diff --git a/toolchain/check/BUILD b/toolchain/check/BUILD index 218bf6a02c21..a26b713b4a9d 100644 --- a/toolchain/check/BUILD +++ b/toolchain/check/BUILD @@ -65,7 +65,6 @@ cc_library( "pattern.cpp", "pattern_match.cpp", "pointer_dereference.cpp", - "require_impls.cpp", "return.cpp", "subst.cpp", "thunk.cpp", @@ -129,7 +128,6 @@ cc_library( "pending_block.h", "pointer_dereference.h", "region_stack.h", - "require_impls.h", "return.h", "subst.h", "thunk.h", diff --git a/toolchain/check/call.cpp b/toolchain/check/call.cpp index ee90a1d4ec80..b41bb8122e4a 100644 --- a/toolchain/check/call.cpp +++ b/toolchain/check/call.cpp @@ -54,7 +54,6 @@ static auto ResolveCalleeInCall(Context& context, SemIR::LocId loc_id, const SemIR::EntityWithParamsBase& entity, EntityKind entity_kind_for_diagnostic, SemIR::SpecificId enclosing_specific_id, - SemIR::InstId self_type_id, SemIR::InstId self_id, llvm::ArrayRef arg_ids) -> std::optional { @@ -86,7 +85,7 @@ static auto ResolveCalleeInCall(Context& context, SemIR::LocId loc_id, auto specific_id = SemIR::SpecificId::None; if (entity.generic_id.has_value()) { specific_id = DeduceGenericCallArguments( - context, loc_id, entity.generic_id, enclosing_specific_id, self_type_id, + context, loc_id, entity.generic_id, enclosing_specific_id, entity.implicit_param_patterns_id, entity.param_patterns_id, self_id, arg_ids); if (!specific_id.has_value()) { @@ -107,7 +106,6 @@ static auto PerformCallToGenericClass(Context& context, SemIR::LocId loc_id, auto callee_specific_id = ResolveCalleeInCall(context, loc_id, generic_class, EntityKind::GenericClass, enclosing_specific_id, - /*self_type_id=*/SemIR::InstId::None, /*self_id=*/SemIR::InstId::None, arg_ids); if (!callee_specific_id) { return SemIR::ErrorInst::InstId; @@ -147,7 +145,6 @@ static auto PerformCallToGenericInterfaceOrNamedConstaint( auto callee_specific_id = ResolveCalleeInCall(context, loc_id, entity, entity_kind_for_diagnostic, enclosing_specific_id, - /*self_type_id=*/SemIR::InstId::None, /*self_id=*/SemIR::InstId::None, arg_ids); if (!callee_specific_id) { return SemIR::ErrorInst::InstId; @@ -221,7 +218,7 @@ auto PerformCallToFunction(Context& context, SemIR::LocId loc_id, auto callee_specific_id = ResolveCalleeInCall( context, loc_id, context.functions().Get(callee_function.function_id), EntityKind::Function, callee_function.enclosing_specific_id, - callee_function.self_type_id, callee_function.self_id, arg_ids); + callee_function.self_id, arg_ids); if (!callee_specific_id) { return SemIR::ErrorInst::InstId; } diff --git a/toolchain/check/context.cpp b/toolchain/check/context.cpp index 2ea44663a898..c8273b5208db 100644 --- a/toolchain/check/context.cpp +++ b/toolchain/check/context.cpp @@ -31,6 +31,7 @@ Context::Context(DiagnosticEmitterBase* emitter, decl_name_stack_(this), scope_stack_(sem_ir_), deferred_definition_worklist_(vlog_stream), + generic_region_stack_(vlog_stream), vtable_stack_("vtable_stack_", *sem_ir, vlog_stream), check_ir_map_(CheckIRToImpportIRStore::MakeWithExplicitSize( total_ir_count_, SemIR::ImportIRId::None)), diff --git a/toolchain/check/custom_witness.cpp b/toolchain/check/custom_witness.cpp index 8e0d583ceb03..7814a6fcfed2 100644 --- a/toolchain/check/custom_witness.cpp +++ b/toolchain/check/custom_witness.cpp @@ -5,12 +5,15 @@ #include "toolchain/check/custom_witness.h" #include "toolchain/base/kind_switch.h" +#include "toolchain/check/facet_type.h" #include "toolchain/check/function.h" +#include "toolchain/check/generic.h" #include "toolchain/check/impl.h" #include "toolchain/check/import_ref.h" #include "toolchain/check/inst.h" #include "toolchain/check/name_lookup.h" #include "toolchain/check/type.h" +#include "toolchain/sem_ir/ids.h" #include "toolchain/sem_ir/typed_insts.h" namespace Carbon::Check { @@ -47,6 +50,70 @@ static auto MakeNoOpFunction(Context& context, SemIR::LocId loc_id, {.self_type_id = self_type_id}); } +static auto MakeCustomWitnessConstantInst( + Context& context, SemIR::LocId loc_id, + SemIR::SpecificInterfaceId query_specific_interface_id, + SemIR::InstBlockId associated_entities_block_id) -> SemIR::InstId { + // The witness is a CustomWitness of the query interface with a table that + // contains each associated entity. + auto const_id = EvalOrAddInst( + context, loc_id, + {.type_id = GetSingletonType(context, SemIR::WitnessType::TypeInstId), + .elements_id = associated_entities_block_id, + .query_specific_interface_id = query_specific_interface_id}); + return context.constant_values().GetInstId(const_id); +} + +struct TypesForSelfFacet { + // A FacetType that contains only the query interface. + SemIR::TypeId facet_type_for_query_specific_interface; + // The query self as a type, which involves a conversion if it was a facet. + SemIR::TypeId query_self_as_type_id; +}; + +static auto GetTypesForSelfFacet( + Context& context, SemIR::LocId loc_id, + SemIR::ConstantId query_self_const_id, + SemIR::SpecificInterfaceId query_specific_interface_id) + -> TypesForSelfFacet { + const auto query_specific_interface = + context.specific_interfaces().Get(query_specific_interface_id); + + // The Self facet will have type FacetType, for the query interface. + auto facet_type_for_query_specific_interface = + context.types().GetTypeIdForTypeConstantId( + EvalOrAddInst( + context, loc_id, + FacetTypeFromInterface(context, + query_specific_interface.interface_id, + query_specific_interface.specific_id))); + // The Self facet needs to point to a type value. If it's not one already, + // convert to type. + auto query_self_as_type_id = GetFacetAsType(context, query_self_const_id); + return {facet_type_for_query_specific_interface, query_self_as_type_id}; +} + +// Build a new facet from the query self, using a CustomWitness for the query +// interface with an entry for each associated entity so far. +static auto MakeSelfFacetWithCustomWitness( + Context& context, SemIR::LocId loc_id, TypesForSelfFacet query_types, + SemIR::SpecificInterfaceId query_specific_interface_id, + SemIR::InstBlockId associated_entities_block_id) -> SemIR::ConstantId { + // We are building a facet value for a single interface, so the witness block + // is a single witness for that interface. + auto witnesses_block_id = + context.inst_blocks().Add({MakeCustomWitnessConstantInst( + context, loc_id, query_specific_interface_id, + associated_entities_block_id)}); + + return EvalOrAddInst( + context, loc_id, + {.type_id = query_types.facet_type_for_query_specific_interface, + .type_inst_id = + context.types().GetTypeInstId(query_types.query_self_as_type_id), + .witnesses_block_id = witnesses_block_id}); +} + auto BuildCustomWitness(Context& context, SemIR::LocId loc_id, SemIR::ConstantId query_self_const_id, SemIR::SpecificInterfaceId query_specific_interface_id, @@ -64,32 +131,34 @@ auto BuildCustomWitness(Context& context, SemIR::LocId loc_id, return SemIR::ErrorInst::InstId; } - llvm::SmallVector entries; + auto query_types_for_self_facet = GetTypesForSelfFacet( + context, loc_id, query_self_const_id, query_specific_interface_id); - // Build a witness with the current contents of the witness table. This will - // grow as we progress through the impl. In theory this will build O(n^2) - // table entries, but in practice n <= 2, so that's OK. - // - // This is necessary because later associated entities may refer to earlier - // associated entities in their signatures. In particular, an associated - // result type may be used as the return type of an associated function. - auto make_witness = [&] { - return context.constant_values().GetInstId( - EvalOrAddInst( - context, loc_id, - {.type_id = - GetSingletonType(context, SemIR::WitnessType::TypeInstId), - .elements_id = context.inst_blocks().Add(entries), - .query_specific_interface_id = query_specific_interface_id})); - }; + // The values that will go in the witness table. + llvm::SmallVector entries; // Fill in the witness table. for (const auto& [assoc_entity_id, value_id] : llvm::zip_equal(assoc_entities, values)) { LoadImportRef(context, assoc_entity_id); + + // Build a witness with the current contents of the witness table. This will + // grow as we progress through the impl. In theory this will build O(n^2) + // table entries, but in practice n <= 2, so that's OK. + // + // This is necessary because later associated entities may refer to earlier + // associated entities in their signatures. In particular, an associated + // result type may be used as the return type of an associated function. + auto self_facet = MakeSelfFacetWithCustomWitness( + context, loc_id, query_types_for_self_facet, + query_specific_interface_id, context.inst_blocks().Add(entries)); + auto interface_with_self_specific_id = MakeSpecificWithInnerSelf( + context, loc_id, interface.generic_id, interface.generic_with_self_id, + query_specific_interface.specific_id, self_facet); + auto decl_id = context.constant_values().GetInstId(SemIR::GetConstantValueInSpecific( - context.sem_ir(), query_specific_interface.specific_id, + context.sem_ir(), interface_with_self_specific_id, assoc_entity_id)); CARBON_CHECK(decl_id.has_value(), "Non-constant associated entity"); auto decl = context.insts().Get(decl_id); @@ -98,17 +167,13 @@ auto BuildCustomWitness(Context& context, SemIR::LocId loc_id, if (struct_value.type_id == SemIR::ErrorInst::TypeId) { return SemIR::ErrorInst::InstId; } - auto self_type_id = GetFacetAsType(context, query_self_const_id); // TODO: If a thunk is needed, this will build a different value each // time it's called, so we won't properly deduplicate repeated // witnesses. - // TODO: Skip calling make_witness if this function signature doesn't - // involve `Self`. entries.push_back(CheckAssociatedFunctionImplementation( context, context.types().GetAs(struct_value.type_id), - query_specific_interface.specific_id, value_id, self_type_id, - make_witness(), + query_specific_interface.specific_id, value_id, /*defer_thunk_definition=*/false)); break; } @@ -131,7 +196,9 @@ auto BuildCustomWitness(Context& context, SemIR::LocId loc_id, CARBON_CHECK(entries.size() <= 1, "TODO: Support multiple associated functions"); - return make_witness(); + return MakeCustomWitnessConstantInst(context, loc_id, + query_specific_interface_id, + context.inst_blocks().Add(entries)); } auto GetCoreInterface(Context& context, SemIR::InterfaceId interface_id) diff --git a/toolchain/check/decl_name_stack.cpp b/toolchain/check/decl_name_stack.cpp index cc60112b0c5e..05915e561569 100644 --- a/toolchain/check/decl_name_stack.cpp +++ b/toolchain/check/decl_name_stack.cpp @@ -17,6 +17,7 @@ #include "toolchain/diagnostics/diagnostic.h" #include "toolchain/sem_ir/ids.h" #include "toolchain/sem_ir/name_scope.h" +#include "toolchain/sem_ir/typed_insts.h" namespace Carbon::Check { @@ -204,15 +205,47 @@ auto DeclNameStack::LookupOrAddName(NameContext name_context, return SemIR::ScopeLookupResult::MakeNotFound(); } +// Get the name scope and generic to use for associated entities in `scope`. +// Typically this is None, in which case the input scope should be used, but +// some entities have a separate generic and inner scope used for associated +// entities. +static auto GetAssociatedEntityScope(Context& context, + const SemIR::NameScope& scope) + -> std::pair { + auto scope_inst = context.insts().Get(scope.inst_id()); + CARBON_KIND_SWITCH(scope_inst) { + case CARBON_KIND(SemIR::InterfaceDecl interface_decl): { + const auto& interface = + context.interfaces().Get(interface_decl.interface_id); + return {interface.scope_with_self_id, interface.generic_with_self_id}; + } + case CARBON_KIND(SemIR::InterfaceWithSelfDecl _): { + CARBON_FATAL("Expected InterfaceDecl as qualifier scope"); + } + case CARBON_KIND(SemIR::NamedConstraintDecl _): { + // ResolveAsScope() does not allow named constraints as a scope qualifier. + CARBON_FATAL( + "Did not expect to find named constraint as scope qualifier"); + } + case CARBON_KIND(SemIR::NamedConstraintWithSelfDecl _): { + CARBON_FATAL("Expected NamedConstraintDecl as qualifier scope"); + } + default: + return {SemIR::NameScopeId::None, SemIR::GenericId::None}; + } +} + // Push a scope corresponding to a name qualifier. For example, for // `fn Class(T:! type).F(n: i32)` we will push the scope for `Class(T:! type)` // between the scope containing the declaration of `T` and the scope // containing the declaration of `n`. +// +// Returns the NameScopeId to use as the parent scope of the next name. static auto PushNameQualifierScope(Context& context, SemIR::LocId loc_id, - SemIR::InstId scope_inst_id, SemIR::NameScopeId scope_id, SemIR::GenericId generic_id, - bool has_error = false) -> void { + bool has_error = false) + -> SemIR::NameScopeId { // If the qualifier has no parameters, we don't need to keep around a // parameter scope. context.scope_stack().PopIfEmpty(); @@ -233,20 +266,35 @@ static auto PushNameQualifierScope(Context& context, SemIR::LocId loc_id, // providing the definition. StartGenericDecl(context); - context.scope_stack().PushForEntity(scope_inst_id, scope_id, self_specific_id, - has_error); + const auto& scope = context.name_scopes().Get(scope_id); + context.scope_stack().PushForEntity(scope.inst_id(), scope_id, + self_specific_id, has_error); - // An interface also introduces its 'Self' parameter into scope, despite it - // not being redeclared as part of the qualifier. - if (auto interface_decl = - context.insts().TryGetAs(scope_inst_id)) { - auto& interface = context.interfaces().Get(interface_decl->interface_id); + auto [assoc_entity_scope_id, assoc_entity_generic_id] = + GetAssociatedEntityScope(context, scope); + + if (assoc_entity_scope_id.has_value()) { + const auto& assoc_entity_scope = + context.name_scopes().Get(assoc_entity_scope_id); + // InterfaceDecl is the only inst that can be a scope qualifier and that has + // an associated entity scope, the InterfaceWithSelfDecl. + auto interface_decl = context.insts().GetAs( + assoc_entity_scope.inst_id()); + auto& interface = context.interfaces().Get(interface_decl.interface_id); + // An interface also introduces its 'Self' parameter into the associated + // entity scope, despite it not being redeclared as part of the qualifier. context.scope_stack().AddCompileTimeBinding(); context.scope_stack().PushCompileTimeBinding(interface.self_param_id); + // Move into the interface-with-self scope. + context.scope_stack().PushForEntity( + assoc_entity_scope.inst_id(), assoc_entity_scope_id, + context.generics().GetSelfSpecific(assoc_entity_generic_id), has_error); } // Enter a parameter scope in case the qualified name itself has parameters. context.scope_stack().PushForSameRegion(); + + return assoc_entity_scope_id.has_value() ? assoc_entity_scope_id : scope_id; } auto DeclNameStack::ApplyNameQualifier(const NameComponent& name) -> void { @@ -257,10 +305,9 @@ auto DeclNameStack::ApplyNameQualifier(const NameComponent& name) -> void { // Resolve the qualifier as a scope and enter the new scope. auto [scope_id, generic_id] = ResolveAsScope(name_context, name); if (scope_id.has_value()) { - PushNameQualifierScope(*context_, name_context.loc_id, - name_context.resolved_inst_id, scope_id, generic_id, - context_->name_scopes().Get(scope_id).has_error()); - name_context.parent_scope_id = scope_id; + name_context.parent_scope_id = PushNameQualifierScope( + *context_, name_context.loc_id, scope_id, generic_id, + context_->name_scopes().Get(scope_id).has_error()); } else { name_context.state = NameContext::State::Error; } @@ -435,7 +482,11 @@ auto DeclNameStack::ResolveAsScope(const NameContext& name_context, name_context.resolved_inst_id); return InvalidResult; } - return {interface_info.scope_id, interface_info.generic_id}; + // The scope and generic of an `I(T:! type)` is the outer + // interface-without-self. That is the generic where parameters appear. + // However when moving to the next qualifier, we need to move to the + // interface-with-self for the associated entity name. + return {interface_info.scope_without_self_id, interface_info.generic_id}; } case CARBON_KIND(SemIR::Namespace resolved_inst): { auto scope_id = resolved_inst.name_scope_id; diff --git a/toolchain/check/deduce.cpp b/toolchain/check/deduce.cpp index 2c010667f2fa..5b14651fbb26 100644 --- a/toolchain/check/deduce.cpp +++ b/toolchain/check/deduce.cpp @@ -160,8 +160,7 @@ class DeductionContext { // not be deduced. `context` must not be null. DeductionContext(Context* context, SemIR::LocId loc_id, SemIR::GenericId generic_id, - SemIR::SpecificId enclosing_specific_id, - SemIR::InstId self_type_id, bool diagnose); + SemIR::SpecificId enclosing_specific_id, bool diagnose); auto context() const -> Context& { return *context_; } @@ -231,7 +230,7 @@ static auto NoteGenericHere(Context& context, SemIR::GenericId generic_id, DeductionContext::DeductionContext(Context* context, SemIR::LocId loc_id, SemIR::GenericId generic_id, SemIR::SpecificId enclosing_specific_id, - SemIR::InstId self_type_id, bool diagnose) + bool diagnose) : context_(context), loc_id_(loc_id), generic_id_(generic_id), @@ -266,16 +265,6 @@ DeductionContext::DeductionContext(Context* context, SemIR::LocId loc_id, first_deduced_index_ = SemIR::CompileTimeBindIndex(args.size()); } - if (self_type_id.has_value()) { - // Copy the provided `Self` type as the value of the next binding. - auto self_index = first_deduced_index_; - result_arg_ids_[self_index.index] = self_type_id; - substitutions_.push_back( - {.bind_id = SemIR::CompileTimeBindIndex(self_index), - .replacement_id = context->constant_values().Get(self_type_id)}); - first_deduced_index_ = SemIR::CompileTimeBindIndex(self_index.index + 1); - } - non_deduced_indexes_.resize(result_arg_ids_.size() - first_deduced_index_.index); } @@ -578,13 +567,13 @@ auto DeductionContext::MakeSpecific() -> SemIR::SpecificId { auto DeduceGenericCallArguments( Context& context, SemIR::LocId loc_id, SemIR::GenericId generic_id, - SemIR::SpecificId enclosing_specific_id, SemIR::InstId self_type_id, + SemIR::SpecificId enclosing_specific_id, [[maybe_unused]] SemIR::InstBlockId implicit_param_patterns_id, SemIR::InstBlockId param_patterns_id, [[maybe_unused]] SemIR::InstId self_id, llvm::ArrayRef arg_ids) -> SemIR::SpecificId { DeductionContext deduction(&context, loc_id, generic_id, - enclosing_specific_id, self_type_id, + enclosing_specific_id, /*diagnose=*/true); // Prepare to perform deduction of the explicit parameters against their @@ -605,7 +594,6 @@ auto DeduceImplArguments(Context& context, SemIR::LocId loc_id, -> SemIR::SpecificId { DeductionContext deduction(&context, loc_id, impl.generic_id, /*enclosing_specific_id=*/SemIR::SpecificId::None, - /*self_type_id=*/SemIR::InstId::None, /*diagnose=*/false); // Prepare to perform deduction of the type and interface. Use the canonical diff --git a/toolchain/check/deduce.h b/toolchain/check/deduce.h index 2b957d3c6c58..a8bd70a17688 100644 --- a/toolchain/check/deduce.h +++ b/toolchain/check/deduce.h @@ -11,12 +11,14 @@ namespace Carbon::Check { // Deduces the generic arguments to use in a call to a generic. -auto DeduceGenericCallArguments( - Context& context, SemIR::LocId loc_id, SemIR::GenericId generic_id, - SemIR::SpecificId enclosing_specific_id, SemIR::InstId self_type_id, - SemIR::InstBlockId implicit_param_patterns_id, - SemIR::InstBlockId param_patterns_id, SemIR::InstId self_id, - llvm::ArrayRef arg_ids) -> SemIR::SpecificId; +auto DeduceGenericCallArguments(Context& context, SemIR::LocId loc_id, + SemIR::GenericId generic_id, + SemIR::SpecificId enclosing_specific_id, + SemIR::InstBlockId implicit_param_patterns_id, + SemIR::InstBlockId param_patterns_id, + SemIR::InstId self_id, + llvm::ArrayRef arg_ids) + -> SemIR::SpecificId; // Deduces the impl arguments to use in a use of a parameterized impl. Returns // `None` if deduction fails. diff --git a/toolchain/check/eval.h b/toolchain/check/eval.h index 2be1e5f4b01c..8dd13d52f4b9 100644 --- a/toolchain/check/eval.h +++ b/toolchain/check/eval.h @@ -52,6 +52,8 @@ auto TryEvalInst(Context& context, InstT inst) -> SemIR::ConstantId { // Evaluates the eval block for a region of a specific. Produces a block // containing the evaluated constant values of the instructions in the eval // block. +// +// TODO: Return whether any of the instructions produced contain an ErrorInst. auto TryEvalBlockForSpecific(Context& context, SemIR::LocId loc_id, SemIR::SpecificId specific_id, SemIR::GenericInstIndex::Region region) diff --git a/toolchain/check/facet_type.cpp b/toolchain/check/facet_type.cpp index 3abbed478770..620fd21783fa 100644 --- a/toolchain/check/facet_type.cpp +++ b/toolchain/check/facet_type.cpp @@ -18,6 +18,7 @@ #include "toolchain/check/subst.h" #include "toolchain/check/type.h" #include "toolchain/check/type_completion.h" +#include "toolchain/sem_ir/generic.h" #include "toolchain/sem_ir/ids.h" #include "toolchain/sem_ir/typed_insts.h" @@ -446,4 +447,25 @@ auto GetConstantFacetValueForType(Context& context, .witnesses_block_id = SemIR::InstBlockId::Empty}); } +auto GetConstantFacetValueForTypeAndInterface( + Context& context, SemIR::TypeInstId type_inst_id, + SemIR::SpecificInterface specific_interface, SemIR::InstId witness_id) + -> SemIR::ConstantId { + // Get the type of the inner `Self`, which is the facet type of the interface. + auto interface_facet_type = EvalOrAddInst( + context, SemIR::LocId::None, + FacetTypeFromInterface(context, specific_interface.interface_id, + specific_interface.specific_id)); + auto self_facet_type_in_generic_without_self = + context.types().GetTypeIdForTypeConstantId(interface_facet_type); + + auto witnesses_block_id = context.inst_blocks().AddCanonical({witness_id}); + auto self_value_const_id = EvalOrAddInst( + context, SemIR::LocId::None, + {.type_id = self_facet_type_in_generic_without_self, + .type_inst_id = type_inst_id, + .witnesses_block_id = witnesses_block_id}); + return self_value_const_id; +} + } // namespace Carbon::Check diff --git a/toolchain/check/facet_type.h b/toolchain/check/facet_type.h index f8e1910a6f75..1d13fcaeee69 100644 --- a/toolchain/check/facet_type.h +++ b/toolchain/check/facet_type.h @@ -15,9 +15,6 @@ namespace Carbon::Check { // Create a FacetType typed instruction object consisting of a interface. The // `specific_id` specifies arguments in the case the interface is generic. -// -// The resulting FacetType may contain multiple interfaces if the named -// interface contains `require` declarations. auto FacetTypeFromInterface(Context& context, SemIR::InterfaceId interface_id, SemIR::SpecificId specific_id) -> SemIR::FacetType; @@ -85,6 +82,11 @@ auto GetConstantFacetValueForType(Context& context, SemIR::TypeInstId type_inst_id) -> SemIR::ConstantId; +auto GetConstantFacetValueForTypeAndInterface( + Context& context, SemIR::TypeInstId type_inst_id, + SemIR::SpecificInterface specific_interface, SemIR::InstId witness_id) + -> SemIR::ConstantId; + } // namespace Carbon::Check #endif // CARBON_TOOLCHAIN_CHECK_FACET_TYPE_H_ diff --git a/toolchain/check/generic.cpp b/toolchain/check/generic.cpp index fe1edcc88b12..a2523a9be13a 100644 --- a/toolchain/check/generic.cpp +++ b/toolchain/check/generic.cpp @@ -654,6 +654,8 @@ auto ResolveSpecificDecl(Context& context, SemIR::LocId loc_id, // recursively resolve the same specific. specific.decl_block_id = SemIR::InstBlockId::Empty; + // TODO: Store in the specific whether the declaration contains any + // ErrorInst values. specific.decl_block_id = TryEvalBlockForSpecific(context, loc_id, specific_id, SemIR::GenericInstIndex::Region::Declaration); @@ -720,6 +722,8 @@ auto ResolveSpecificDefinition(Context& context, SemIR::LocId loc_id, // The generic is not defined yet. return false; } + // TODO: Store in the specific whether the definition contains any ErrorInst + // values. specific.definition_block_id = TryEvalBlockForSpecific( context, loc_id, specific_id, SemIR::GenericInstIndex::Definition); } @@ -739,4 +743,140 @@ auto DiagnoseIfGenericMissingExplicitParameters( GenericMissingExplicitParameters); } +static auto ValidateGenericWithoutAndWithSelfMatch( + Context& context, SemIR::GenericId generic_without_self_id, + SemIR::GenericId generic_with_self_id, + SemIR::SpecificId specific_without_self_id) -> void { + CARBON_CHECK( + generic_without_self_id.has_value() == + specific_without_self_id.has_value(), + "Have a generic-without-self {0} but no specific-without-self {1} or " + "vice-versa", + generic_without_self_id, specific_without_self_id); + + CARBON_CHECK( + generic_with_self_id.has_value(), + "Missing a generic ID for generic-with-self that should always exist."); + const auto& generic_with_self = context.generics().Get(generic_with_self_id); + + auto generic_with_self_decl = context.insts().Get(generic_with_self.decl_id); + CARBON_CHECK( + (generic_with_self_decl.IsOneOf()), + "generic-with-self {0} should be a generic for an " + "InterfaceWithSelfDecl or NamedConstraintWithSelfDecl, found {1}", + generic_with_self, generic_with_self_decl); + + if (!generic_without_self_id.has_value()) { + return; + } + + const auto& generic_without_self = + context.generics().Get(generic_without_self_id); + const auto& specific_without_self = + context.specifics().Get(specific_without_self_id); + + CARBON_CHECK(specific_without_self.generic_id == generic_without_self_id, + "specific-without-self {0} is not a specific for the " + "generic-without-self {1}", + specific_without_self, generic_without_self); + + auto generic_without_self_decl = + context.insts().Get(generic_without_self.decl_id); + + CARBON_KIND_SWITCH(generic_without_self_decl) { + case CARBON_KIND(SemIR::InterfaceDecl without_self_decl): { + auto with_self_decl = + generic_with_self_decl.As(); + CARBON_CHECK( + without_self_decl.interface_id == with_self_decl.interface_id, + "Found generic-without-self for interface {0}, and generic-with-self " + "for interface {1}; expected the same interface for both", + context.interfaces().Get(without_self_decl.interface_id), + context.interfaces().Get(with_self_decl.interface_id)); + break; + } + case CARBON_KIND(SemIR::NamedConstraintDecl without_self_decl): { + auto with_self_decl = + generic_with_self_decl.As(); + CARBON_CHECK( + without_self_decl.named_constraint_id == + with_self_decl.named_constraint_id, + "Found generic-without-self for constraint {0}, and " + "generic-with-self for named constraint {1}; expected the same named " + "constraint for both", + context.named_constraints().Get( + without_self_decl.named_constraint_id), + context.named_constraints().Get(with_self_decl.named_constraint_id)); + break; + } + default: + CARBON_FATAL( + "generic-without-self {0} should be a generic for an InterfaceDecl " + "or NamedConstraintDecl, found {1}", + generic_without_self, generic_without_self_decl); + } +} + +auto MakeSpecificWithInnerSelf(Context& context, SemIR::LocId loc_id, + SemIR::GenericId generic_without_self_id, + SemIR::GenericId generic_with_self_id, + SemIR::SpecificId specific_without_self_id, + SemIR::ConstantId self_facet) + -> SemIR::SpecificId { + ValidateGenericWithoutAndWithSelfMatch(context, generic_without_self_id, + generic_with_self_id, + specific_without_self_id); + + auto outer_args_id = + context.specifics().GetArgsOrEmpty(specific_without_self_id); + auto outer_args = context.inst_blocks().Get(outer_args_id); + + llvm::SmallVector args; + args.reserve(outer_args.size() + 1); + llvm::append_range(args, outer_args); + + if (self_facet == SemIR::ErrorInst::ConstantId) { + args.push_back(SemIR::ErrorInst::InstId); + } else { + auto self_facet_inst_id = context.constant_values().GetInstId(self_facet); + CARBON_CHECK(context.types().Is( + context.insts().Get(self_facet_inst_id).type_id())); + args.push_back(self_facet_inst_id); + } + + auto specific_id = MakeSpecific(context, loc_id, generic_with_self_id, args); + ResolveSpecificDefinition(context, loc_id, specific_id); + return specific_id; +} + +auto CopySpecificToGeneric(Context& context, SemIR::LocId loc_id, + SemIR::SpecificId specific_id, + SemIR::GenericId target_generic_id) + -> SemIR::SpecificId { + if (!specific_id.has_value()) { + const auto& target_generic = context.generics().Get(target_generic_id); + auto target_bindings = + context.inst_blocks().Get(target_generic.bindings_id); + CARBON_CHECK(target_bindings.empty()); + return SemIR::SpecificId::None; + } + + const auto& specific = context.specifics().Get(specific_id); + auto source_generic_id = specific.generic_id; + + const auto& source_generic = context.generics().Get(source_generic_id); + const auto& target_generic = context.generics().Get(target_generic_id); + auto source_bindings = context.inst_blocks().Get(source_generic.bindings_id); + auto target_bindings = context.inst_blocks().Get(target_generic.bindings_id); + for (auto [source, target] : + llvm::zip_equal(source_bindings, target_bindings)) { + CARBON_CHECK(context.constant_values().Get(source) == + context.constant_values().Get(target)); + } + + auto args_id = context.specifics().GetArgsOrEmpty(specific_id); + return MakeSpecific(context, loc_id, target_generic_id, args_id); +} + } // namespace Carbon::Check diff --git a/toolchain/check/generic.h b/toolchain/check/generic.h index 3d477eae7452..65f1dc382f35 100644 --- a/toolchain/check/generic.h +++ b/toolchain/check/generic.h @@ -125,6 +125,49 @@ auto ResolveSpecificDefinition(Context& context, SemIR::LocId loc_id, auto DiagnoseIfGenericMissingExplicitParameters( Context& context, const SemIR::EntityWithParamsBase& entity_base) -> void; +// Given a generic and specific for an entity, construct the specific for the +// inner generic-with-self. +// +// Interfaces and named constraints each have two generics. +// * A regular outward facing generic which includes just the generic bindings +// as written in the declaration. +// * An inner generic-with-self which includes an additional generic binding of +// the `Self` facet value. Associated entities are located inside this inner +// generic-with-self. +// +// This function moves from a specific for the outer generic to a specific for +// the inner generic-with-self. An entity which has no generic bindings will +// have no outer generic-without-self and thus no specific-without-self, but +// there is always an inner generic-with-self regardless, because of the +// additional `Self` binding. +// +// If the generic-without-self has its definition completed, the resulting +// specific will also. Note that during construction of an interface/constraint, +// the definition cannot be complete yet. +// +// TODO: This should take a `diagnoser` parameter which is passed through to +// MakeSpecific() and TryEvalBlockForSpecific(), so that monomorphization errors +// get diagnosed to the correct semantic operation, instead of just to specific +// instantiation. +auto MakeSpecificWithInnerSelf(Context& context, SemIR::LocId loc_id, + SemIR::GenericId generic_without_self_id, + SemIR::GenericId generic_with_self_id, + SemIR::SpecificId specific_without_self_id, + SemIR::ConstantId self_facet) + -> SemIR::SpecificId; + +// Copy the arguments of a specific into the context of another generic. The +// target generic must have the exact same bindings as the specific's generic. +// +// TODO: This should take a `diagnoser` parameter which is passed through to +// MakeSpecific() and TryEvalBlockForSpecific(), so that monomorphization errors +// get diagnosed to the correct semantic operation, instead of just to specific +// instantiation. +auto CopySpecificToGeneric(Context& context, SemIR::LocId loc_id, + SemIR::SpecificId specific_id, + SemIR::GenericId target_generic_id) + -> SemIR::SpecificId; + } // namespace Carbon::Check #endif // CARBON_TOOLCHAIN_CHECK_GENERIC_H_ diff --git a/toolchain/check/generic_region_stack.cpp b/toolchain/check/generic_region_stack.cpp index be06694f0f63..f82e9cfbb672 100644 --- a/toolchain/check/generic_region_stack.cpp +++ b/toolchain/check/generic_region_stack.cpp @@ -4,9 +4,13 @@ #include "toolchain/check/generic_region_stack.h" +#include "common/vlog.h" + namespace Carbon::Check { auto GenericRegionStack::Push(PendingGeneric generic) -> void { + CARBON_VLOG("GenericRegion Push: {0} {1}\n", generic.generic_id, + generic.region); pending_generic_ids_.push_back(generic); pending_eval_block_stack_.PushArray(); dependent_inst_stack_.PushArray(); @@ -14,7 +18,9 @@ auto GenericRegionStack::Push(PendingGeneric generic) -> void { } auto GenericRegionStack::Pop() -> void { - pending_generic_ids_.pop_back(); + auto pending = pending_generic_ids_.pop_back_val(); + CARBON_VLOG("GenericRegion Pop: {0} {1}\n", pending.generic_id, + pending.region); pending_eval_block_stack_.PopArray(); dependent_inst_stack_.PopArray(); constants_in_generic_stack_.pop_back(); diff --git a/toolchain/check/generic_region_stack.h b/toolchain/check/generic_region_stack.h index a3d380cd2b0b..ac55457da862 100644 --- a/toolchain/check/generic_region_stack.h +++ b/toolchain/check/generic_region_stack.h @@ -31,7 +31,8 @@ using ConstantsInGenericMap = Map; // `var x: C(i32, 0) = {.x = 0};` also substitutes into the definition. class GenericRegionStack { public: - GenericRegionStack() { + explicit GenericRegionStack(llvm::raw_ostream* vlog_stream) + : vlog_stream_(vlog_stream) { // Reserve a large enough stack that we typically won't need to reallocate. constants_in_generic_stack_.reserve(4); } @@ -106,6 +107,9 @@ class GenericRegionStack { } private: + // Whether to print verbose output. + llvm::raw_ostream* vlog_stream_; + // The IDs of pending generics. llvm::SmallVector pending_generic_ids_; diff --git a/toolchain/check/handle_binding_pattern.cpp b/toolchain/check/handle_binding_pattern.cpp index b78dfe7742be..cf278c716700 100644 --- a/toolchain/check/handle_binding_pattern.cpp +++ b/toolchain/check/handle_binding_pattern.cpp @@ -382,7 +382,6 @@ auto HandleParseNode(Context& context, {.name_id = name_id, .parent_scope_id = context.scope_stack().PeekNameScopeId(), .decl_id = decl_id, - .generic_id = SemIR::GenericId::None, .default_value_id = SemIR::InstId::None}); ReplaceInstBeforeConstantUse(context, decl_id, assoc_const_decl); @@ -398,7 +397,7 @@ auto HandleParseNode(Context& context, Parse::FieldNameAndTypeId node_id) auto [name_node, name_id] = context.node_stack().PopNameWithNodeId(); auto parent_class_decl = - context.scope_stack().GetCurrentScopeAs(); + context.scope_stack().TryGetCurrentScopeAs(); CARBON_CHECK(parent_class_decl); cast_type_id = AsConcreteType( context, cast_type_id, type_node, diff --git a/toolchain/check/handle_class.cpp b/toolchain/check/handle_class.cpp index 06cd8b7241fc..bdd49be9e65a 100644 --- a/toolchain/check/handle_class.cpp +++ b/toolchain/check/handle_class.cpp @@ -318,7 +318,7 @@ static auto GetCurrentScopeAsClassOrDiagnose(Context& context, Lex::TokenKind tok) -> std::optional { auto class_scope = - context.scope_stack().GetCurrentScopeAs(); + context.scope_stack().TryGetCurrentScopeAs(); if (!class_scope) { DiagnoseClassSpecificDeclOutsideClass(context, loc_id, tok); } diff --git a/toolchain/check/handle_function.cpp b/toolchain/check/handle_function.cpp index 8dec402db93e..d061b2f7c60a 100644 --- a/toolchain/check/handle_function.cpp +++ b/toolchain/check/handle_function.cpp @@ -86,6 +86,7 @@ static auto DiagnoseModifiers(Context& context, Parse::AnyFunctionDeclId node_id, DeclIntroducerState& introducer, bool is_definition, + SemIR::NameScopeId parent_scope_id, SemIR::InstId parent_scope_inst_id, std::optional parent_scope_inst, SemIR::InstId self_param_id) -> void { @@ -99,7 +100,7 @@ static auto DiagnoseModifiers(Context& context, is_definition); CheckMethodModifiersOnFunction(context, introducer, parent_scope_inst_id, parent_scope_inst); - RequireDefaultFinalOnlyInInterfaces(context, introducer, parent_scope_inst); + RequireDefaultFinalOnlyInInterfaces(context, introducer, parent_scope_id); if (introducer.modifier_set.HasAnyOf(KeywordModifierSet::Interface)) { // TODO: Once we are saving the modifiers for a function, add check that @@ -266,11 +267,11 @@ static auto TryMergeRedecl(Context& context, Parse::AnyFunctionDeclId node_id, } // Adds the declaration to name lookup when appropriate. -static auto MaybeAddToNameLookup( - Context& context, const DeclNameStack::NameContext& name_context, - const KeywordModifierSet& modifier_set, - const std::optional& parent_scope_inst, SemIR::InstId decl_id) - -> void { +static auto MaybeAddToNameLookup(Context& context, + const DeclNameStack::NameContext& name_context, + const KeywordModifierSet& modifier_set, + SemIR::NameScopeId parent_scope_id, + SemIR::InstId decl_id) -> void { if (name_context.state == DeclNameStack::NameContext::State::Poisoned || name_context.prev_inst_id().has_value()) { return; @@ -279,11 +280,13 @@ static auto MaybeAddToNameLookup( // At interface scope, a function declaration introduces an associated // function. auto lookup_result_id = decl_id; - if (parent_scope_inst && !name_context.has_qualifiers) { - if (auto interface_scope = - parent_scope_inst->TryAs()) { - lookup_result_id = BuildAssociatedEntity( - context, interface_scope->interface_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()); + lookup_result_id = + BuildAssociatedEntity(context, interface_decl.interface_id, decl_id); } } @@ -522,7 +525,8 @@ static auto BuildFunctionDecl(Context& context, auto introducer = context.decl_introducer_state_stack().Pop(); DiagnoseModifiers(context, node_id, introducer, is_definition, - parent_scope_inst_id, parent_scope_inst, self_param_id); + name_context.parent_scope_id, parent_scope_inst_id, + parent_scope_inst, self_param_id); bool is_extern = introducer.modifier_set.HasAnyOf(KeywordModifierSet::Extern); auto virtual_modifier = GetVirtualModifier(introducer.modifier_set); auto evaluation_mode = GetEvaluationMode(introducer.modifier_set); @@ -591,7 +595,7 @@ static auto BuildFunctionDecl(Context& context, // Add to name lookup if needed, now that the decl is built. MaybeAddToNameLookup(context, name_context, introducer.modifier_set, - parent_scope_inst, decl_id); + name_context.parent_scope_id, decl_id); ValidateForEntryPoint(context, node_id, function_decl.function_id, function_info); diff --git a/toolchain/check/handle_interface.cpp b/toolchain/check/handle_interface.cpp index 62e2e891b1e3..5491a2c9ff3b 100644 --- a/toolchain/check/handle_interface.cpp +++ b/toolchain/check/handle_interface.cpp @@ -117,35 +117,77 @@ auto HandleParseNode(Context& context, CARBON_CHECK(!interface_info.has_definition_started(), "Can't merge with defined interfaces."); interface_info.definition_id = decl_inst_id; - interface_info.scope_id = context.name_scopes().Add( + interface_info.scope_without_self_id = context.name_scopes().Add( decl_inst_id, SemIR::NameId::None, interface_info.parent_scope_id); + + // Start the definition of interface-without-self. + StartGenericDefinition(context, interface_info.generic_id); + + context.inst_block_stack().Push(); + + // Enter the interface-without-self scope, which is used for the Self + // instruction, since it needs to reference the interface (without-self) + // generic. Self can't reference the interface-with-self generic since it's a + // parameter to the generic. + context.scope_stack().PushForEntity( + decl_inst_id, interface_info.scope_without_self_id, + context.generics().GetSelfSpecific(interface_info.generic_id)); + + // Declare and introduce `Self`. We model `Self` as a symbolic binding whose + // type is the interface, excluding any other interfaces mentioned by + // `require` declarations. + // + // This is an instruction in the interface-without-self so that we can apply a + // SpecificInterface to it, and get the inner `Self` as modified by any + // enclosing specific. + SemIR::TypeId self_type_id = GetInterfaceType( + context, interface_id, + context.generics().GetSelfSpecific(interface_info.generic_id)); + interface_info.self_param_id = AddSelfSymbolicBindingToScope( + context, node_id, self_type_id, interface_info.scope_without_self_id, + /*is_template=*/false); + + // Start the declaration of interface-with-self. + StartGenericDecl(context); + + // Push `Self` as a parameter of the interface-with-self. + context.scope_stack().PushCompileTimeBinding(interface_info.self_param_id); + + // Add the interface-with-self declaration and build the generic for it. This + // captures the `interface_info.self_param_id` as a parameter of the generic. + auto interface_with_self_decl = + SemIR::InterfaceWithSelfDecl{.interface_id = interface_id}; + auto decl_with_self_inst_id = + AddPlaceholderInst(context, node_id, interface_with_self_decl); + auto generic_with_self_id = BuildGenericDecl(context, decl_with_self_inst_id); + interface_info.generic_with_self_id = generic_with_self_id; + ReplaceInstBeforeConstantUse(context, decl_with_self_inst_id, + interface_with_self_decl); + + interface_info.scope_with_self_id = + context.name_scopes().Add(decl_with_self_inst_id, SemIR::NameId::None, + interface_info.scope_without_self_id); + // Set on the name scope that `M` is replaced by `Self.M`. context.name_scopes() - .Get(interface_info.scope_id) + .Get(interface_info.scope_with_self_id) .set_is_interface_definition(); - auto self_specific_id = - context.generics().GetSelfSpecific(interface_info.generic_id); + // Start the definition of interface-with-self. + StartGenericDefinition(context, interface_info.generic_with_self_id); - StartGenericDefinition(context, interface_info.generic_id); + // Enter a scope for the interace-with-self. + context.scope_stack().PushForEntity( + decl_with_self_inst_id, interface_info.scope_with_self_id, + context.generics().GetSelfSpecific(interface_info.generic_with_self_id)); + + interface_info.body_block_without_self_id = + context.inst_block_stack().PeekOrAdd(); context.inst_block_stack().Push(); context.require_impls_stack().PushArray(); // We use the arg stack to build the witness table type. context.args_type_info_stack().Push(); - // Declare and introduce `Self`. We model `Self` as a symbolic binding whose - // type is the interface, excluding any other interfaces mentioned by - // `require` declarations. - SemIR::TypeId self_type_id = - GetInterfaceType(context, interface_id, self_specific_id); - interface_info.self_param_id = - AddSelfGenericParameter(context, node_id, self_type_id, - interface_info.scope_id, /*is_template=*/false); - - // Enter the interface scope. - context.scope_stack().PushForEntity(decl_inst_id, interface_info.scope_id, - self_specific_id); - // TODO: Handle the case where there's control flow in the interface body. For // example: // @@ -155,7 +197,8 @@ auto HandleParseNode(Context& context, // // We may need to track a list of instruction blocks here, as we do for a // function. - interface_info.body_block_id = context.inst_block_stack().PeekOrAdd(); + interface_info.body_block_with_self_id = + context.inst_block_stack().PeekOrAdd(); context.node_stack().Push(node_id, interface_id); return true; @@ -165,6 +208,7 @@ auto HandleParseNode(Context& context, Parse::InterfaceDefinitionId /*node_id*/) -> bool { auto interface_id = context.node_stack().Pop(); + // Pop the body_block_with_self. context.inst_block_stack().Pop(); auto associated_entities_id = context.args_type_info_stack().Pop(); @@ -179,6 +223,13 @@ auto HandleParseNode(Context& context, Parse::InterfaceDefinitionId /*node_id*/) interface_info.associated_entities_id = associated_entities_id; } + // Finish the definition of interface-with-self. + FinishGenericDefinition(context, interface_info.generic_with_self_id); + + // Pop the body_block_without_self. + context.inst_block_stack().Pop(); + + // Finish the definition of interface-without-self. FinishGenericDefinition(context, interface_info.generic_id); // The decl_name_stack and scopes are popped by `ProcessNodeIds`. diff --git a/toolchain/check/handle_let_and_var.cpp b/toolchain/check/handle_let_and_var.cpp index 4ae54b3608e1..b04f9bf0b651 100644 --- a/toolchain/check/handle_let_and_var.cpp +++ b/toolchain/check/handle_let_and_var.cpp @@ -7,7 +7,6 @@ #include "toolchain/check/context.h" #include "toolchain/check/convert.h" #include "toolchain/check/decl_introducer_state.h" -#include "toolchain/check/generic.h" #include "toolchain/check/handle.h" #include "toolchain/check/inst.h" #include "toolchain/check/interface.h" @@ -34,22 +33,19 @@ namespace Carbon::Check { // called at the `=` or the `;` of the declaration, whichever comes first. static auto EndAssociatedConstantDeclRegion(Context& context, SemIR::InterfaceId interface_id) - -> SemIR::GenericId { + -> void { // Peek the pattern. For a valid associated constant, the corresponding // instruction will be an `AssociatedConstantDecl` instruction. auto decl_id = context.node_stack().PeekPattern(); auto assoc_const_decl = context.insts().GetAs(decl_id); - - // Finish the declaration region of this generic. auto& assoc_const = context.associated_constants().Get(assoc_const_decl.assoc_const_id); - assoc_const.generic_id = BuildGenericDecl(context, decl_id); - // Build a corresponding associated entity and add it into scope. Note - // that we do this outside the generic region. + // Build a corresponding associated entity and add it into scope. + // // TODO: The instruction is added to the associated constant's decl block. - // It probably should be in the interface's body instead. + // It probably should be in the interface-with-self body instead. auto assoc_id = BuildAssociatedEntity(context, interface_id, decl_id); auto name_context = context.decl_name_stack().MakeUnqualifiedName( context.node_stack().PeekNodeId(), assoc_const.name_id); @@ -58,7 +54,6 @@ static auto EndAssociatedConstantDeclRegion(Context& context, .modifier_set.GetAccessKind(); context.decl_name_stack().AddNameOrDiagnose(name_context, assoc_id, access_kind); - return assoc_const.generic_id; } template @@ -79,8 +74,6 @@ auto HandleParseNode(Context& context, Parse::LetIntroducerId node_id) -> bool { auto HandleParseNode(Context& context, Parse::AssociatedConstantIntroducerId node_id) -> bool { - // An associated constant is always generic. - StartGenericDecl(context); // Collect the declarations nested in the associated constant in a decl // block. This is popped by FinishAssociatedConstantDecl. context.inst_block_stack().Push(); @@ -133,7 +126,9 @@ auto HandleParseNode(Context& context, Parse::VariablePatternId node_id) // Handle the end of the full-pattern of a let/var declaration (before the // start of the initializer, if any). static auto EndFullPattern(Context& context) -> void { - if (context.scope_stack().GetCurrentScopeAs()) { + auto scope_id = context.scope_stack().PeekNameScopeId(); + if (scope_id.has_value() && + context.name_scopes().Get(scope_id).is_interface_definition()) { // Don't emit NameBindingDecl for an associated constant, because it will // always be empty. context.pattern_block_stack().PopAndDiscard(); @@ -168,13 +163,8 @@ auto HandleParseNode(Context& context, Parse::LetInitializerId node_id) auto HandleParseNode(Context& context, Parse::AssociatedConstantInitializerId node_id) -> bool { auto interface_decl = - context.scope_stack().GetCurrentScopeAs(); - auto generic_id = - EndAssociatedConstantDeclRegion(context, interface_decl->interface_id); - - // Start building the definition region of the constant. - StartGenericDefinition(context, generic_id); - + context.scope_stack().GetCurrentScopeAs(); + EndAssociatedConstantDeclRegion(context, interface_decl.interface_id); return HandleInitializer(context, node_id); } @@ -223,8 +213,9 @@ static auto HandleDecl(Context& context) -> DeclInfo { // now. We will have done this at the `=` if there was an initializer. if (IntroducerNodeKind == Parse::NodeKind::AssociatedConstantIntroducer) { auto interface_decl = - context.scope_stack().GetCurrentScopeAs(); - EndAssociatedConstantDeclRegion(context, interface_decl->interface_id); + context.scope_stack() + .GetCurrentScopeAs(); + EndAssociatedConstantDeclRegion(context, interface_decl.interface_id); } EndFullPattern(context); @@ -262,7 +253,7 @@ auto HandleParseNode(Context& context, Parse::LetDeclId node_id) -> bool { // constant. We use this rather than `LimitModifiersOnDecl` to get a more // specific error. RequireDefaultFinalOnlyInInterfaces(context, decl_info.introducer, - std::nullopt); + SemIR::NameScopeId::None); if (decl_info.init_id.has_value()) { LocalPatternMatch(context, decl_info.pattern_id, decl_info.init_id); @@ -288,18 +279,15 @@ auto HandleParseNode(Context& context, Parse::AssociatedConstantDeclId node_id) KeywordModifierSet::Access | KeywordModifierSet::Interface); auto interface_scope = - context.scope_stack().GetCurrentScopeAs(); - // The `AssociatedConstantDecl` instruction and the - // corresponding `AssociatedConstant` entity are built as part of handling the - // binding pattern, but we still need to finish building the `Generic` object - // and attach the default value, if any is specified. + context.scope_stack().GetCurrentScopeAs(); + // The `AssociatedConstantDecl` instruction and the corresponding + // `AssociatedConstant` entity are built as part of handling the binding + // pattern, but we still need to attach the default value, if any is + // specified. if (decl_info.pattern_id == SemIR::ErrorInst::InstId) { - context.name_scopes() - .Get(context.interfaces().Get(interface_scope->interface_id).scope_id) - .set_has_error(); - if (decl_info.init_id.has_value()) { - DiscardGenericDecl(context); - } + const auto& interface = + context.interfaces().Get(interface_scope.interface_id); + context.name_scopes().Get(interface.scope_with_self_id).set_has_error(); context.inst_block_stack().Pop(); return true; } @@ -319,7 +307,6 @@ auto HandleParseNode(Context& context, Parse::AssociatedConstantDeclId node_id) ConvertToValueOfType(context, node_id, decl_info.init_id, decl.type_id); auto& assoc_const = context.associated_constants().Get(decl.assoc_const_id); assoc_const.default_value_id = default_value_id; - FinishGenericDefinition(context, assoc_const.generic_id); } else { // TODO: Either allow redeclarations of associated constants or diagnose if // the `default` modifier was used. diff --git a/toolchain/check/handle_named_constraint.cpp b/toolchain/check/handle_named_constraint.cpp index 2e843fc355c0..a1370b8b8a49 100644 --- a/toolchain/check/handle_named_constraint.cpp +++ b/toolchain/check/handle_named_constraint.cpp @@ -122,29 +122,69 @@ auto HandleParseNode(Context& context, CARBON_CHECK(!constraint_info.has_definition_started(), "Can't merge with defined named constraints."); constraint_info.definition_id = decl_inst_id; - constraint_info.scope_id = context.name_scopes().Add( + constraint_info.scope_without_self_id = context.name_scopes().Add( decl_inst_id, SemIR::NameId::None, constraint_info.parent_scope_id); - auto self_specific_id = - context.generics().GetSelfSpecific(constraint_info.generic_id); StartGenericDefinition(context, constraint_info.generic_id); context.inst_block_stack().Push(); - context.require_impls_stack().PushArray(); + + // Enter the constraint-without-self scope, which is used for the Self + // instruction, since it needs to reference the constraint (without-self) + // generic. Self can't reference the constraint-with-self generic since it's a + // parameter to the generic. + context.scope_stack().PushForEntity( + decl_inst_id, constraint_info.scope_without_self_id, + context.generics().GetSelfSpecific(constraint_info.generic_id)); // Declare and introduce `Self`. We model `Self` as a symbolic binding whose // type is the named constraint, excluding any other interfaces mentioned by // `require` declarations. This makes it an empty facet type. - SemIR::TypeId self_type_id = - GetNamedConstraintType(context, named_constraint_id, self_specific_id); - constraint_info.self_param_id = AddSelfGenericParameter( - context, node_id, self_type_id, constraint_info.scope_id, is_template); + SemIR::TypeId self_type_id = GetNamedConstraintType( + context, named_constraint_id, + context.generics().GetSelfSpecific(constraint_info.generic_id)); + constraint_info.self_param_id = AddSelfSymbolicBindingToScope( + context, node_id, self_type_id, constraint_info.scope_without_self_id, + is_template); - // Enter the constraint scope. - context.scope_stack().PushForEntity(decl_inst_id, constraint_info.scope_id, - self_specific_id); + // Start the declaration of constraint-with-self. + StartGenericDecl(context); - constraint_info.body_block_id = context.inst_block_stack().PeekOrAdd(); + // Push `Self` as a parameter of the constraint-with-self. + context.scope_stack().PushCompileTimeBinding(constraint_info.self_param_id); + + // Add the interface-with-self declaration and build the generic for it. This + // captures the `interface_info.self_param_id` as a parameter of the generic. + auto constraint_with_self_decl = SemIR::NamedConstraintWithSelfDecl{ + .named_constraint_id = named_constraint_id}; + auto decl_with_self_inst_id = + AddPlaceholderInst(context, node_id, constraint_with_self_decl); + auto generic_with_self_id = BuildGenericDecl(context, decl_with_self_inst_id); + constraint_info.generic_with_self_id = generic_with_self_id; + ReplaceInstBeforeConstantUse(context, decl_with_self_inst_id, + constraint_with_self_decl); + + constraint_info.scope_with_self_id = + context.name_scopes().Add(decl_with_self_inst_id, SemIR::NameId::None, + constraint_info.scope_without_self_id); + + // Start the definition of constraint-with-self. + StartGenericDefinition(context, constraint_info.generic_with_self_id); + + // Enter a scope for the constraint-with-self. + context.scope_stack().PushForEntity( + decl_with_self_inst_id, constraint_info.scope_with_self_id, + context.generics().GetSelfSpecific(constraint_info.generic_with_self_id)); + + constraint_info.body_block_without_self_id = + context.inst_block_stack().PeekOrAdd(); + + context.inst_block_stack().Push(); + + constraint_info.body_block_with_self_id = + context.inst_block_stack().PeekOrAdd(); + + context.require_impls_stack().PushArray(); context.node_stack().Push(node_id, named_constraint_id); return true; @@ -155,6 +195,7 @@ auto HandleParseNode(Context& context, auto named_constraint_id = context.node_stack() .Pop(); + // Pop the body_block_with_self. context.inst_block_stack().Pop(); auto require_impls_block_id = context.require_impls_blocks().Add( @@ -169,6 +210,13 @@ auto HandleParseNode(Context& context, constraint_info.complete = true; } + // Finish the definition of constraint-with-self. + FinishGenericDefinition(context, constraint_info.generic_with_self_id); + + // Pop the body_block_without_self. + context.inst_block_stack().Pop(); + + // Finish the definition of interfconstraintace-without-self. FinishGenericDefinition(context, constraint_info.generic_id); // The decl_name_stack and scopes are popped by `ProcessNodeIds`. diff --git a/toolchain/check/handle_require.cpp b/toolchain/check/handle_require.cpp index 3df541a2e03b..262cbda5f7a0 100644 --- a/toolchain/check/handle_require.cpp +++ b/toolchain/check/handle_require.cpp @@ -38,8 +38,8 @@ auto HandleParseNode(Context& context, Parse::RequireIntroducerId node_id) auto scope_id = context.scope_stack().PeekNameScopeId(); auto scope_inst_id = context.name_scopes().Get(scope_id).inst_id(); auto scope_inst = context.insts().Get(scope_inst_id); - if (!scope_inst.Is() && - !scope_inst.Is()) { + if (!scope_inst.Is() && + !scope_inst.Is()) { CARBON_DIAGNOSTIC( RequireInWrongScope, Error, "`require` can only be used in an `interface` or `constraint`"); @@ -60,14 +60,10 @@ auto HandleParseNode(Context& context, Parse::RequireDefaultSelfImplsId node_id) return true; } - auto scope_id = context.scope_stack().PeekNameScopeId(); auto lookup_result = - LookupNameInExactScope(context, node_id, SemIR::NameId::SelfType, - scope_id, context.name_scopes().Get(scope_id), - /*is_being_declared=*/false); - CARBON_CHECK(lookup_result.is_found()); - - auto self_inst_id = lookup_result.target_inst_id(); + LookupUnqualifiedName(context, node_id, SemIR::NameId::SelfType, + /*required=*/true); + auto self_inst_id = lookup_result.scope_result.target_inst_id(); auto self_type_id = context.insts().Get(self_inst_id).type_id(); if (self_type_id == SemIR::ErrorInst::TypeId) { context.node_stack().Push(node_id, SemIR::ErrorInst::TypeInstId); @@ -314,21 +310,17 @@ auto HandleParseNode(Context& context, Parse::RequireDeclId node_id) -> bool { return true; } - // The generic of a require declaration is always inside an interface or - // constraint, which makes its last generic binding the inner `Self` facet - // of the interface/constraint definition. Thus the last argument of its - // `self_specific` is that inner `Self`. - auto self_specific_id = context.generics().GetSelfSpecific( - context.require_impls().Get(require_impls_id).generic_id); - const auto& self_specific = context.specifics().Get(self_specific_id); - auto self_specific_args = context.inst_blocks().Get(self_specific.args_id); - auto inner_self_inst_id = self_specific_args.back(); - // The extended scope instruction must be part of the enclosing scope (and // generic). A specific for the enclosing scope will be applied to it when // using the instruction later. To do so, we wrap the constraint facet type // it in a SpecificConstant, which preserves the require declaration's // specific along with the facet type. + // + // TODO: Remove the separate generic for each require decl, then we don't + // need a SpecificConstant anymore, as the constraint_inst_id will already + // be in the generic of the interface-with-self. + auto self_specific_id = context.generics().GetSelfSpecific( + context.require_impls().Get(require_impls_id).generic_id); auto constraint_id_in_self_specific = AddTypeInst( context, node_id, {.type_id = SemIR::TypeType::TypeId, @@ -336,8 +328,7 @@ auto HandleParseNode(Context& context, Parse::RequireDeclId node_id) -> bool { .specific_id = self_specific_id}); auto enclosing_scope_id = context.scope_stack().PeekNameScopeId(); auto& enclosing_scope = context.name_scopes().Get(enclosing_scope_id); - enclosing_scope.AddExtendedScope( - {constraint_id_in_self_specific, inner_self_inst_id}); + enclosing_scope.AddExtendedScope(constraint_id_in_self_specific); } context.require_impls_stack().AppendToTop(require_impls_id); diff --git a/toolchain/check/impl.cpp b/toolchain/check/impl.cpp index 040fb9644652..5f212bead667 100644 --- a/toolchain/check/impl.cpp +++ b/toolchain/check/impl.cpp @@ -19,7 +19,6 @@ #include "toolchain/check/merge.h" #include "toolchain/check/name_lookup.h" #include "toolchain/check/name_scope.h" -#include "toolchain/check/require_impls.h" #include "toolchain/check/thunk.h" #include "toolchain/check/type.h" #include "toolchain/check/type_completion.h" @@ -46,7 +45,6 @@ static auto NoteAssociatedFunction(Context& context, DiagnosticBuilder& builder, auto CheckAssociatedFunctionImplementation( Context& context, SemIR::FunctionType interface_function_type, SemIR::SpecificId enclosing_specific_id, SemIR::InstId impl_decl_id, - SemIR::TypeId self_type_id, SemIR::InstId witness_inst_id, bool defer_thunk_definition) -> SemIR::InstId { auto impl_function_decl = context.insts().TryGetAs(impl_decl_id); @@ -76,7 +74,7 @@ auto CheckAssociatedFunctionImplementation( context.functions() .Get(interface_function_type.function_id) .generic_id, - enclosing_specific_id, self_type_id, witness_inst_id); + enclosing_specific_id); return BuildThunk(context, interface_function_type.function_id, interface_function_specific_id, impl_decl_id, @@ -236,7 +234,7 @@ static auto ApplyExtendImplAs(Context& context, SemIR::LocId loc_id, } if (!impl.generic_id.has_value()) { - parent_scope.AddExtendedScope({impl.constraint_id}); + parent_scope.AddExtendedScope(impl.constraint_id); } else { // The extended scope instruction must be part of the enclosing scope (and // generic). A specific for the enclosing scope will be applied to it when @@ -248,7 +246,7 @@ static auto ApplyExtendImplAs(Context& context, SemIR::LocId loc_id, {.type_id = SemIR::TypeType::TypeId, .inst_id = impl.constraint_id, .specific_id = context.generics().GetSelfSpecific(impl.generic_id)}); - parent_scope.AddExtendedScope({constraint_id_in_self_specific}); + parent_scope.AddExtendedScope(constraint_id_in_self_specific); } return true; } @@ -459,12 +457,15 @@ auto AddImplWitnessForDeclaration(Context& context, SemIR::LocId loc_id, // value to that type now we know the value of `Self`. SemIR::TypeId assoc_const_type_id = assoc_constant_decl->type_id; if (assoc_const_type_id.is_symbolic()) { + auto self_facet = GetConstantFacetValueForType(context, impl.self_id); + auto interface_with_self_specific_id = MakeSpecificWithInnerSelf( + context, loc_id, interface.generic_id, interface.generic_with_self_id, + impl.interface.specific_id, self_facet); + // Get the type of the associated constant in this interface with this // value for `Self`. assoc_const_type_id = GetTypeForSpecificAssociatedEntity( - context, SemIR::LocId(impl.constraint_id), impl.interface.specific_id, - decl_id, context.types().GetTypeIdForTypeInstId(impl.self_id), - witness_inst_id); + context, interface_with_self_specific_id, decl_id); // Perform the conversion of the value to the type. We skipped this when // forming the facet type because the type of the associated constant // was symbolic. @@ -603,17 +604,22 @@ auto FinishImplWitness(Context& context, const SemIR::Impl& impl) -> void { auto witness_block = context.inst_blocks().GetMutable(witness_table.elements_id); auto& impl_scope = context.name_scopes().Get(impl.scope_id); - auto self_type_id = context.types().GetTypeIdForTypeInstId(impl.self_id); const auto& interface = context.interfaces().Get(impl.interface.interface_id); auto assoc_entities = context.inst_blocks().Get(interface.associated_entities_id); llvm::SmallVector used_decl_ids; + auto self_facet = GetConstantFacetValueForTypeAndInterface( + context, impl.self_id, impl.interface, impl.witness_id); + auto interface_with_self_specific_id = MakeSpecificWithInnerSelf( + context, SemIR::LocId(impl.definition_id), interface.generic_id, + interface.generic_with_self_id, impl.interface.specific_id, self_facet); + for (auto [assoc_entity, witness_value] : llvm::zip_equal(assoc_entities, witness_block)) { auto decl_id = context.constant_values().GetInstId(SemIR::GetConstantValueInSpecific( - context.sem_ir(), impl.interface.specific_id, assoc_entity)); + context.sem_ir(), interface_with_self_specific_id, assoc_entity)); CARBON_CHECK(decl_id.has_value(), "Non-constant associated entity"); auto decl = context.insts().Get(decl_id); CARBON_KIND_SWITCH(decl) { @@ -636,7 +642,7 @@ auto FinishImplWitness(Context& context, const SemIR::Impl& impl) -> void { witness_value = CheckAssociatedFunctionImplementation( context, *fn_type, context.generics().GetSelfSpecific(impl.generic_id), - lookup_result.target_inst_id(), self_type_id, impl.witness_id, + lookup_result.target_inst_id(), /*defer_thunk_definition=*/true); } else { CARBON_DIAGNOSTIC( @@ -690,18 +696,29 @@ auto CheckRequireDeclsSatisfied(Context& context, SemIR::LocId loc_id, } // Make a facet value for the self type. - auto self_facet_value = GetConstantFacetValueForType(context, impl.self_id); + auto self_facet = GetConstantFacetValueForType(context, impl.self_id); + auto interface_with_self_specific_id = MakeSpecificWithInnerSelf( + context, loc_id, interface.generic_id, interface.generic_with_self_id, + impl.interface.specific_id, self_facet); for (auto require_id : require_ids) { const auto& require = context.require_impls().Get(require_id); - auto require_specific = - GetRequireImplsSpecificFromEnclosingSpecificWithSelfFacetValue( - context, require, impl.interface.specific_id, self_facet_value); - auto self_const_id = GetConstantValueInRequireImplsSpecific( - context, require_specific, require.self_id); - auto facet_type_const_id = GetConstantValueInRequireImplsSpecific( - context, require_specific, require.facet_type_inst_id); + // Each require is in its own generic, with no additional bindings and no + // definition, so that they can have their specifics independently + // instantiated. + auto require_specific_id = CopySpecificToGeneric( + context, SemIR::LocId(require.decl_id), interface_with_self_specific_id, + require.generic_id); + auto self_const_id = GetConstantValueInSpecific( + context.sem_ir(), require_specific_id, require.self_id); + auto facet_type_const_id = GetConstantValueInSpecific( + context.sem_ir(), require_specific_id, require.facet_type_inst_id); + if (self_const_id == SemIR::ErrorInst::ConstantId || + facet_type_const_id == SemIR::ErrorInst::ConstantId) { + FillImplWitnessWithErrors(context, impl); + break; + } auto result = LookupImplWitness(context, loc_id, self_const_id, facet_type_const_id); @@ -762,11 +779,13 @@ auto CheckConstraintIsInterface(Context& context, SemIR::InstId impl_decl_id, SemIR::InstId self_id, SemIR::TypeInstId constraint_id) -> SemIR::SpecificInterface { - auto facet_type_id = context.types().GetTypeIdForTypeInstId(constraint_id); - if (facet_type_id == SemIR::ErrorInst::TypeId) { + auto facet_type_as_type_id = + context.types().GetTypeIdForTypeInstId(constraint_id); + if (facet_type_as_type_id == SemIR::ErrorInst::TypeId) { return SemIR::SpecificInterface::None; } - auto facet_type = context.types().TryGetAs(facet_type_id); + auto facet_type = + context.types().TryGetAs(facet_type_as_type_id); if (!facet_type) { CARBON_DIAGNOSTIC(ImplAsNonFacetType, Error, "impl as non-facet type {0}", InstIdAsType); diff --git a/toolchain/check/impl.h b/toolchain/check/impl.h index 062daec93673..ba90737af804 100644 --- a/toolchain/check/impl.h +++ b/toolchain/check/impl.h @@ -82,7 +82,6 @@ auto IsImplEffectivelyFinal(Context& context, const SemIR::Impl& impl) -> bool; auto CheckAssociatedFunctionImplementation( Context& context, SemIR::FunctionType interface_function_type, SemIR::SpecificId enclosing_specific_id, SemIR::InstId impl_decl_id, - SemIR::TypeId self_type_id, SemIR::InstId witness_inst_id, bool defer_thunk_definition) -> SemIR::InstId; // Checks that the constraint specified for the impl is valid and identified. diff --git a/toolchain/check/import_ref.cpp b/toolchain/check/import_ref.cpp index 7f224a42c1ee..cf1404826039 100644 --- a/toolchain/check/import_ref.cpp +++ b/toolchain/check/import_ref.cpp @@ -4,6 +4,7 @@ #include "toolchain/check/import_ref.h" +#include #include #include #include @@ -869,7 +870,9 @@ static auto GetLocalConstantId(ImportRefResolver& resolver, auto import_decl_inst_id = resolver.import_generics().Get(generic_id).decl_id; auto import_decl_inst = resolver.import_insts().GetWithAttachedType(import_decl_inst_id); - if (import_decl_inst.IsOneOf()) { + if (import_decl_inst.IsOneOf()) { // For these decl types, the imported entity can be found via the // declaration's operands. return GetLocalConstantId(resolver, import_decl_inst_id); @@ -910,6 +913,17 @@ static auto GetLocalGenericId(ImportContext& context, case CARBON_KIND(SemIR::ImplDecl impl_decl): { return context.local_impls().Get(impl_decl.impl_id).generic_id; } + case CARBON_KIND(SemIR::InterfaceWithSelfDecl interface_with_self_decl): { + return context.local_interfaces() + .Get(interface_with_self_decl.interface_id) + .generic_with_self_id; + } + case CARBON_KIND( + SemIR::NamedConstraintWithSelfDecl constraint_with_self_decl): { + return context.local_named_constraints() + .Get(constraint_with_self_decl.named_constraint_id) + .generic_with_self_id; + } case CARBON_KIND(SemIR::RequireImplsDecl require_decl): { return context.local_require_impls() .Get(require_decl.require_impls_id) @@ -1192,12 +1206,12 @@ static auto GetLocalNameScopeIdImpl(ImportRefResolver& resolver, case CARBON_KIND(SemIR::SpecificInterface interface): { return resolver.local_interfaces() .Get(interface.interface_id) - .scope_id; + .scope_without_self_id; } case CARBON_KIND(SemIR::SpecificNamedConstraint constraint): { return resolver.local_named_constraints() .Get(constraint.named_constraint_id) - .scope_id; + .scope_without_self_id; } } } @@ -1206,6 +1220,16 @@ static auto GetLocalNameScopeIdImpl(ImportRefResolver& resolver, case CARBON_KIND(SemIR::ImplDecl inst): { return resolver.local_impls().Get(inst.impl_id).scope_id; } + case CARBON_KIND(SemIR::InterfaceWithSelfDecl interface_with_self): { + return resolver.local_interfaces() + .Get(interface_with_self.interface_id) + .scope_with_self_id; + } + case CARBON_KIND(SemIR::NamedConstraintWithSelfDecl constraint_with_self): { + return resolver.local_named_constraints() + .Get(constraint_with_self.named_constraint_id) + .scope_with_self_id; + } case SemIR::StructValue::Kind: { auto type_inst = resolver.local_types().GetAsInst(name_scope_inst.type_id()); @@ -1214,12 +1238,14 @@ static auto GetLocalNameScopeIdImpl(ImportRefResolver& resolver, return resolver.local_classes().Get(inst.class_id).scope_id; } case CARBON_KIND(SemIR::GenericInterfaceType inst): { - return resolver.local_interfaces().Get(inst.interface_id).scope_id; + return resolver.local_interfaces() + .Get(inst.interface_id) + .scope_without_self_id; } case CARBON_KIND(SemIR::GenericNamedConstraintType inst): { return resolver.local_named_constraints() .Get(inst.named_constraint_id) - .scope_id; + .scope_without_self_id; } default: { break; @@ -1327,9 +1353,8 @@ static auto AddNameScopeImportRefs(ImportContext& context, .result = SemIR::ScopeLookupResult::MakeFound( ref_id, result.access_kind())}); } - for (auto [scope_inst_id, inner_self_id] : import_scope.extended_scopes()) { - new_scope.AddExtendedScope({AddImportRef(context, scope_inst_id), - AddImportRef(context, inner_self_id)}); + for (auto scope_inst_id : import_scope.extended_scopes()) { + new_scope.AddExtendedScope(AddImportRef(context, scope_inst_id)); } } @@ -1400,8 +1425,11 @@ struct ResolveResult { bool retry = false; // If a generic needs to be resolved, the generic information. - SemIR::GenericId import_generic_id = SemIR::GenericId::None; - SemIR::GenericId local_generic_id = SemIR::GenericId::None; + struct ResolveGeneric { + SemIR::GenericId import_generic_id = SemIR::GenericId::None; + SemIR::GenericId local_generic_id = SemIR::GenericId::None; + }; + std::array resolve_generic; // Produces a resolve result that tries resolving this instruction again. If // `const_id` is specified, then this is the end of the second phase, and the @@ -1434,22 +1462,22 @@ struct ResolveResult { // If there's no generic, this is equivalent to `Done`. If there is a generic, // it's still done, but the fetched generic data is processed and the generic // is enqueued for further work. + // + // It's not valid to have a generic-with-self but no base generic. static auto FinishGenericOrDone(ImportRefResolver& resolver, SemIR::ConstantId const_id, SemIR::InstId decl_id, SemIR::GenericId import_generic_id, SemIR::GenericId local_generic_id, GenericData generic_data) -> ResolveResult { - if (!import_generic_id.has_value()) { - return Done(const_id, decl_id); + auto result = Done(const_id, decl_id); + if (import_generic_id.has_value()) { + SetGenericDataForResolveResult(resolver, import_generic_id, + local_generic_id, generic_data); + result.resolve_generic[0].import_generic_id = import_generic_id; + result.resolve_generic[0].local_generic_id = local_generic_id; } - - SetGenericDataForResolveResult(resolver, import_generic_id, - local_generic_id, generic_data); - return {.const_id = const_id, - .decl_id = decl_id, - .import_generic_id = import_generic_id, - .local_generic_id = local_generic_id}; + return result; } // Adds `inst` to the local context as a deduplicated constant and returns a @@ -1567,8 +1595,6 @@ static auto ImportAssociatedConstant( .name_id = GetLocalNameId(context, import_assoc_const.name_id), .parent_scope_id = SemIR::NameScopeId::None, .decl_id = assoc_const_decl_id, - .generic_id = ImportIncompleteGeneric(context, assoc_const_decl_id, - import_assoc_const.generic_id), .default_value_id = import_assoc_const.default_value_id.has_value() ? AddImportRef(context, import_assoc_const.default_value_id) @@ -1614,8 +1640,6 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, // Load the values to populate the entity with. auto parent_scope_id = GetLocalNameScopeId(resolver, import_assoc_const.parent_scope_id); - auto generic_data = - GetLocalGenericData(resolver, import_assoc_const.generic_id); auto& new_assoc_const = resolver.local_associated_constants().Get(assoc_const_id); @@ -1625,9 +1649,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, // Populate the entity. new_assoc_const.parent_scope_id = parent_scope_id; - return ResolveResult::FinishGenericOrDone( - resolver, const_id, new_assoc_const.decl_id, - import_assoc_const.generic_id, new_assoc_const.generic_id, generic_data); + return ResolveResult::Done(const_id, new_assoc_const.decl_id); } static auto TryResolveTypedInst(ImportRefResolver& resolver, @@ -1661,9 +1683,10 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, auto specific_interface = GetLocalSpecificInterface(resolver, inst.GetSpecificInterface(), data); return ResolveResult::Deduplicated( - resolver, {.type_id = SemIR::TypeType::TypeId, - .interface_id = specific_interface.interface_id, - .interface_specific_id = specific_interface.specific_id}); + resolver, + {.type_id = SemIR::TypeType::TypeId, + .interface_id = specific_interface.interface_id, + .interface_without_self_specific_id = specific_interface.specific_id}); } static auto TryResolveTypedInst(ImportRefResolver& resolver, @@ -2233,7 +2256,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, return ResolveResult::Retry(); } - // On the second phase, create a forward declaration of the interface. + // On the second phase, create a forward declaration of the function. auto specific_id = GetOrAddLocalSpecific(resolver, import_specific_id, specific_data); std::tie(function_id, function_const_id) = @@ -2749,12 +2772,18 @@ static auto ImportInterfaceDecl(ImportContext& context, context, import_interface.first_owning_decl_id, interface_decl); // Start with an incomplete interface. + // + // The generic_with_self_id is constructed by the InterfaceWithSelfDecl + // instruction inside the InterfaceDecl's body. interface_decl.interface_id = context.local_interfaces().Add( {GetIncompleteLocalEntityBase(context, interface_decl_id, import_interface), - {.scope_id = import_interface.is_complete() - ? AddPlaceholderNameScope(context) - : SemIR::NameScopeId::None}}); + {.scope_without_self_id = import_interface.is_complete() + ? AddPlaceholderNameScope(context) + : SemIR::NameScopeId::None, + .scope_with_self_id = import_interface.is_complete() + ? AddPlaceholderNameScope(context) + : SemIR::NameScopeId::None}}); if (import_interface.has_parameters()) { interface_decl.type_id = GetGenericInterfaceType( @@ -2774,19 +2803,17 @@ static auto ImportInterfaceDefinition(ImportContext& context, const SemIR::Interface& import_interface, SemIR::Interface& new_interface, SemIR::InstId self_param_id) -> void { - auto& new_scope = context.local_name_scopes().Get(new_interface.scope_id); + auto& new_scope = + context.local_name_scopes().Get(new_interface.scope_without_self_id); const auto& import_scope = - context.import_name_scopes().Get(import_interface.scope_id); + context.import_name_scopes().Get(import_interface.scope_without_self_id); // Push a block so that we can add scoped instructions to it. context.local_context().inst_block_stack().Push(); InitializeNameScopeAndImportRefs( context, import_scope, new_scope, new_interface.first_owning_decl_id, SemIR::NameId::None, new_interface.parent_scope_id); - new_scope.set_is_interface_definition(); - new_interface.associated_entities_id = AddAssociatedEntities( - context, new_interface.scope_id, import_interface.associated_entities_id); - new_interface.body_block_id = + new_interface.body_block_without_self_id = context.local_context().inst_block_stack().Pop(); new_interface.self_param_id = self_param_id; } @@ -2850,8 +2877,17 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, std::optional self_param_id; if (import_interface.is_complete()) { + // Note the TODO on ResolveLocalEvalBlock, the generic eval block is rebuilt + // instead of being imported. When it's imported maybe this should be an + // ImportRef? self_param_id = GetLocalConstantInstId(resolver, import_interface.self_param_id); + + // Importing the `generic_with_self_id` imports the InterfaceWithSelfDecl + // which sets the associated constants in the interface (if it's complete) + // which marks the local interface as complete. The InterfaceWithSelfDecl + // also sets the `generic_with_self_id` field on the local interface. + GetLocalConstantId(resolver, import_interface.generic_with_self_id); } auto& new_interface = resolver.local_interfaces().Get(interface_id); @@ -2874,11 +2910,133 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, ImportInterfaceDefinition(resolver, import_interface, new_interface, *self_param_id); } + + // The interface's `generic_with_self_id` is filled out and finished by + // importing the InterfaceWithSelfDecl instruction which we find inside the + // InterfaceDecl. return ResolveResult::FinishGenericOrDone( resolver, interface_const_id, new_interface.first_decl_id(), import_interface.generic_id, new_interface.generic_id, generic_data); } +static auto TryResolveTypedInst(ImportRefResolver& resolver, + SemIR::InterfaceWithSelfDecl inst, + SemIR::ConstantId const_id) -> ResolveResult { + auto interface_const_id = GetLocalConstantId( + resolver, + resolver.import_interfaces().Get(inst.interface_id).first_owning_decl_id); + + // These are set differently in each phase. + auto decl_id = SemIR::InstId::None; + auto local_interface_id = SemIR::InterfaceId::None; + auto generic_with_self_id = SemIR::GenericId::None; + + // Note that InterfaceWithSelfDecl always occurs inside an InterfaceDecl, so + // the import here can rely on the `Interface` already existing. + + auto import_generic_with_self_id = + resolver.import_interfaces().Get(inst.interface_id).generic_with_self_id; + + if (!const_id.has_value()) { + if (resolver.HasNewWork()) { + // This is the end of the first phase. Don't make a new generic yet if we + // already have new work. + return ResolveResult::Retry(); + } + + // Get the local interface ID from the constant value of the interface decl, + // which is either a GenericInterfaceType (if generic) or a FacetType (if + // not). + auto interface_const_inst_id = + resolver.local_constant_values().GetInstId(interface_const_id); + if (auto struct_value = resolver.local_insts().TryGetAs( + interface_const_inst_id)) { + auto generic_interface_type = + resolver.local_types().GetAs( + struct_value->type_id); + local_interface_id = generic_interface_type.interface_id; + } else { + auto local_facet_type = resolver.local_insts().GetAs( + interface_const_inst_id); + const auto& local_facet_type_info = + resolver.local_facet_types().Get(local_facet_type.facet_type_id); + auto single_interface = *local_facet_type_info.TryAsSingleExtend(); + CARBON_KIND_SWITCH(single_interface) { + case CARBON_KIND(SemIR::SpecificInterface specific_interface): { + local_interface_id = specific_interface.interface_id; + break; + } + case CARBON_KIND(SemIR::SpecificNamedConstraint _): { + CARBON_FATAL( + "Unexpected NamedConstraint in InterfaceDecl value's facet type"); + } + } + } + + // On the second phase, create a local decl instruction with a local generic + // ID. Store that generic ID in the local interface. + const auto& import_generic = + resolver.import_generics().Get(import_generic_with_self_id); + + SemIR::InterfaceWithSelfDecl interface_with_self_decl = { + .interface_id = SemIR::InterfaceId::None}; + decl_id = AddPlaceholderImportedInst(resolver, import_generic.decl_id, + interface_with_self_decl); + generic_with_self_id = + ImportIncompleteGeneric(resolver, decl_id, import_generic_with_self_id); + interface_with_self_decl.interface_id = local_interface_id; + const_id = ReplacePlaceholderImportedInst(resolver, decl_id, + interface_with_self_decl); + + resolver.local_interfaces().Get(local_interface_id).generic_with_self_id = + generic_with_self_id; + } else { + // On the third phase, get the interface, decl and generic IDs from the + // constant value of the decl (which is itself) from the second phase. + auto decl = resolver.local_insts().GetAs( + resolver.local_constant_values().GetInstId(const_id)); + local_interface_id = decl.interface_id; + generic_with_self_id = resolver.local_interfaces() + .Get(local_interface_id) + .generic_with_self_id; + decl_id = resolver.local_generics().Get(generic_with_self_id).decl_id; + } + + auto generic_with_self_data = + GetLocalGenericData(resolver, import_generic_with_self_id); + if (resolver.HasNewWork()) { + return ResolveResult::Retry(const_id, decl_id); + } + + auto& local_interface = resolver.local_interfaces().Get( + resolver.local_insts() + .GetAs(decl_id) + .interface_id); + const auto& import_interface = + resolver.import_interfaces().Get(inst.interface_id); + + auto& new_scope = + resolver.local_name_scopes().Get(local_interface.scope_with_self_id); + const auto& import_scope = + resolver.import_name_scopes().Get(import_interface.scope_with_self_id); + + // Push a block so that we can add scoped instructions to it. + resolver.local_context().inst_block_stack().Push(); + InitializeNameScopeAndImportRefs(resolver, import_scope, new_scope, decl_id, + SemIR::NameId::None, + local_interface.scope_without_self_id); + new_scope.set_is_interface_definition(); + local_interface.associated_entities_id = + AddAssociatedEntities(resolver, local_interface.scope_with_self_id, + import_interface.associated_entities_id); + local_interface.body_block_with_self_id = + resolver.local_context().inst_block_stack().Pop(); + + return ResolveResult::FinishGenericOrDone( + resolver, const_id, decl_id, import_generic_with_self_id, + generic_with_self_id, generic_with_self_data); +} + // Make a declaration of a named constraint. This is done as a separate step // from importing the constraint definition in order to resolve cycles. static auto ImportNamedConstraintDecl( @@ -2894,14 +3052,20 @@ static auto ImportNamedConstraintDecl( context, import_named_constraint.first_owning_decl_id, named_constraint_decl); - // Start with an incomplete interface. + // Start with an incomplete named constraint. + // + // The generic_with_self_id is constructed by the NamedConstraintWithSelfDecl + // instruction inside the NamedConstraintDecl's body. named_constraint_decl.named_constraint_id = context.local_named_constraints().Add( {GetIncompleteLocalEntityBase(context, named_constraint_decl_id, import_named_constraint), - {.scope_id = import_named_constraint.is_complete() - ? AddPlaceholderNameScope(context) - : SemIR::NameScopeId::None}}); + {.scope_without_self_id = import_named_constraint.is_complete() + ? AddPlaceholderNameScope(context) + : SemIR::NameScopeId::None, + .scope_with_self_id = import_named_constraint.is_complete() + ? AddPlaceholderNameScope(context) + : SemIR::NameScopeId::None}}); if (import_named_constraint.has_parameters()) { named_constraint_decl.type_id = GetGenericNamedConstraintType( @@ -2909,7 +3073,7 @@ static auto ImportNamedConstraintDecl( enclosing_specific_id); } - // Write the interface ID into the InterfaceDecl. + // Write the named constraint ID into the NameConstraintDecl. auto interface_const_id = ReplacePlaceholderImportedInst( context, named_constraint_decl_id, named_constraint_decl); return {named_constraint_decl.named_constraint_id, interface_const_id}; @@ -2922,10 +3086,10 @@ static auto ImportNamedConstraintDefinition( const SemIR::NamedConstraint& import_named_constraint, SemIR::NamedConstraint& new_named_constraint, SemIR::InstId self_param_id) -> void { - auto& new_scope = - context.local_name_scopes().Get(new_named_constraint.scope_id); - const auto& import_scope = - context.import_name_scopes().Get(import_named_constraint.scope_id); + auto& new_scope = context.local_name_scopes().Get( + new_named_constraint.scope_without_self_id); + const auto& import_scope = context.import_name_scopes().Get( + import_named_constraint.scope_without_self_id); // Push a block so that we can add scoped instructions to it. context.local_context().inst_block_stack().Push(); @@ -2933,10 +3097,9 @@ static auto ImportNamedConstraintDefinition( new_named_constraint.first_owning_decl_id, SemIR::NameId::None, new_named_constraint.parent_scope_id); - new_named_constraint.body_block_id = + new_named_constraint.body_block_without_self_id = context.local_context().inst_block_stack().Pop(); new_named_constraint.self_param_id = self_param_id; - new_named_constraint.complete = import_named_constraint.complete; } static auto TryResolveTypedInst(ImportRefResolver& resolver, @@ -3004,6 +3167,12 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, if (import_named_constraint.is_complete()) { self_param_id = GetLocalConstantInstId(resolver, import_named_constraint.self_param_id); + + // Importing the `generic_with_self_id` imports the + // NamedConstraintWithSelfDecl which (if it's complete) marks the local + // named constraint as complete. The NamedConstraintWithSelfDecl also sets + // the `generic_with_self_id` field on the local interface. + GetLocalConstantId(resolver, import_named_constraint.generic_with_self_id); } auto& new_named_constraint = resolver.local_named_constraints().Get(named_constraint_id); @@ -3030,12 +3199,136 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver, ImportNamedConstraintDefinition(resolver, import_named_constraint, new_named_constraint, *self_param_id); } + + // The named constraint's `generic_with_self_id` is filled out and finished by + // importing the NamedConstraintWithSelfDecl instruction which we find inside + // the NamedConstraintDecl. return ResolveResult::FinishGenericOrDone( resolver, named_constraint_const_id, new_named_constraint.first_decl_id(), import_named_constraint.generic_id, new_named_constraint.generic_id, generic_data); } +static auto TryResolveTypedInst(ImportRefResolver& resolver, + SemIR::NamedConstraintWithSelfDecl inst, + SemIR::ConstantId const_id) -> ResolveResult { + auto constraint_const_id = + GetLocalConstantId(resolver, resolver.import_named_constraints() + .Get(inst.named_constraint_id) + .first_owning_decl_id); + + // These are set differently in each phase. + auto decl_id = SemIR::InstId::None; + auto local_constraint_id = SemIR::NamedConstraintId::None; + auto generic_with_self_id = SemIR::GenericId::None; + + // Note that NamedConstraintWithSelfDecl always occurs inside an + // NamedConstraintDecl, so the import here can rely on the `NamedConstraint` + // already existing. + + auto import_generic_with_self_id = resolver.import_named_constraints() + .Get(inst.named_constraint_id) + .generic_with_self_id; + + if (!const_id.has_value()) { + if (resolver.HasNewWork()) { + // This is the end of the first phase. Don't make a new generic yet if we + // already have new work. + return ResolveResult::Retry(); + } + + // Get the local named constraint ID from the constant value of the named + // constraint decl, which is either a GenericNamedConstraintType (if + // generic) or a FacetType (if not). + auto constraint_const_inst_id = + resolver.local_constant_values().GetInstId(constraint_const_id); + if (auto struct_value = resolver.local_insts().TryGetAs( + constraint_const_inst_id)) { + auto generic_constraint_type = + resolver.local_types().GetAs( + struct_value->type_id); + local_constraint_id = generic_constraint_type.named_constraint_id; + } else { + auto local_facet_type = resolver.local_insts().GetAs( + constraint_const_inst_id); + const auto& local_facet_type_info = + resolver.local_facet_types().Get(local_facet_type.facet_type_id); + auto single_interface = *local_facet_type_info.TryAsSingleExtend(); + CARBON_KIND_SWITCH(single_interface) { + case CARBON_KIND(SemIR::SpecificNamedConstraint specific_constraint): { + local_constraint_id = specific_constraint.named_constraint_id; + break; + } + case CARBON_KIND(SemIR::SpecificInterface _): { + CARBON_FATAL( + "Unexpected Interface in NamedConstraintDecl value's facet type"); + } + } + } + + // On the second phase, create a local decl instruction with a local generic + // ID. Store that generic ID in the local interface. + const auto& import_generic = + resolver.import_generics().Get(import_generic_with_self_id); + + SemIR::NamedConstraintWithSelfDecl constraint_with_self_decl = { + .named_constraint_id = SemIR::NamedConstraintId::None}; + decl_id = AddPlaceholderImportedInst(resolver, import_generic.decl_id, + constraint_with_self_decl); + generic_with_self_id = + ImportIncompleteGeneric(resolver, decl_id, import_generic_with_self_id); + constraint_with_self_decl.named_constraint_id = local_constraint_id; + const_id = ReplacePlaceholderImportedInst(resolver, decl_id, + constraint_with_self_decl); + + resolver.local_named_constraints() + .Get(local_constraint_id) + .generic_with_self_id = generic_with_self_id; + } else { + // On the third phase, get the interface, decl and generic IDs from the + // constant value of the decl (which is itself) from the second phase. + auto decl = + resolver.local_insts().GetAs( + resolver.local_constant_values().GetInstId(const_id)); + local_constraint_id = decl.named_constraint_id; + generic_with_self_id = resolver.local_named_constraints() + .Get(local_constraint_id) + .generic_with_self_id; + decl_id = resolver.local_generics().Get(generic_with_self_id).decl_id; + } + + auto generic_with_self_data = + GetLocalGenericData(resolver, import_generic_with_self_id); + if (resolver.HasNewWork()) { + return ResolveResult::Retry(const_id, decl_id); + } + + auto& local_constraint = resolver.local_named_constraints().Get( + resolver.local_insts() + .GetAs(decl_id) + .named_constraint_id); + const auto& import_constraint = + resolver.import_named_constraints().Get(inst.named_constraint_id); + + auto& new_scope = + resolver.local_name_scopes().Get(local_constraint.scope_with_self_id); + const auto& import_scope = + resolver.import_name_scopes().Get(import_constraint.scope_with_self_id); + + // Push a block so that we can add scoped instructions to it. + resolver.local_context().inst_block_stack().Push(); + InitializeNameScopeAndImportRefs(resolver, import_scope, new_scope, decl_id, + SemIR::NameId::None, + local_constraint.scope_without_self_id); + local_constraint.complete = import_constraint.complete; + local_constraint.body_block_with_self_id = + resolver.local_context().inst_block_stack().Pop(); + + return ResolveResult::FinishGenericOrDone( + resolver, const_id, decl_id, import_generic_with_self_id, + generic_with_self_id, generic_with_self_data); +} + static auto TryResolveTypedInst(ImportRefResolver& resolver, SemIR::FacetAccessType inst) -> ResolveResult { auto facet_value_inst_id = @@ -3699,9 +3992,15 @@ static auto TryResolveInstCanonical(ImportRefResolver& resolver, case CARBON_KIND(SemIR::InterfaceDecl inst): { return TryResolveTypedInst(resolver, inst, const_id); } + case CARBON_KIND(SemIR::InterfaceWithSelfDecl inst): { + return TryResolveTypedInst(resolver, inst, const_id); + } case CARBON_KIND(SemIR::NamedConstraintDecl inst): { return TryResolveTypedInst(resolver, inst, const_id); } + case CARBON_KIND(SemIR::NamedConstraintWithSelfDecl inst): { + return TryResolveTypedInst(resolver, inst, const_id); + } case CARBON_KIND(SemIR::RequireImplsDecl inst): { return TryResolveTypedInst(resolver, inst, const_id); } @@ -4053,10 +4352,12 @@ auto ImportRefResolver::Resolve(SemIR::InstId inst_id) -> SemIR::ConstantId { } else { work_stack_.pop_back(); - if (result.import_generic_id.has_value()) { - work_stack_.push_back( - GenericWork{.import_id = result.import_generic_id, - .local_id = result.local_generic_id}); + for (const auto& resolve : result.resolve_generic) { + if (resolve.import_generic_id.has_value()) { + work_stack_.push_back( + GenericWork{.import_id = resolve.import_generic_id, + .local_id = resolve.local_generic_id}); + } } } break; diff --git a/toolchain/check/interface.cpp b/toolchain/check/interface.cpp index 101b36d12161..083e6ee6c990 100644 --- a/toolchain/check/interface.cpp +++ b/toolchain/check/interface.cpp @@ -33,9 +33,10 @@ auto BuildAssociatedEntity(Context& context, SemIR::InterfaceId interface_id, return SemIR::ErrorInst::InstId; } - // This associated entity is being declared as a member of the self specific - // of the interface. - auto interface_specific_id = + // This associated entity is being declared as a member of an interface. We + // use the self-specific of the interface-without-self as the AssociatedEntity + // names the externally facing SpecificInterface (without self). + auto interface_without_self_specific_id = context.generics().GetSelfSpecific(interface_info.generic_id); // Register this declaration as declaring an associated entity. @@ -45,114 +46,24 @@ auto BuildAssociatedEntity(Context& context, SemIR::InterfaceId interface_id, // Name lookup for the declaration's name should name the associated entity, // not the declaration itself. - auto type_id = - GetAssociatedEntityType(context, interface_id, interface_specific_id); + auto type_id = GetAssociatedEntityType(context, interface_id, + interface_without_self_specific_id); return AddInst( context, SemIR::LocId(decl_id), {.type_id = type_id, .index = index, .decl_id = decl_id}); } -// Returns the `Self` binding for an interface, given a specific for the -// interface and a generic for an associated entity within it. -static auto GetSelfBinding(Context& context, - SemIR::SpecificId interface_specific_id, - SemIR::GenericId assoc_entity_generic_id) - -> SemIR::InstId { - const auto& generic = context.generics().Get(assoc_entity_generic_id); - auto bindings = context.inst_blocks().Get(generic.bindings_id); - auto interface_args_id = - context.specifics().GetArgsOrEmpty(interface_specific_id); - auto interface_args = context.inst_blocks().Get(interface_args_id); - - // The `Self` binding is the first binding after the interface's arguments. - auto self_binding_id = bindings[interface_args.size()]; - - // Check that we found the self binding. The binding might be a - // `SymbolicBinding` or an `ImportRef` naming one. - auto self_binding_const_inst_id = - context.constant_values().GetConstantInstId(self_binding_id); - auto bind_name_inst = - context.insts().GetAs(self_binding_const_inst_id); - CARBON_CHECK( - context.entity_names().Get(bind_name_inst.entity_name_id).name_id == - SemIR::NameId::SelfType, - "Expected a Self binding, found {0}", bind_name_inst); - - return self_binding_id; -} - -// Construct a facet value that can be used for the `Self` binding of entities -// inside an interface. -// -// The `interface_specific_id` is the specific of the interface around the -// `Self`. The `generic_id` is for member of the interface that the `Self` value -// will be for. The `self_witness_id` is an impl witness for the interface that -// the `self_type_id` implements that interface. It should come from an impl -// definition with the given self-type and the interface as its constraint. -// -// The returned facet value can be used as the `Self` value in a specific for -// the generic member of the interface, and can appear in its specific. As such, -// this is a building block of GetSelfSpecificForInterfaceMemberWithSelfType. -static auto GetSelfFacetValueForInterfaceMemberSpecific( - Context& context, SemIR::SpecificId interface_specific_id, - SemIR::GenericId generic_id, SemIR::TypeId self_type_id, - SemIR::InstId self_witness_id) -> SemIR::InstId { - auto self_binding_id = - GetSelfBinding(context, interface_specific_id, generic_id); - auto self_facet_type_id = SemIR::GetTypeOfInstInSpecific( - context.sem_ir(), interface_specific_id, self_binding_id); - // Create a facet value to be the value of `Self` in the interface. - // TODO: Pass this in instead of creating it here. The caller sometimes - // already has a facet value. - auto type_inst_id = context.types().GetTypeInstId(self_type_id); - auto witnesses_block_id = - context.inst_blocks().AddCanonical({self_witness_id}); - auto self_value_const_id = TryEvalInst( - context, SemIR::FacetValue{.type_id = self_facet_type_id, - .type_inst_id = type_inst_id, - .witnesses_block_id = witnesses_block_id}); - return context.constant_values().GetInstId(self_value_const_id); -} - -// Builds and returns the argument list from `interface_specific_id` with a -// value for the `Self` parameter of `generic_id` appended. -static auto GetGenericArgsWithSelfType(Context& context, - SemIR::SpecificId interface_specific_id, - SemIR::GenericId generic_id, - SemIR::TypeId self_type_id, - SemIR::InstId witness_inst_id, - std::size_t reserve_args_size = 0) - -> llvm::SmallVector { - auto interface_args_id = - context.specifics().GetArgsOrEmpty(interface_specific_id); - auto interface_args = context.inst_blocks().Get(interface_args_id); - - llvm::SmallVector arg_ids; - arg_ids.reserve(std::max(reserve_args_size, interface_args.size() + 1)); - - // Start with the enclosing arguments from the interface. - llvm::append_range(arg_ids, interface_args); - - // Add the `Self` argument. - arg_ids.push_back(GetSelfFacetValueForInterfaceMemberSpecific( - context, interface_specific_id, generic_id, self_type_id, - witness_inst_id)); - - return arg_ids; -} - auto GetSelfSpecificForInterfaceMemberWithSelfType( Context& context, SemIR::LocId loc_id, - SemIR::SpecificId interface_specific_id, SemIR::GenericId generic_id, - SemIR::SpecificId enclosing_specific_id, SemIR::TypeId self_type_id, - SemIR::InstId witness_inst_id) -> SemIR::SpecificId { + SemIR::SpecificId interface_with_self_specific_id, + SemIR::GenericId generic_id, SemIR::SpecificId enclosing_specific_id) + -> SemIR::SpecificId { const auto& generic = context.generics().Get(generic_id); auto self_specific_args = context.inst_blocks().Get( context.specifics().Get(generic.self_specific_id).args_id); - auto arg_ids = GetGenericArgsWithSelfType( - context, interface_specific_id, generic_id, self_type_id, witness_inst_id, - self_specific_args.size()); + auto arg_ids = llvm::SmallVector(context.inst_blocks().Get( + context.specifics().GetArgsOrEmpty(interface_with_self_specific_id))); // Determine the number of specific arguments that enclose the point where // this self specific will be used from. In an impl, this will be the number @@ -189,12 +100,9 @@ auto GetSelfSpecificForInterfaceMemberWithSelfType( return MakeSpecific(context, loc_id, generic_id, arg_ids); } -auto GetTypeForSpecificAssociatedEntity(Context& context, SemIR::LocId loc_id, - SemIR::SpecificId interface_specific_id, - SemIR::InstId decl_id, - SemIR::TypeId self_type_id, - SemIR::InstId self_witness_id) - -> SemIR::TypeId { +auto GetTypeForSpecificAssociatedEntity( + Context& context, SemIR::SpecificId interface_with_self_specific_id, + SemIR::InstId decl_id) -> SemIR::TypeId { auto decl_constant_inst_id = context.constant_values().GetConstantInstId(decl_id); if (decl_constant_inst_id == SemIR::ErrorInst::InstId) { @@ -203,28 +111,19 @@ auto GetTypeForSpecificAssociatedEntity(Context& context, SemIR::LocId loc_id, auto decl = context.insts().Get(decl_constant_inst_id); if (auto assoc_const = decl.TryAs()) { - // Form a specific for the associated constant, and grab the type from - // there. - auto generic_id = context.associated_constants() - .Get(assoc_const->assoc_const_id) - .generic_id; - auto arg_ids = - GetGenericArgsWithSelfType(context, interface_specific_id, generic_id, - self_type_id, self_witness_id); - auto const_specific_id = MakeSpecific(context, loc_id, generic_id, arg_ids); - return SemIR::GetTypeOfInstInSpecific(context.sem_ir(), const_specific_id, - decl_id); + return SemIR::GetTypeOfInstInSpecific( + context.sem_ir(), interface_with_self_specific_id, decl_id); } if (auto fn = context.types().TryGetAs(decl.type_id())) { // Form the type of the function within the interface, and attach the `Self` // type. auto interface_fn_type_id = SemIR::GetTypeOfInstInSpecific( - context.sem_ir(), interface_specific_id, decl_id); - auto self_facet_id = GetSelfFacetValueForInterfaceMemberSpecific( - context, interface_specific_id, - context.functions().Get(fn->function_id).generic_id, self_type_id, - self_witness_id); + context.sem_ir(), interface_with_self_specific_id, decl_id); + auto self_facet_id = context.inst_blocks() + .Get(context.specifics().GetArgsOrEmpty( + interface_with_self_specific_id)) + .back(); return GetFunctionTypeWithSelfType( context, context.types().GetTypeInstId(interface_fn_type_id), self_facet_id); @@ -233,9 +132,11 @@ auto GetTypeForSpecificAssociatedEntity(Context& context, SemIR::LocId loc_id, CARBON_FATAL("Unexpected kind for associated constant {0}", decl); } -auto AddSelfGenericParameter(Context& context, SemIR::LocId definition_loc_id, - SemIR::TypeId type_id, SemIR::NameScopeId scope_id, - bool is_template) -> SemIR::InstId { +auto AddSelfSymbolicBindingToScope(Context& context, + SemIR::LocId definition_loc_id, + SemIR::TypeId type_id, + SemIR::NameScopeId scope_id, + bool is_template) -> SemIR::InstId { auto entity_name_id = context.entity_names().AddSymbolicBindingName( SemIR::NameId::SelfType, scope_id, context.scope_stack().AddCompileTimeBinding(), is_template); @@ -246,7 +147,6 @@ auto AddSelfGenericParameter(Context& context, SemIR::LocId definition_loc_id, {.type_id = type_id, .entity_name_id = entity_name_id, .value_id = SemIR::InstId::None}); - context.scope_stack().PushCompileTimeBinding(self_param_inst_id); context.name_scopes().AddRequiredName(scope_id, SemIR::NameId::SelfType, self_param_inst_id); return self_param_inst_id; diff --git a/toolchain/check/interface.h b/toolchain/check/interface.h index 042f7e7ac5f9..6ed6869e3228 100644 --- a/toolchain/check/interface.h +++ b/toolchain/check/interface.h @@ -29,26 +29,25 @@ auto BuildAssociatedEntity(Context& context, SemIR::InterfaceId interface_id, // given a specific for the interface plus a type to use as `Self`. auto GetSelfSpecificForInterfaceMemberWithSelfType( Context& context, SemIR::LocId loc_id, - SemIR::SpecificId interface_specific_id, SemIR::GenericId generic_id, - SemIR::SpecificId enclosing_specific_id, SemIR::TypeId self_type_id, - SemIR::InstId witness_inst_id) -> SemIR::SpecificId; + SemIR::SpecificId interface_with_self_specific_id, + SemIR::GenericId generic_id, SemIR::SpecificId enclosing_specific_id) + -> SemIR::SpecificId; // Gets the type of the specified associated entity, given the specific for the // interface and the type of `Self`. -auto GetTypeForSpecificAssociatedEntity(Context& context, SemIR::LocId loc_id, - SemIR::SpecificId interface_specific_id, - SemIR::InstId decl_id, - SemIR::TypeId self_type_id, - SemIR::InstId self_witness_id) - -> SemIR::TypeId; +auto GetTypeForSpecificAssociatedEntity( + Context& context, SemIR::SpecificId interface_with_self_specific_id, + SemIR::InstId decl_id) -> SemIR::TypeId; // Creates a symbolic binding for `Self` of type `type_id` in the scope of -// `scope_id`, and add the name `Self` for the compile time binding. +// `scope_id`. // // Returns the symbolic binding instruction. -auto AddSelfGenericParameter(Context& context, SemIR::LocId definition_loc_id, - SemIR::TypeId type_id, SemIR::NameScopeId scope_id, - bool is_template) -> SemIR::InstId; +auto AddSelfSymbolicBindingToScope(Context& context, + SemIR::LocId definition_loc_id, + SemIR::TypeId type_id, + SemIR::NameScopeId scope_id, + bool is_template) -> SemIR::InstId; // Given a search result `lookup_result` for `name`, returns the previous valid // declaration of `name` if there is one. The `entity` is a new decl of the same diff --git a/toolchain/check/member_access.cpp b/toolchain/check/member_access.cpp index e72d556ab5b6..501e22806112 100644 --- a/toolchain/check/member_access.cpp +++ b/toolchain/check/member_access.cpp @@ -13,6 +13,7 @@ #include "toolchain/check/convert.h" #include "toolchain/check/eval.h" #include "toolchain/check/facet_type.h" +#include "toolchain/check/generic.h" #include "toolchain/check/impl_lookup.h" #include "toolchain/check/import_ref.h" #include "toolchain/check/inst.h" @@ -27,6 +28,7 @@ #include "toolchain/sem_ir/ids.h" #include "toolchain/sem_ir/inst.h" #include "toolchain/sem_ir/name_scope.h" +#include "toolchain/sem_ir/specific_interface.h" #include "toolchain/sem_ir/typed_insts.h" namespace Carbon::Check { @@ -175,11 +177,9 @@ static auto ScopeNeedsImplLookup(Context& context, return true; } -static auto AccessMemberOfImplWitness(Context& context, SemIR::LocId loc_id, - SemIR::TypeId self_type_id, - SemIR::InstId witness_id, - SemIR::SpecificId interface_specific_id, - SemIR::InstId member_id) +static auto AccessMemberOfImplWitness( + Context& context, SemIR::LocId loc_id, SemIR::InstId witness_id, + SemIR::SpecificId interface_with_self_specific_id, SemIR::InstId member_id) -> SemIR::InstId { auto member_value_id = context.constant_values().GetConstantInstId(member_id); if (!member_value_id.has_value()) { @@ -200,8 +200,7 @@ static auto AccessMemberOfImplWitness(Context& context, SemIR::LocId loc_id, // associated entity to find the type of the member access. LoadImportRef(context, assoc_entity->decl_id); auto assoc_type_id = GetTypeForSpecificAssociatedEntity( - context, loc_id, interface_specific_id, assoc_entity->decl_id, - self_type_id, witness_id); + context, interface_with_self_specific_id, assoc_entity->decl_id); return GetOrAddInst(context, loc_id, {.type_id = assoc_type_id, @@ -238,8 +237,9 @@ static auto PerformImplLookup( MakeDiagnosticBuilderFn missing_impl_diagnoser = nullptr) -> SemIR::InstId { auto self_type_id = context.types().GetTypeIdForTypeConstantId(type_const_id); // TODO: Avoid forming and then immediately decomposing a `FacetType` here. - auto interface_type_id = GetInterfaceType(context, assoc_type.interface_id, - assoc_type.interface_specific_id); + auto interface_type_id = + GetInterfaceType(context, assoc_type.interface_id, + assoc_type.interface_without_self_specific_id); auto lookup_result = LookupImplWitness(context, loc_id, type_const_id, interface_type_id.AsConstantId()); if (!lookup_result.has_value()) { @@ -266,8 +266,16 @@ static auto PerformImplLookup( auto witness_id = GetWitnessFromSingleImplLookupResult(context, lookup_result); - return AccessMemberOfImplWitness(context, loc_id, self_type_id, witness_id, - assoc_type.interface_specific_id, member_id); + + auto self_facet = GetConstantFacetValueForTypeAndInterface( + context, context.types().GetTypeInstId(self_type_id), + assoc_type.GetSpecificInterface(), witness_id); + const auto& interface = context.interfaces().Get(assoc_type.interface_id); + auto interface_with_self_specific_id = MakeSpecificWithInnerSelf( + context, loc_id, interface.generic_id, interface.generic_with_self_id, + assoc_type.interface_without_self_specific_id, self_facet); + return AccessMemberOfImplWitness(context, loc_id, witness_id, + interface_with_self_specific_id, member_id); } // Performs a member name lookup into the specified scope, including performing @@ -647,31 +655,27 @@ auto PerformAction(Context& context, SemIR::LocId loc_id, static auto GetAssociatedValueImpl(Context& context, SemIR::LocId loc_id, SemIR::InstId base_id, const SemIR::AssociatedEntity& assoc_entity, - SemIR::SpecificInterface interface) + SemIR::SpecificInterface specific_interface) -> SemIR::InstId { // Convert to the interface type of the associated member, to get a facet // value. - auto interface_type_id = - GetInterfaceType(context, interface.interface_id, interface.specific_id); - auto facet_inst_id = + auto interface_type_id = GetInterfaceType( + context, specific_interface.interface_id, specific_interface.specific_id); + auto self_facet_inst_id = ConvertToValueOfType(context, loc_id, base_id, interface_type_id); - if (facet_inst_id == SemIR::ErrorInst::InstId) { + if (self_facet_inst_id == SemIR::ErrorInst::InstId) { return SemIR::ErrorInst::InstId; } - // That facet value has both the self type we need below and the witness - // we are going to use to look up the value of the associated member. - auto self_type_const_id = TryEvalInst( - context, {.type_id = SemIR::TypeType::TypeId, - .facet_value_inst_id = facet_inst_id}); + + auto self_facet_const_id = context.constant_values().Get(self_facet_inst_id); + // TODO: We should be able to lookup constant associated values from runtime // facet values by using their FacetType only, but we assume constant values // for impl lookup at the moment. - if (!self_type_const_id.is_constant()) { + if (!self_facet_const_id.is_constant()) { context.TODO(loc_id, "associated value lookup on runtime facet value"); return SemIR::ErrorInst::InstId; } - auto self_type_id = - context.types().GetTypeIdForTypeConstantId(self_type_const_id); // TODO: If `ConvertToValueOfType` returned a `FacetValue`, we already got a // witness for this interface there. We don't need to do both a @@ -679,20 +683,27 @@ static auto GetAssociatedValueImpl(Context& context, SemIR::LocId loc_id, // want to do LookupImplWitness unconditionally (eg. if `base_id` has exactly // the right FacetType already), can we drop the ConvertToValueOfType step? auto lookup_result = LookupImplWitness( - context, loc_id, context.constant_values().Get(facet_inst_id), - EvalOrAddInst(context, loc_id, - FacetTypeFromInterface(context, interface.interface_id, - interface.specific_id))); + context, loc_id, self_facet_const_id, + EvalOrAddInst( + context, loc_id, + FacetTypeFromInterface(context, specific_interface.interface_id, + specific_interface.specific_id))); CARBON_CHECK(lookup_result.has_value()); auto witness_id = GetWitnessFromSingleImplLookupResult(context, lookup_result); + const auto& interface = + context.interfaces().Get(specific_interface.interface_id); + + auto interface_with_self_specific_id = MakeSpecificWithInnerSelf( + context, loc_id, interface.generic_id, interface.generic_with_self_id, + specific_interface.specific_id, self_facet_const_id); + // Before we can access the element of the witness, we need to figure out // the type of that element. It depends on the self type and the specific // interface. auto assoc_type_id = GetTypeForSpecificAssociatedEntity( - context, loc_id, interface.specific_id, assoc_entity.decl_id, - self_type_id, witness_id); + context, interface_with_self_specific_id, assoc_entity.decl_id); // Now that we have the witness, an index into it, and the type of the // result, return the element of the witness. return GetOrAddInst(context, loc_id, @@ -704,7 +715,8 @@ static auto GetAssociatedValueImpl(Context& context, SemIR::LocId loc_id, auto GetAssociatedValue(Context& context, SemIR::LocId loc_id, SemIR::InstId base_id, SemIR::ConstantId assoc_entity_const_id, - SemIR::SpecificInterface interface) -> SemIR::InstId { + SemIR::SpecificInterface specific_interface) + -> SemIR::InstId { // TODO: This function shares a code with PerformCompoundMemberAccess(), // it would be nice to reduce the duplication. @@ -716,7 +728,7 @@ auto GetAssociatedValue(Context& context, SemIR::LocId loc_id, LoadImportRef(context, decl_id); return GetAssociatedValueImpl(context, loc_id, base_id, assoc_entity, - interface); + specific_interface); } auto PerformCompoundMemberAccess(Context& context, SemIR::LocId loc_id, diff --git a/toolchain/check/modifiers.cpp b/toolchain/check/modifiers.cpp index ab95211a7f2c..f50dc717be98 100644 --- a/toolchain/check/modifiers.cpp +++ b/toolchain/check/modifiers.cpp @@ -221,10 +221,12 @@ auto RestrictExternModifierOnDecl(Context& context, } } -auto RequireDefaultFinalOnlyInInterfaces( - Context& context, DeclIntroducerState& introducer, - std::optional parent_scope_inst) -> void { - if (parent_scope_inst && parent_scope_inst->Is()) { +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()) { // Both `default` and `final` allowed in an interface definition. return; } diff --git a/toolchain/check/modifiers.h b/toolchain/check/modifiers.h index fd1cda704b46..961cfba3210d 100644 --- a/toolchain/check/modifiers.h +++ b/toolchain/check/modifiers.h @@ -52,10 +52,11 @@ auto RestrictExternModifierOnDecl(Context& context, // declarations where they are not allowed. Right now they are only allowed // inside interfaces. // -// `parent_scope_inst` may be nullopt for a declaration in a block scope. -auto RequireDefaultFinalOnlyInInterfaces( - Context& context, DeclIntroducerState& introducer, - std::optional parent_scope_inst) -> void; +// `parent_scope_id` may be None for a declaration in a block scope. +auto RequireDefaultFinalOnlyInInterfaces(Context& context, + DeclIntroducerState& introducer, + SemIR::NameScopeId parent_scope_id) + -> void; } // namespace Carbon::Check diff --git a/toolchain/check/name_lookup.cpp b/toolchain/check/name_lookup.cpp index 0b189aa01e4e..6d1f4490734b 100644 --- a/toolchain/check/name_lookup.cpp +++ b/toolchain/check/name_lookup.cpp @@ -110,6 +110,8 @@ auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id, context, loc_id, name_id, LookupScope{.name_scope_id = lookup_scope_id, .specific_id = specific_id, + // A non-lexical lookup does not know what `Self` will + // be; it remains symbolic if needed. .self_const_id = SemIR::ConstantId::None}, /*required=*/false); non_lexical_result.scope_result.is_found()) { @@ -125,7 +127,8 @@ auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id, context.sem_ir(), non_lexical_result.specific_id, target_inst_id))) { auto interface_decl = - context.insts().GetAs(scope.inst_id()); + context.insts().GetAs( + scope.inst_id()); const auto& interface = context.interfaces().Get(interface_decl.interface_id); SemIR::InstId result_inst_id = GetAssociatedValue( @@ -286,6 +289,56 @@ struct ProhibitedAccessInfo { bool is_parent_access; }; +static auto GetSelfFacetForInterfaceFromLookupSelfType( + Context& context, const SemIR::GenericId generic_with_self_id, + SemIR::ConstantId self_type_const_id) -> SemIR::ConstantId { + if (!self_type_const_id.has_value()) { + // In a lookup into a non-lexical scope, there is no self-type from the + // lookup for the interface-with-self specific. So the self-type we use is + // the abstract symbolic Self from the self specific of the + // interface-with-self. + auto self_specific_args_id = context.specifics().GetArgsOrEmpty( + context.generics().GetSelfSpecific(generic_with_self_id)); + auto self_specific_args = context.inst_blocks().Get(self_specific_args_id); + return context.constant_values().Get(self_specific_args.back()); + } + + if (context.insts().Is( + context.constant_values().GetInstId(self_type_const_id))) { + // We are looking directly in a facet type, like `I.F` for an interface `I`, + // which means there is no self-type from the lookup for the + // interface-with-self specific. So the self-type we use is the abstract + // symbolic Self from the self specific of the interface-with-self. + auto self_specific_args_id = context.specifics().GetArgsOrEmpty( + context.generics().GetSelfSpecific(generic_with_self_id)); + auto self_specific_args = context.inst_blocks().Get(self_specific_args_id); + return context.constant_values().Get(self_specific_args.back()); + } + + // Extended name lookup into a type, like `x.F`, can find a facet + // type extended scope from the type of `x`. The type of `x` maybe a + // facet converted to a type, so drop the `as type` conversion if + // so. + auto canonical_facet_or_type = + GetCanonicalFacetOrTypeValue(context, self_type_const_id); + + auto type_of_canonical_facet_or_type = + context.insts() + .Get(context.constant_values().GetInstId(canonical_facet_or_type)) + .type_id(); + if (type_of_canonical_facet_or_type == SemIR::TypeType::TypeId) { + // If we still have a type, turn it into a facet for use in the + // interface-with-self specific. + return GetConstantFacetValueForType( + context, context.types().GetAsTypeInstId( + context.constant_values().GetInstId(self_type_const_id))); + } + + // We have a facet for the self-type (or perhaps an ErrorInst), which we can + // use directly in the interface-with-self specific. + return canonical_facet_or_type; +} + auto AppendLookupScopesForConstant(Context& context, SemIR::LocId loc_id, SemIR::ConstantId lookup_const_id, SemIR::ConstantId self_type_const_id, @@ -318,6 +371,7 @@ auto AppendLookupScopesForConstant(Context& context, SemIR::LocId loc_id, .self_const_id = self_type_const_id}); return true; } + // Extended scopes may point to a FacetType. if (auto facet_type = lookup.TryAs()) { // TODO: Allow name lookup into facet types that are being defined even if // they are not complete. @@ -337,15 +391,33 @@ auto AppendLookupScopesForConstant(Context& context, SemIR::LocId loc_id, // Name lookup into "extend" constraints but not "self impls" constraints. for (const auto& extend : facet_type_info.extend_constraints) { auto& interface = context.interfaces().Get(extend.interface_id); - scopes->push_back({.name_scope_id = interface.scope_id, - .specific_id = extend.specific_id, + + // We need to build the inner interface-with-self specific. To do that + // we need to determine the self facet value to use. + auto self_facet = GetSelfFacetForInterfaceFromLookupSelfType( + context, interface.generic_with_self_id, self_type_const_id); + auto interface_with_self_specific_id = MakeSpecificWithInnerSelf( + context, loc_id, interface.generic_id, + interface.generic_with_self_id, extend.specific_id, self_facet); + + scopes->push_back({.name_scope_id = interface.scope_with_self_id, + .specific_id = interface_with_self_specific_id, .self_const_id = self_type_const_id}); } for (const auto& extend : facet_type_info.extend_named_constraints) { auto& constraint = context.named_constraints().Get(extend.named_constraint_id); - scopes->push_back({.name_scope_id = constraint.scope_id, - .specific_id = extend.specific_id, + + // We need to build the inner constraint-with-self specific. To do that + // we need to determine the self facet value to use. + auto self_facet = GetSelfFacetForInterfaceFromLookupSelfType( + context, constraint.generic_with_self_id, self_type_const_id); + auto constraint_with_self_specific_id = MakeSpecificWithInnerSelf( + context, loc_id, constraint.generic_id, + constraint.generic_with_self_id, extend.specific_id, self_facet); + + scopes->push_back({.name_scope_id = constraint.scope_with_self_id, + .specific_id = constraint_with_self_specific_id, .self_const_id = self_type_const_id}); } } else { @@ -458,51 +530,13 @@ auto LookupQualifiedName(Context& context, SemIR::LocId loc_id, // access, look in its extended scopes. const auto& extended = name_scope.extended_scopes(); scopes.reserve(scopes.size() + extended.size()); - for (auto [extended_id, inner_self_id] : llvm::reverse(extended)) { + for (auto extended_id : llvm::reverse(extended)) { // Substitute into the constant describing the extended scope to // determine its corresponding specific. CARBON_CHECK(extended_id.has_value()); LoadImportRef(context, extended_id); SemIR::ConstantId const_id = GetConstantValueInSpecific( context.sem_ir(), specific_id, extended_id); - - // Apply self_const_id to the extended_id, replacing inner_self_id - // inside. - // - // TODO: We do this by substituting a `Self` value that the extended - // scope provides us with the self type/facet of the name lookup. But - // we'd like to avoid using substitution, and do this through the - // generic system with a specific and/or eval. Ideally it's somehow done - // as part of the `GetConstantValueInSpecific` call above, but with - // providing the additional information of the self type/facet of the - // name lookup. Further thoughts here: - // https://discord.com/channels/655572317891461132/941071822756143115/1463277684082737214 - if (inner_self_id.has_value() && self_const_id.has_value()) { - LoadImportRef(context, inner_self_id); - - auto inner_self_binding = - context.insts().GetAs( - context.constant_values().GetConstantInstId(inner_self_id)); - auto entity_id = inner_self_binding.entity_name_id; - auto bind_index = context.entity_names().Get(entity_id).bind_index(); - auto facet_value = SemIR::ConstantId::None; - if (auto self_type_id = - context.types().TryGetTypeIdForTypeConstantId(self_const_id); - self_type_id.has_value()) { - // The self for member lookup is a type, we need a facet value to - // replace `Self`. - facet_value = GetConstantFacetValueForType( - context, context.types().GetTypeInstId(self_type_id)); - } else { - // The self for member lookup is a facet value, use it as is to - // replace `Self`. - facet_value = self_const_id; - } - llvm::SmallVector substitutions = { - {.bind_id = bind_index, .replacement_id = facet_value}}; - const_id = SubstConstant(context, loc_id, const_id, substitutions); - } - if (!AppendLookupScopesForConstant(context, loc_id, const_id, self_const_id, &scopes)) { // TODO: Handle case where we have a symbolic type and instead should diff --git a/toolchain/check/require_impls.cpp b/toolchain/check/require_impls.cpp deleted file mode 100644 index 53e963076cfb..000000000000 --- a/toolchain/check/require_impls.cpp +++ /dev/null @@ -1,103 +0,0 @@ -// Part of the Carbon Language project, under the Apache License v2.0 with LLVM -// Exceptions. See /LICENSE for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -#include "toolchain/check/require_impls.h" - -#include "toolchain/check/generic.h" -#include "toolchain/check/inst.h" -#include "toolchain/check/interface.h" -#include "toolchain/sem_ir/ids.h" -#include "toolchain/sem_ir/typed_insts.h" - -namespace Carbon::Check { - -static auto GetEnclosingDeclFromEnclosingSpecificId( - Context& context, SemIR::SpecificId enclosing_specific_id) -> SemIR::Inst { - return context.insts().Get( - context.generics() - .Get(context.specifics().Get(enclosing_specific_id).generic_id) - .decl_id); -} - -static auto GetSpecificArgsFromEnclosingSpecific( - Context& context, SemIR::SpecificId enclosing_specific_id) - -> llvm::SmallVector { - auto enclosing_specific_args_id = - context.specifics().GetArgsOrEmpty(enclosing_specific_id); - auto enclosing_specific_args = - context.inst_blocks().Get(enclosing_specific_args_id); - llvm::SmallVector arg_ids; - // Reserve space for the `Self` after the enclosing specific's args. - arg_ids.reserve(enclosing_specific_args.size() + 1); - llvm::append_range(arg_ids, enclosing_specific_args); - return arg_ids; -} - -auto GetRequireImplsSpecificFromEnclosingSpecific( - Context& context, const SemIR::RequireImpls& require, - SemIR::SpecificId enclosing_specific_id) -> RequireImplsSpecific { - if (enclosing_specific_id.has_value()) { - auto enclosing_generic_decl = - GetEnclosingDeclFromEnclosingSpecificId(context, enclosing_specific_id); - CARBON_CHECK(enclosing_generic_decl.Is() || - enclosing_generic_decl.Is(), - "Incorrect enclosing specific for RequireImpls. Expected an " - "interface or named constraint. Found {0}.", - enclosing_generic_decl); - } - - auto arg_ids = - GetSpecificArgsFromEnclosingSpecific(context, enclosing_specific_id); - - // Specifics inside an interface/constraint also include the `Self` of the - // enclosing entity. We copy that `Self` from the self-specific of the - // RequireImpls generic. - const auto& require_generic = context.generics().Get(require.generic_id); - const auto& require_self_specific = - context.specifics().Get(require_generic.self_specific_id); - auto require_self_specific_args = - context.inst_blocks().Get(require_self_specific.args_id); - // The last argument of a `require` generic is always `Self`, as `require` - // can not have any parameters of its own, only enclosing parameters. - auto self_inst_id = require_self_specific_args.back(); - CARBON_CHECK(context.insts().Is(self_inst_id)); - arg_ids.push_back(self_inst_id); - - auto specific_id = MakeSpecific(context, SemIR::LocId(require.decl_id), - require.generic_id, arg_ids); - // TODO: Cache the specific on Context. - return {.specific_id = specific_id}; -} - -auto GetRequireImplsSpecificFromEnclosingSpecificWithSelfFacetValue( - Context& context, const SemIR::RequireImpls& require, - SemIR::SpecificId enclosing_specific_id, - SemIR::ConstantId self_facet_value_id) -> RequireImplsSpecific { - auto self_facet_value_inst_id = - context.constant_values().GetInstId(self_facet_value_id); - auto self_facet_value = context.insts().Get(self_facet_value_inst_id); - CARBON_CHECK(context.types().Is(self_facet_value.type_id()), - "{0}", self_facet_value); - - auto arg_ids = - GetSpecificArgsFromEnclosingSpecific(context, enclosing_specific_id); - arg_ids.push_back(self_facet_value_inst_id); - - auto specific_id = MakeSpecific(context, SemIR::LocId(require.decl_id), - require.generic_id, arg_ids); - // TODO: Cache the specific on Context. - return {.specific_id = specific_id}; -} - -auto GetConstantValueInRequireImplsSpecific(Context& context, - RequireImplsSpecific specific, - SemIR::InstId inst_id) - -> SemIR::ConstantId { - auto const_id = SemIR::GetConstantValueInSpecific( - context.sem_ir(), specific.specific_id, inst_id); - CARBON_CHECK(const_id.has_value(), "The specific has not been resolved?"); - return const_id; -} - -} // namespace Carbon::Check diff --git a/toolchain/check/require_impls.h b/toolchain/check/require_impls.h deleted file mode 100644 index 00c7e0fd65d1..000000000000 --- a/toolchain/check/require_impls.h +++ /dev/null @@ -1,52 +0,0 @@ -// Part of the Carbon Language project, under the Apache License v2.0 with LLVM -// Exceptions. See /LICENSE for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -#ifndef CARBON_TOOLCHAIN_CHECK_REQUIRE_IMPLS_H_ -#define CARBON_TOOLCHAIN_CHECK_REQUIRE_IMPLS_H_ - -#include "toolchain/check/context.h" -#include "toolchain/sem_ir/ids.h" -#include "toolchain/sem_ir/require_impls.h" - -namespace Carbon::Check { - -// A type-safe wrapper around the specific id of a RequireImpls entity. -// Constructed from a specific for its enclosing interface or constraint entity. -struct RequireImplsSpecific { - SemIR::SpecificId specific_id; -}; - -// Get the specific of a RequireImpls from the specific of its enclosing -// interface or named constraint. Since a `require` declaration can not -// introduce new generic bindings, the specific for the RequireImpls can be -// constructed from the enclosing one. -auto GetRequireImplsSpecificFromEnclosingSpecific( - Context& context, const SemIR::RequireImpls& require, - SemIR::SpecificId enclosing_specific_id) -> RequireImplsSpecific; - -// Like GetRequireImplsSpecificFromEnclosingSpecific but the `Self` value in the -// specific is replaced by a given facet value. -auto GetRequireImplsSpecificFromEnclosingSpecificWithSelfFacetValue( - Context& context, const SemIR::RequireImpls& require, - SemIR::SpecificId enclosing_specific_id, - SemIR::ConstantId self_facet_value_id) -> RequireImplsSpecific; - -// Returns the constant value of `inst_id` from inside a RequireImpls -// declaration, mapped into `enclosing_specific_id`. If an error results, it -// returns ErrorInst. -// -// An error can occur during monomorphization when the self-type was valid as a -// symbolic but becomes invalid with a more concrete specific. -// -// RequireImpls is always generic, so the instructions inside it must have a -// specific applied. That specific is constructed from a specific for the -// enclosing generic entity, with GetRequireImplsSpecificFromEnclosingSpecific. -auto GetConstantValueInRequireImplsSpecific(Context& context, - RequireImplsSpecific specific, - SemIR::InstId inst_id) - -> SemIR::ConstantId; - -} // namespace Carbon::Check - -#endif // CARBON_TOOLCHAIN_CHECK_REQUIRE_IMPLS_H_ diff --git a/toolchain/check/scope_stack.h b/toolchain/check/scope_stack.h index 620c47feebc0..759b4a403fb9 100644 --- a/toolchain/check/scope_stack.h +++ b/toolchain/check/scope_stack.h @@ -106,7 +106,7 @@ class ScopeStack { // Returns the current scope, if it is of the specified kind. Otherwise, // returns nullopt. template - auto GetCurrentScopeAs() -> std::optional { + auto TryGetCurrentScopeAs() -> std::optional { auto inst_id = PeekInstId(); if (!inst_id.has_value()) { return std::nullopt; @@ -114,6 +114,16 @@ class ScopeStack { return sem_ir_->insts().TryGetAs(inst_id); } + // Returns the current scope, assuming it is of the specified kind. + // Check-fails if there is no instruction for a current scope, or the scope is + // of a different kind. + template + auto GetCurrentScopeAs() -> InstT { + auto inst_id = PeekInstId(); + CARBON_CHECK(inst_id.has_value()); + return sem_ir_->insts().GetAs(inst_id); + } + // If there is no `returned var` in scope, sets the given instruction to be // the current `returned var` and returns an `None`. If there // is already a `returned var`, returns it instead. diff --git a/toolchain/check/testdata/alias/export_name.carbon b/toolchain/check/testdata/alias/export_name.carbon index 1b6ec30b4355..3c772f08abde 100644 --- a/toolchain/check/testdata/alias/export_name.carbon +++ b/toolchain/check/testdata/alias/export_name.carbon @@ -288,7 +288,6 @@ var d: D* = &c; // CHECK:STDOUT: %pattern_type.506: type = pattern_type %ptr.31e [concrete] // CHECK:STDOUT: %addr: %ptr.31e = addr_of file.%c.var [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -296,7 +295,8 @@ var d: D* = &c; // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.411: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%C) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.ed9: %ptr.as.Copy.impl.Op.type.411 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.31e, (%Copy.impl_witness.2c7) [concrete] -// CHECK:STDOUT: %.cda: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.259: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.64b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.259, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: = bound_method %addr, %ptr.as.Copy.impl.Op.ed9 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.ed9, @ptr.as.Copy.impl.Op(%C) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %addr, %ptr.as.Copy.impl.Op.specific_fn [concrete] @@ -361,7 +361,7 @@ var d: D* = &c; // CHECK:STDOUT: assign file.%c.var, %.loc7_1 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, file.%c [concrete = file.%c.var] // CHECK:STDOUT: %addr: %ptr.31e = addr_of %c.ref [concrete = constants.%addr] -// CHECK:STDOUT: %impl.elem0: %.cda = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] +// CHECK:STDOUT: %impl.elem0: %.64b = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] // CHECK:STDOUT: %bound_method.loc8_13.1: = bound_method %addr, %impl.elem0 [concrete = constants.%ptr.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%C) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.2: = bound_method %addr, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/array/bound_values.carbon b/toolchain/check/testdata/array/bound_values.carbon index c775e86bd6f2..9c535348b298 100644 --- a/toolchain/check/testdata/array/bound_values.carbon +++ b/toolchain/check/testdata/array/bound_values.carbon @@ -73,10 +73,10 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %AddWith.type.4c0: type = facet_type <@AddWith, @AddWith(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %AddWith.Op.type.0ee: type = fn_type @AddWith.Op, @AddWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %AddWith.impl_witness: = impl_witness imports.%AddWith.impl_witness_table [concrete] // CHECK:STDOUT: %AddWith.facet: %AddWith.type.4c0 = facet_value Core.IntLiteral, (%AddWith.impl_witness) [concrete] -// CHECK:STDOUT: %.27e: type = fn_type_with_self_type %AddWith.Op.type.0ee, %AddWith.facet [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type.900: type = fn_type @AddWith.WithSelf.Op, @AddWith(Core.IntLiteral, %AddWith.facet) [concrete] +// CHECK:STDOUT: %.302: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.900, %AddWith.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.AddWith.impl.Op.type: type = fn_type @Core.IntLiteral.as.AddWith.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.AddWith.impl.Op: %Core.IntLiteral.as.AddWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.AddWith.impl.Op.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.AddWith.impl.Op [concrete] @@ -96,7 +96,7 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem1: %.27e = impl_witness_access constants.%AddWith.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.AddWith.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.302 = impl_witness_access constants.%AddWith.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.AddWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %int_1, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.AddWith.impl.Op.bound] // CHECK:STDOUT: %Core.IntLiteral.as.AddWith.impl.Op.call: init Core.IntLiteral = call %bound_method(%int_1, %int_2) [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = value_of_initializer %Core.IntLiteral.as.AddWith.impl.Op.call [concrete = constants.%int_3.1ba] @@ -118,7 +118,6 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete] // CHECK:STDOUT: %As.type.346: type = facet_type <@As, @As(%u32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.b94: type = fn_type @As.Convert, @As(%u32) [concrete] // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.2b1: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.979: %Core.IntLiteral.as.As.impl.Convert.type.2b1 = struct_value () [symbolic] @@ -127,20 +126,21 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.3e7: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bbd: %Core.IntLiteral.as.As.impl.Convert.type.3e7 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.346 = facet_value Core.IntLiteral, (%As.impl_witness.e1d) [concrete] -// CHECK:STDOUT: %.548: type = fn_type_with_self_type %As.Convert.type.b94, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.89a: type = fn_type @As.WithSelf.Convert, @As(%u32, %As.facet) [concrete] +// CHECK:STDOUT: %.1a4: type = fn_type_with_self_type %As.WithSelf.Convert.type.89a, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_3.1ba, %Core.IntLiteral.as.As.impl.Convert.bbd [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.bbd, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d64: = bound_method %int_3.1ba, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.d14: %u32 = int_value 3 [concrete] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.7f8: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.0ea: %UInt.as.ImplicitAs.impl.Convert.type.7f8 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.895: = impl_witness imports.%ImplicitAs.impl_witness_table.493, @UInt.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.543: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.342: %UInt.as.ImplicitAs.impl.Convert.type.543 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.2c6: %ImplicitAs.type.139 = facet_value %u32, (%ImplicitAs.impl_witness.895) [concrete] -// CHECK:STDOUT: %.258: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.2c6 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.70d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.2c6) [concrete] +// CHECK:STDOUT: %.044: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.70d, %ImplicitAs.facet.2c6 [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.bound: = bound_method %int_3.d14, %UInt.as.ImplicitAs.impl.Convert.342 [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %UInt.as.ImplicitAs.impl.Convert.342, @UInt.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.c86: = bound_method %int_3.d14, %UInt.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -161,14 +161,14 @@ var b: array(1, 39999999999999999993); // CHECK:STDOUT: %int_3.loc6: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_32.loc6_21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [concrete = constants.%u32] -// CHECK:STDOUT: %impl.elem0.loc6_18.1: %.548 = impl_witness_access constants.%As.impl_witness.e1d, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bbd] +// CHECK:STDOUT: %impl.elem0.loc6_18.1: %.1a4 = impl_witness_access constants.%As.impl_witness.e1d, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bbd] // CHECK:STDOUT: %bound_method.loc6_18.1: = bound_method %int_3.loc6, %impl.elem0.loc6_18.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc6_18.1: = specific_function %impl.elem0.loc6_18.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_18.2: = bound_method %int_3.loc6, %specific_fn.loc6_18.1 [concrete = constants.%bound_method.d64] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %u32 = call %bound_method.loc6_18.2(%int_3.loc6) [concrete = constants.%int_3.d14] // CHECK:STDOUT: %.loc6_18.1: %u32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_3.d14] // CHECK:STDOUT: %.loc6_18.2: %u32 = converted %int_3.loc6, %.loc6_18.1 [concrete = constants.%int_3.d14] -// CHECK:STDOUT: %impl.elem0.loc6_18.2: %.258 = impl_witness_access constants.%ImplicitAs.impl_witness.895, element0 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.342] +// CHECK:STDOUT: %impl.elem0.loc6_18.2: %.044 = impl_witness_access constants.%ImplicitAs.impl_witness.895, element0 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.342] // CHECK:STDOUT: %bound_method.loc6_18.3: = bound_method %.loc6_18.2, %impl.elem0.loc6_18.2 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc6_18.2: = specific_function %impl.elem0.loc6_18.2, @UInt.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_18.4: = bound_method %.loc6_18.2, %specific_fn.loc6_18.2 [concrete = constants.%bound_method.c86] diff --git a/toolchain/check/testdata/array/import.carbon b/toolchain/check/testdata/array/import.carbon index f81c8f50efc2..df7b91a9be88 100644 --- a/toolchain/check/testdata/array/import.carbon +++ b/toolchain/check/testdata/array/import.carbon @@ -69,14 +69,14 @@ fn F() -> array(i32, 1) { // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %array_type: type = array_type %int_42, %i32 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] @@ -99,7 +99,7 @@ fn F() -> array(i32, 1) { // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc6_15.1: ref %i32 = array_index %.loc6_12.2, %n.ref // CHECK:STDOUT: %.loc6_15.2: %i32 = acquire_value %.loc6_15.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_15.1: = bound_method %.loc6_15.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_15.2: = bound_method %.loc6_15.2, %specific_fn diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index 04855648b871..72385a4266c5 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -58,14 +58,14 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] @@ -73,7 +73,6 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %tuple.2d5: %tuple.type.37f = tuple_value (%int_1.5b8, %int_2.ecc, %int_3.1ba) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -81,7 +80,8 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -113,7 +113,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %.loc4_15.1: ref %array_type = value_as_ref %arr.ref // CHECK:STDOUT: %.loc4_15.2: ref %i32 = array_index %.loc4_15.1, %i.ref // CHECK:STDOUT: %.loc4_15.3: %i32 = acquire_value %.loc4_15.2 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc4_15.1: = bound_method %.loc4_15.3, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc4_15.2: = bound_method %.loc4_15.3, %specific_fn @@ -129,7 +129,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc10_20.1: %tuple.type.37f = tuple_literal (%int_1.loc10_13, %int_2.loc10_16, %int_3) [concrete = constants.%tuple.2d5] // CHECK:STDOUT: %int_1.loc10_23: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc10_20.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_20.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_20.1: = bound_method %int_1.loc10_13, %impl.elem0.loc10_20.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc10_20.1: = specific_function %impl.elem0.loc10_20.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_20.2: = bound_method %int_1.loc10_13, %specific_fn.loc10_20.1 [concrete = constants.%bound_method.38b] @@ -139,7 +139,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc10_20.4: ref %i32 = array_index %.loc10_20.3, %int_0 // CHECK:STDOUT: %.loc10_20.5: init %i32 to %.loc10_20.4 = in_place_init %.loc10_20.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc10_20.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_20.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_20.3: = bound_method %int_2.loc10_16, %impl.elem0.loc10_20.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc10_20.2: = specific_function %impl.elem0.loc10_20.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_20.4: = bound_method %int_2.loc10_16, %specific_fn.loc10_20.2 [concrete = constants.%bound_method.646] @@ -148,7 +148,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %int_1.loc10_20: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc10_20.7: ref %i32 = array_index %.loc10_20.3, %int_1.loc10_20 // CHECK:STDOUT: %.loc10_20.8: init %i32 to %.loc10_20.7 = in_place_init %.loc10_20.6 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc10_20.3: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_20.3: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_20.5: = bound_method %int_3, %impl.elem0.loc10_20.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc10_20.3: = specific_function %impl.elem0.loc10_20.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_20.6: = bound_method %int_3, %specific_fn.loc10_20.3 [concrete = constants.%bound_method.fa7] @@ -161,7 +161,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %.loc10_20.13: init %array_type = converted %.loc10_20.1, %.loc10_20.12 [concrete = constants.%array] // CHECK:STDOUT: %.loc10_20.14: ref %array_type = temporary %.loc10_20.3, %.loc10_20.13 // CHECK:STDOUT: %.loc10_20.15: %array_type = acquire_value %.loc10_20.14 -// CHECK:STDOUT: %impl.elem0.loc10_23: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_23: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_23.1: = bound_method %int_1.loc10_23, %impl.elem0.loc10_23 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc10_23: = specific_function %impl.elem0.loc10_23, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_23.2: = bound_method %int_1.loc10_23, %specific_fn.loc10_23 [concrete = constants.%bound_method.38b] @@ -189,7 +189,6 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -197,7 +196,8 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @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] @@ -219,7 +219,7 @@ fn F(a: array({}, 3)) -> {} { // CHECK:STDOUT: %.loc6_24.1: Core.IntLiteral = struct_access %.loc6_23.2, element0 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_24.1: = bound_method %.loc6_24.1, %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.loc6_24.2: = bound_method %.loc6_24.1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/array/init_dependent_bound.carbon b/toolchain/check/testdata/array/init_dependent_bound.carbon index 90a9e8c8b3cc..3502288d84ab 100644 --- a/toolchain/check/testdata/array/init_dependent_bound.carbon +++ b/toolchain/check/testdata/array/init_dependent_bound.carbon @@ -68,12 +68,12 @@ fn H() { G(3); } // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %array.ca4: %array_type.1b3 = tuple_value () [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %array_type.1b3, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.15e: %Destroy.type = facet_value %array_type.1b3, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.8b1: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.15e [symbolic] -// CHECK:STDOUT: %impl.elem0: %.8b1 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet.15e) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.427: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.15e) [symbolic] +// CHECK:STDOUT: %.6d6: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.427, %Destroy.facet.15e [symbolic] +// CHECK:STDOUT: %impl.elem0: %.6d6 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet.15e) [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %array_type.70a: type = array_type %int_0, %C [concrete] // CHECK:STDOUT: %complete_type.95b: = complete_type_witness %array_type.70a [concrete] @@ -83,7 +83,8 @@ fn H() { G(3); } // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.809: = custom_witness (%DestroyOp), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.565: %Destroy.type = facet_value %array_type.70a, (%custom_witness.809) [concrete] -// CHECK:STDOUT: %.165: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.565 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.9a3: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.565) [concrete] +// CHECK:STDOUT: %.b12: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.9a3, %Destroy.facet.565 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -99,9 +100,10 @@ fn H() { G(3); } // CHECK:STDOUT: %array: @G.%array_type.loc7_22.2 (%array_type.1b3) = tuple_value () [symbolic = %array (constants.%array.ca4)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %array_type.loc7_22.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type.loc7_22.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.15e)] -// CHECK:STDOUT: %.loc7_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc7_3.2 (constants.%.8b1)] -// CHECK:STDOUT: %impl.elem0.loc7_3.2: @G.%.loc7_3.2 (%.8b1) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.427)] +// CHECK:STDOUT: %.loc7_3.2: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc7_3.2 (constants.%.6d6)] +// CHECK:STDOUT: %impl.elem0.loc7_3.2: @G.%.loc7_3.2 (%.6d6) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -120,11 +122,11 @@ fn H() { G(3); } // CHECK:STDOUT: %array_type.loc7_22.1: type = array_type %int_0, %T.ref [symbolic = %array_type.loc7_22.2 (constants.%array_type.1b3)] // CHECK:STDOUT: } // CHECK:STDOUT: %arr: ref @G.%array_type.loc7_22.2 (%array_type.1b3) = ref_binding arr, %arr.var -// CHECK:STDOUT: %impl.elem0.loc7_3.1: @G.%.loc7_3.2 (%.8b1) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc7_3.1: @G.%.loc7_3.2 (%.6d6) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %arr.var, %impl.elem0.loc7_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.Op(constants.%Destroy.facet.15e) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.15e) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %arr.var, %specific_impl_fn.loc7_3.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%arr.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%arr.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -145,7 +147,8 @@ fn H() { G(3); } // CHECK:STDOUT: %array => constants.%array.40f // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.809 // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.565 -// CHECK:STDOUT: %.loc7_3.2 => constants.%.165 +// CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.9a3 +// CHECK:STDOUT: %.loc7_3.2 => constants.%.b12 // CHECK:STDOUT: %impl.elem0.loc7_3.2 => constants.%DestroyOp // CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%DestroyOp // CHECK:STDOUT: } @@ -162,7 +165,6 @@ fn H() { G(3); } // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%int_1, %int_2, %int_3.1ba) [concrete] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic] @@ -171,19 +173,20 @@ fn H() { G(3); } // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.290: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete] -// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.290 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.290) [concrete] +// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet.290 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %int_3.822, %Int.as.ImplicitAs.impl.Convert.dd4 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.17a: = bound_method %int_3.822, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %inst.splice_block: = inst_value [concrete] { -// CHECK:STDOUT: %.236: Core.IntLiteral = splice_block %.f35 [concrete = %int_3.1ba] { -// CHECK:STDOUT: %impl.elem0: %.71e = impl_witness_access %ImplicitAs.impl_witness.640, element0 [concrete = %Int.as.ImplicitAs.impl.Convert.dd4] -// CHECK:STDOUT: %bound_method.41c: = bound_method %int_3.822, %impl.elem0 [concrete = %Int.as.ImplicitAs.impl.Convert.bound] +// CHECK:STDOUT: %.3e5: Core.IntLiteral = splice_block %.502 [concrete = %int_3.1ba] { +// CHECK:STDOUT: %impl.elem0: %.0a7 = impl_witness_access %ImplicitAs.impl_witness.640, element0 [concrete = %Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %bound_method.372: = bound_method %int_3.822, %impl.elem0 [concrete = %Int.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete = %Int.as.ImplicitAs.impl.Convert.specific_fn] -// CHECK:STDOUT: %bound_method.ffb: = bound_method %int_3.822, %specific_fn [concrete = %bound_method.17a] -// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.ffb(%int_3.822) [concrete = %int_3.1ba] -// CHECK:STDOUT: %.43d: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = %int_3.1ba] -// CHECK:STDOUT: %.f35: Core.IntLiteral = converted %int_3.822, %.43d [concrete = %int_3.1ba] +// CHECK:STDOUT: %bound_method.28e: = bound_method %int_3.822, %specific_fn [concrete = %bound_method.17a] +// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.28e(%int_3.822) [concrete = %int_3.1ba] +// CHECK:STDOUT: %.14d: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = %int_3.1ba] +// CHECK:STDOUT: %.502: Core.IntLiteral = converted %int_3.822, %.14d [concrete = %int_3.1ba] // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/as/adapter_conversion.carbon b/toolchain/check/testdata/as/adapter_conversion.carbon index c13b6b7da18d..41104f629677 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -254,7 +254,6 @@ var b: B = {.x = ()} as B; // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -262,7 +261,8 @@ var b: B = {.x = ()} as B; // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] @@ -297,7 +297,7 @@ var b: B = {.x = ()} as B; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc9_15.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_15.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -359,7 +359,6 @@ var b: B = {.x = ()} as B; // CHECK:STDOUT: %struct_type.x.y.4cf: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [concrete] // CHECK:STDOUT: %struct: %struct_type.x.y.4cf = struct_value (%int_1.5b8, %int_2.ecc) [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -367,7 +366,8 @@ var b: B = {.x = ()} as B; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -398,7 +398,7 @@ var b: B = {.x = ()} as B; // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc14_34.1: %struct_type.x.y.4cf = struct_literal (%int_1, %int_2) [concrete = constants.%struct] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] -// CHECK:STDOUT: %impl.elem0.loc14_34.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc14_34.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc14_34.1: = bound_method %int_1, %impl.elem0.loc14_34.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc14_34.1: = specific_function %impl.elem0.loc14_34.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_34.2: = bound_method %int_1, %specific_fn.loc14_34.1 [concrete = constants.%bound_method.38b] @@ -407,7 +407,7 @@ var b: B = {.x = ()} as B; // CHECK:STDOUT: %.loc14_34.3: ref %A = temporary_storage // CHECK:STDOUT: %.loc14_34.4: ref %i32 = class_element_access %.loc14_34.3, element0 // CHECK:STDOUT: %.loc14_34.5: init %i32 to %.loc14_34.4 = in_place_init %.loc14_34.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc14_34.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc14_34.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc14_34.3: = bound_method %int_2, %impl.elem0.loc14_34.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc14_34.2: = specific_function %impl.elem0.loc14_34.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_34.4: = bound_method %int_2, %specific_fn.loc14_34.2 [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/as/basics.carbon b/toolchain/check/testdata/as/basics.carbon index e3f5e77ccd36..afe4511d079f 100644 --- a/toolchain/check/testdata/as/basics.carbon +++ b/toolchain/check/testdata/as/basics.carbon @@ -375,11 +375,11 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %X.val: %X = struct_value (%empty_tuple) [concrete] // CHECK:STDOUT: %As.type.d1e: type = facet_type <@As, @As(%Y)> [concrete] // CHECK:STDOUT: %As.impl_witness.e92: = impl_witness @X.as.As.impl.%As.impl_witness_table [concrete] -// CHECK:STDOUT: %As.Convert.type.5a7: type = fn_type @As.Convert, @As(%Y) [concrete] // CHECK:STDOUT: %X.as.As.impl.Convert.type: type = fn_type @X.as.As.impl.Convert [concrete] // CHECK:STDOUT: %X.as.As.impl.Convert: %X.as.As.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %As.facet.c03: %As.type.d1e = facet_value %X, (%As.impl_witness.e92) [concrete] -// CHECK:STDOUT: %.c8a: type = fn_type_with_self_type %As.Convert.type.5a7, %As.facet.c03 [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.edc: type = fn_type @As.WithSelf.Convert, @As(%Y, %As.facet.c03) [concrete] +// CHECK:STDOUT: %.84a: type = fn_type_with_self_type %As.WithSelf.Convert.type.edc, %As.facet.c03 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -408,7 +408,7 @@ let n: {.x: ()} = {.x = ()} as {.x = ()}; // CHECK:STDOUT: %.loc19_21.6: ref %X = temporary %.loc19_21.2, %.loc19_21.5 // CHECK:STDOUT: %.loc19_23.1: ref %X = converted %.loc19_21.1, %.loc19_21.6 // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y] -// CHECK:STDOUT: %impl.elem0: %.c8a = impl_witness_access constants.%As.impl_witness.e92, element0 [concrete = constants.%X.as.As.impl.Convert] +// CHECK:STDOUT: %impl.elem0: %.84a = impl_witness_access constants.%As.impl_witness.e92, element0 [concrete = constants.%X.as.As.impl.Convert] // CHECK:STDOUT: %bound_method: = bound_method %.loc19_23.1, %impl.elem0 // CHECK:STDOUT: %.loc19_29.1: ref %Y = temporary_storage // CHECK:STDOUT: %.loc19_23.2: %X = acquire_value %.loc19_23.1 diff --git a/toolchain/check/testdata/as/var_init.carbon b/toolchain/check/testdata/as/var_init.carbon index 9150314b67db..643167236c13 100644 --- a/toolchain/check/testdata/as/var_init.carbon +++ b/toolchain/check/testdata/as/var_init.carbon @@ -35,12 +35,12 @@ fn Convert(t: ()) { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.062: type = facet_type <@ImplicitAs, @ImplicitAs(%X)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness @empty_tuple.type.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.9f8: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%X) [concrete] // CHECK:STDOUT: %pattern_type.05f: type = pattern_type %X [concrete] // CHECK:STDOUT: %empty_tuple.type.as.ImplicitAs.impl.Convert.type: type = fn_type @empty_tuple.type.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %empty_tuple.type.as.ImplicitAs.impl.Convert: %empty_tuple.type.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.062 = facet_value %empty_tuple.type, (%ImplicitAs.impl_witness) [concrete] -// CHECK:STDOUT: %.198: type = fn_type_with_self_type %ImplicitAs.Convert.type.9f8, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.73b: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%X, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.1bd: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.73b, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %empty_tuple.type.as.ImplicitAs.impl.Convert.bound: = bound_method %empty_tuple, %empty_tuple.type.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] @@ -57,7 +57,7 @@ fn Convert(t: ()) { // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %X = var %x.var_patt // CHECK:STDOUT: %.loc12_15.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %impl.elem0: %.198 = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%empty_tuple.type.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0: %.1bd = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%empty_tuple.type.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method: = bound_method %.loc12_15.1, %impl.elem0 [concrete = constants.%empty_tuple.type.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %.loc12_3.1: ref %X = splice_block %x.var {} // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] diff --git a/toolchain/check/testdata/basics/include_in_dumps.carbon b/toolchain/check/testdata/basics/include_in_dumps.carbon index ac892e0d9ba9..b785d2af1122 100644 --- a/toolchain/check/testdata/basics/include_in_dumps.carbon +++ b/toolchain/check/testdata/basics/include_in_dumps.carbon @@ -104,6 +104,7 @@ fn F(c: C) { c.(I.Op)(); } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -112,6 +113,8 @@ fn F(c: C) { c.(I.Op)(); } // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- exclude/included_with_range.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -119,14 +122,16 @@ fn F(c: C) { c.(I.Op)(); } // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.fa0: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %I.Op.type: type = fn_type @I.Op [concrete] -// CHECK:STDOUT: %I.Op: %I.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.Op.type.71c: type = fn_type @I.WithSelf.Op, @I(%Self) [symbolic] +// 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: %I.assoc_type = assoc_entity element0, @I.%I.Op.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.Op.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %I.WithSelf.Op.type.c9a: type = fn_type @I.WithSelf.Op, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.Op.b3e: %I.WithSelf.Op.type.c9a = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -137,44 +142,61 @@ fn F(c: C) { c.(I.Op)(); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.Op.decl: %I.Op.type = fn_decl @I.Op [concrete = constants.%I.Op] { -// CHECK:STDOUT: %self.patt: @I.Op.%pattern_type (%pattern_type.fa0) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.Op.%pattern_type (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc7: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.Op.decl: @I.%I.WithSelf.Op.type (%I.WithSelf.Op.type.71c) = fn_decl @I.WithSelf.Op [symbolic = @I.%I.WithSelf.Op (constants.%I.WithSelf.Op.ae1)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.Op.%pattern_type (%pattern_type.fa0) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.Op.%pattern_type (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc8_15.1: type = splice_block %.loc8_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self.loc7 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc8_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @I.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.Op.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.Op.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc7 // CHECK:STDOUT: .Op = %assoc0 -// CHECK:STDOUT: witness = (%I.Op.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.Op.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.Op(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.Op(@I.%Self.loc7: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.fa0)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.Op(constants.%Self) { +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc8 => constants.%Self +// 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) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fa0 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.Op(constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc8 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.Op.type => constants.%I.WithSelf.Op.type.c9a +// CHECK:STDOUT: %I.WithSelf.Op => constants.%I.WithSelf.Op.b3e +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.Op(constants.%I.facet) { // CHECK:STDOUT: %Self => constants.%I.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7c7 @@ -192,15 +214,17 @@ fn F(c: C) { c.(I.Op)(); } // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.10e [concrete] -// CHECK:STDOUT: %I.Op.type: type = fn_type @I.Op [concrete] -// CHECK:STDOUT: %I.Op: %I.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.Op.type.f73: type = fn_type @I.WithSelf.Op, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.Op.f53: %I.WithSelf.Op.type.f73 = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.422: type = pattern_type %Self.binding.as_type [symbolic] +// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.e26 [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] -// CHECK:STDOUT: %.ce4: type = fn_type_with_self_type %I.Op.type, %I.facet [concrete] +// CHECK:STDOUT: %I.WithSelf.Op.type.537: type = fn_type @I.WithSelf.Op, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.Op.a52: %I.WithSelf.Op.type.537 = struct_value () [concrete] +// CHECK:STDOUT: %.c12: type = fn_type_with_self_type %I.WithSelf.Op.type.537, %I.facet [concrete] // CHECK:STDOUT: %C.as.I.impl.Op.type: type = fn_type @C.as.I.impl.Op [concrete] // CHECK:STDOUT: %C.as.I.impl.Op: %C.as.I.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -214,11 +238,11 @@ fn F(c: C) { c.(I.Op)(); } // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//included_with_range, loc16_1, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.743 = import_ref Main//included_with_range, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//included_with_range, loc7_13, unloaded -// CHECK:STDOUT: %Main.import_ref.e7d: %I.assoc_type = import_ref Main//included_with_range, loc8_22, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.d09: %I.assoc_type = import_ref Main//included_with_range, loc8_22, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.Op = import_ref Main//included_with_range, Op, unloaded -// CHECK:STDOUT: %Main.import_ref.10e: %I.Op.type = import_ref Main//included_with_range, loc8_22, loaded [concrete = constants.%I.Op] -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//included_with_range, loc7_13, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.2362f8.2: %I.type = import_ref Main//included_with_range, loc7_13, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//included_with_range, loc7_13, unloaded +// CHECK:STDOUT: %Main.import_ref.e26: @I.%I.WithSelf.Op.type (%I.WithSelf.Op.type.f73) = import_ref Main//included_with_range, loc8_22, loaded [symbolic = @I.%I.WithSelf.Op (constants.%I.WithSelf.Op.f53)] // CHECK:STDOUT: %Main.import_ref.f72: = import_ref Main//included_with_range, loc13_15, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.61c: type = import_ref Main//included_with_range, loc13_8, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.72a: type = import_ref Main//included_with_range, loc13_13, loaded [concrete = constants.%I.type] @@ -248,7 +272,7 @@ fn F(c: C) { c.(I.Op)(); } // CHECK:STDOUT: interface @I [from "exclude/included_with_range.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .Op = imports.%Main.import_ref.e7d +// CHECK:STDOUT: .Op = imports.%Main.import_ref.d09 // CHECK:STDOUT: witness = (imports.%Main.Op) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -270,14 +294,14 @@ fn F(c: C) { c.(I.Op)(); } // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] -// CHECK:STDOUT: %Op.ref: %I.assoc_type = name_ref Op, imports.%Main.import_ref.e7d [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.ce4 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.Op] +// CHECK:STDOUT: %Op.ref: %I.assoc_type = name_ref Op, imports.%Main.import_ref.d09 [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %.c12 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %C.as.I.impl.Op.call: init %empty_tuple.type = call %bound_method(%c.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.Op(imports.%Main.import_ref.236: %I.type) [from "exclude/included_with_range.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.Op(imports.%Main.import_ref.2362f8.2: %I.type) [from "exclude/included_with_range.carbon"] { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.422)] @@ -287,12 +311,26 @@ fn F(c: C) { c.(I.Op)(); } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.I.impl.Op [from "exclude/included_with_range.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.Op(constants.%Self) { +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %I.WithSelf.Op.type => constants.%I.WithSelf.Op.type.f73 +// CHECK:STDOUT: %I.WithSelf.Op => constants.%I.WithSelf.Op.f53 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.Op(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.422 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.Op.type => constants.%I.WithSelf.Op.type.537 +// CHECK:STDOUT: %I.WithSelf.Op => constants.%I.WithSelf.Op.a52 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- import_excluded.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -302,13 +340,15 @@ fn F(c: C) { c.(I.Op)(); } // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] +// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %I.WithSelf.Op.type.f73: type = fn_type @I.WithSelf.Op, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.Op.f53: %I.WithSelf.Op.type.f73 = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.10e [concrete] -// CHECK:STDOUT: %I.Op.type: type = fn_type @I.Op [concrete] -// CHECK:STDOUT: %I.Op: %I.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.e26 [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] -// CHECK:STDOUT: %.ce4: type = fn_type_with_self_type %I.Op.type, %I.facet [concrete] +// CHECK:STDOUT: %I.WithSelf.Op.type.537: type = fn_type @I.WithSelf.Op, @I(%I.facet) [concrete] +// CHECK:STDOUT: %.c12: type = fn_type_with_self_type %I.WithSelf.Op.type.537, %I.facet [concrete] // CHECK:STDOUT: %C.as.I.impl.Op.type: type = fn_type @C.as.I.impl.Op [concrete] // CHECK:STDOUT: %C.as.I.impl.Op: %C.as.I.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -320,8 +360,8 @@ fn F(c: C) { c.(I.Op)(); } // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.e7d: %I.assoc_type = import_ref Main//excluded_with_range, loc6_22, loaded [concrete = constants.%assoc0] -// CHECK:STDOUT: %Main.import_ref.10e: %I.Op.type = import_ref Main//excluded_with_range, loc6_22, loaded [concrete = constants.%I.Op] +// CHECK:STDOUT: %Main.import_ref.d09: %I.assoc_type = import_ref Main//excluded_with_range, loc6_22, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.e26: @I.%I.WithSelf.Op.type (%I.WithSelf.Op.type.f73) = import_ref Main//excluded_with_range, loc6_22, loaded [symbolic = @I.%I.WithSelf.Op (constants.%I.WithSelf.Op.f53)] // CHECK:STDOUT: %Main.import_ref.4bc: %C.as.I.impl.Op.type = import_ref Main//excluded_with_range, loc12_25, loaded [concrete = constants.%C.as.I.impl.Op] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.4bc), @C.as.I.impl [concrete] // CHECK:STDOUT: } @@ -349,8 +389,8 @@ fn F(c: C) { c.(I.Op)(); } // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] -// CHECK:STDOUT: %Op.ref: %I.assoc_type = name_ref Op, imports.%Main.import_ref.e7d [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.ce4 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.Op] +// CHECK:STDOUT: %Op.ref: %I.assoc_type = name_ref Op, imports.%Main.import_ref.d09 [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %.c12 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %C.as.I.impl.Op.call: init %empty_tuple.type = call %bound_method(%c.ref) // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/basics/parens.carbon b/toolchain/check/testdata/basics/parens.carbon index 8cb6a74b2cf0..45699b9d29cc 100644 --- a/toolchain/check/testdata/basics/parens.carbon +++ b/toolchain/check/testdata/basics/parens.carbon @@ -26,7 +26,6 @@ var b: i32 = ((2)); // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -34,7 +33,8 @@ var b: i32 = ((2)); // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -90,7 +90,7 @@ var b: i32 = ((2)); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc14: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc14: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc14_1.1: = bound_method %int_1, %impl.elem0.loc14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_1.2: = bound_method %int_1, %specific_fn.loc14 [concrete = constants.%bound_method.38b] @@ -98,7 +98,7 @@ var b: i32 = ((2)); // CHECK:STDOUT: %.loc14: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: assign file.%a.var, %.loc14 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc15: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_1.1: = bound_method %int_2, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_1.2: = bound_method %int_2, %specific_fn.loc15 [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon b/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon index e47bde3ff806..aaddc6048820 100644 --- a/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon +++ b/toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon @@ -38,241 +38,253 @@ fn Foo[T:! type](p: T*) -> (T*, ()) { // CHECK:STDOUT: import_ir_insts: // CHECK:STDOUT: import_ir_inst0: {ir_id: import_ir60000004, inst_id: inst48000010} // CHECK:STDOUT: import_ir_inst1: {ir_id: import_ir60000004, inst_id: inst48000010} -// CHECK:STDOUT: import_ir_inst2: {ir_id: import_ir60000004, inst_id: inst48000012} -// CHECK:STDOUT: import_ir_inst3: {ir_id: import_ir60000004, inst_id: inst48000031} -// CHECK:STDOUT: import_ir_inst4: {ir_id: import_ir60000004, inst_id: inst4800002C} -// CHECK:STDOUT: import_ir_inst5: {ir_id: import_ir60000004, inst_id: inst4800002C} -// CHECK:STDOUT: import_ir_inst6: {ir_id: import_ir60000004, inst_id: inst4800002C} -// CHECK:STDOUT: import_ir_inst7: {ir_id: import_ir60000004, inst_id: inst48000026} -// CHECK:STDOUT: import_ir_inst8: {ir_id: import_ir60000004, inst_id: inst48000027} -// CHECK:STDOUT: import_ir_inst9: {ir_id: import_ir60000004, inst_id: inst4800001D} -// CHECK:STDOUT: import_ir_instA: {ir_id: import_ir60000004, inst_id: inst4800001F} -// CHECK:STDOUT: import_ir_instB: {ir_id: import_ir60000004, inst_id: inst48000022} -// CHECK:STDOUT: import_ir_instC: {ir_id: import_ir60000004, inst_id: inst48000023} +// CHECK:STDOUT: import_ir_inst2: {ir_id: import_ir60000004, inst_id: inst48000015} +// CHECK:STDOUT: import_ir_inst3: {ir_id: import_ir60000004, inst_id: inst48000035} +// CHECK:STDOUT: import_ir_inst4: {ir_id: import_ir60000004, inst_id: inst4800002D} +// CHECK:STDOUT: import_ir_inst5: {ir_id: import_ir60000004, inst_id: inst48000012} +// CHECK:STDOUT: import_ir_inst6: {ir_id: import_ir60000004, inst_id: inst4800002D} +// CHECK:STDOUT: import_ir_inst7: {ir_id: import_ir60000004, inst_id: inst48000027} +// CHECK:STDOUT: import_ir_inst8: {ir_id: import_ir60000004, inst_id: inst48000028} +// CHECK:STDOUT: import_ir_inst9: {ir_id: import_ir60000004, inst_id: inst4800001E} +// CHECK:STDOUT: import_ir_instA: {ir_id: import_ir60000004, inst_id: inst48000020} +// CHECK:STDOUT: import_ir_instB: {ir_id: import_ir60000004, inst_id: inst48000023} +// CHECK:STDOUT: import_ir_instC: {ir_id: import_ir60000004, inst_id: inst48000024} // CHECK:STDOUT: import_ir_instD: {ir_id: import_ir60000004, inst_id: inst48000012} -// CHECK:STDOUT: import_ir_instE: {ir_id: import_ir60000004, inst_id: inst48000016} -// CHECK:STDOUT: import_ir_instF: {ir_id: import_ir60000004, inst_id: inst48000019} -// CHECK:STDOUT: import_ir_inst10: {ir_id: import_ir60000004, inst_id: inst4800001E} -// CHECK:STDOUT: import_ir_inst11: {ir_id: import_ir60000004, inst_id: inst48000025} -// CHECK:STDOUT: import_ir_inst12: {ir_id: import_ir60000004, inst_id: inst4800006A} -// CHECK:STDOUT: import_ir_inst13: {ir_id: import_ir60000004, inst_id: inst48000068} -// CHECK:STDOUT: import_ir_inst14: {ir_id: import_ir60000004, inst_id: inst48000081} -// CHECK:STDOUT: import_ir_inst15: {ir_id: import_ir60000004, inst_id: inst48000069} -// CHECK:STDOUT: import_ir_inst16: {ir_id: import_ir60000004, inst_id: inst48000081} -// CHECK:STDOUT: import_ir_inst17: {ir_id: import_ir60000004, inst_id: inst4800007C} -// CHECK:STDOUT: import_ir_inst18: {ir_id: import_ir60000004, inst_id: inst4800007D} -// CHECK:STDOUT: import_ir_inst19: {ir_id: import_ir60000004, inst_id: inst48000075} -// CHECK:STDOUT: import_ir_inst1A: {ir_id: import_ir60000004, inst_id: inst48000077} -// CHECK:STDOUT: import_ir_inst1B: {ir_id: import_ir60000004, inst_id: inst48000078} -// CHECK:STDOUT: import_ir_inst1C: {ir_id: import_ir60000004, inst_id: inst48000079} -// CHECK:STDOUT: import_ir_inst1D: {ir_id: import_ir60000004, inst_id: inst48000059} -// CHECK:STDOUT: import_ir_inst1E: {ir_id: import_ir60000004, inst_id: inst48000070} -// CHECK:STDOUT: import_ir_inst1F: {ir_id: import_ir60000004, inst_id: inst48000071} -// CHECK:STDOUT: import_ir_inst20: {ir_id: import_ir60000004, inst_id: inst48000072} -// CHECK:STDOUT: import_ir_inst21: {ir_id: import_ir60000004, inst_id: inst48000076} -// CHECK:STDOUT: import_ir_inst22: {ir_id: import_ir60000004, inst_id: inst4800007B} -// CHECK:STDOUT: import_ir_inst23: {ir_id: import_ir60000004, inst_id: inst48000089} -// CHECK:STDOUT: import_ir_inst24: {ir_id: import_ir60000004, inst_id: inst48000090} -// CHECK:STDOUT: import_ir_inst25: {ir_id: import_ir60000004, inst_id: inst48000097} -// CHECK:STDOUT: import_ir_inst26: {ir_id: import_ir60000004, inst_id: inst4800009B} -// CHECK:STDOUT: import_ir_inst27: {ir_id: import_ir60000004, inst_id: inst4800009C} -// CHECK:STDOUT: import_ir_inst28: {ir_id: import_ir60000004, inst_id: inst480000A2} -// CHECK:STDOUT: import_ir_inst29: {ir_id: import_ir60000004, inst_id: inst4800005D} -// CHECK:STDOUT: import_ir_inst2A: {ir_id: import_ir60000004, inst_id: inst48000063} -// CHECK:STDOUT: import_ir_inst2B: {ir_id: import_ir60000004, inst_id: inst48000066} -// CHECK:STDOUT: import_ir_inst2C: {ir_id: import_ir60000004, inst_id: inst48000059} -// CHECK:STDOUT: import_ir_inst2D: {ir_id: import_ir60000004, inst_id: inst4800005B} -// CHECK:STDOUT: import_ir_inst2E: {ir_id: import_ir60000004, inst_id: inst48000061} -// CHECK:STDOUT: import_ir_inst2F: {ir_id: import_ir60000004, inst_id: inst48000065} -// CHECK:STDOUT: import_ir_inst30: {ir_id: import_ir60000004, inst_id: inst4800006C} -// CHECK:STDOUT: import_ir_inst31: {ir_id: import_ir60000004, inst_id: inst48000084} -// CHECK:STDOUT: import_ir_inst32: {ir_id: import_ir60000004, inst_id: inst48000085} -// CHECK:STDOUT: import_ir_inst33: {ir_id: import_ir60000004, inst_id: inst480000B7} -// CHECK:STDOUT: import_ir_inst34: {ir_id: import_ir60000004, inst_id: inst480000B5} -// CHECK:STDOUT: import_ir_inst35: {ir_id: import_ir60000004, inst_id: inst480000B3} -// CHECK:STDOUT: import_ir_inst36: {ir_id: import_ir60000004, inst_id: inst480000B4} -// CHECK:STDOUT: import_ir_inst37: {ir_id: import_ir60000004, inst_id: inst480000D1} -// CHECK:STDOUT: import_ir_inst38: {ir_id: import_ir60000004, inst_id: inst480000CF} -// CHECK:STDOUT: import_ir_inst39: {ir_id: import_ir60000004, inst_id: inst480000CD} -// CHECK:STDOUT: import_ir_inst3A: {ir_id: import_ir60000004, inst_id: inst480000CE} -// CHECK:STDOUT: import_ir_inst3B: {ir_id: import_ir60000004, inst_id: inst480000EB} -// CHECK:STDOUT: import_ir_inst3C: {ir_id: import_ir60000004, inst_id: inst480000E9} -// CHECK:STDOUT: import_ir_inst3D: {ir_id: import_ir60000004, inst_id: inst480000E7} -// CHECK:STDOUT: import_ir_inst3E: {ir_id: import_ir60000004, inst_id: inst480000E8} -// CHECK:STDOUT: import_ir_inst3F: {ir_id: import_ir60000004, inst_id: inst48000105} -// CHECK:STDOUT: import_ir_inst40: {ir_id: import_ir60000004, inst_id: inst48000103} -// CHECK:STDOUT: import_ir_inst41: {ir_id: import_ir60000004, inst_id: inst48000101} -// CHECK:STDOUT: import_ir_inst42: {ir_id: import_ir60000004, inst_id: inst48000102} -// CHECK:STDOUT: import_ir_inst43: {ir_id: import_ir60000004, inst_id: inst48000124} -// CHECK:STDOUT: import_ir_inst44: {ir_id: import_ir60000004, inst_id: inst48000122} -// CHECK:STDOUT: import_ir_inst45: {ir_id: import_ir60000004, inst_id: inst48000138} -// CHECK:STDOUT: import_ir_inst46: {ir_id: import_ir60000004, inst_id: inst48000123} -// CHECK:STDOUT: import_ir_inst47: {ir_id: import_ir60000004, inst_id: inst4800011C} -// CHECK:STDOUT: import_ir_inst48: {ir_id: import_ir60000004, inst_id: inst4800011E} -// CHECK:STDOUT: import_ir_inst49: {ir_id: import_ir60000004, inst_id: inst48000121} -// CHECK:STDOUT: import_ir_inst4A: {ir_id: import_ir60000004, inst_id: inst48000119} -// CHECK:STDOUT: import_ir_inst4B: {ir_id: import_ir60000004, inst_id: inst4800011B} -// CHECK:STDOUT: import_ir_inst4C: {ir_id: import_ir60000004, inst_id: inst48000120} -// CHECK:STDOUT: import_ir_inst4D: {ir_id: import_ir60000004, inst_id: inst48000126} -// CHECK:STDOUT: import_ir_inst4E: {ir_id: import_ir60000004, inst_id: inst48000138} -// CHECK:STDOUT: import_ir_inst4F: {ir_id: import_ir60000004, inst_id: inst48000133} -// CHECK:STDOUT: import_ir_inst50: {ir_id: import_ir60000004, inst_id: inst48000134} +// CHECK:STDOUT: import_ir_instE: {ir_id: import_ir60000004, inst_id: inst48000017} +// CHECK:STDOUT: import_ir_instF: {ir_id: import_ir60000004, inst_id: inst4800001A} +// CHECK:STDOUT: import_ir_inst10: {ir_id: import_ir60000004, inst_id: inst4800001F} +// CHECK:STDOUT: import_ir_inst11: {ir_id: import_ir60000004, inst_id: inst48000026} +// CHECK:STDOUT: import_ir_inst12: {ir_id: import_ir60000004, inst_id: inst48000031} +// CHECK:STDOUT: import_ir_inst13: {ir_id: import_ir60000004, inst_id: inst48000032} +// CHECK:STDOUT: import_ir_inst14: {ir_id: import_ir60000004, inst_id: inst48000033} +// CHECK:STDOUT: import_ir_inst15: {ir_id: import_ir60000004, inst_id: inst48000012} +// CHECK:STDOUT: import_ir_inst16: {ir_id: import_ir60000004, inst_id: inst4800002D} +// CHECK:STDOUT: import_ir_inst17: {ir_id: import_ir60000004, inst_id: inst4800006E} +// CHECK:STDOUT: import_ir_inst18: {ir_id: import_ir60000004, inst_id: inst4800006C} +// CHECK:STDOUT: import_ir_inst19: {ir_id: import_ir60000004, inst_id: inst48000085} +// CHECK:STDOUT: import_ir_inst1A: {ir_id: import_ir60000004, inst_id: inst4800006D} +// CHECK:STDOUT: import_ir_inst1B: {ir_id: import_ir60000004, inst_id: inst48000085} +// CHECK:STDOUT: import_ir_inst1C: {ir_id: import_ir60000004, inst_id: inst48000080} +// CHECK:STDOUT: import_ir_inst1D: {ir_id: import_ir60000004, inst_id: inst48000081} +// CHECK:STDOUT: import_ir_inst1E: {ir_id: import_ir60000004, inst_id: inst48000079} +// CHECK:STDOUT: import_ir_inst1F: {ir_id: import_ir60000004, inst_id: inst4800007B} +// CHECK:STDOUT: import_ir_inst20: {ir_id: import_ir60000004, inst_id: inst4800007C} +// CHECK:STDOUT: import_ir_inst21: {ir_id: import_ir60000004, inst_id: inst4800007D} +// CHECK:STDOUT: import_ir_inst22: {ir_id: import_ir60000004, inst_id: inst4800005D} +// CHECK:STDOUT: import_ir_inst23: {ir_id: import_ir60000004, inst_id: inst48000074} +// CHECK:STDOUT: import_ir_inst24: {ir_id: import_ir60000004, inst_id: inst48000075} +// CHECK:STDOUT: import_ir_inst25: {ir_id: import_ir60000004, inst_id: inst48000076} +// CHECK:STDOUT: import_ir_inst26: {ir_id: import_ir60000004, inst_id: inst4800007A} +// CHECK:STDOUT: import_ir_inst27: {ir_id: import_ir60000004, inst_id: inst4800007F} +// CHECK:STDOUT: import_ir_inst28: {ir_id: import_ir60000004, inst_id: inst4800008F} +// CHECK:STDOUT: import_ir_inst29: {ir_id: import_ir60000004, inst_id: inst48000096} +// CHECK:STDOUT: import_ir_inst2A: {ir_id: import_ir60000004, inst_id: inst4800009D} +// CHECK:STDOUT: import_ir_inst2B: {ir_id: import_ir60000004, inst_id: inst480000A3} +// CHECK:STDOUT: import_ir_inst2C: {ir_id: import_ir60000004, inst_id: inst480000A4} +// CHECK:STDOUT: import_ir_inst2D: {ir_id: import_ir60000004, inst_id: inst480000A5} +// CHECK:STDOUT: import_ir_inst2E: {ir_id: import_ir60000004, inst_id: inst480000AB} +// CHECK:STDOUT: import_ir_inst2F: {ir_id: import_ir60000004, inst_id: inst48000061} +// CHECK:STDOUT: import_ir_inst30: {ir_id: import_ir60000004, inst_id: inst48000067} +// CHECK:STDOUT: import_ir_inst31: {ir_id: import_ir60000004, inst_id: inst4800006A} +// CHECK:STDOUT: import_ir_inst32: {ir_id: import_ir60000004, inst_id: inst4800005D} +// CHECK:STDOUT: import_ir_inst33: {ir_id: import_ir60000004, inst_id: inst4800005F} +// CHECK:STDOUT: import_ir_inst34: {ir_id: import_ir60000004, inst_id: inst48000065} +// CHECK:STDOUT: import_ir_inst35: {ir_id: import_ir60000004, inst_id: inst48000069} +// CHECK:STDOUT: import_ir_inst36: {ir_id: import_ir60000004, inst_id: inst48000070} +// CHECK:STDOUT: import_ir_inst37: {ir_id: import_ir60000004, inst_id: inst48000088} +// CHECK:STDOUT: import_ir_inst38: {ir_id: import_ir60000004, inst_id: inst48000089} +// CHECK:STDOUT: import_ir_inst39: {ir_id: import_ir60000004, inst_id: inst480000C0} +// CHECK:STDOUT: import_ir_inst3A: {ir_id: import_ir60000004, inst_id: inst480000BE} +// CHECK:STDOUT: import_ir_inst3B: {ir_id: import_ir60000004, inst_id: inst480000BC} +// CHECK:STDOUT: import_ir_inst3C: {ir_id: import_ir60000004, inst_id: inst480000BD} +// CHECK:STDOUT: import_ir_inst3D: {ir_id: import_ir60000004, inst_id: inst480000DC} +// CHECK:STDOUT: import_ir_inst3E: {ir_id: import_ir60000004, inst_id: inst480000DA} +// CHECK:STDOUT: import_ir_inst3F: {ir_id: import_ir60000004, inst_id: inst480000D8} +// CHECK:STDOUT: import_ir_inst40: {ir_id: import_ir60000004, inst_id: inst480000D9} +// CHECK:STDOUT: import_ir_inst41: {ir_id: import_ir60000004, inst_id: inst480000F8} +// CHECK:STDOUT: import_ir_inst42: {ir_id: import_ir60000004, inst_id: inst480000F6} +// CHECK:STDOUT: import_ir_inst43: {ir_id: import_ir60000004, inst_id: inst480000F4} +// CHECK:STDOUT: import_ir_inst44: {ir_id: import_ir60000004, inst_id: inst480000F5} +// CHECK:STDOUT: import_ir_inst45: {ir_id: import_ir60000004, inst_id: inst48000114} +// CHECK:STDOUT: import_ir_inst46: {ir_id: import_ir60000004, inst_id: inst48000112} +// CHECK:STDOUT: import_ir_inst47: {ir_id: import_ir60000004, inst_id: inst48000110} +// CHECK:STDOUT: import_ir_inst48: {ir_id: import_ir60000004, inst_id: inst48000111} +// CHECK:STDOUT: import_ir_inst49: {ir_id: import_ir60000004, inst_id: inst48000135} +// CHECK:STDOUT: import_ir_inst4A: {ir_id: import_ir60000004, inst_id: inst48000133} +// CHECK:STDOUT: import_ir_inst4B: {ir_id: import_ir60000004, inst_id: inst48000149} +// CHECK:STDOUT: import_ir_inst4C: {ir_id: import_ir60000004, inst_id: inst48000134} +// CHECK:STDOUT: import_ir_inst4D: {ir_id: import_ir60000004, inst_id: inst4800012D} +// CHECK:STDOUT: import_ir_inst4E: {ir_id: import_ir60000004, inst_id: inst4800012F} +// CHECK:STDOUT: import_ir_inst4F: {ir_id: import_ir60000004, inst_id: inst48000132} +// CHECK:STDOUT: import_ir_inst50: {ir_id: import_ir60000004, inst_id: inst4800012A} // CHECK:STDOUT: import_ir_inst51: {ir_id: import_ir60000004, inst_id: inst4800012C} -// CHECK:STDOUT: import_ir_inst52: {ir_id: import_ir60000004, inst_id: inst4800012E} -// CHECK:STDOUT: import_ir_inst53: {ir_id: import_ir60000004, inst_id: inst4800012F} -// CHECK:STDOUT: import_ir_inst54: {ir_id: import_ir60000004, inst_id: inst48000130} -// CHECK:STDOUT: import_ir_inst55: {ir_id: import_ir60000004, inst_id: inst48000119} -// CHECK:STDOUT: import_ir_inst56: {ir_id: import_ir60000004, inst_id: inst48000128} -// CHECK:STDOUT: import_ir_inst57: {ir_id: import_ir60000004, inst_id: inst48000129} -// CHECK:STDOUT: import_ir_inst58: {ir_id: import_ir60000004, inst_id: inst4800012D} -// CHECK:STDOUT: import_ir_inst59: {ir_id: import_ir60000004, inst_id: inst48000132} -// CHECK:STDOUT: import_ir_inst5A: {ir_id: import_ir60000004, inst_id: inst4800013B} -// CHECK:STDOUT: import_ir_inst5B: {ir_id: import_ir60000004, inst_id: inst4800013C} -// CHECK:STDOUT: import_ir_inst5C: {ir_id: import_ir60000004, inst_id: inst4800013F} -// CHECK:STDOUT: import_ir_inst5D: {ir_id: import_ir60000004, inst_id: inst48000144} -// CHECK:STDOUT: import_ir_inst5E: {ir_id: import_ir60000004, inst_id: inst48000142} -// CHECK:STDOUT: import_ir_inst5F: {ir_id: import_ir60000004, inst_id: inst(TypeType)} -// CHECK:STDOUT: import_ir_inst60: {ir_id: import_ir60000004, inst_id: inst48000141} -// CHECK:STDOUT: import_ir_inst61: {ir_id: import_ir60000004, inst_id: inst4800015C} -// CHECK:STDOUT: import_ir_inst62: {ir_id: import_ir60000004, inst_id: inst4800015A} -// CHECK:STDOUT: import_ir_inst63: {ir_id: import_ir60000004, inst_id: inst48000158} -// CHECK:STDOUT: import_ir_inst64: {ir_id: import_ir60000004, inst_id: inst48000159} -// CHECK:STDOUT: import_ir_inst65: {ir_id: import_ir60000004, inst_id: inst48000190} -// CHECK:STDOUT: import_ir_inst66: {ir_id: import_ir60000004, inst_id: inst4800018E} -// CHECK:STDOUT: import_ir_inst67: {ir_id: import_ir60000004, inst_id: inst480001AB} -// CHECK:STDOUT: import_ir_inst68: {ir_id: import_ir60000004, inst_id: inst4800018F} -// CHECK:STDOUT: import_ir_inst69: {ir_id: import_ir60000004, inst_id: inst480001AB} -// CHECK:STDOUT: import_ir_inst6A: {ir_id: import_ir60000004, inst_id: inst480001A6} +// CHECK:STDOUT: import_ir_inst52: {ir_id: import_ir60000004, inst_id: inst48000131} +// CHECK:STDOUT: import_ir_inst53: {ir_id: import_ir60000004, inst_id: inst48000137} +// CHECK:STDOUT: import_ir_inst54: {ir_id: import_ir60000004, inst_id: inst48000149} +// CHECK:STDOUT: import_ir_inst55: {ir_id: import_ir60000004, inst_id: inst48000144} +// CHECK:STDOUT: import_ir_inst56: {ir_id: import_ir60000004, inst_id: inst48000145} +// CHECK:STDOUT: import_ir_inst57: {ir_id: import_ir60000004, inst_id: inst4800013D} +// CHECK:STDOUT: import_ir_inst58: {ir_id: import_ir60000004, inst_id: inst4800013F} +// CHECK:STDOUT: import_ir_inst59: {ir_id: import_ir60000004, inst_id: inst48000140} +// CHECK:STDOUT: import_ir_inst5A: {ir_id: import_ir60000004, inst_id: inst48000141} +// CHECK:STDOUT: import_ir_inst5B: {ir_id: import_ir60000004, inst_id: inst4800012A} +// CHECK:STDOUT: import_ir_inst5C: {ir_id: import_ir60000004, inst_id: inst48000139} +// CHECK:STDOUT: import_ir_inst5D: {ir_id: import_ir60000004, inst_id: inst4800013A} +// CHECK:STDOUT: import_ir_inst5E: {ir_id: import_ir60000004, inst_id: inst4800013E} +// CHECK:STDOUT: import_ir_inst5F: {ir_id: import_ir60000004, inst_id: inst48000143} +// CHECK:STDOUT: import_ir_inst60: {ir_id: import_ir60000004, inst_id: inst4800014C} +// CHECK:STDOUT: import_ir_inst61: {ir_id: import_ir60000004, inst_id: inst4800014D} +// CHECK:STDOUT: import_ir_inst62: {ir_id: import_ir60000004, inst_id: inst48000150} +// CHECK:STDOUT: import_ir_inst63: {ir_id: import_ir60000004, inst_id: inst48000157} +// CHECK:STDOUT: import_ir_inst64: {ir_id: import_ir60000004, inst_id: inst48000155} +// CHECK:STDOUT: import_ir_inst65: {ir_id: import_ir60000004, inst_id: inst(TypeType)} +// CHECK:STDOUT: import_ir_inst66: {ir_id: import_ir60000004, inst_id: inst48000154} +// CHECK:STDOUT: import_ir_inst67: {ir_id: import_ir60000004, inst_id: inst48000171} +// CHECK:STDOUT: import_ir_inst68: {ir_id: import_ir60000004, inst_id: inst4800016F} +// CHECK:STDOUT: import_ir_inst69: {ir_id: import_ir60000004, inst_id: inst4800016D} +// CHECK:STDOUT: import_ir_inst6A: {ir_id: import_ir60000004, inst_id: inst4800016E} // CHECK:STDOUT: import_ir_inst6B: {ir_id: import_ir60000004, inst_id: inst480001A7} -// CHECK:STDOUT: import_ir_inst6C: {ir_id: import_ir60000004, inst_id: inst4800019F} -// CHECK:STDOUT: import_ir_inst6D: {ir_id: import_ir60000004, inst_id: inst480001A1} -// CHECK:STDOUT: import_ir_inst6E: {ir_id: import_ir60000004, inst_id: inst480001A2} -// CHECK:STDOUT: import_ir_inst6F: {ir_id: import_ir60000004, inst_id: inst480001A3} -// CHECK:STDOUT: import_ir_inst70: {ir_id: import_ir60000004, inst_id: inst48000171} -// CHECK:STDOUT: import_ir_inst71: {ir_id: import_ir60000004, inst_id: inst48000176} -// CHECK:STDOUT: import_ir_inst72: {ir_id: import_ir60000004, inst_id: inst48000198} -// CHECK:STDOUT: import_ir_inst73: {ir_id: import_ir60000004, inst_id: inst48000199} -// CHECK:STDOUT: import_ir_inst74: {ir_id: import_ir60000004, inst_id: inst4800019A} -// CHECK:STDOUT: import_ir_inst75: {ir_id: import_ir60000004, inst_id: inst4800019B} -// CHECK:STDOUT: import_ir_inst76: {ir_id: import_ir60000004, inst_id: inst4800019C} -// CHECK:STDOUT: import_ir_inst77: {ir_id: import_ir60000004, inst_id: inst480001A0} -// CHECK:STDOUT: import_ir_inst78: {ir_id: import_ir60000004, inst_id: inst480001A5} -// CHECK:STDOUT: import_ir_inst79: {ir_id: import_ir60000004, inst_id: inst480001B4} -// CHECK:STDOUT: import_ir_inst7A: {ir_id: import_ir60000004, inst_id: inst480001BB} -// CHECK:STDOUT: import_ir_inst7B: {ir_id: import_ir60000004, inst_id: inst480001BF} -// CHECK:STDOUT: import_ir_inst7C: {ir_id: import_ir60000004, inst_id: inst480001C1} -// CHECK:STDOUT: import_ir_inst7D: {ir_id: import_ir60000004, inst_id: inst480001C2} -// CHECK:STDOUT: import_ir_inst7E: {ir_id: import_ir60000004, inst_id: inst480001C5} -// CHECK:STDOUT: import_ir_inst7F: {ir_id: import_ir60000004, inst_id: inst480001D1} -// CHECK:STDOUT: import_ir_inst80: {ir_id: import_ir60000004, inst_id: inst480001D6} -// CHECK:STDOUT: import_ir_inst81: {ir_id: import_ir60000004, inst_id: inst480001DA} -// CHECK:STDOUT: import_ir_inst82: {ir_id: import_ir60000004, inst_id: inst480001DB} -// CHECK:STDOUT: import_ir_inst83: {ir_id: import_ir60000004, inst_id: inst480001E1} -// CHECK:STDOUT: import_ir_inst84: {ir_id: import_ir60000004, inst_id: inst48000179} -// CHECK:STDOUT: import_ir_inst85: {ir_id: import_ir60000004, inst_id: inst48000173} -// CHECK:STDOUT: import_ir_inst86: {ir_id: import_ir60000004, inst_id: inst48000189} -// CHECK:STDOUT: import_ir_inst87: {ir_id: import_ir60000004, inst_id: inst4800018B} -// CHECK:STDOUT: import_ir_inst88: {ir_id: import_ir60000004, inst_id: inst48000171} -// CHECK:STDOUT: import_ir_inst89: {ir_id: import_ir60000004, inst_id: inst48000176} -// CHECK:STDOUT: import_ir_inst8A: {ir_id: import_ir60000004, inst_id: inst48000172} -// CHECK:STDOUT: import_ir_inst8B: {ir_id: import_ir60000004, inst_id: inst48000178} -// CHECK:STDOUT: import_ir_inst8C: {ir_id: import_ir60000004, inst_id: inst4800017F} -// CHECK:STDOUT: import_ir_inst8D: {ir_id: import_ir60000004, inst_id: inst48000182} -// CHECK:STDOUT: import_ir_inst8E: {ir_id: import_ir60000004, inst_id: inst48000186} -// CHECK:STDOUT: import_ir_inst8F: {ir_id: import_ir60000004, inst_id: inst4800018A} -// CHECK:STDOUT: import_ir_inst90: {ir_id: import_ir60000004, inst_id: inst48000192} -// CHECK:STDOUT: import_ir_inst91: {ir_id: import_ir60000004, inst_id: inst480001AE} -// CHECK:STDOUT: import_ir_inst92: {ir_id: import_ir60000004, inst_id: inst480001AF} -// CHECK:STDOUT: import_ir_inst93: {ir_id: import_ir60000004, inst_id: inst4800021C} -// CHECK:STDOUT: import_ir_inst94: {ir_id: import_ir60000004, inst_id: inst4800021A} -// CHECK:STDOUT: import_ir_inst95: {ir_id: import_ir60000004, inst_id: inst4800023B} -// CHECK:STDOUT: import_ir_inst96: {ir_id: import_ir60000004, inst_id: inst4800021B} -// CHECK:STDOUT: import_ir_inst97: {ir_id: import_ir60000004, inst_id: inst4800023B} -// CHECK:STDOUT: import_ir_inst98: {ir_id: import_ir60000004, inst_id: inst48000236} -// CHECK:STDOUT: import_ir_inst99: {ir_id: import_ir60000004, inst_id: inst48000237} -// CHECK:STDOUT: import_ir_inst9A: {ir_id: import_ir60000004, inst_id: inst4800022F} -// CHECK:STDOUT: import_ir_inst9B: {ir_id: import_ir60000004, inst_id: inst48000231} -// CHECK:STDOUT: import_ir_inst9C: {ir_id: import_ir60000004, inst_id: inst48000232} -// CHECK:STDOUT: import_ir_inst9D: {ir_id: import_ir60000004, inst_id: inst48000233} -// CHECK:STDOUT: import_ir_inst9E: {ir_id: import_ir60000004, inst_id: inst480001F3} -// CHECK:STDOUT: import_ir_inst9F: {ir_id: import_ir60000004, inst_id: inst480001F8} -// CHECK:STDOUT: import_ir_instA0: {ir_id: import_ir60000004, inst_id: inst480001FD} -// CHECK:STDOUT: import_ir_instA1: {ir_id: import_ir60000004, inst_id: inst48000226} -// CHECK:STDOUT: import_ir_instA2: {ir_id: import_ir60000004, inst_id: inst48000227} -// CHECK:STDOUT: import_ir_instA3: {ir_id: import_ir60000004, inst_id: inst48000228} -// CHECK:STDOUT: import_ir_instA4: {ir_id: import_ir60000004, inst_id: inst48000229} -// CHECK:STDOUT: import_ir_instA5: {ir_id: import_ir60000004, inst_id: inst4800022A} -// CHECK:STDOUT: import_ir_instA6: {ir_id: import_ir60000004, inst_id: inst4800022B} -// CHECK:STDOUT: import_ir_instA7: {ir_id: import_ir60000004, inst_id: inst4800022C} -// CHECK:STDOUT: import_ir_instA8: {ir_id: import_ir60000004, inst_id: inst48000230} -// CHECK:STDOUT: import_ir_instA9: {ir_id: import_ir60000004, inst_id: inst48000235} +// CHECK:STDOUT: import_ir_inst6C: {ir_id: import_ir60000004, inst_id: inst480001A5} +// CHECK:STDOUT: import_ir_inst6D: {ir_id: import_ir60000004, inst_id: inst480001C2} +// CHECK:STDOUT: import_ir_inst6E: {ir_id: import_ir60000004, inst_id: inst480001A6} +// CHECK:STDOUT: import_ir_inst6F: {ir_id: import_ir60000004, inst_id: inst480001C2} +// CHECK:STDOUT: import_ir_inst70: {ir_id: import_ir60000004, inst_id: inst480001BD} +// CHECK:STDOUT: import_ir_inst71: {ir_id: import_ir60000004, inst_id: inst480001BE} +// CHECK:STDOUT: import_ir_inst72: {ir_id: import_ir60000004, inst_id: inst480001B6} +// CHECK:STDOUT: import_ir_inst73: {ir_id: import_ir60000004, inst_id: inst480001B8} +// CHECK:STDOUT: import_ir_inst74: {ir_id: import_ir60000004, inst_id: inst480001B9} +// CHECK:STDOUT: import_ir_inst75: {ir_id: import_ir60000004, inst_id: inst480001BA} +// CHECK:STDOUT: import_ir_inst76: {ir_id: import_ir60000004, inst_id: inst48000188} +// CHECK:STDOUT: import_ir_inst77: {ir_id: import_ir60000004, inst_id: inst4800018D} +// CHECK:STDOUT: import_ir_inst78: {ir_id: import_ir60000004, inst_id: inst480001AF} +// CHECK:STDOUT: import_ir_inst79: {ir_id: import_ir60000004, inst_id: inst480001B0} +// CHECK:STDOUT: import_ir_inst7A: {ir_id: import_ir60000004, inst_id: inst480001B1} +// CHECK:STDOUT: import_ir_inst7B: {ir_id: import_ir60000004, inst_id: inst480001B2} +// CHECK:STDOUT: import_ir_inst7C: {ir_id: import_ir60000004, inst_id: inst480001B3} +// CHECK:STDOUT: import_ir_inst7D: {ir_id: import_ir60000004, inst_id: inst480001B7} +// CHECK:STDOUT: import_ir_inst7E: {ir_id: import_ir60000004, inst_id: inst480001BC} +// CHECK:STDOUT: import_ir_inst7F: {ir_id: import_ir60000004, inst_id: inst480001CD} +// CHECK:STDOUT: import_ir_inst80: {ir_id: import_ir60000004, inst_id: inst480001D4} +// CHECK:STDOUT: import_ir_inst81: {ir_id: import_ir60000004, inst_id: inst480001D8} +// CHECK:STDOUT: import_ir_inst82: {ir_id: import_ir60000004, inst_id: inst480001DA} +// CHECK:STDOUT: import_ir_inst83: {ir_id: import_ir60000004, inst_id: inst480001DB} +// CHECK:STDOUT: import_ir_inst84: {ir_id: import_ir60000004, inst_id: inst480001DC} +// CHECK:STDOUT: import_ir_inst85: {ir_id: import_ir60000004, inst_id: inst480001DF} +// CHECK:STDOUT: import_ir_inst86: {ir_id: import_ir60000004, inst_id: inst480001EB} +// CHECK:STDOUT: import_ir_inst87: {ir_id: import_ir60000004, inst_id: inst480001F2} +// CHECK:STDOUT: import_ir_inst88: {ir_id: import_ir60000004, inst_id: inst480001F6} +// CHECK:STDOUT: import_ir_inst89: {ir_id: import_ir60000004, inst_id: inst480001F7} +// CHECK:STDOUT: import_ir_inst8A: {ir_id: import_ir60000004, inst_id: inst480001F8} +// CHECK:STDOUT: import_ir_inst8B: {ir_id: import_ir60000004, inst_id: inst480001FE} +// CHECK:STDOUT: import_ir_inst8C: {ir_id: import_ir60000004, inst_id: inst48000190} +// CHECK:STDOUT: import_ir_inst8D: {ir_id: import_ir60000004, inst_id: inst4800018A} +// CHECK:STDOUT: import_ir_inst8E: {ir_id: import_ir60000004, inst_id: inst480001A0} +// CHECK:STDOUT: import_ir_inst8F: {ir_id: import_ir60000004, inst_id: inst480001A2} +// CHECK:STDOUT: import_ir_inst90: {ir_id: import_ir60000004, inst_id: inst48000188} +// CHECK:STDOUT: import_ir_inst91: {ir_id: import_ir60000004, inst_id: inst4800018D} +// CHECK:STDOUT: import_ir_inst92: {ir_id: import_ir60000004, inst_id: inst48000189} +// CHECK:STDOUT: import_ir_inst93: {ir_id: import_ir60000004, inst_id: inst4800018F} +// CHECK:STDOUT: import_ir_inst94: {ir_id: import_ir60000004, inst_id: inst48000196} +// CHECK:STDOUT: import_ir_inst95: {ir_id: import_ir60000004, inst_id: inst48000199} +// CHECK:STDOUT: import_ir_inst96: {ir_id: import_ir60000004, inst_id: inst4800019D} +// CHECK:STDOUT: import_ir_inst97: {ir_id: import_ir60000004, inst_id: inst480001A1} +// CHECK:STDOUT: import_ir_inst98: {ir_id: import_ir60000004, inst_id: inst480001A9} +// CHECK:STDOUT: import_ir_inst99: {ir_id: import_ir60000004, inst_id: inst480001C5} +// CHECK:STDOUT: import_ir_inst9A: {ir_id: import_ir60000004, inst_id: inst480001C6} +// CHECK:STDOUT: import_ir_inst9B: {ir_id: import_ir60000004, inst_id: inst48000239} +// CHECK:STDOUT: import_ir_inst9C: {ir_id: import_ir60000004, inst_id: inst48000237} +// CHECK:STDOUT: import_ir_inst9D: {ir_id: import_ir60000004, inst_id: inst48000258} +// CHECK:STDOUT: import_ir_inst9E: {ir_id: import_ir60000004, inst_id: inst48000238} +// CHECK:STDOUT: import_ir_inst9F: {ir_id: import_ir60000004, inst_id: inst48000258} +// CHECK:STDOUT: import_ir_instA0: {ir_id: import_ir60000004, inst_id: inst48000253} +// CHECK:STDOUT: import_ir_instA1: {ir_id: import_ir60000004, inst_id: inst48000254} +// CHECK:STDOUT: import_ir_instA2: {ir_id: import_ir60000004, inst_id: inst4800024C} +// CHECK:STDOUT: import_ir_instA3: {ir_id: import_ir60000004, inst_id: inst4800024E} +// CHECK:STDOUT: import_ir_instA4: {ir_id: import_ir60000004, inst_id: inst4800024F} +// CHECK:STDOUT: import_ir_instA5: {ir_id: import_ir60000004, inst_id: inst48000250} +// CHECK:STDOUT: import_ir_instA6: {ir_id: import_ir60000004, inst_id: inst48000210} +// CHECK:STDOUT: import_ir_instA7: {ir_id: import_ir60000004, inst_id: inst48000215} +// CHECK:STDOUT: import_ir_instA8: {ir_id: import_ir60000004, inst_id: inst4800021A} +// CHECK:STDOUT: import_ir_instA9: {ir_id: import_ir60000004, inst_id: inst48000243} // CHECK:STDOUT: import_ir_instAA: {ir_id: import_ir60000004, inst_id: inst48000244} -// CHECK:STDOUT: import_ir_instAB: {ir_id: import_ir60000004, inst_id: inst4800024A} -// CHECK:STDOUT: import_ir_instAC: {ir_id: import_ir60000004, inst_id: inst4800024E} -// CHECK:STDOUT: import_ir_instAD: {ir_id: import_ir60000004, inst_id: inst48000250} -// CHECK:STDOUT: import_ir_instAE: {ir_id: import_ir60000004, inst_id: inst48000251} -// CHECK:STDOUT: import_ir_instAF: {ir_id: import_ir60000004, inst_id: inst48000254} -// CHECK:STDOUT: import_ir_instB0: {ir_id: import_ir60000004, inst_id: inst4800025E} -// CHECK:STDOUT: import_ir_instB1: {ir_id: import_ir60000004, inst_id: inst48000262} -// CHECK:STDOUT: import_ir_instB2: {ir_id: import_ir60000004, inst_id: inst48000264} -// CHECK:STDOUT: import_ir_instB3: {ir_id: import_ir60000004, inst_id: inst48000265} -// CHECK:STDOUT: import_ir_instB4: {ir_id: import_ir60000004, inst_id: inst48000268} -// CHECK:STDOUT: import_ir_instB5: {ir_id: import_ir60000004, inst_id: inst48000274} -// CHECK:STDOUT: import_ir_instB6: {ir_id: import_ir60000004, inst_id: inst48000279} -// CHECK:STDOUT: import_ir_instB7: {ir_id: import_ir60000004, inst_id: inst4800027D} -// CHECK:STDOUT: import_ir_instB8: {ir_id: import_ir60000004, inst_id: inst4800027E} -// CHECK:STDOUT: import_ir_instB9: {ir_id: import_ir60000004, inst_id: inst48000284} -// CHECK:STDOUT: import_ir_instBA: {ir_id: import_ir60000004, inst_id: inst48000200} -// CHECK:STDOUT: import_ir_instBB: {ir_id: import_ir60000004, inst_id: inst480001FA} -// CHECK:STDOUT: import_ir_instBC: {ir_id: import_ir60000004, inst_id: inst480001F5} -// CHECK:STDOUT: import_ir_instBD: {ir_id: import_ir60000004, inst_id: inst48000214} -// CHECK:STDOUT: import_ir_instBE: {ir_id: import_ir60000004, inst_id: inst48000216} -// CHECK:STDOUT: import_ir_instBF: {ir_id: import_ir60000004, inst_id: inst480001F3} -// CHECK:STDOUT: import_ir_instC0: {ir_id: import_ir60000004, inst_id: inst480001F8} -// CHECK:STDOUT: import_ir_instC1: {ir_id: import_ir60000004, inst_id: inst480001FD} -// CHECK:STDOUT: import_ir_instC2: {ir_id: import_ir60000004, inst_id: inst480001F4} -// CHECK:STDOUT: import_ir_instC3: {ir_id: import_ir60000004, inst_id: inst480001F9} -// CHECK:STDOUT: import_ir_instC4: {ir_id: import_ir60000004, inst_id: inst480001FF} -// CHECK:STDOUT: import_ir_instC5: {ir_id: import_ir60000004, inst_id: inst48000207} -// CHECK:STDOUT: import_ir_instC6: {ir_id: import_ir60000004, inst_id: inst4800020A} -// CHECK:STDOUT: import_ir_instC7: {ir_id: import_ir60000004, inst_id: inst4800020D} -// CHECK:STDOUT: import_ir_instC8: {ir_id: import_ir60000004, inst_id: inst48000211} -// CHECK:STDOUT: import_ir_instC9: {ir_id: import_ir60000004, inst_id: inst48000215} -// CHECK:STDOUT: import_ir_instCA: {ir_id: import_ir60000004, inst_id: inst4800021E} -// CHECK:STDOUT: import_ir_instCB: {ir_id: import_ir60000004, inst_id: inst4800023E} -// CHECK:STDOUT: import_ir_instCC: {ir_id: import_ir60000004, inst_id: inst4800023F} +// CHECK:STDOUT: import_ir_instAB: {ir_id: import_ir60000004, inst_id: inst48000245} +// CHECK:STDOUT: import_ir_instAC: {ir_id: import_ir60000004, inst_id: inst48000246} +// CHECK:STDOUT: import_ir_instAD: {ir_id: import_ir60000004, inst_id: inst48000247} +// CHECK:STDOUT: import_ir_instAE: {ir_id: import_ir60000004, inst_id: inst48000248} +// CHECK:STDOUT: import_ir_instAF: {ir_id: import_ir60000004, inst_id: inst48000249} +// CHECK:STDOUT: import_ir_instB0: {ir_id: import_ir60000004, inst_id: inst4800024D} +// CHECK:STDOUT: import_ir_instB1: {ir_id: import_ir60000004, inst_id: inst48000252} +// CHECK:STDOUT: import_ir_instB2: {ir_id: import_ir60000004, inst_id: inst48000263} +// CHECK:STDOUT: import_ir_instB3: {ir_id: import_ir60000004, inst_id: inst48000269} +// CHECK:STDOUT: import_ir_instB4: {ir_id: import_ir60000004, inst_id: inst4800026D} +// CHECK:STDOUT: import_ir_instB5: {ir_id: import_ir60000004, inst_id: inst4800026F} +// CHECK:STDOUT: import_ir_instB6: {ir_id: import_ir60000004, inst_id: inst48000270} +// CHECK:STDOUT: import_ir_instB7: {ir_id: import_ir60000004, inst_id: inst48000271} +// CHECK:STDOUT: import_ir_instB8: {ir_id: import_ir60000004, inst_id: inst48000274} +// CHECK:STDOUT: import_ir_instB9: {ir_id: import_ir60000004, inst_id: inst4800027E} +// CHECK:STDOUT: import_ir_instBA: {ir_id: import_ir60000004, inst_id: inst48000282} +// CHECK:STDOUT: import_ir_instBB: {ir_id: import_ir60000004, inst_id: inst48000284} +// CHECK:STDOUT: import_ir_instBC: {ir_id: import_ir60000004, inst_id: inst48000285} +// CHECK:STDOUT: import_ir_instBD: {ir_id: import_ir60000004, inst_id: inst48000286} +// CHECK:STDOUT: import_ir_instBE: {ir_id: import_ir60000004, inst_id: inst48000289} +// CHECK:STDOUT: import_ir_instBF: {ir_id: import_ir60000004, inst_id: inst48000295} +// CHECK:STDOUT: import_ir_instC0: {ir_id: import_ir60000004, inst_id: inst4800029C} +// CHECK:STDOUT: import_ir_instC1: {ir_id: import_ir60000004, inst_id: inst480002A0} +// CHECK:STDOUT: import_ir_instC2: {ir_id: import_ir60000004, inst_id: inst480002A1} +// CHECK:STDOUT: import_ir_instC3: {ir_id: import_ir60000004, inst_id: inst480002A2} +// CHECK:STDOUT: import_ir_instC4: {ir_id: import_ir60000004, inst_id: inst480002A8} +// CHECK:STDOUT: import_ir_instC5: {ir_id: import_ir60000004, inst_id: inst4800021D} +// CHECK:STDOUT: import_ir_instC6: {ir_id: import_ir60000004, inst_id: inst48000217} +// CHECK:STDOUT: import_ir_instC7: {ir_id: import_ir60000004, inst_id: inst48000212} +// CHECK:STDOUT: import_ir_instC8: {ir_id: import_ir60000004, inst_id: inst48000231} +// CHECK:STDOUT: import_ir_instC9: {ir_id: import_ir60000004, inst_id: inst48000233} +// CHECK:STDOUT: import_ir_instCA: {ir_id: import_ir60000004, inst_id: inst48000210} +// CHECK:STDOUT: import_ir_instCB: {ir_id: import_ir60000004, inst_id: inst48000215} +// CHECK:STDOUT: import_ir_instCC: {ir_id: import_ir60000004, inst_id: inst4800021A} +// CHECK:STDOUT: import_ir_instCD: {ir_id: import_ir60000004, inst_id: inst48000211} +// CHECK:STDOUT: import_ir_instCE: {ir_id: import_ir60000004, inst_id: inst48000216} +// CHECK:STDOUT: import_ir_instCF: {ir_id: import_ir60000004, inst_id: inst4800021C} +// CHECK:STDOUT: import_ir_instD0: {ir_id: import_ir60000004, inst_id: inst48000224} +// CHECK:STDOUT: import_ir_instD1: {ir_id: import_ir60000004, inst_id: inst48000227} +// CHECK:STDOUT: import_ir_instD2: {ir_id: import_ir60000004, inst_id: inst4800022A} +// CHECK:STDOUT: import_ir_instD3: {ir_id: import_ir60000004, inst_id: inst4800022E} +// CHECK:STDOUT: import_ir_instD4: {ir_id: import_ir60000004, inst_id: inst48000232} +// CHECK:STDOUT: import_ir_instD5: {ir_id: import_ir60000004, inst_id: inst4800023B} +// CHECK:STDOUT: import_ir_instD6: {ir_id: import_ir60000004, inst_id: inst4800025B} +// CHECK:STDOUT: import_ir_instD7: {ir_id: import_ir60000004, inst_id: inst4800025C} // CHECK:STDOUT: clang_decls: {} // CHECK:STDOUT: name_scopes: // CHECK:STDOUT: name_scope0: {inst: instF, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name(Core): inst60000011, name0: inst6000003C}} // CHECK:STDOUT: name_scope60000001: {inst: inst60000011, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name3: inst6000004C}} -// CHECK:STDOUT: name_scope60000002: {inst: inst6000004D, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {name(SelfType): inst60000050, name4: inst60000051}} -// CHECK:STDOUT: name_scope60000003: {inst: inst60000069, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} -// CHECK:STDOUT: name_scope60000004: {inst: inst6000009B, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} -// CHECK:STDOUT: name_scope60000005: {inst: inst6000009F, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} -// CHECK:STDOUT: name_scope60000006: {inst: inst600000A3, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} -// CHECK:STDOUT: name_scope60000007: {inst: inst600000A7, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} -// CHECK:STDOUT: name_scope60000008: {inst: inst600000AB, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} -// CHECK:STDOUT: name_scope60000009: {inst: inst600000C9, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} -// CHECK:STDOUT: name_scope6000000A: {inst: inst600000CD, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} -// CHECK:STDOUT: name_scope6000000B: {inst: inst600000D1, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} -// CHECK:STDOUT: name_scope6000000C: {inst: inst60000111, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} +// CHECK:STDOUT: name_scope60000002: {inst: inst6000004D, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {name(SelfType): inst60000068}} +// CHECK:STDOUT: name_scope60000003: {inst: inst6000004F, parent_scope: name_scope60000002, has_error: false, extended_scopes: [], names: {name4: inst60000051}} +// CHECK:STDOUT: name_scope60000004: {inst: inst6000006E, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} +// CHECK:STDOUT: name_scope60000005: {inst: inst600000A3, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} +// CHECK:STDOUT: name_scope60000006: {inst: inst600000A7, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} +// CHECK:STDOUT: name_scope60000007: {inst: inst600000AB, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} +// CHECK:STDOUT: name_scope60000008: {inst: inst600000AF, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} +// CHECK:STDOUT: name_scope60000009: {inst: inst600000B3, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} +// CHECK:STDOUT: name_scope6000000A: {inst: inst600000D1, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} +// CHECK:STDOUT: name_scope6000000B: {inst: inst600000D5, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} +// CHECK:STDOUT: name_scope6000000C: {inst: inst600000D9, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} +// CHECK:STDOUT: name_scope6000000D: {inst: inst6000011D, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}} // CHECK:STDOUT: entity_names: // CHECK:STDOUT: entity_name60000000: {name: name(PeriodSelf), parent_scope: name_scope, index: -1, is_template: 0} // CHECK:STDOUT: entity_name60000001: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name60000002: {name: name2, parent_scope: name_scope, index: -1, is_template: 0} // CHECK:STDOUT: entity_name60000003: {name: name3, parent_scope: name_scope60000001, index: -1, is_template: 0} // CHECK:STDOUT: entity_name60000004: {name: name(SelfType), parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name60000005: {name: name4, parent_scope: name_scope60000002, index: -1, is_template: 0} +// CHECK:STDOUT: entity_name60000005: {name: name4, parent_scope: name_scope60000003, index: -1, is_template: 0} // CHECK:STDOUT: entity_name60000006: {name: name(SelfType), parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name60000007: {name: name(SelfType), parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name60000008: {name: name(SelfValue), parent_scope: name_scope, index: -1, is_template: 0} // CHECK:STDOUT: entity_name60000009: {name: name(SelfType), parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name6000000A: {name: name(SelfType), parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name6000000B: {name: name(SelfType), parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name6000000C: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name6000000C: {name: name(SelfType), parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name6000000D: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name6000000E: {name: name(SelfValue), parent_scope: name_scope, index: -1, is_template: 0} -// CHECK:STDOUT: entity_name6000000F: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name6000000E: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name6000000F: {name: name(SelfValue), parent_scope: name_scope, index: -1, is_template: 0} // CHECK:STDOUT: entity_name60000010: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name60000011: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name60000012: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} @@ -282,105 +294,120 @@ fn Foo[T:! type](p: T*) -> (T*, ()) { // CHECK:STDOUT: entity_name60000016: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name60000017: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name60000018: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name60000019: {name: name(SelfValue), parent_scope: name_scope, index: -1, is_template: 0} -// CHECK:STDOUT: entity_name6000001A: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name6000001B: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} +// CHECK:STDOUT: entity_name60000019: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name6000001A: {name: name(SelfValue), parent_scope: name_scope, index: -1, is_template: 0} +// CHECK:STDOUT: entity_name6000001B: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name6000001C: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} -// CHECK:STDOUT: entity_name6000001D: {name: name(SelfValue), parent_scope: name_scope, index: -1, is_template: 0} -// CHECK:STDOUT: entity_name6000001E: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} +// CHECK:STDOUT: entity_name6000001D: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} +// CHECK:STDOUT: entity_name6000001E: {name: name(SelfValue), parent_scope: name_scope, index: -1, is_template: 0} // CHECK:STDOUT: entity_name6000001F: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} -// CHECK:STDOUT: entity_name60000020: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name60000020: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} // CHECK:STDOUT: entity_name60000021: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name60000022: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} -// CHECK:STDOUT: entity_name60000023: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name60000024: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} -// CHECK:STDOUT: entity_name60000025: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name60000026: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} -// CHECK:STDOUT: entity_name60000027: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name60000028: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} -// CHECK:STDOUT: entity_name60000029: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name6000002A: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} +// CHECK:STDOUT: entity_name60000022: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name60000023: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} +// CHECK:STDOUT: entity_name60000024: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name60000025: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} +// CHECK:STDOUT: entity_name60000026: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name60000027: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} +// CHECK:STDOUT: entity_name60000028: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name60000029: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} +// CHECK:STDOUT: entity_name6000002A: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: entity_name6000002B: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} -// CHECK:STDOUT: entity_name6000002C: {name: name(SelfValue), parent_scope: name_scope, index: -1, is_template: 0} -// CHECK:STDOUT: entity_name6000002D: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} +// CHECK:STDOUT: entity_name6000002C: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} +// CHECK:STDOUT: entity_name6000002D: {name: name(SelfValue), parent_scope: name_scope, index: -1, is_template: 0} // CHECK:STDOUT: entity_name6000002E: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} -// CHECK:STDOUT: entity_name6000002F: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} +// CHECK:STDOUT: entity_name6000002F: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} // CHECK:STDOUT: entity_name60000030: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} -// CHECK:STDOUT: entity_name60000031: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name60000031: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} // CHECK:STDOUT: entity_name60000032: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name60000033: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} -// CHECK:STDOUT: entity_name60000034: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} -// CHECK:STDOUT: entity_name60000035: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name60000036: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} -// CHECK:STDOUT: entity_name60000037: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} -// CHECK:STDOUT: entity_name60000038: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name60000039: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} -// CHECK:STDOUT: entity_name6000003A: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} -// CHECK:STDOUT: entity_name6000003B: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} -// CHECK:STDOUT: entity_name6000003C: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} -// CHECK:STDOUT: entity_name6000003D: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} -// CHECK:STDOUT: entity_name6000003E: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name60000033: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name60000034: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} +// CHECK:STDOUT: entity_name60000035: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} +// CHECK:STDOUT: entity_name60000036: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name60000037: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} +// CHECK:STDOUT: entity_name60000038: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} +// CHECK:STDOUT: entity_name60000039: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name6000003A: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} +// CHECK:STDOUT: entity_name6000003B: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} +// CHECK:STDOUT: entity_name6000003C: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} +// CHECK:STDOUT: entity_name6000003D: {name: name6, parent_scope: name_scope, index: 2, is_template: 0} +// CHECK:STDOUT: entity_name6000003E: {name: name5, parent_scope: name_scope, index: 1, is_template: 0} +// CHECK:STDOUT: entity_name6000003F: {name: name1, parent_scope: name_scope, index: 0, is_template: 0} // CHECK:STDOUT: cpp_global_vars: {} // CHECK:STDOUT: functions: // CHECK:STDOUT: function60000000: {name: name0, parent_scope: name_scope0, call_param_patterns_id: inst_block60000010, call_params_id: inst_block60000011, return_type_inst_id: inst6000002F, return_form_inst_id: inst60000031, return_patterns_id: inst_block6000000F, body: [inst_block60000018]} -// CHECK:STDOUT: function60000001: {name: name4, parent_scope: name_scope60000002, call_param_patterns_id: inst_block6000001B, return_type_inst_id: inst60000060, return_form_inst_id: inst60000061, return_patterns_id: inst_block6000001D} -// CHECK:STDOUT: function60000002: {name: name4, parent_scope: name_scope60000003, call_param_patterns_id: inst_block60000026, return_type_inst_id: inst60000079, return_form_inst_id: inst6000007A, return_patterns_id: inst_block60000028} -// CHECK:STDOUT: function60000003: {name: name4, parent_scope: name_scope60000008, call_param_patterns_id: inst_block6000003B, return_type_inst_id: inst600000BE, return_form_inst_id: inst600000BF, return_patterns_id: inst_block6000003D} -// CHECK:STDOUT: function60000004: {name: name4, parent_scope: name_scope6000000B, call_param_patterns_id: inst_block60000049, return_type_inst_id: inst600000E3, return_form_inst_id: inst600000E4, return_patterns_id: inst_block6000004B} -// CHECK:STDOUT: function60000005: {name: name4, parent_scope: name_scope6000000C, call_param_patterns_id: inst_block60000063, return_type_inst_id: inst60000123, return_form_inst_id: inst60000124, return_patterns_id: inst_block60000065} +// CHECK:STDOUT: function60000001: {name: name4, parent_scope: name_scope60000003, call_param_patterns_id: inst_block6000001E, return_type_inst_id: inst6000005E, return_form_inst_id: inst6000005F, return_patterns_id: inst_block60000020} +// CHECK:STDOUT: function60000002: {name: name4, parent_scope: name_scope60000004, call_param_patterns_id: inst_block6000002A, return_type_inst_id: inst6000007E, return_form_inst_id: inst6000007F, return_patterns_id: inst_block6000002C} +// CHECK:STDOUT: function60000003: {name: name4, parent_scope: name_scope60000009, call_param_patterns_id: inst_block60000041, return_type_inst_id: inst600000C6, return_form_inst_id: inst600000C7, return_patterns_id: inst_block60000043} +// CHECK:STDOUT: function60000004: {name: name4, parent_scope: name_scope6000000C, call_param_patterns_id: inst_block6000004F, return_type_inst_id: inst600000EB, return_form_inst_id: inst600000EC, return_patterns_id: inst_block60000051} +// CHECK:STDOUT: function60000005: {name: name4, parent_scope: name_scope6000000D, call_param_patterns_id: inst_block6000006C, return_type_inst_id: inst6000012F, return_form_inst_id: inst60000130, return_patterns_id: inst_block6000006E} // CHECK:STDOUT: classes: {} // CHECK:STDOUT: interfaces: // CHECK:STDOUT: interface60000000: {name: name3, parent_scope: name_scope60000001, require_impls_block_id: require_block_empty} // CHECK:STDOUT: associated_constants: {} // CHECK:STDOUT: impls: -// CHECK:STDOUT: impl60000000: {self: inst60000091, constraint: inst60000092, witness: inst60000068} -// CHECK:STDOUT: impl60000001: {self: inst6000009C, constraint: inst6000009D, witness: inst6000009A} -// CHECK:STDOUT: impl60000002: {self: inst600000A0, constraint: inst600000A1, witness: inst6000009E} -// CHECK:STDOUT: impl60000003: {self: inst600000A4, constraint: inst600000A5, witness: inst600000A2} -// CHECK:STDOUT: impl60000004: {self: inst600000A8, constraint: inst600000A9, witness: inst600000A6} -// CHECK:STDOUT: impl60000005: {self: inst600000B0, constraint: inst600000B1, witness: inst600000AA} -// CHECK:STDOUT: impl60000006: {self: inst600000CA, constraint: inst600000CB, witness: inst600000C8} -// CHECK:STDOUT: impl60000007: {self: inst600000CE, constraint: inst600000CF, witness: inst600000CC} -// CHECK:STDOUT: impl60000008: {self: inst60000103, constraint: inst60000104, witness: inst600000D0} -// CHECK:STDOUT: impl60000009: {self: inst6000014C, constraint: inst6000014D, witness: inst60000110} +// CHECK:STDOUT: impl60000000: {self: inst60000099, constraint: inst6000009A, witness: inst6000006D} +// CHECK:STDOUT: impl60000001: {self: inst600000A4, constraint: inst600000A5, witness: inst600000A2} +// CHECK:STDOUT: impl60000002: {self: inst600000A8, constraint: inst600000A9, witness: inst600000A6} +// CHECK:STDOUT: impl60000003: {self: inst600000AC, constraint: inst600000AD, witness: inst600000AA} +// CHECK:STDOUT: impl60000004: {self: inst600000B0, constraint: inst600000B1, witness: inst600000AE} +// CHECK:STDOUT: impl60000005: {self: inst600000B8, constraint: inst600000B9, witness: inst600000B2} +// CHECK:STDOUT: impl60000006: {self: inst600000D2, constraint: inst600000D3, witness: inst600000D0} +// CHECK:STDOUT: impl60000007: {self: inst600000D6, constraint: inst600000D7, witness: inst600000D4} +// CHECK:STDOUT: impl60000008: {self: inst6000010F, constraint: inst60000110, witness: inst600000D8} +// CHECK:STDOUT: impl60000009: {self: inst6000015D, constraint: inst6000015E, witness: inst6000011C} // CHECK:STDOUT: generics: -// CHECK:STDOUT: generic60000000: {decl: inst6000003C, bindings: inst_block60000014, self_specific_id: specific60000000, decl_block_id: inst_block60000016, definition_block_id: inst_block60000081} -// CHECK:STDOUT: generic60000001: {decl: inst60000056, bindings: inst_block6000001E, self_specific_id: specific60000001, decl_block_id: inst_block6000001F, definition_block_id: inst_block} -// CHECK:STDOUT: generic60000002: {decl: inst60000069, bindings: inst_block60000030, self_specific_id: specific60000002, decl_block_id: inst_block60000032, definition_block_id: inst_block60000034} -// CHECK:STDOUT: generic60000003: {decl: inst60000070, bindings: inst_block60000029, self_specific_id: specific60000004, decl_block_id: inst_block6000002A, definition_block_id: inst_block6000002D} -// CHECK:STDOUT: generic60000004: {decl: inst600000AB, bindings: inst_block60000038, self_specific_id: specific60000007, decl_block_id: inst_block6000003A, definition_block_id: inst_block60000042} -// CHECK:STDOUT: generic60000005: {decl: inst600000B6, bindings: inst_block6000003E, self_specific_id: specific60000009, decl_block_id: inst_block6000003F, definition_block_id: inst_block_empty} -// CHECK:STDOUT: generic60000006: {decl: inst600000D1, bindings: inst_block60000056, self_specific_id: specific6000000A, decl_block_id: inst_block6000005A, definition_block_id: inst_block6000005C} -// CHECK:STDOUT: generic60000007: {decl: inst600000D8, bindings: inst_block6000004C, self_specific_id: specific6000000C, decl_block_id: inst_block6000004E, definition_block_id: inst_block60000053} -// CHECK:STDOUT: generic60000008: {decl: inst60000111, bindings: inst_block60000071, self_specific_id: specific60000010, decl_block_id: inst_block60000075, definition_block_id: inst_block60000077} -// CHECK:STDOUT: generic60000009: {decl: inst60000118, bindings: inst_block60000066, self_specific_id: specific60000012, decl_block_id: inst_block60000068, definition_block_id: inst_block6000006E} +// CHECK:STDOUT: generic60000000: {decl: inst6000003C, bindings: inst_block60000014, self_specific_id: specific60000000, decl_block_id: inst_block60000016, definition_block_id: inst_block60000090} +// CHECK:STDOUT: generic60000001: {decl: inst6000004F, bindings: inst_block6000001B, self_specific_id: specific60000001, decl_block_id: inst_block_empty, definition_block_id: inst_block60000025} +// CHECK:STDOUT: generic60000002: {decl: inst60000054, bindings: inst_block60000021, self_specific_id: specific60000002, decl_block_id: inst_block60000022, definition_block_id: inst_block} +// CHECK:STDOUT: generic60000003: {decl: inst6000006E, bindings: inst_block60000036, self_specific_id: specific60000004, decl_block_id: inst_block60000038, definition_block_id: inst_block6000003A} +// CHECK:STDOUT: generic60000004: {decl: inst60000075, bindings: inst_block6000002D, self_specific_id: specific60000007, decl_block_id: inst_block6000002E, definition_block_id: inst_block60000033} +// CHECK:STDOUT: generic60000005: {decl: inst600000B3, bindings: inst_block6000003E, self_specific_id: specific6000000B, decl_block_id: inst_block60000040, definition_block_id: inst_block60000048} +// CHECK:STDOUT: generic60000006: {decl: inst600000BE, bindings: inst_block60000044, self_specific_id: specific6000000D, decl_block_id: inst_block60000045, definition_block_id: inst_block_empty} +// CHECK:STDOUT: generic60000007: {decl: inst600000D9, bindings: inst_block6000005F, self_specific_id: specific6000000E, decl_block_id: inst_block60000063, definition_block_id: inst_block60000065} +// CHECK:STDOUT: generic60000008: {decl: inst600000E0, bindings: inst_block60000052, self_specific_id: specific60000011, decl_block_id: inst_block60000054, definition_block_id: inst_block6000005C} +// CHECK:STDOUT: generic60000009: {decl: inst6000011D, bindings: inst_block6000007E, self_specific_id: specific60000017, decl_block_id: inst_block60000082, definition_block_id: inst_block60000084} +// CHECK:STDOUT: generic6000000A: {decl: inst60000124, bindings: inst_block6000006F, self_specific_id: specific6000001A, decl_block_id: inst_block60000071, definition_block_id: inst_block6000007B} // CHECK:STDOUT: specifics: // CHECK:STDOUT: specific60000000: {generic: generic60000000, args: inst_block60000015, decl_block_id: inst_block60000017, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000001: {generic: generic60000001, args: inst_block60000020, decl_block_id: inst_block60000021, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000002: {generic: generic60000002, args: inst_block60000023, decl_block_id: inst_block60000024, definition_block_id: inst_block60000025} -// CHECK:STDOUT: specific60000003: {generic: generic60000001, args: inst_block60000023, decl_block_id: inst_block6000002B, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000004: {generic: generic60000003, args: inst_block60000023, decl_block_id: inst_block6000002E, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000005: {generic: generic60000001, args: inst_block6000002C, decl_block_id: inst_block, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000006: {generic: generic60000002, args: inst_block60000031, decl_block_id: inst_block, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000007: {generic: generic60000004, args: inst_block60000015, decl_block_id: inst_block60000036, definition_block_id: inst_block60000078} -// CHECK:STDOUT: specific60000008: {generic: generic60000004, args: inst_block60000039, decl_block_id: inst_block, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000009: {generic: generic60000005, args: inst_block60000015, decl_block_id: inst_block60000040, definition_block_id: inst_block} -// CHECK:STDOUT: specific6000000A: {generic: generic60000006, args: inst_block60000045, decl_block_id: inst_block60000047, definition_block_id: inst_block60000048} -// CHECK:STDOUT: specific6000000B: {generic: generic60000001, args: inst_block6000004F, decl_block_id: inst_block60000050, definition_block_id: inst_block} -// CHECK:STDOUT: specific6000000C: {generic: generic60000007, args: inst_block60000045, decl_block_id: inst_block60000054, definition_block_id: inst_block} -// CHECK:STDOUT: specific6000000D: {generic: generic60000001, args: inst_block60000051, decl_block_id: inst_block, definition_block_id: inst_block} -// CHECK:STDOUT: specific6000000E: {generic: generic60000001, args: inst_block60000052, decl_block_id: inst_block, definition_block_id: inst_block} -// CHECK:STDOUT: specific6000000F: {generic: generic60000006, args: inst_block60000057, decl_block_id: inst_block, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000010: {generic: generic60000008, args: inst_block6000005F, decl_block_id: inst_block60000061, definition_block_id: inst_block60000062} -// CHECK:STDOUT: specific60000011: {generic: generic60000001, args: inst_block60000069, decl_block_id: inst_block6000006A, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000012: {generic: generic60000009, args: inst_block6000005F, decl_block_id: inst_block6000006F, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000013: {generic: generic60000001, args: inst_block6000006B, decl_block_id: inst_block, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000014: {generic: generic60000001, args: inst_block6000006C, decl_block_id: inst_block, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000015: {generic: generic60000001, args: inst_block6000006D, decl_block_id: inst_block, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000016: {generic: generic60000008, args: inst_block60000072, decl_block_id: inst_block, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000017: {generic: generic60000004, args: inst_block60000079, decl_block_id: inst_block, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000018: {generic: generic60000001, args: inst_block6000007C, decl_block_id: inst_block6000007D, definition_block_id: inst_block} -// CHECK:STDOUT: specific60000019: {generic: generic60000001, args: inst_block6000007E, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000001: {generic: generic60000001, args: inst_block6000001C, decl_block_id: inst_block_empty, definition_block_id: inst_block6000001D} +// CHECK:STDOUT: specific60000002: {generic: generic60000002, args: inst_block6000001C, decl_block_id: inst_block60000023, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000003: {generic: generic60000001, args: inst_block60000024, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000004: {generic: generic60000003, args: inst_block60000027, decl_block_id: inst_block60000028, definition_block_id: inst_block60000029} +// CHECK:STDOUT: specific60000005: {generic: generic60000001, args: inst_block60000027, decl_block_id: inst_block_empty, definition_block_id: inst_block6000002F} +// CHECK:STDOUT: specific60000006: {generic: generic60000002, args: inst_block60000027, decl_block_id: inst_block60000030, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000007: {generic: generic60000004, args: inst_block60000027, decl_block_id: inst_block60000034, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000008: {generic: generic60000001, args: inst_block60000031, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000009: {generic: generic60000002, args: inst_block60000031, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific6000000A: {generic: generic60000003, args: inst_block60000037, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific6000000B: {generic: generic60000005, args: inst_block60000015, decl_block_id: inst_block6000003C, definition_block_id: inst_block60000085} +// CHECK:STDOUT: specific6000000C: {generic: generic60000005, args: inst_block6000003F, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific6000000D: {generic: generic60000006, args: inst_block60000015, decl_block_id: inst_block60000046, definition_block_id: inst_block} +// CHECK:STDOUT: specific6000000E: {generic: generic60000007, args: inst_block6000004B, decl_block_id: inst_block6000004D, definition_block_id: inst_block6000004E} +// CHECK:STDOUT: specific6000000F: {generic: generic60000001, args: inst_block60000055, decl_block_id: inst_block_empty, definition_block_id: inst_block60000056} +// CHECK:STDOUT: specific60000010: {generic: generic60000002, args: inst_block60000055, decl_block_id: inst_block60000057, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000011: {generic: generic60000008, args: inst_block6000004B, decl_block_id: inst_block6000005D, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000012: {generic: generic60000001, args: inst_block60000058, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000013: {generic: generic60000002, args: inst_block60000058, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000014: {generic: generic60000001, args: inst_block6000005A, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000015: {generic: generic60000002, args: inst_block6000005A, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000016: {generic: generic60000007, args: inst_block60000060, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000017: {generic: generic60000009, args: inst_block60000068, decl_block_id: inst_block6000006A, definition_block_id: inst_block6000006B} +// CHECK:STDOUT: specific60000018: {generic: generic60000001, args: inst_block60000072, decl_block_id: inst_block_empty, definition_block_id: inst_block60000073} +// CHECK:STDOUT: specific60000019: {generic: generic60000002, args: inst_block60000072, decl_block_id: inst_block60000074, definition_block_id: inst_block} +// CHECK:STDOUT: specific6000001A: {generic: generic6000000A, args: inst_block60000068, decl_block_id: inst_block6000007C, definition_block_id: inst_block} +// CHECK:STDOUT: specific6000001B: {generic: generic60000001, args: inst_block60000075, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific6000001C: {generic: generic60000002, args: inst_block60000075, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific6000001D: {generic: generic60000001, args: inst_block60000077, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific6000001E: {generic: generic60000002, args: inst_block60000077, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific6000001F: {generic: generic60000001, args: inst_block60000079, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000020: {generic: generic60000002, args: inst_block60000079, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000021: {generic: generic60000009, args: inst_block6000007F, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000022: {generic: generic60000005, args: inst_block60000086, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000023: {generic: generic60000001, args: inst_block60000088, decl_block_id: inst_block_empty, definition_block_id: inst_block60000089} +// CHECK:STDOUT: specific60000024: {generic: generic60000001, args: inst_block6000008B, decl_block_id: inst_block, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000025: {generic: generic60000002, args: inst_block60000088, decl_block_id: inst_block6000008C, definition_block_id: inst_block} +// CHECK:STDOUT: specific60000026: {generic: generic60000002, args: inst_block6000008B, decl_block_id: inst_block, definition_block_id: inst_block} // CHECK:STDOUT: specific_interfaces: // CHECK:STDOUT: specific_interface60000000: {interface_id: interface60000000, specific_id: specific} // CHECK:STDOUT: struct_type_fields: @@ -422,9 +449,9 @@ fn Foo[T:! type](p: T*) -> (T*, ()) { // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(SpecificFunctionType))} // CHECK:STDOUT: 'type(inst(RequireSpecificDefinitionType))': // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(RequireSpecificDefinitionType))} -// CHECK:STDOUT: 'type(symbolic_constant60000129)': +// CHECK:STDOUT: 'type(symbolic_constant60000146)': // CHECK:STDOUT: value_repr: {kind: none, type: type(inst60000025)} -// CHECK:STDOUT: 'type(symbolic_constant6000012C)': +// CHECK:STDOUT: 'type(symbolic_constant6000014A)': // CHECK:STDOUT: value_repr: {kind: none, type: type(inst60000025)} // CHECK:STDOUT: 'type(inst(BoundMethodType))': // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(BoundMethodType))} @@ -496,301 +523,321 @@ fn Foo[T:! type](p: T*) -> (T*, ()) { // CHECK:STDOUT: inst6000004C: {kind: ImportRefLoaded, arg0: import_ir_inst0, arg1: entity_name60000003, type: type(TypeType)} // CHECK:STDOUT: inst6000004D: {kind: InterfaceDecl, arg0: interface60000000, arg1: inst_block_empty, type: type(TypeType)} // CHECK:STDOUT: inst6000004E: {kind: FacetType, arg0: facet_type60000001, type: type(TypeType)} -// CHECK:STDOUT: inst6000004F: {kind: SymbolicBinding, arg0: entity_name60000004, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000050: {kind: ImportRefUnloaded, arg0: import_ir_inst2, arg1: entity_name} -// CHECK:STDOUT: inst60000051: {kind: ImportRefLoaded, arg0: import_ir_inst3, arg1: entity_name, type: type(inst60000053)} +// CHECK:STDOUT: inst6000004F: {kind: InterfaceWithSelfDecl, arg0: interface60000000} +// CHECK:STDOUT: inst60000050: {kind: SymbolicBinding, arg0: entity_name60000004, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000051: {kind: ImportRefLoaded, arg0: import_ir_inst3, arg1: entity_name, type: type(inst60000069)} // CHECK:STDOUT: inst60000052: {kind: ImportRefUnloaded, arg0: import_ir_inst4, arg1: entity_name60000005} -// CHECK:STDOUT: inst60000053: {kind: AssociatedEntityType, arg0: interface60000000, arg1: specific, type: type(TypeType)} -// CHECK:STDOUT: inst60000054: {kind: ImportRefLoaded, arg0: import_ir_inst5, arg1: entity_name, type: type(inst60000057)} -// CHECK:STDOUT: inst60000055: {kind: AssociatedEntity, arg0: element0, arg1: inst60000054, type: type(inst60000053)} -// CHECK:STDOUT: inst60000056: {kind: FunctionDecl, arg0: function60000001, arg1: inst_block_empty, type: type(inst60000057)} -// CHECK:STDOUT: inst60000057: {kind: FunctionType, arg0: function60000001, arg1: specific, type: type(TypeType)} -// CHECK:STDOUT: inst60000058: {kind: StructValue, arg0: inst_block_empty, type: type(inst60000057)} -// CHECK:STDOUT: inst60000059: {kind: SymbolicBindingType, arg0: entity_name60000004, arg1: inst6000004F, type: type(TypeType)} -// CHECK:STDOUT: inst6000005A: {kind: PatternType, arg0: inst60000059, type: type(TypeType)} -// CHECK:STDOUT: inst6000005B: {kind: ReturnSlotPattern, arg0: inst, type: type(symbolic_constant60000017)} -// CHECK:STDOUT: inst6000005C: {kind: OutParamPattern, arg0: inst6000005B, arg1: call_param1, type: type(symbolic_constant60000017)} -// CHECK:STDOUT: inst6000005D: {kind: ValueBindingPattern, arg0: entity_name60000008, type: type(symbolic_constant60000017)} -// CHECK:STDOUT: inst6000005E: {kind: ValueParamPattern, arg0: inst6000005D, arg1: call_param0, type: type(symbolic_constant60000017)} -// CHECK:STDOUT: inst6000005F: {kind: InitForm, arg0: inst60000059, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst60000060: {kind: ImportRefLoaded, arg0: import_ir_instB, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst60000061: {kind: ImportRefLoaded, arg0: import_ir_instC, arg1: entity_name, type: type(inst(FormType))} -// CHECK:STDOUT: inst60000062: {kind: ImportRefLoaded, arg0: import_ir_instD, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000063: {kind: SymbolicBinding, arg0: entity_name60000004, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000064: {kind: SymbolicBindingType, arg0: entity_name60000004, arg1: inst60000063, type: type(TypeType)} -// CHECK:STDOUT: inst60000065: {kind: PatternType, arg0: inst60000064, type: type(TypeType)} -// CHECK:STDOUT: inst60000066: {kind: InitForm, arg0: inst60000064, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst60000067: {kind: LookupImplWitness, arg0: inst6000001C, arg1: specific_interface60000000, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000068: {kind: ImportRefUnloaded, arg0: import_ir_inst12, arg1: entity_name} -// CHECK:STDOUT: inst60000069: {kind: ImplDecl, arg0: impl60000000, arg1: inst_block_empty} -// CHECK:STDOUT: inst6000006A: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst6000006B: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst6000006A, type: type(TypeType)} -// CHECK:STDOUT: inst6000006C: {kind: ConstType, arg0: inst6000006B, type: type(TypeType)} -// CHECK:STDOUT: inst6000006D: {kind: ImportRefUnloaded, arg0: import_ir_inst14, arg1: entity_name} -// CHECK:STDOUT: inst6000006E: {kind: ImplWitnessTable, arg0: inst_block60000022, arg1: impl60000000} -// CHECK:STDOUT: inst6000006F: {kind: ImplWitness, arg0: inst6000006E, arg1: specific60000002, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000070: {kind: FunctionDecl, arg0: function60000002, arg1: inst_block_empty, type: type(symbolic_constant60000028)} -// CHECK:STDOUT: inst60000071: {kind: FunctionType, arg0: function60000002, arg1: specific60000002, type: type(TypeType)} -// CHECK:STDOUT: inst60000072: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000028)} -// CHECK:STDOUT: inst60000073: {kind: PatternType, arg0: inst6000006C, type: type(TypeType)} -// CHECK:STDOUT: inst60000074: {kind: ReturnSlotPattern, arg0: inst, type: type(symbolic_constant6000002D)} -// CHECK:STDOUT: inst60000075: {kind: OutParamPattern, arg0: inst60000074, arg1: call_param1, type: type(symbolic_constant6000002D)} -// CHECK:STDOUT: inst60000076: {kind: ValueBindingPattern, arg0: entity_name6000000E, type: type(symbolic_constant6000002D)} -// CHECK:STDOUT: inst60000077: {kind: ValueParamPattern, arg0: inst60000076, arg1: call_param0, type: type(symbolic_constant6000002D)} -// CHECK:STDOUT: inst60000078: {kind: InitForm, arg0: inst6000006C, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst60000079: {kind: ImportRefLoaded, arg0: import_ir_inst1B, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst6000007A: {kind: ImportRefLoaded, arg0: import_ir_inst1C, arg1: entity_name, type: type(inst(FormType))} -// CHECK:STDOUT: inst6000007B: {kind: ImportRefLoaded, arg0: import_ir_inst1D, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst6000007C: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst6000007D: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst6000007C, type: type(TypeType)} -// CHECK:STDOUT: inst6000007E: {kind: ConstType, arg0: inst6000007D, type: type(TypeType)} -// CHECK:STDOUT: inst6000007F: {kind: PatternType, arg0: inst6000007E, type: type(TypeType)} -// CHECK:STDOUT: inst60000080: {kind: InitForm, arg0: inst6000007E, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst60000081: {kind: LookupImplWitness, arg0: inst6000006A, arg1: specific_interface60000000, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000082: {kind: FunctionTypeWithSelfType, arg0: inst60000057, arg1: inst6000006A, type: type(TypeType)} -// CHECK:STDOUT: inst60000083: {kind: ImplWitnessAccess, arg0: inst60000081, arg1: element0, type: type(symbolic_constant6000003C)} -// CHECK:STDOUT: inst60000084: {kind: SpecificImplFunction, arg0: inst60000083, arg1: specific60000003, type: type(inst(SpecificFunctionType))} -// CHECK:STDOUT: inst60000085: {kind: InitForm, arg0: inst6000006B, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst60000086: {kind: PatternType, arg0: inst6000006B, type: type(TypeType)} -// CHECK:STDOUT: inst60000087: {kind: RequireCompleteType, arg0: inst6000006B, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000088: {kind: RequireCompleteType, arg0: inst6000006C, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000089: {kind: RequireCompleteType, arg0: inst6000007E, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst6000008A: {kind: RequireCompleteType, arg0: inst6000007D, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst6000008B: {kind: LookupImplWitness, arg0: inst6000007C, arg1: specific_interface60000000, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst6000008C: {kind: FunctionTypeWithSelfType, arg0: inst60000057, arg1: inst6000007C, type: type(TypeType)} -// CHECK:STDOUT: inst6000008D: {kind: ImplWitnessAccess, arg0: inst6000008B, arg1: element0, type: type(symbolic_constant6000004C)} -// CHECK:STDOUT: inst6000008E: {kind: SpecificImplFunction, arg0: inst6000008D, arg1: specific60000005, type: type(inst(SpecificFunctionType))} -// CHECK:STDOUT: inst6000008F: {kind: PatternType, arg0: inst6000004E, type: type(TypeType)} -// CHECK:STDOUT: inst60000090: {kind: SymbolicBindingPattern, arg0: entity_name60000014, type: type(inst6000008F)} -// CHECK:STDOUT: inst60000091: {kind: ImportRefLoaded, arg0: import_ir_inst2A, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst60000092: {kind: ImportRefLoaded, arg0: import_ir_inst2B, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst60000093: {kind: ImportRefLoaded, arg0: import_ir_inst2C, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000094: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000095: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst60000094, type: type(TypeType)} -// CHECK:STDOUT: inst60000096: {kind: ConstType, arg0: inst60000095, type: type(TypeType)} -// CHECK:STDOUT: inst60000097: {kind: ImplWitness, arg0: inst6000006E, arg1: specific60000006, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000098: {kind: FunctionType, arg0: function60000002, arg1: specific60000006, type: type(TypeType)} -// CHECK:STDOUT: inst60000099: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000057)} -// CHECK:STDOUT: inst6000009A: {kind: ImportRefUnloaded, arg0: import_ir_inst33, arg1: entity_name} -// CHECK:STDOUT: inst6000009B: {kind: ImplDecl, arg0: impl60000001, arg1: inst_block_empty} -// CHECK:STDOUT: inst6000009C: {kind: ImportRefLoaded, arg0: import_ir_inst35, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst6000009D: {kind: ImportRefLoaded, arg0: import_ir_inst36, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst6000009E: {kind: ImportRefUnloaded, arg0: import_ir_inst37, arg1: entity_name} -// CHECK:STDOUT: inst6000009F: {kind: ImplDecl, arg0: impl60000002, arg1: inst_block_empty} -// CHECK:STDOUT: inst600000A0: {kind: ImportRefLoaded, arg0: import_ir_inst39, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000A1: {kind: ImportRefLoaded, arg0: import_ir_inst3A, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000A2: {kind: ImportRefUnloaded, arg0: import_ir_inst3B, arg1: entity_name} -// CHECK:STDOUT: inst600000A3: {kind: ImplDecl, arg0: impl60000003, arg1: inst_block_empty} -// CHECK:STDOUT: inst600000A4: {kind: ImportRefLoaded, arg0: import_ir_inst3D, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000A5: {kind: ImportRefLoaded, arg0: import_ir_inst3E, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000A6: {kind: ImportRefUnloaded, arg0: import_ir_inst3F, arg1: entity_name} -// CHECK:STDOUT: inst600000A7: {kind: ImplDecl, arg0: impl60000004, arg1: inst_block_empty} -// CHECK:STDOUT: inst600000A8: {kind: ImportRefLoaded, arg0: import_ir_inst41, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000A9: {kind: ImportRefLoaded, arg0: import_ir_inst42, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000AA: {kind: ImportRefLoaded, arg0: import_ir_inst43, arg1: entity_name, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000AB: {kind: ImplDecl, arg0: impl60000005, arg1: inst_block_empty} -// CHECK:STDOUT: inst600000AC: {kind: ImportRefUnloaded, arg0: import_ir_inst45, arg1: entity_name} -// CHECK:STDOUT: inst600000AD: {kind: ImplWitnessTable, arg0: inst_block60000035, arg1: impl60000005} -// CHECK:STDOUT: inst600000AE: {kind: ImplWitness, arg0: inst600000AD, arg1: specific60000007, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000AF: {kind: SymbolicBindingPattern, arg0: entity_name60000018, type: type(inst60000018)} -// CHECK:STDOUT: inst600000B0: {kind: ImportRefLoaded, arg0: import_ir_inst48, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000B1: {kind: ImportRefLoaded, arg0: import_ir_inst49, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000B2: {kind: ImportRefLoaded, arg0: import_ir_inst4A, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000B3: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(TypeType)} -// CHECK:STDOUT: inst600000B4: {kind: PointerType, arg0: inst600000B3, type: type(TypeType)} -// CHECK:STDOUT: inst600000B5: {kind: ImplWitness, arg0: inst600000AD, arg1: specific60000008, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000B6: {kind: FunctionDecl, arg0: function60000003, arg1: inst_block_empty, type: type(symbolic_constant60000063)} -// CHECK:STDOUT: inst600000B7: {kind: FunctionType, arg0: function60000003, arg1: specific60000007, type: type(TypeType)} -// CHECK:STDOUT: inst600000B8: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000063)} -// CHECK:STDOUT: inst600000B9: {kind: ReturnSlotPattern, arg0: inst, type: type(symbolic_constant60000067)} -// CHECK:STDOUT: inst600000BA: {kind: OutParamPattern, arg0: inst600000B9, arg1: call_param1, type: type(symbolic_constant60000067)} -// CHECK:STDOUT: inst600000BB: {kind: ValueBindingPattern, arg0: entity_name60000019, type: type(symbolic_constant60000067)} -// CHECK:STDOUT: inst600000BC: {kind: ValueParamPattern, arg0: inst600000BB, arg1: call_param0, type: type(symbolic_constant60000067)} -// CHECK:STDOUT: inst600000BD: {kind: InitForm, arg0: inst6000001C, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst600000BE: {kind: ImportRefLoaded, arg0: import_ir_inst53, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000BF: {kind: ImportRefLoaded, arg0: import_ir_inst54, arg1: entity_name, type: type(inst(FormType))} -// CHECK:STDOUT: inst600000C0: {kind: ImportRefLoaded, arg0: import_ir_inst55, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000C1: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(TypeType)} -// CHECK:STDOUT: inst600000C2: {kind: PointerType, arg0: inst600000C1, type: type(TypeType)} -// CHECK:STDOUT: inst600000C3: {kind: PatternType, arg0: inst600000C2, type: type(TypeType)} -// CHECK:STDOUT: inst600000C4: {kind: InitForm, arg0: inst600000C2, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst600000C5: {kind: FunctionType, arg0: function60000003, arg1: specific60000008, type: type(TypeType)} -// CHECK:STDOUT: inst600000C6: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000073)} -// CHECK:STDOUT: inst600000C7: {kind: RequireCompleteType, arg0: inst600000B4, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000C8: {kind: ImportRefUnloaded, arg0: import_ir_inst5D, arg1: entity_name} -// CHECK:STDOUT: inst600000C9: {kind: ImplDecl, arg0: impl60000006, arg1: inst_block_empty} -// CHECK:STDOUT: inst600000CA: {kind: ImportRefLoaded, arg0: import_ir_inst5F, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000CB: {kind: ImportRefLoaded, arg0: import_ir_inst60, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000CC: {kind: ImportRefUnloaded, arg0: import_ir_inst61, arg1: entity_name} -// CHECK:STDOUT: inst600000CD: {kind: ImplDecl, arg0: impl60000007, arg1: inst_block_empty} -// CHECK:STDOUT: inst600000CE: {kind: ImportRefLoaded, arg0: import_ir_inst63, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000CF: {kind: ImportRefLoaded, arg0: import_ir_inst64, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000D0: {kind: ImportRefUnloaded, arg0: import_ir_inst65, arg1: entity_name} -// CHECK:STDOUT: inst600000D1: {kind: ImplDecl, arg0: impl60000008, arg1: inst_block_empty} -// CHECK:STDOUT: inst600000D2: {kind: SymbolicBinding, arg0: entity_name6000001B, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst600000D3: {kind: SymbolicBindingType, arg0: entity_name6000001B, arg1: inst600000D2, type: type(TypeType)} -// CHECK:STDOUT: inst600000D4: {kind: TupleType, arg0: inst_block60000043, type: type(TypeType)} -// CHECK:STDOUT: inst600000D5: {kind: ImportRefUnloaded, arg0: import_ir_inst67, arg1: entity_name} -// CHECK:STDOUT: inst600000D6: {kind: ImplWitnessTable, arg0: inst_block60000044, arg1: impl60000008} -// CHECK:STDOUT: inst600000D7: {kind: ImplWitness, arg0: inst600000D6, arg1: specific6000000A, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000D8: {kind: FunctionDecl, arg0: function60000004, arg1: inst_block_empty, type: type(symbolic_constant6000007C)} -// CHECK:STDOUT: inst600000D9: {kind: FunctionType, arg0: function60000004, arg1: specific6000000A, type: type(TypeType)} -// CHECK:STDOUT: inst600000DA: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant6000007C)} -// CHECK:STDOUT: inst600000DB: {kind: TupleType, arg0: inst_block60000046, type: type(TypeType)} -// CHECK:STDOUT: inst600000DC: {kind: TupleValue, arg0: inst_block60000045, type: type(inst600000DB)} -// CHECK:STDOUT: inst600000DD: {kind: PatternType, arg0: inst600000D4, type: type(TypeType)} -// CHECK:STDOUT: inst600000DE: {kind: ReturnSlotPattern, arg0: inst, type: type(symbolic_constant60000082)} -// CHECK:STDOUT: inst600000DF: {kind: OutParamPattern, arg0: inst600000DE, arg1: call_param1, type: type(symbolic_constant60000082)} -// CHECK:STDOUT: inst600000E0: {kind: ValueBindingPattern, arg0: entity_name6000001D, type: type(symbolic_constant60000082)} -// CHECK:STDOUT: inst600000E1: {kind: ValueParamPattern, arg0: inst600000E0, arg1: call_param0, type: type(symbolic_constant60000082)} -// CHECK:STDOUT: inst600000E2: {kind: InitForm, arg0: inst600000D4, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst600000E3: {kind: ImportRefLoaded, arg0: import_ir_inst6E, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst600000E4: {kind: ImportRefLoaded, arg0: import_ir_inst6F, arg1: entity_name, type: type(inst(FormType))} -// CHECK:STDOUT: inst600000E5: {kind: ImportRefLoaded, arg0: import_ir_inst70, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst600000E6: {kind: ImportRefLoaded, arg0: import_ir_inst71, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst600000E7: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst600000E8: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst600000E7, type: type(TypeType)} -// CHECK:STDOUT: inst600000E9: {kind: SymbolicBinding, arg0: entity_name6000001B, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst600000EA: {kind: SymbolicBindingType, arg0: entity_name6000001B, arg1: inst600000E9, type: type(TypeType)} -// CHECK:STDOUT: inst600000EB: {kind: TupleType, arg0: inst_block6000004D, type: type(TypeType)} -// CHECK:STDOUT: inst600000EC: {kind: PatternType, arg0: inst600000EB, type: type(TypeType)} -// CHECK:STDOUT: inst600000ED: {kind: InitForm, arg0: inst600000EB, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst600000EE: {kind: LookupImplWitness, arg0: inst600000D2, arg1: specific_interface60000000, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000EF: {kind: FunctionTypeWithSelfType, arg0: inst60000057, arg1: inst600000D2, type: type(TypeType)} -// CHECK:STDOUT: inst600000F0: {kind: ImplWitnessAccess, arg0: inst600000EE, arg1: element0, type: type(symbolic_constant60000096)} -// CHECK:STDOUT: inst600000F1: {kind: SpecificImplFunction, arg0: inst600000F0, arg1: specific6000000B, type: type(inst(SpecificFunctionType))} -// CHECK:STDOUT: inst600000F2: {kind: InitForm, arg0: inst600000D3, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst600000F3: {kind: PatternType, arg0: inst600000D3, type: type(TypeType)} -// CHECK:STDOUT: inst600000F4: {kind: RequireCompleteType, arg0: inst600000D3, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000F5: {kind: RequireCompleteType, arg0: inst600000D4, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000F6: {kind: RequireCompleteType, arg0: inst600000EB, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000F7: {kind: RequireCompleteType, arg0: inst600000E8, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000F8: {kind: LookupImplWitness, arg0: inst600000E7, arg1: specific_interface60000000, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000F9: {kind: FunctionTypeWithSelfType, arg0: inst60000057, arg1: inst600000E7, type: type(TypeType)} -// CHECK:STDOUT: inst600000FA: {kind: ImplWitnessAccess, arg0: inst600000F8, arg1: element0, type: type(symbolic_constant600000AB)} -// CHECK:STDOUT: inst600000FB: {kind: SpecificImplFunction, arg0: inst600000FA, arg1: specific6000000D, type: type(inst(SpecificFunctionType))} -// CHECK:STDOUT: inst600000FC: {kind: RequireCompleteType, arg0: inst600000EA, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000FD: {kind: LookupImplWitness, arg0: inst600000E9, arg1: specific_interface60000000, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst600000FE: {kind: FunctionTypeWithSelfType, arg0: inst60000057, arg1: inst600000E9, type: type(TypeType)} -// CHECK:STDOUT: inst600000FF: {kind: ImplWitnessAccess, arg0: inst600000FD, arg1: element0, type: type(symbolic_constant600000B0)} -// CHECK:STDOUT: inst60000100: {kind: SpecificImplFunction, arg0: inst600000FF, arg1: specific6000000E, type: type(inst(SpecificFunctionType))} -// CHECK:STDOUT: inst60000101: {kind: SymbolicBindingPattern, arg0: entity_name60000028, type: type(inst6000008F)} -// CHECK:STDOUT: inst60000102: {kind: SymbolicBindingPattern, arg0: entity_name60000029, type: type(inst6000008F)} -// CHECK:STDOUT: inst60000103: {kind: ImportRefLoaded, arg0: import_ir_inst86, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst60000104: {kind: ImportRefLoaded, arg0: import_ir_inst87, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst60000105: {kind: ImportRefLoaded, arg0: import_ir_inst88, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000106: {kind: ImportRefLoaded, arg0: import_ir_inst89, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000107: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000108: {kind: SymbolicBinding, arg0: entity_name6000001B, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000109: {kind: TupleValue, arg0: inst_block60000057, type: type(inst600000DB)} -// CHECK:STDOUT: inst6000010A: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst60000107, type: type(TypeType)} -// CHECK:STDOUT: inst6000010B: {kind: SymbolicBindingType, arg0: entity_name6000001B, arg1: inst60000108, type: type(TypeType)} -// CHECK:STDOUT: inst6000010C: {kind: TupleType, arg0: inst_block60000058, type: type(TypeType)} -// CHECK:STDOUT: inst6000010D: {kind: ImplWitness, arg0: inst600000D6, arg1: specific6000000F, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst6000010E: {kind: FunctionType, arg0: function60000004, arg1: specific6000000F, type: type(TypeType)} -// CHECK:STDOUT: inst6000010F: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant600000C1)} -// CHECK:STDOUT: inst60000110: {kind: ImportRefUnloaded, arg0: import_ir_inst93, arg1: entity_name} -// CHECK:STDOUT: inst60000111: {kind: ImplDecl, arg0: impl60000009, arg1: inst_block_empty} -// CHECK:STDOUT: inst60000112: {kind: SymbolicBinding, arg0: entity_name6000002A, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000113: {kind: SymbolicBindingType, arg0: entity_name6000002A, arg1: inst60000112, type: type(TypeType)} -// CHECK:STDOUT: inst60000114: {kind: TupleType, arg0: inst_block6000005D, type: type(TypeType)} -// CHECK:STDOUT: inst60000115: {kind: ImportRefUnloaded, arg0: import_ir_inst95, arg1: entity_name} -// CHECK:STDOUT: inst60000116: {kind: ImplWitnessTable, arg0: inst_block6000005E, arg1: impl60000009} -// CHECK:STDOUT: inst60000117: {kind: ImplWitness, arg0: inst60000116, arg1: specific60000010, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000118: {kind: FunctionDecl, arg0: function60000005, arg1: inst_block_empty, type: type(symbolic_constant600000C9)} -// CHECK:STDOUT: inst60000119: {kind: FunctionType, arg0: function60000005, arg1: specific60000010, type: type(TypeType)} -// CHECK:STDOUT: inst6000011A: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant600000C9)} -// CHECK:STDOUT: inst6000011B: {kind: TupleType, arg0: inst_block60000060, type: type(TypeType)} -// CHECK:STDOUT: inst6000011C: {kind: TupleValue, arg0: inst_block6000005F, type: type(inst6000011B)} -// CHECK:STDOUT: inst6000011D: {kind: PatternType, arg0: inst60000114, type: type(TypeType)} -// CHECK:STDOUT: inst6000011E: {kind: ReturnSlotPattern, arg0: inst, type: type(symbolic_constant600000CF)} -// CHECK:STDOUT: inst6000011F: {kind: OutParamPattern, arg0: inst6000011E, arg1: call_param1, type: type(symbolic_constant600000CF)} -// CHECK:STDOUT: inst60000120: {kind: ValueBindingPattern, arg0: entity_name6000002C, type: type(symbolic_constant600000CF)} -// CHECK:STDOUT: inst60000121: {kind: ValueParamPattern, arg0: inst60000120, arg1: call_param0, type: type(symbolic_constant600000CF)} -// CHECK:STDOUT: inst60000122: {kind: InitForm, arg0: inst60000114, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst60000123: {kind: ImportRefLoaded, arg0: import_ir_inst9C, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst60000124: {kind: ImportRefLoaded, arg0: import_ir_inst9D, arg1: entity_name, type: type(inst(FormType))} -// CHECK:STDOUT: inst60000125: {kind: ImportRefLoaded, arg0: import_ir_inst9E, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000126: {kind: ImportRefLoaded, arg0: import_ir_inst9F, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000127: {kind: ImportRefLoaded, arg0: import_ir_instA0, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000128: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000129: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst60000128, type: type(TypeType)} -// CHECK:STDOUT: inst6000012A: {kind: SymbolicBinding, arg0: entity_name6000001B, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst6000012B: {kind: SymbolicBindingType, arg0: entity_name6000001B, arg1: inst6000012A, type: type(TypeType)} -// CHECK:STDOUT: inst6000012C: {kind: SymbolicBinding, arg0: entity_name6000002A, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst6000012D: {kind: SymbolicBindingType, arg0: entity_name6000002A, arg1: inst6000012C, type: type(TypeType)} -// CHECK:STDOUT: inst6000012E: {kind: TupleType, arg0: inst_block60000067, type: type(TypeType)} -// CHECK:STDOUT: inst6000012F: {kind: PatternType, arg0: inst6000012E, type: type(TypeType)} -// CHECK:STDOUT: inst60000130: {kind: InitForm, arg0: inst6000012E, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst60000131: {kind: LookupImplWitness, arg0: inst60000112, arg1: specific_interface60000000, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000132: {kind: FunctionTypeWithSelfType, arg0: inst60000057, arg1: inst60000112, type: type(TypeType)} -// CHECK:STDOUT: inst60000133: {kind: ImplWitnessAccess, arg0: inst60000131, arg1: element0, type: type(symbolic_constant600000E8)} -// CHECK:STDOUT: inst60000134: {kind: SpecificImplFunction, arg0: inst60000133, arg1: specific60000011, type: type(inst(SpecificFunctionType))} -// CHECK:STDOUT: inst60000135: {kind: InitForm, arg0: inst60000113, arg1: call_param1, type: type(inst(FormType))} -// CHECK:STDOUT: inst60000136: {kind: PatternType, arg0: inst60000113, type: type(TypeType)} -// CHECK:STDOUT: inst60000137: {kind: RequireCompleteType, arg0: inst60000113, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000138: {kind: RequireCompleteType, arg0: inst60000114, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000139: {kind: RequireCompleteType, arg0: inst6000012E, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst6000013A: {kind: RequireCompleteType, arg0: inst60000129, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst6000013B: {kind: LookupImplWitness, arg0: inst60000128, arg1: specific_interface60000000, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst6000013C: {kind: FunctionTypeWithSelfType, arg0: inst60000057, arg1: inst60000128, type: type(TypeType)} -// CHECK:STDOUT: inst6000013D: {kind: ImplWitnessAccess, arg0: inst6000013B, arg1: element0, type: type(symbolic_constant60000102)} -// CHECK:STDOUT: inst6000013E: {kind: SpecificImplFunction, arg0: inst6000013D, arg1: specific60000013, type: type(inst(SpecificFunctionType))} -// CHECK:STDOUT: inst6000013F: {kind: RequireCompleteType, arg0: inst6000012B, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000140: {kind: LookupImplWitness, arg0: inst6000012A, arg1: specific_interface60000000, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000141: {kind: FunctionTypeWithSelfType, arg0: inst60000057, arg1: inst6000012A, type: type(TypeType)} -// CHECK:STDOUT: inst60000142: {kind: ImplWitnessAccess, arg0: inst60000140, arg1: element0, type: type(symbolic_constant60000107)} -// CHECK:STDOUT: inst60000143: {kind: SpecificImplFunction, arg0: inst60000142, arg1: specific60000014, type: type(inst(SpecificFunctionType))} -// CHECK:STDOUT: inst60000144: {kind: RequireCompleteType, arg0: inst6000012D, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000145: {kind: LookupImplWitness, arg0: inst6000012C, arg1: specific_interface60000000, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000146: {kind: FunctionTypeWithSelfType, arg0: inst60000057, arg1: inst6000012C, type: type(TypeType)} -// CHECK:STDOUT: inst60000147: {kind: ImplWitnessAccess, arg0: inst60000145, arg1: element0, type: type(symbolic_constant6000010C)} -// CHECK:STDOUT: inst60000148: {kind: SpecificImplFunction, arg0: inst60000147, arg1: specific60000015, type: type(inst(SpecificFunctionType))} -// CHECK:STDOUT: inst60000149: {kind: SymbolicBindingPattern, arg0: entity_name6000003C, type: type(inst6000008F)} -// CHECK:STDOUT: inst6000014A: {kind: SymbolicBindingPattern, arg0: entity_name6000003D, type: type(inst6000008F)} -// CHECK:STDOUT: inst6000014B: {kind: SymbolicBindingPattern, arg0: entity_name6000003E, type: type(inst6000008F)} -// CHECK:STDOUT: inst6000014C: {kind: ImportRefLoaded, arg0: import_ir_instBD, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst6000014D: {kind: ImportRefLoaded, arg0: import_ir_instBE, arg1: entity_name, type: type(TypeType)} -// CHECK:STDOUT: inst6000014E: {kind: ImportRefLoaded, arg0: import_ir_instBF, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst6000014F: {kind: ImportRefLoaded, arg0: import_ir_instC0, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000150: {kind: ImportRefLoaded, arg0: import_ir_instC1, arg1: entity_name, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000151: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000152: {kind: SymbolicBinding, arg0: entity_name6000001B, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000153: {kind: SymbolicBinding, arg0: entity_name6000002A, arg1: inst, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000154: {kind: TupleValue, arg0: inst_block60000072, type: type(inst6000011B)} -// CHECK:STDOUT: inst60000155: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst60000151, type: type(TypeType)} -// CHECK:STDOUT: inst60000156: {kind: SymbolicBindingType, arg0: entity_name6000001B, arg1: inst60000152, type: type(TypeType)} -// CHECK:STDOUT: inst60000157: {kind: SymbolicBindingType, arg0: entity_name6000002A, arg1: inst60000153, type: type(TypeType)} -// CHECK:STDOUT: inst60000158: {kind: TupleType, arg0: inst_block60000073, type: type(TypeType)} -// CHECK:STDOUT: inst60000159: {kind: ImplWitness, arg0: inst60000116, arg1: specific60000016, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst6000015A: {kind: FunctionType, arg0: function60000005, arg1: specific60000016, type: type(TypeType)} -// CHECK:STDOUT: inst6000015B: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000121)} -// CHECK:STDOUT: inst6000015C: {kind: RequireSpecificDefinition, arg0: specific60000007, type: type(inst(RequireSpecificDefinitionType))} -// CHECK:STDOUT: inst6000015D: {kind: RequireSpecificDefinition, arg0: specific60000007, type: type(inst(RequireSpecificDefinitionType))} -// CHECK:STDOUT: inst6000015E: {kind: RequireSpecificDefinition, arg0: specific60000017, type: type(inst(RequireSpecificDefinitionType))} -// CHECK:STDOUT: inst6000015F: {kind: LookupImplWitness, arg0: inst6000001C, arg1: specific_interface60000000, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000160: {kind: LookupImplWitness, arg0: inst6000001D, arg1: specific_interface60000000, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst60000161: {kind: FacetValue, arg0: inst6000001C, arg1: inst_block6000007A, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000162: {kind: FunctionTypeWithSelfType, arg0: inst60000057, arg1: inst60000161, type: type(TypeType)} -// CHECK:STDOUT: inst60000163: {kind: ImplWitnessAccess, arg0: inst6000015F, arg1: element0, type: type(symbolic_constant6000012C)} -// CHECK:STDOUT: inst60000164: {kind: ImplWitnessAccess, arg0: inst6000015F, arg1: element0, type: type(symbolic_constant60000129)} -// CHECK:STDOUT: inst60000165: {kind: FacetValue, arg0: inst6000001D, arg1: inst_block6000007B, type: type(inst6000004E)} -// CHECK:STDOUT: inst60000166: {kind: FunctionTypeWithSelfType, arg0: inst60000057, arg1: inst60000165, type: type(TypeType)} -// CHECK:STDOUT: inst60000167: {kind: ImplWitnessAccess, arg0: inst60000160, arg1: element0, type: type(symbolic_constant6000012C)} -// CHECK:STDOUT: inst60000168: {kind: BoundMethod, arg0: inst60000046, arg1: inst60000163, type: type(inst(BoundMethodType))} -// CHECK:STDOUT: inst60000169: {kind: SpecificImplFunction, arg0: inst60000163, arg1: specific60000018, type: type(inst(SpecificFunctionType))} -// CHECK:STDOUT: inst6000016A: {kind: SpecificImplFunction, arg0: inst60000164, arg1: specific60000018, type: type(inst(SpecificFunctionType))} -// CHECK:STDOUT: inst6000016B: {kind: SpecificImplFunction, arg0: inst60000167, arg1: specific60000019, type: type(inst(SpecificFunctionType))} -// CHECK:STDOUT: inst6000016C: {kind: BoundMethod, arg0: inst60000046, arg1: inst60000169, type: type(inst(BoundMethodType))} -// CHECK:STDOUT: inst6000016D: {kind: RequireCompleteType, arg0: inst6000001C, type: type(inst(WitnessType))} -// CHECK:STDOUT: inst6000016E: {kind: Call, arg0: inst6000016C, arg1: inst_block6000007F, type: type(symbolic_constant60000004)} -// CHECK:STDOUT: inst6000016F: {kind: InPlaceInit, arg0: inst6000016E, arg1: inst6000004A, type: type(symbolic_constant60000004)} -// CHECK:STDOUT: inst60000170: {kind: TupleAccess, arg0: inst6000003A, arg1: element1, type: type(inst60000025)} -// CHECK:STDOUT: inst60000171: {kind: TupleInit, arg0: inst_block_empty, arg1: inst, type: type(inst60000025)} -// CHECK:STDOUT: inst60000172: {kind: Converted, arg0: inst60000047, arg1: inst60000171, type: type(inst60000025)} -// CHECK:STDOUT: inst60000173: {kind: TupleInit, arg0: inst_block60000080, arg1: inst6000003A, type: type(symbolic_constant6000000A)} -// CHECK:STDOUT: inst60000174: {kind: Converted, arg0: inst60000048, arg1: inst60000173, type: type(symbolic_constant6000000A)} -// CHECK:STDOUT: inst60000175: {kind: ReturnExpr, arg0: inst60000174, arg1: inst6000003A} +// CHECK:STDOUT: inst60000053: {kind: ImportRefLoaded, arg0: import_ir_inst5, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000054: {kind: FunctionDecl, arg0: function60000001, arg1: inst_block_empty, type: type(symbolic_constant60000015)} +// CHECK:STDOUT: inst60000055: {kind: FunctionType, arg0: function60000001, arg1: specific60000001, type: type(TypeType)} +// CHECK:STDOUT: inst60000056: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000015)} +// CHECK:STDOUT: inst60000057: {kind: SymbolicBindingType, arg0: entity_name60000004, arg1: inst60000050, type: type(TypeType)} +// CHECK:STDOUT: inst60000058: {kind: PatternType, arg0: inst60000057, type: type(TypeType)} +// CHECK:STDOUT: inst60000059: {kind: ReturnSlotPattern, arg0: inst, type: type(symbolic_constant6000001B)} +// CHECK:STDOUT: inst6000005A: {kind: OutParamPattern, arg0: inst60000059, arg1: call_param1, type: type(symbolic_constant6000001B)} +// CHECK:STDOUT: inst6000005B: {kind: ValueBindingPattern, arg0: entity_name60000008, type: type(symbolic_constant6000001B)} +// CHECK:STDOUT: inst6000005C: {kind: ValueParamPattern, arg0: inst6000005B, arg1: call_param0, type: type(symbolic_constant6000001B)} +// CHECK:STDOUT: inst6000005D: {kind: InitForm, arg0: inst60000057, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst6000005E: {kind: ImportRefLoaded, arg0: import_ir_instB, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst6000005F: {kind: ImportRefLoaded, arg0: import_ir_instC, arg1: entity_name, type: type(inst(FormType))} +// CHECK:STDOUT: inst60000060: {kind: ImportRefLoaded, arg0: import_ir_instD, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000061: {kind: SymbolicBinding, arg0: entity_name60000004, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000062: {kind: SymbolicBindingType, arg0: entity_name60000004, arg1: inst60000061, type: type(TypeType)} +// CHECK:STDOUT: inst60000063: {kind: PatternType, arg0: inst60000062, type: type(TypeType)} +// CHECK:STDOUT: inst60000064: {kind: InitForm, arg0: inst60000062, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst60000065: {kind: SymbolicBinding, arg0: entity_name60000004, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000066: {kind: FunctionType, arg0: function60000001, arg1: specific60000003, type: type(TypeType)} +// CHECK:STDOUT: inst60000067: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000029)} +// CHECK:STDOUT: inst60000068: {kind: ImportRefUnloaded, arg0: import_ir_inst15, arg1: entity_name} +// CHECK:STDOUT: inst60000069: {kind: AssociatedEntityType, arg0: interface60000000, arg1: specific, type: type(TypeType)} +// CHECK:STDOUT: inst6000006A: {kind: ImportRefLoaded, arg0: import_ir_inst16, arg1: entity_name, type: type(symbolic_constant60000019)} +// CHECK:STDOUT: inst6000006B: {kind: AssociatedEntity, arg0: element0, arg1: inst6000006A, type: type(inst60000069)} +// CHECK:STDOUT: inst6000006C: {kind: LookupImplWitness, arg0: inst6000001C, arg1: specific_interface60000000, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst6000006D: {kind: ImportRefUnloaded, arg0: import_ir_inst17, arg1: entity_name} +// CHECK:STDOUT: inst6000006E: {kind: ImplDecl, arg0: impl60000000, arg1: inst_block_empty} +// CHECK:STDOUT: inst6000006F: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000070: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst6000006F, type: type(TypeType)} +// CHECK:STDOUT: inst60000071: {kind: ConstType, arg0: inst60000070, type: type(TypeType)} +// CHECK:STDOUT: inst60000072: {kind: ImportRefUnloaded, arg0: import_ir_inst19, arg1: entity_name} +// CHECK:STDOUT: inst60000073: {kind: ImplWitnessTable, arg0: inst_block60000026, arg1: impl60000000} +// CHECK:STDOUT: inst60000074: {kind: ImplWitness, arg0: inst60000073, arg1: specific60000004, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000075: {kind: FunctionDecl, arg0: function60000002, arg1: inst_block_empty, type: type(symbolic_constant60000031)} +// CHECK:STDOUT: inst60000076: {kind: FunctionType, arg0: function60000002, arg1: specific60000004, type: type(TypeType)} +// CHECK:STDOUT: inst60000077: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000031)} +// CHECK:STDOUT: inst60000078: {kind: PatternType, arg0: inst60000071, type: type(TypeType)} +// CHECK:STDOUT: inst60000079: {kind: ReturnSlotPattern, arg0: inst, type: type(symbolic_constant60000036)} +// CHECK:STDOUT: inst6000007A: {kind: OutParamPattern, arg0: inst60000079, arg1: call_param1, type: type(symbolic_constant60000036)} +// CHECK:STDOUT: inst6000007B: {kind: ValueBindingPattern, arg0: entity_name6000000F, type: type(symbolic_constant60000036)} +// CHECK:STDOUT: inst6000007C: {kind: ValueParamPattern, arg0: inst6000007B, arg1: call_param0, type: type(symbolic_constant60000036)} +// CHECK:STDOUT: inst6000007D: {kind: InitForm, arg0: inst60000071, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst6000007E: {kind: ImportRefLoaded, arg0: import_ir_inst20, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst6000007F: {kind: ImportRefLoaded, arg0: import_ir_inst21, arg1: entity_name, type: type(inst(FormType))} +// CHECK:STDOUT: inst60000080: {kind: ImportRefLoaded, arg0: import_ir_inst22, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000081: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000082: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst60000081, type: type(TypeType)} +// CHECK:STDOUT: inst60000083: {kind: ConstType, arg0: inst60000082, type: type(TypeType)} +// CHECK:STDOUT: inst60000084: {kind: PatternType, arg0: inst60000083, type: type(TypeType)} +// CHECK:STDOUT: inst60000085: {kind: InitForm, arg0: inst60000083, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst60000086: {kind: LookupImplWitness, arg0: inst6000006F, arg1: specific_interface60000000, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000087: {kind: FunctionType, arg0: function60000001, arg1: specific60000005, type: type(TypeType)} +// CHECK:STDOUT: inst60000088: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000045)} +// CHECK:STDOUT: inst60000089: {kind: FunctionTypeWithSelfType, arg0: inst60000087, arg1: inst6000006F, type: type(TypeType)} +// CHECK:STDOUT: inst6000008A: {kind: ImplWitnessAccess, arg0: inst60000086, arg1: element0, type: type(symbolic_constant60000047)} +// CHECK:STDOUT: inst6000008B: {kind: SpecificImplFunction, arg0: inst6000008A, arg1: specific60000006, type: type(inst(SpecificFunctionType))} +// CHECK:STDOUT: inst6000008C: {kind: InitForm, arg0: inst60000070, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst6000008D: {kind: PatternType, arg0: inst60000070, type: type(TypeType)} +// CHECK:STDOUT: inst6000008E: {kind: RequireCompleteType, arg0: inst60000070, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst6000008F: {kind: RequireCompleteType, arg0: inst60000071, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000090: {kind: RequireCompleteType, arg0: inst60000083, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000091: {kind: RequireCompleteType, arg0: inst60000082, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000092: {kind: LookupImplWitness, arg0: inst60000081, arg1: specific_interface60000000, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000093: {kind: FunctionType, arg0: function60000001, arg1: specific60000008, type: type(TypeType)} +// CHECK:STDOUT: inst60000094: {kind: FunctionTypeWithSelfType, arg0: inst60000093, arg1: inst60000081, type: type(TypeType)} +// CHECK:STDOUT: inst60000095: {kind: ImplWitnessAccess, arg0: inst60000092, arg1: element0, type: type(symbolic_constant60000059)} +// CHECK:STDOUT: inst60000096: {kind: SpecificImplFunction, arg0: inst60000095, arg1: specific60000009, type: type(inst(SpecificFunctionType))} +// CHECK:STDOUT: inst60000097: {kind: PatternType, arg0: inst6000004E, type: type(TypeType)} +// CHECK:STDOUT: inst60000098: {kind: SymbolicBindingPattern, arg0: entity_name60000015, type: type(inst60000097)} +// CHECK:STDOUT: inst60000099: {kind: ImportRefLoaded, arg0: import_ir_inst30, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst6000009A: {kind: ImportRefLoaded, arg0: import_ir_inst31, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst6000009B: {kind: ImportRefLoaded, arg0: import_ir_inst32, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst6000009C: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst6000009D: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst6000009C, type: type(TypeType)} +// CHECK:STDOUT: inst6000009E: {kind: ConstType, arg0: inst6000009D, type: type(TypeType)} +// CHECK:STDOUT: inst6000009F: {kind: ImplWitness, arg0: inst60000073, arg1: specific6000000A, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst600000A0: {kind: FunctionType, arg0: function60000002, arg1: specific6000000A, type: type(TypeType)} +// CHECK:STDOUT: inst600000A1: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000064)} +// CHECK:STDOUT: inst600000A2: {kind: ImportRefUnloaded, arg0: import_ir_inst39, arg1: entity_name} +// CHECK:STDOUT: inst600000A3: {kind: ImplDecl, arg0: impl60000001, arg1: inst_block_empty} +// CHECK:STDOUT: inst600000A4: {kind: ImportRefLoaded, arg0: import_ir_inst3B, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000A5: {kind: ImportRefLoaded, arg0: import_ir_inst3C, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000A6: {kind: ImportRefUnloaded, arg0: import_ir_inst3D, arg1: entity_name} +// CHECK:STDOUT: inst600000A7: {kind: ImplDecl, arg0: impl60000002, arg1: inst_block_empty} +// CHECK:STDOUT: inst600000A8: {kind: ImportRefLoaded, arg0: import_ir_inst3F, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000A9: {kind: ImportRefLoaded, arg0: import_ir_inst40, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000AA: {kind: ImportRefUnloaded, arg0: import_ir_inst41, arg1: entity_name} +// CHECK:STDOUT: inst600000AB: {kind: ImplDecl, arg0: impl60000003, arg1: inst_block_empty} +// CHECK:STDOUT: inst600000AC: {kind: ImportRefLoaded, arg0: import_ir_inst43, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000AD: {kind: ImportRefLoaded, arg0: import_ir_inst44, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000AE: {kind: ImportRefUnloaded, arg0: import_ir_inst45, arg1: entity_name} +// CHECK:STDOUT: inst600000AF: {kind: ImplDecl, arg0: impl60000004, arg1: inst_block_empty} +// CHECK:STDOUT: inst600000B0: {kind: ImportRefLoaded, arg0: import_ir_inst47, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000B1: {kind: ImportRefLoaded, arg0: import_ir_inst48, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000B2: {kind: ImportRefLoaded, arg0: import_ir_inst49, arg1: entity_name, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst600000B3: {kind: ImplDecl, arg0: impl60000005, arg1: inst_block_empty} +// CHECK:STDOUT: inst600000B4: {kind: ImportRefUnloaded, arg0: import_ir_inst4B, arg1: entity_name} +// CHECK:STDOUT: inst600000B5: {kind: ImplWitnessTable, arg0: inst_block6000003B, arg1: impl60000005} +// CHECK:STDOUT: inst600000B6: {kind: ImplWitness, arg0: inst600000B5, arg1: specific6000000B, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst600000B7: {kind: SymbolicBindingPattern, arg0: entity_name60000019, type: type(inst60000018)} +// CHECK:STDOUT: inst600000B8: {kind: ImportRefLoaded, arg0: import_ir_inst4E, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000B9: {kind: ImportRefLoaded, arg0: import_ir_inst4F, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000BA: {kind: ImportRefLoaded, arg0: import_ir_inst50, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000BB: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(TypeType)} +// CHECK:STDOUT: inst600000BC: {kind: PointerType, arg0: inst600000BB, type: type(TypeType)} +// CHECK:STDOUT: inst600000BD: {kind: ImplWitness, arg0: inst600000B5, arg1: specific6000000C, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst600000BE: {kind: FunctionDecl, arg0: function60000003, arg1: inst_block_empty, type: type(symbolic_constant60000070)} +// CHECK:STDOUT: inst600000BF: {kind: FunctionType, arg0: function60000003, arg1: specific6000000B, type: type(TypeType)} +// CHECK:STDOUT: inst600000C0: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000070)} +// CHECK:STDOUT: inst600000C1: {kind: ReturnSlotPattern, arg0: inst, type: type(symbolic_constant60000074)} +// CHECK:STDOUT: inst600000C2: {kind: OutParamPattern, arg0: inst600000C1, arg1: call_param1, type: type(symbolic_constant60000074)} +// CHECK:STDOUT: inst600000C3: {kind: ValueBindingPattern, arg0: entity_name6000001A, type: type(symbolic_constant60000074)} +// CHECK:STDOUT: inst600000C4: {kind: ValueParamPattern, arg0: inst600000C3, arg1: call_param0, type: type(symbolic_constant60000074)} +// CHECK:STDOUT: inst600000C5: {kind: InitForm, arg0: inst6000001C, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst600000C6: {kind: ImportRefLoaded, arg0: import_ir_inst59, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000C7: {kind: ImportRefLoaded, arg0: import_ir_inst5A, arg1: entity_name, type: type(inst(FormType))} +// CHECK:STDOUT: inst600000C8: {kind: ImportRefLoaded, arg0: import_ir_inst5B, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000C9: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(TypeType)} +// CHECK:STDOUT: inst600000CA: {kind: PointerType, arg0: inst600000C9, type: type(TypeType)} +// CHECK:STDOUT: inst600000CB: {kind: PatternType, arg0: inst600000CA, type: type(TypeType)} +// CHECK:STDOUT: inst600000CC: {kind: InitForm, arg0: inst600000CA, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst600000CD: {kind: FunctionType, arg0: function60000003, arg1: specific6000000C, type: type(TypeType)} +// CHECK:STDOUT: inst600000CE: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000080)} +// CHECK:STDOUT: inst600000CF: {kind: RequireCompleteType, arg0: inst600000BC, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst600000D0: {kind: ImportRefUnloaded, arg0: import_ir_inst63, arg1: entity_name} +// CHECK:STDOUT: inst600000D1: {kind: ImplDecl, arg0: impl60000006, arg1: inst_block_empty} +// CHECK:STDOUT: inst600000D2: {kind: ImportRefLoaded, arg0: import_ir_inst65, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000D3: {kind: ImportRefLoaded, arg0: import_ir_inst66, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000D4: {kind: ImportRefUnloaded, arg0: import_ir_inst67, arg1: entity_name} +// CHECK:STDOUT: inst600000D5: {kind: ImplDecl, arg0: impl60000007, arg1: inst_block_empty} +// CHECK:STDOUT: inst600000D6: {kind: ImportRefLoaded, arg0: import_ir_inst69, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000D7: {kind: ImportRefLoaded, arg0: import_ir_inst6A, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000D8: {kind: ImportRefUnloaded, arg0: import_ir_inst6B, arg1: entity_name} +// CHECK:STDOUT: inst600000D9: {kind: ImplDecl, arg0: impl60000008, arg1: inst_block_empty} +// CHECK:STDOUT: inst600000DA: {kind: SymbolicBinding, arg0: entity_name6000001C, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst600000DB: {kind: SymbolicBindingType, arg0: entity_name6000001C, arg1: inst600000DA, type: type(TypeType)} +// CHECK:STDOUT: inst600000DC: {kind: TupleType, arg0: inst_block60000049, type: type(TypeType)} +// CHECK:STDOUT: inst600000DD: {kind: ImportRefUnloaded, arg0: import_ir_inst6D, arg1: entity_name} +// CHECK:STDOUT: inst600000DE: {kind: ImplWitnessTable, arg0: inst_block6000004A, arg1: impl60000008} +// CHECK:STDOUT: inst600000DF: {kind: ImplWitness, arg0: inst600000DE, arg1: specific6000000E, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst600000E0: {kind: FunctionDecl, arg0: function60000004, arg1: inst_block_empty, type: type(symbolic_constant60000089)} +// CHECK:STDOUT: inst600000E1: {kind: FunctionType, arg0: function60000004, arg1: specific6000000E, type: type(TypeType)} +// CHECK:STDOUT: inst600000E2: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000089)} +// CHECK:STDOUT: inst600000E3: {kind: TupleType, arg0: inst_block6000004C, type: type(TypeType)} +// CHECK:STDOUT: inst600000E4: {kind: TupleValue, arg0: inst_block6000004B, type: type(inst600000E3)} +// CHECK:STDOUT: inst600000E5: {kind: PatternType, arg0: inst600000DC, type: type(TypeType)} +// CHECK:STDOUT: inst600000E6: {kind: ReturnSlotPattern, arg0: inst, type: type(symbolic_constant6000008F)} +// CHECK:STDOUT: inst600000E7: {kind: OutParamPattern, arg0: inst600000E6, arg1: call_param1, type: type(symbolic_constant6000008F)} +// CHECK:STDOUT: inst600000E8: {kind: ValueBindingPattern, arg0: entity_name6000001E, type: type(symbolic_constant6000008F)} +// CHECK:STDOUT: inst600000E9: {kind: ValueParamPattern, arg0: inst600000E8, arg1: call_param0, type: type(symbolic_constant6000008F)} +// CHECK:STDOUT: inst600000EA: {kind: InitForm, arg0: inst600000DC, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst600000EB: {kind: ImportRefLoaded, arg0: import_ir_inst74, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst600000EC: {kind: ImportRefLoaded, arg0: import_ir_inst75, arg1: entity_name, type: type(inst(FormType))} +// CHECK:STDOUT: inst600000ED: {kind: ImportRefLoaded, arg0: import_ir_inst76, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst600000EE: {kind: ImportRefLoaded, arg0: import_ir_inst77, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst600000EF: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst600000F0: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst600000EF, type: type(TypeType)} +// CHECK:STDOUT: inst600000F1: {kind: SymbolicBinding, arg0: entity_name6000001C, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst600000F2: {kind: SymbolicBindingType, arg0: entity_name6000001C, arg1: inst600000F1, type: type(TypeType)} +// CHECK:STDOUT: inst600000F3: {kind: TupleType, arg0: inst_block60000053, type: type(TypeType)} +// CHECK:STDOUT: inst600000F4: {kind: PatternType, arg0: inst600000F3, type: type(TypeType)} +// CHECK:STDOUT: inst600000F5: {kind: InitForm, arg0: inst600000F3, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst600000F6: {kind: LookupImplWitness, arg0: inst600000DA, arg1: specific_interface60000000, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst600000F7: {kind: FunctionType, arg0: function60000001, arg1: specific6000000F, type: type(TypeType)} +// CHECK:STDOUT: inst600000F8: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant600000A3)} +// CHECK:STDOUT: inst600000F9: {kind: FunctionTypeWithSelfType, arg0: inst600000F7, arg1: inst600000DA, type: type(TypeType)} +// CHECK:STDOUT: inst600000FA: {kind: ImplWitnessAccess, arg0: inst600000F6, arg1: element0, type: type(symbolic_constant600000A5)} +// CHECK:STDOUT: inst600000FB: {kind: SpecificImplFunction, arg0: inst600000FA, arg1: specific60000010, type: type(inst(SpecificFunctionType))} +// CHECK:STDOUT: inst600000FC: {kind: InitForm, arg0: inst600000DB, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst600000FD: {kind: PatternType, arg0: inst600000DB, type: type(TypeType)} +// CHECK:STDOUT: inst600000FE: {kind: RequireCompleteType, arg0: inst600000DB, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst600000FF: {kind: RequireCompleteType, arg0: inst600000DC, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000100: {kind: RequireCompleteType, arg0: inst600000F3, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000101: {kind: RequireCompleteType, arg0: inst600000F0, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000102: {kind: LookupImplWitness, arg0: inst600000EF, arg1: specific_interface60000000, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000103: {kind: FunctionType, arg0: function60000001, arg1: specific60000012, type: type(TypeType)} +// CHECK:STDOUT: inst60000104: {kind: FunctionTypeWithSelfType, arg0: inst60000103, arg1: inst600000EF, type: type(TypeType)} +// CHECK:STDOUT: inst60000105: {kind: ImplWitnessAccess, arg0: inst60000102, arg1: element0, type: type(symbolic_constant600000BD)} +// CHECK:STDOUT: inst60000106: {kind: SpecificImplFunction, arg0: inst60000105, arg1: specific60000013, type: type(inst(SpecificFunctionType))} +// CHECK:STDOUT: inst60000107: {kind: RequireCompleteType, arg0: inst600000F2, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000108: {kind: LookupImplWitness, arg0: inst600000F1, arg1: specific_interface60000000, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000109: {kind: FunctionType, arg0: function60000001, arg1: specific60000014, type: type(TypeType)} +// CHECK:STDOUT: inst6000010A: {kind: FunctionTypeWithSelfType, arg0: inst60000109, arg1: inst600000F1, type: type(TypeType)} +// CHECK:STDOUT: inst6000010B: {kind: ImplWitnessAccess, arg0: inst60000108, arg1: element0, type: type(symbolic_constant600000C3)} +// CHECK:STDOUT: inst6000010C: {kind: SpecificImplFunction, arg0: inst6000010B, arg1: specific60000015, type: type(inst(SpecificFunctionType))} +// CHECK:STDOUT: inst6000010D: {kind: SymbolicBindingPattern, arg0: entity_name60000029, type: type(inst60000097)} +// CHECK:STDOUT: inst6000010E: {kind: SymbolicBindingPattern, arg0: entity_name6000002A, type: type(inst60000097)} +// CHECK:STDOUT: inst6000010F: {kind: ImportRefLoaded, arg0: import_ir_inst8E, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst60000110: {kind: ImportRefLoaded, arg0: import_ir_inst8F, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst60000111: {kind: ImportRefLoaded, arg0: import_ir_inst90, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000112: {kind: ImportRefLoaded, arg0: import_ir_inst91, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000113: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000114: {kind: SymbolicBinding, arg0: entity_name6000001C, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000115: {kind: TupleValue, arg0: inst_block60000060, type: type(inst600000E3)} +// CHECK:STDOUT: inst60000116: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst60000113, type: type(TypeType)} +// CHECK:STDOUT: inst60000117: {kind: SymbolicBindingType, arg0: entity_name6000001C, arg1: inst60000114, type: type(TypeType)} +// CHECK:STDOUT: inst60000118: {kind: TupleType, arg0: inst_block60000061, type: type(TypeType)} +// CHECK:STDOUT: inst60000119: {kind: ImplWitness, arg0: inst600000DE, arg1: specific60000016, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst6000011A: {kind: FunctionType, arg0: function60000004, arg1: specific60000016, type: type(TypeType)} +// CHECK:STDOUT: inst6000011B: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant600000D4)} +// CHECK:STDOUT: inst6000011C: {kind: ImportRefUnloaded, arg0: import_ir_inst9B, arg1: entity_name} +// CHECK:STDOUT: inst6000011D: {kind: ImplDecl, arg0: impl60000009, arg1: inst_block_empty} +// CHECK:STDOUT: inst6000011E: {kind: SymbolicBinding, arg0: entity_name6000002B, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst6000011F: {kind: SymbolicBindingType, arg0: entity_name6000002B, arg1: inst6000011E, type: type(TypeType)} +// CHECK:STDOUT: inst60000120: {kind: TupleType, arg0: inst_block60000066, type: type(TypeType)} +// CHECK:STDOUT: inst60000121: {kind: ImportRefUnloaded, arg0: import_ir_inst9D, arg1: entity_name} +// CHECK:STDOUT: inst60000122: {kind: ImplWitnessTable, arg0: inst_block60000067, arg1: impl60000009} +// CHECK:STDOUT: inst60000123: {kind: ImplWitness, arg0: inst60000122, arg1: specific60000017, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000124: {kind: FunctionDecl, arg0: function60000005, arg1: inst_block_empty, type: type(symbolic_constant600000DC)} +// CHECK:STDOUT: inst60000125: {kind: FunctionType, arg0: function60000005, arg1: specific60000017, type: type(TypeType)} +// CHECK:STDOUT: inst60000126: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant600000DC)} +// CHECK:STDOUT: inst60000127: {kind: TupleType, arg0: inst_block60000069, type: type(TypeType)} +// CHECK:STDOUT: inst60000128: {kind: TupleValue, arg0: inst_block60000068, type: type(inst60000127)} +// CHECK:STDOUT: inst60000129: {kind: PatternType, arg0: inst60000120, type: type(TypeType)} +// CHECK:STDOUT: inst6000012A: {kind: ReturnSlotPattern, arg0: inst, type: type(symbolic_constant600000E2)} +// CHECK:STDOUT: inst6000012B: {kind: OutParamPattern, arg0: inst6000012A, arg1: call_param1, type: type(symbolic_constant600000E2)} +// CHECK:STDOUT: inst6000012C: {kind: ValueBindingPattern, arg0: entity_name6000002D, type: type(symbolic_constant600000E2)} +// CHECK:STDOUT: inst6000012D: {kind: ValueParamPattern, arg0: inst6000012C, arg1: call_param0, type: type(symbolic_constant600000E2)} +// CHECK:STDOUT: inst6000012E: {kind: InitForm, arg0: inst60000120, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst6000012F: {kind: ImportRefLoaded, arg0: import_ir_instA4, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst60000130: {kind: ImportRefLoaded, arg0: import_ir_instA5, arg1: entity_name, type: type(inst(FormType))} +// CHECK:STDOUT: inst60000131: {kind: ImportRefLoaded, arg0: import_ir_instA6, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000132: {kind: ImportRefLoaded, arg0: import_ir_instA7, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000133: {kind: ImportRefLoaded, arg0: import_ir_instA8, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000134: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000135: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst60000134, type: type(TypeType)} +// CHECK:STDOUT: inst60000136: {kind: SymbolicBinding, arg0: entity_name6000001C, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000137: {kind: SymbolicBindingType, arg0: entity_name6000001C, arg1: inst60000136, type: type(TypeType)} +// CHECK:STDOUT: inst60000138: {kind: SymbolicBinding, arg0: entity_name6000002B, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000139: {kind: SymbolicBindingType, arg0: entity_name6000002B, arg1: inst60000138, type: type(TypeType)} +// CHECK:STDOUT: inst6000013A: {kind: TupleType, arg0: inst_block60000070, type: type(TypeType)} +// CHECK:STDOUT: inst6000013B: {kind: PatternType, arg0: inst6000013A, type: type(TypeType)} +// CHECK:STDOUT: inst6000013C: {kind: InitForm, arg0: inst6000013A, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst6000013D: {kind: LookupImplWitness, arg0: inst6000011E, arg1: specific_interface60000000, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst6000013E: {kind: FunctionType, arg0: function60000001, arg1: specific60000018, type: type(TypeType)} +// CHECK:STDOUT: inst6000013F: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant600000FB)} +// CHECK:STDOUT: inst60000140: {kind: FunctionTypeWithSelfType, arg0: inst6000013E, arg1: inst6000011E, type: type(TypeType)} +// CHECK:STDOUT: inst60000141: {kind: ImplWitnessAccess, arg0: inst6000013D, arg1: element0, type: type(symbolic_constant600000FD)} +// CHECK:STDOUT: inst60000142: {kind: SpecificImplFunction, arg0: inst60000141, arg1: specific60000019, type: type(inst(SpecificFunctionType))} +// CHECK:STDOUT: inst60000143: {kind: InitForm, arg0: inst6000011F, arg1: call_param1, type: type(inst(FormType))} +// CHECK:STDOUT: inst60000144: {kind: PatternType, arg0: inst6000011F, type: type(TypeType)} +// CHECK:STDOUT: inst60000145: {kind: RequireCompleteType, arg0: inst6000011F, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000146: {kind: RequireCompleteType, arg0: inst60000120, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000147: {kind: RequireCompleteType, arg0: inst6000013A, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000148: {kind: RequireCompleteType, arg0: inst60000135, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000149: {kind: LookupImplWitness, arg0: inst60000134, arg1: specific_interface60000000, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst6000014A: {kind: FunctionType, arg0: function60000001, arg1: specific6000001B, type: type(TypeType)} +// CHECK:STDOUT: inst6000014B: {kind: FunctionTypeWithSelfType, arg0: inst6000014A, arg1: inst60000134, type: type(TypeType)} +// CHECK:STDOUT: inst6000014C: {kind: ImplWitnessAccess, arg0: inst60000149, arg1: element0, type: type(symbolic_constant6000011B)} +// CHECK:STDOUT: inst6000014D: {kind: SpecificImplFunction, arg0: inst6000014C, arg1: specific6000001C, type: type(inst(SpecificFunctionType))} +// CHECK:STDOUT: inst6000014E: {kind: RequireCompleteType, arg0: inst60000137, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst6000014F: {kind: LookupImplWitness, arg0: inst60000136, arg1: specific_interface60000000, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000150: {kind: FunctionType, arg0: function60000001, arg1: specific6000001D, type: type(TypeType)} +// CHECK:STDOUT: inst60000151: {kind: FunctionTypeWithSelfType, arg0: inst60000150, arg1: inst60000136, type: type(TypeType)} +// CHECK:STDOUT: inst60000152: {kind: ImplWitnessAccess, arg0: inst6000014F, arg1: element0, type: type(symbolic_constant60000121)} +// CHECK:STDOUT: inst60000153: {kind: SpecificImplFunction, arg0: inst60000152, arg1: specific6000001E, type: type(inst(SpecificFunctionType))} +// CHECK:STDOUT: inst60000154: {kind: RequireCompleteType, arg0: inst60000139, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000155: {kind: LookupImplWitness, arg0: inst60000138, arg1: specific_interface60000000, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000156: {kind: FunctionType, arg0: function60000001, arg1: specific6000001F, type: type(TypeType)} +// CHECK:STDOUT: inst60000157: {kind: FunctionTypeWithSelfType, arg0: inst60000156, arg1: inst60000138, type: type(TypeType)} +// CHECK:STDOUT: inst60000158: {kind: ImplWitnessAccess, arg0: inst60000155, arg1: element0, type: type(symbolic_constant60000127)} +// CHECK:STDOUT: inst60000159: {kind: SpecificImplFunction, arg0: inst60000158, arg1: specific60000020, type: type(inst(SpecificFunctionType))} +// CHECK:STDOUT: inst6000015A: {kind: SymbolicBindingPattern, arg0: entity_name6000003D, type: type(inst60000097)} +// CHECK:STDOUT: inst6000015B: {kind: SymbolicBindingPattern, arg0: entity_name6000003E, type: type(inst60000097)} +// CHECK:STDOUT: inst6000015C: {kind: SymbolicBindingPattern, arg0: entity_name6000003F, type: type(inst60000097)} +// CHECK:STDOUT: inst6000015D: {kind: ImportRefLoaded, arg0: import_ir_instC8, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst6000015E: {kind: ImportRefLoaded, arg0: import_ir_instC9, arg1: entity_name, type: type(TypeType)} +// CHECK:STDOUT: inst6000015F: {kind: ImportRefLoaded, arg0: import_ir_instCA, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000160: {kind: ImportRefLoaded, arg0: import_ir_instCB, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000161: {kind: ImportRefLoaded, arg0: import_ir_instCC, arg1: entity_name, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000162: {kind: SymbolicBinding, arg0: entity_name60000001, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000163: {kind: SymbolicBinding, arg0: entity_name6000001C, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000164: {kind: SymbolicBinding, arg0: entity_name6000002B, arg1: inst, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000165: {kind: TupleValue, arg0: inst_block6000007F, type: type(inst60000127)} +// CHECK:STDOUT: inst60000166: {kind: SymbolicBindingType, arg0: entity_name60000001, arg1: inst60000162, type: type(TypeType)} +// CHECK:STDOUT: inst60000167: {kind: SymbolicBindingType, arg0: entity_name6000001C, arg1: inst60000163, type: type(TypeType)} +// CHECK:STDOUT: inst60000168: {kind: SymbolicBindingType, arg0: entity_name6000002B, arg1: inst60000164, type: type(TypeType)} +// CHECK:STDOUT: inst60000169: {kind: TupleType, arg0: inst_block60000080, type: type(TypeType)} +// CHECK:STDOUT: inst6000016A: {kind: ImplWitness, arg0: inst60000122, arg1: specific60000021, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst6000016B: {kind: FunctionType, arg0: function60000005, arg1: specific60000021, type: type(TypeType)} +// CHECK:STDOUT: inst6000016C: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant6000013C)} +// CHECK:STDOUT: inst6000016D: {kind: RequireSpecificDefinition, arg0: specific6000000B, type: type(inst(RequireSpecificDefinitionType))} +// CHECK:STDOUT: inst6000016E: {kind: RequireSpecificDefinition, arg0: specific6000000B, type: type(inst(RequireSpecificDefinitionType))} +// CHECK:STDOUT: inst6000016F: {kind: RequireSpecificDefinition, arg0: specific60000022, type: type(inst(RequireSpecificDefinitionType))} +// CHECK:STDOUT: inst60000170: {kind: LookupImplWitness, arg0: inst6000001C, arg1: specific_interface60000000, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000171: {kind: LookupImplWitness, arg0: inst6000001D, arg1: specific_interface60000000, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000172: {kind: FacetValue, arg0: inst6000001C, arg1: inst_block60000087, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000173: {kind: FunctionType, arg0: function60000001, arg1: specific60000023, type: type(TypeType)} +// CHECK:STDOUT: inst60000174: {kind: StructValue, arg0: inst_block_empty, type: type(symbolic_constant60000144)} +// CHECK:STDOUT: inst60000175: {kind: FunctionTypeWithSelfType, arg0: inst60000173, arg1: inst60000172, type: type(TypeType)} +// CHECK:STDOUT: inst60000176: {kind: ImplWitnessAccess, arg0: inst60000170, arg1: element0, type: type(symbolic_constant6000014A)} +// CHECK:STDOUT: inst60000177: {kind: ImplWitnessAccess, arg0: inst60000170, arg1: element0, type: type(symbolic_constant60000146)} +// CHECK:STDOUT: inst60000178: {kind: FacetValue, arg0: inst6000001D, arg1: inst_block6000008A, type: type(inst6000004E)} +// CHECK:STDOUT: inst60000179: {kind: FunctionType, arg0: function60000001, arg1: specific60000024, type: type(TypeType)} +// CHECK:STDOUT: inst6000017A: {kind: FunctionTypeWithSelfType, arg0: inst60000179, arg1: inst60000178, type: type(TypeType)} +// CHECK:STDOUT: inst6000017B: {kind: ImplWitnessAccess, arg0: inst60000171, arg1: element0, type: type(symbolic_constant6000014A)} +// CHECK:STDOUT: inst6000017C: {kind: BoundMethod, arg0: inst60000046, arg1: inst60000176, type: type(inst(BoundMethodType))} +// CHECK:STDOUT: inst6000017D: {kind: SpecificImplFunction, arg0: inst60000176, arg1: specific60000025, type: type(inst(SpecificFunctionType))} +// CHECK:STDOUT: inst6000017E: {kind: SpecificImplFunction, arg0: inst60000177, arg1: specific60000025, type: type(inst(SpecificFunctionType))} +// CHECK:STDOUT: inst6000017F: {kind: SpecificImplFunction, arg0: inst6000017B, arg1: specific60000026, type: type(inst(SpecificFunctionType))} +// CHECK:STDOUT: inst60000180: {kind: BoundMethod, arg0: inst60000046, arg1: inst6000017D, type: type(inst(BoundMethodType))} +// CHECK:STDOUT: inst60000181: {kind: RequireCompleteType, arg0: inst6000001C, type: type(inst(WitnessType))} +// CHECK:STDOUT: inst60000182: {kind: Call, arg0: inst60000180, arg1: inst_block6000008E, type: type(symbolic_constant60000004)} +// CHECK:STDOUT: inst60000183: {kind: InPlaceInit, arg0: inst60000182, arg1: inst6000004A, type: type(symbolic_constant60000004)} +// CHECK:STDOUT: inst60000184: {kind: TupleAccess, arg0: inst6000003A, arg1: element1, type: type(inst60000025)} +// CHECK:STDOUT: inst60000185: {kind: TupleInit, arg0: inst_block_empty, arg1: inst, type: type(inst60000025)} +// CHECK:STDOUT: inst60000186: {kind: Converted, arg0: inst60000047, arg1: inst60000185, type: type(inst60000025)} +// CHECK:STDOUT: inst60000187: {kind: TupleInit, arg0: inst_block6000008F, arg1: inst6000003A, type: type(symbolic_constant6000000A)} +// CHECK:STDOUT: inst60000188: {kind: Converted, arg0: inst60000048, arg1: inst60000187, type: type(symbolic_constant6000000A)} +// CHECK:STDOUT: inst60000189: {kind: ReturnExpr, arg0: inst60000188, arg1: inst6000003A} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: values: // CHECK:STDOUT: instF: concrete_constant(instF) @@ -849,293 +896,313 @@ fn Foo[T:! type](p: T*) -> (T*, ()) { // CHECK:STDOUT: inst6000004C: concrete_constant(inst6000004E) // CHECK:STDOUT: inst6000004D: concrete_constant(inst6000004E) // CHECK:STDOUT: inst6000004E: concrete_constant(inst6000004E) -// CHECK:STDOUT: inst6000004F: symbolic_constant60000014 -// CHECK:STDOUT: inst60000050: constant -// CHECK:STDOUT: inst60000051: concrete_constant(inst60000055) +// CHECK:STDOUT: inst6000004F: concrete_constant(inst6000004F) +// CHECK:STDOUT: inst60000050: symbolic_constant60000014 +// CHECK:STDOUT: inst60000051: concrete_constant(inst6000006B) // CHECK:STDOUT: inst60000052: constant -// CHECK:STDOUT: inst60000053: concrete_constant(inst60000053) -// CHECK:STDOUT: inst60000054: concrete_constant(inst60000058) -// CHECK:STDOUT: inst60000055: concrete_constant(inst60000055) -// CHECK:STDOUT: inst60000056: concrete_constant(inst60000058) -// CHECK:STDOUT: inst60000057: concrete_constant(inst60000057) -// CHECK:STDOUT: inst60000058: concrete_constant(inst60000058) -// CHECK:STDOUT: inst60000059: symbolic_constant60000015 -// CHECK:STDOUT: inst6000005A: symbolic_constant60000016 +// CHECK:STDOUT: inst60000053: symbolic_constant60000014 +// CHECK:STDOUT: inst60000054: symbolic_constant60000017 +// CHECK:STDOUT: inst60000055: symbolic_constant60000015 +// CHECK:STDOUT: inst60000056: symbolic_constant60000016 +// CHECK:STDOUT: inst60000057: symbolic_constant60000018 +// CHECK:STDOUT: inst60000058: symbolic_constant6000001A +// CHECK:STDOUT: inst60000059: concrete_constant(inst60000059) +// CHECK:STDOUT: inst6000005A: concrete_constant(inst6000005A) // CHECK:STDOUT: inst6000005B: concrete_constant(inst6000005B) // CHECK:STDOUT: inst6000005C: concrete_constant(inst6000005C) -// CHECK:STDOUT: inst6000005D: concrete_constant(inst6000005D) -// CHECK:STDOUT: inst6000005E: concrete_constant(inst6000005E) -// CHECK:STDOUT: inst6000005F: symbolic_constant60000018 -// CHECK:STDOUT: inst60000060: symbolic_constant6000001D -// CHECK:STDOUT: inst60000061: symbolic_constant6000001C -// CHECK:STDOUT: inst60000062: symbolic_constant60000014 -// CHECK:STDOUT: inst60000063: symbolic_constant6000001E -// CHECK:STDOUT: inst60000064: symbolic_constant6000001F -// CHECK:STDOUT: inst60000065: symbolic_constant60000020 -// CHECK:STDOUT: inst60000066: symbolic_constant60000021 -// CHECK:STDOUT: inst60000067: symbolic_constant60000127 +// CHECK:STDOUT: inst6000005D: symbolic_constant6000001C +// CHECK:STDOUT: inst6000005E: symbolic_constant60000021 +// CHECK:STDOUT: inst6000005F: symbolic_constant60000020 +// CHECK:STDOUT: inst60000060: symbolic_constant60000014 +// CHECK:STDOUT: inst60000061: symbolic_constant60000022 +// CHECK:STDOUT: inst60000062: symbolic_constant60000023 +// CHECK:STDOUT: inst60000063: symbolic_constant60000024 +// CHECK:STDOUT: inst60000064: symbolic_constant60000025 +// CHECK:STDOUT: inst60000065: symbolic_constant60000028 +// CHECK:STDOUT: inst60000066: symbolic_constant60000029 +// CHECK:STDOUT: inst60000067: symbolic_constant6000002A // CHECK:STDOUT: inst60000068: constant // CHECK:STDOUT: inst60000069: concrete_constant(inst60000069) -// CHECK:STDOUT: inst6000006A: symbolic_constant60000022 -// CHECK:STDOUT: inst6000006B: symbolic_constant60000023 -// CHECK:STDOUT: inst6000006C: symbolic_constant60000024 +// CHECK:STDOUT: inst6000006A: symbolic_constant60000017 +// CHECK:STDOUT: inst6000006B: concrete_constant(inst6000006B) +// CHECK:STDOUT: inst6000006C: symbolic_constant60000142 // CHECK:STDOUT: inst6000006D: constant // CHECK:STDOUT: inst6000006E: concrete_constant(inst6000006E) -// CHECK:STDOUT: inst6000006F: symbolic_constant60000026 -// CHECK:STDOUT: inst60000070: symbolic_constant6000002A -// CHECK:STDOUT: inst60000071: symbolic_constant60000028 -// CHECK:STDOUT: inst60000072: symbolic_constant60000029 -// CHECK:STDOUT: inst60000073: symbolic_constant6000002C -// CHECK:STDOUT: inst60000074: concrete_constant(inst60000074) -// CHECK:STDOUT: inst60000075: concrete_constant(inst60000075) -// CHECK:STDOUT: inst60000076: concrete_constant(inst60000076) -// CHECK:STDOUT: inst60000077: concrete_constant(inst60000077) -// CHECK:STDOUT: inst60000078: symbolic_constant6000002E -// CHECK:STDOUT: inst60000079: symbolic_constant60000035 -// CHECK:STDOUT: inst6000007A: symbolic_constant60000034 -// CHECK:STDOUT: inst6000007B: symbolic_constant60000033 -// CHECK:STDOUT: inst6000007C: symbolic_constant60000036 +// CHECK:STDOUT: inst6000006F: symbolic_constant6000002B +// CHECK:STDOUT: inst60000070: symbolic_constant6000002C +// CHECK:STDOUT: inst60000071: symbolic_constant6000002D +// CHECK:STDOUT: inst60000072: constant +// CHECK:STDOUT: inst60000073: concrete_constant(inst60000073) +// CHECK:STDOUT: inst60000074: symbolic_constant6000002F +// CHECK:STDOUT: inst60000075: symbolic_constant60000033 +// CHECK:STDOUT: inst60000076: symbolic_constant60000031 +// CHECK:STDOUT: inst60000077: symbolic_constant60000032 +// CHECK:STDOUT: inst60000078: symbolic_constant60000035 +// CHECK:STDOUT: inst60000079: concrete_constant(inst60000079) +// CHECK:STDOUT: inst6000007A: concrete_constant(inst6000007A) +// CHECK:STDOUT: inst6000007B: concrete_constant(inst6000007B) +// CHECK:STDOUT: inst6000007C: concrete_constant(inst6000007C) // CHECK:STDOUT: inst6000007D: symbolic_constant60000037 -// CHECK:STDOUT: inst6000007E: symbolic_constant60000038 -// CHECK:STDOUT: inst6000007F: symbolic_constant60000039 -// CHECK:STDOUT: inst60000080: symbolic_constant6000003A -// CHECK:STDOUT: inst60000081: symbolic_constant6000003B -// CHECK:STDOUT: inst60000082: symbolic_constant6000003C -// CHECK:STDOUT: inst60000083: symbolic_constant6000003D -// CHECK:STDOUT: inst60000084: symbolic_constant6000003E -// CHECK:STDOUT: inst60000085: symbolic_constant60000040 -// CHECK:STDOUT: inst60000086: symbolic_constant60000041 +// CHECK:STDOUT: inst6000007E: symbolic_constant6000003E +// CHECK:STDOUT: inst6000007F: symbolic_constant6000003D +// CHECK:STDOUT: inst60000080: symbolic_constant6000003C +// CHECK:STDOUT: inst60000081: symbolic_constant6000003F +// CHECK:STDOUT: inst60000082: symbolic_constant60000040 +// CHECK:STDOUT: inst60000083: symbolic_constant60000041 +// CHECK:STDOUT: inst60000084: symbolic_constant60000042 +// CHECK:STDOUT: inst60000085: symbolic_constant60000043 +// CHECK:STDOUT: inst60000086: symbolic_constant60000044 // CHECK:STDOUT: inst60000087: symbolic_constant60000045 -// CHECK:STDOUT: inst60000088: symbolic_constant60000047 -// CHECK:STDOUT: inst60000089: symbolic_constant60000049 -// CHECK:STDOUT: inst6000008A: symbolic_constant6000004A -// CHECK:STDOUT: inst6000008B: symbolic_constant6000004B -// CHECK:STDOUT: inst6000008C: symbolic_constant6000004C -// CHECK:STDOUT: inst6000008D: symbolic_constant6000004D -// CHECK:STDOUT: inst6000008E: symbolic_constant6000004E -// CHECK:STDOUT: inst6000008F: concrete_constant(inst6000008F) -// CHECK:STDOUT: inst60000090: concrete_constant(inst60000090) -// CHECK:STDOUT: inst60000091: symbolic_constant60000025 -// CHECK:STDOUT: inst60000092: concrete_constant(inst6000004E) -// CHECK:STDOUT: inst60000093: symbolic_constant60000033 -// CHECK:STDOUT: inst60000094: symbolic_constant60000052 -// CHECK:STDOUT: inst60000095: symbolic_constant60000053 -// CHECK:STDOUT: inst60000096: symbolic_constant60000054 -// CHECK:STDOUT: inst60000097: symbolic_constant60000055 -// CHECK:STDOUT: inst60000098: symbolic_constant60000057 -// CHECK:STDOUT: inst60000099: symbolic_constant60000058 -// CHECK:STDOUT: inst6000009A: constant -// CHECK:STDOUT: inst6000009B: concrete_constant(inst6000009B) -// CHECK:STDOUT: inst6000009C: concrete_constant(inst(BoolType)) -// CHECK:STDOUT: inst6000009D: concrete_constant(inst6000004E) -// CHECK:STDOUT: inst6000009E: constant -// CHECK:STDOUT: inst6000009F: concrete_constant(inst6000009F) -// CHECK:STDOUT: inst600000A0: concrete_constant(inst(CharLiteralType)) -// CHECK:STDOUT: inst600000A1: concrete_constant(inst6000004E) +// CHECK:STDOUT: inst60000088: symbolic_constant60000046 +// CHECK:STDOUT: inst60000089: symbolic_constant60000047 +// CHECK:STDOUT: inst6000008A: symbolic_constant60000048 +// CHECK:STDOUT: inst6000008B: symbolic_constant60000049 +// CHECK:STDOUT: inst6000008C: symbolic_constant6000004B +// CHECK:STDOUT: inst6000008D: symbolic_constant6000004C +// CHECK:STDOUT: inst6000008E: symbolic_constant60000051 +// CHECK:STDOUT: inst6000008F: symbolic_constant60000053 +// CHECK:STDOUT: inst60000090: symbolic_constant60000055 +// CHECK:STDOUT: inst60000091: symbolic_constant60000056 +// CHECK:STDOUT: inst60000092: symbolic_constant60000057 +// CHECK:STDOUT: inst60000093: symbolic_constant60000058 +// CHECK:STDOUT: inst60000094: symbolic_constant60000059 +// CHECK:STDOUT: inst60000095: symbolic_constant6000005A +// CHECK:STDOUT: inst60000096: symbolic_constant6000005B +// CHECK:STDOUT: inst60000097: concrete_constant(inst60000097) +// CHECK:STDOUT: inst60000098: concrete_constant(inst60000098) +// CHECK:STDOUT: inst60000099: symbolic_constant6000002E +// CHECK:STDOUT: inst6000009A: concrete_constant(inst6000004E) +// CHECK:STDOUT: inst6000009B: symbolic_constant6000003C +// CHECK:STDOUT: inst6000009C: symbolic_constant6000005F +// CHECK:STDOUT: inst6000009D: symbolic_constant60000060 +// CHECK:STDOUT: inst6000009E: symbolic_constant60000061 +// CHECK:STDOUT: inst6000009F: symbolic_constant60000062 +// CHECK:STDOUT: inst600000A0: symbolic_constant60000064 +// CHECK:STDOUT: inst600000A1: symbolic_constant60000065 // CHECK:STDOUT: inst600000A2: constant // CHECK:STDOUT: inst600000A3: concrete_constant(inst600000A3) -// CHECK:STDOUT: inst600000A4: concrete_constant(inst(FloatLiteralType)) +// CHECK:STDOUT: inst600000A4: concrete_constant(inst(BoolType)) // CHECK:STDOUT: inst600000A5: concrete_constant(inst6000004E) // CHECK:STDOUT: inst600000A6: constant // CHECK:STDOUT: inst600000A7: concrete_constant(inst600000A7) -// CHECK:STDOUT: inst600000A8: concrete_constant(inst(IntLiteralType)) +// CHECK:STDOUT: inst600000A8: concrete_constant(inst(CharLiteralType)) // CHECK:STDOUT: inst600000A9: concrete_constant(inst6000004E) -// CHECK:STDOUT: inst600000AA: symbolic_constant60000123 +// CHECK:STDOUT: inst600000AA: constant // CHECK:STDOUT: inst600000AB: concrete_constant(inst600000AB) -// CHECK:STDOUT: inst600000AC: constant -// CHECK:STDOUT: inst600000AD: concrete_constant(inst600000AD) -// CHECK:STDOUT: inst600000AE: symbolic_constant6000005A +// CHECK:STDOUT: inst600000AC: concrete_constant(inst(FloatLiteralType)) +// CHECK:STDOUT: inst600000AD: concrete_constant(inst6000004E) +// CHECK:STDOUT: inst600000AE: constant // CHECK:STDOUT: inst600000AF: concrete_constant(inst600000AF) -// CHECK:STDOUT: inst600000B0: symbolic_constant60000059 +// CHECK:STDOUT: inst600000B0: concrete_constant(inst(IntLiteralType)) // CHECK:STDOUT: inst600000B1: concrete_constant(inst6000004E) -// CHECK:STDOUT: inst600000B2: symbolic_constant6000005E -// CHECK:STDOUT: inst600000B3: symbolic_constant6000005F -// CHECK:STDOUT: inst600000B4: symbolic_constant60000060 -// CHECK:STDOUT: inst600000B5: symbolic_constant60000061 -// CHECK:STDOUT: inst600000B6: symbolic_constant60000065 -// CHECK:STDOUT: inst600000B7: symbolic_constant60000063 -// CHECK:STDOUT: inst600000B8: symbolic_constant60000064 -// CHECK:STDOUT: inst600000B9: concrete_constant(inst600000B9) -// CHECK:STDOUT: inst600000BA: concrete_constant(inst600000BA) -// CHECK:STDOUT: inst600000BB: concrete_constant(inst600000BB) -// CHECK:STDOUT: inst600000BC: concrete_constant(inst600000BC) -// CHECK:STDOUT: inst600000BD: symbolic_constant60000068 -// CHECK:STDOUT: inst600000BE: symbolic_constant6000006D -// CHECK:STDOUT: inst600000BF: symbolic_constant6000006C -// CHECK:STDOUT: inst600000C0: symbolic_constant6000005E -// CHECK:STDOUT: inst600000C1: symbolic_constant6000006E -// CHECK:STDOUT: inst600000C2: symbolic_constant6000006F -// CHECK:STDOUT: inst600000C3: symbolic_constant60000070 -// CHECK:STDOUT: inst600000C4: symbolic_constant60000071 -// CHECK:STDOUT: inst600000C5: symbolic_constant60000073 -// CHECK:STDOUT: inst600000C6: symbolic_constant60000074 -// CHECK:STDOUT: inst600000C7: symbolic_constant60000075 -// CHECK:STDOUT: inst600000C8: constant -// CHECK:STDOUT: inst600000C9: concrete_constant(inst600000C9) -// CHECK:STDOUT: inst600000CA: concrete_constant(inst(TypeType)) -// CHECK:STDOUT: inst600000CB: concrete_constant(inst6000004E) -// CHECK:STDOUT: inst600000CC: constant -// CHECK:STDOUT: inst600000CD: concrete_constant(inst600000CD) -// CHECK:STDOUT: inst600000CE: concrete_constant(inst60000025) -// CHECK:STDOUT: inst600000CF: concrete_constant(inst6000004E) +// CHECK:STDOUT: inst600000B2: symbolic_constant6000013E +// CHECK:STDOUT: inst600000B3: concrete_constant(inst600000B3) +// CHECK:STDOUT: inst600000B4: constant +// CHECK:STDOUT: inst600000B5: concrete_constant(inst600000B5) +// CHECK:STDOUT: inst600000B6: symbolic_constant60000067 +// CHECK:STDOUT: inst600000B7: concrete_constant(inst600000B7) +// CHECK:STDOUT: inst600000B8: symbolic_constant60000066 +// CHECK:STDOUT: inst600000B9: concrete_constant(inst6000004E) +// CHECK:STDOUT: inst600000BA: symbolic_constant6000006B +// CHECK:STDOUT: inst600000BB: symbolic_constant6000006C +// CHECK:STDOUT: inst600000BC: symbolic_constant6000006D +// CHECK:STDOUT: inst600000BD: symbolic_constant6000006E +// CHECK:STDOUT: inst600000BE: symbolic_constant60000072 +// CHECK:STDOUT: inst600000BF: symbolic_constant60000070 +// CHECK:STDOUT: inst600000C0: symbolic_constant60000071 +// CHECK:STDOUT: inst600000C1: concrete_constant(inst600000C1) +// CHECK:STDOUT: inst600000C2: concrete_constant(inst600000C2) +// CHECK:STDOUT: inst600000C3: concrete_constant(inst600000C3) +// CHECK:STDOUT: inst600000C4: concrete_constant(inst600000C4) +// CHECK:STDOUT: inst600000C5: symbolic_constant60000075 +// CHECK:STDOUT: inst600000C6: symbolic_constant6000007A +// CHECK:STDOUT: inst600000C7: symbolic_constant60000079 +// CHECK:STDOUT: inst600000C8: symbolic_constant6000006B +// CHECK:STDOUT: inst600000C9: symbolic_constant6000007B +// CHECK:STDOUT: inst600000CA: symbolic_constant6000007C +// CHECK:STDOUT: inst600000CB: symbolic_constant6000007D +// CHECK:STDOUT: inst600000CC: symbolic_constant6000007E +// CHECK:STDOUT: inst600000CD: symbolic_constant60000080 +// CHECK:STDOUT: inst600000CE: symbolic_constant60000081 +// CHECK:STDOUT: inst600000CF: symbolic_constant60000082 // CHECK:STDOUT: inst600000D0: constant // CHECK:STDOUT: inst600000D1: concrete_constant(inst600000D1) -// CHECK:STDOUT: inst600000D2: symbolic_constant60000076 -// CHECK:STDOUT: inst600000D3: symbolic_constant60000077 -// CHECK:STDOUT: inst600000D4: symbolic_constant60000078 -// CHECK:STDOUT: inst600000D5: constant -// CHECK:STDOUT: inst600000D6: concrete_constant(inst600000D6) -// CHECK:STDOUT: inst600000D7: symbolic_constant6000007A -// CHECK:STDOUT: inst600000D8: symbolic_constant6000007E -// CHECK:STDOUT: inst600000D9: symbolic_constant6000007C -// CHECK:STDOUT: inst600000DA: symbolic_constant6000007D -// CHECK:STDOUT: inst600000DB: concrete_constant(inst600000DB) -// CHECK:STDOUT: inst600000DC: symbolic_constant60000080 -// CHECK:STDOUT: inst600000DD: symbolic_constant60000081 +// CHECK:STDOUT: inst600000D2: concrete_constant(inst(TypeType)) +// CHECK:STDOUT: inst600000D3: concrete_constant(inst6000004E) +// CHECK:STDOUT: inst600000D4: constant +// CHECK:STDOUT: inst600000D5: concrete_constant(inst600000D5) +// CHECK:STDOUT: inst600000D6: concrete_constant(inst60000025) +// CHECK:STDOUT: inst600000D7: concrete_constant(inst6000004E) +// CHECK:STDOUT: inst600000D8: constant +// CHECK:STDOUT: inst600000D9: concrete_constant(inst600000D9) +// CHECK:STDOUT: inst600000DA: symbolic_constant60000083 +// CHECK:STDOUT: inst600000DB: symbolic_constant60000084 +// CHECK:STDOUT: inst600000DC: symbolic_constant60000085 +// CHECK:STDOUT: inst600000DD: constant // CHECK:STDOUT: inst600000DE: concrete_constant(inst600000DE) -// CHECK:STDOUT: inst600000DF: concrete_constant(inst600000DF) -// CHECK:STDOUT: inst600000E0: concrete_constant(inst600000E0) -// CHECK:STDOUT: inst600000E1: concrete_constant(inst600000E1) -// CHECK:STDOUT: inst600000E2: symbolic_constant60000083 -// CHECK:STDOUT: inst600000E3: symbolic_constant6000008D -// CHECK:STDOUT: inst600000E4: symbolic_constant6000008C -// CHECK:STDOUT: inst600000E5: symbolic_constant6000008B -// CHECK:STDOUT: inst600000E6: symbolic_constant6000008A -// CHECK:STDOUT: inst600000E7: symbolic_constant6000008E -// CHECK:STDOUT: inst600000E8: symbolic_constant6000008F -// CHECK:STDOUT: inst600000E9: symbolic_constant60000090 -// CHECK:STDOUT: inst600000EA: symbolic_constant60000091 -// CHECK:STDOUT: inst600000EB: symbolic_constant60000092 -// CHECK:STDOUT: inst600000EC: symbolic_constant60000093 -// CHECK:STDOUT: inst600000ED: symbolic_constant60000094 -// CHECK:STDOUT: inst600000EE: symbolic_constant60000095 -// CHECK:STDOUT: inst600000EF: symbolic_constant60000096 -// CHECK:STDOUT: inst600000F0: symbolic_constant60000097 -// CHECK:STDOUT: inst600000F1: symbolic_constant60000098 -// CHECK:STDOUT: inst600000F2: symbolic_constant6000009A -// CHECK:STDOUT: inst600000F3: symbolic_constant6000009B -// CHECK:STDOUT: inst600000F4: symbolic_constant6000009F -// CHECK:STDOUT: inst600000F5: symbolic_constant600000A6 -// CHECK:STDOUT: inst600000F6: symbolic_constant600000A8 -// CHECK:STDOUT: inst600000F7: symbolic_constant600000A9 -// CHECK:STDOUT: inst600000F8: symbolic_constant600000AA -// CHECK:STDOUT: inst600000F9: symbolic_constant600000AB -// CHECK:STDOUT: inst600000FA: symbolic_constant600000AC -// CHECK:STDOUT: inst600000FB: symbolic_constant600000AD -// CHECK:STDOUT: inst600000FC: symbolic_constant600000AE -// CHECK:STDOUT: inst600000FD: symbolic_constant600000AF -// CHECK:STDOUT: inst600000FE: symbolic_constant600000B0 -// CHECK:STDOUT: inst600000FF: symbolic_constant600000B1 -// CHECK:STDOUT: inst60000100: symbolic_constant600000B2 -// CHECK:STDOUT: inst60000101: concrete_constant(inst60000101) -// CHECK:STDOUT: inst60000102: concrete_constant(inst60000102) -// CHECK:STDOUT: inst60000103: symbolic_constant60000079 -// CHECK:STDOUT: inst60000104: concrete_constant(inst6000004E) -// CHECK:STDOUT: inst60000105: symbolic_constant6000008B -// CHECK:STDOUT: inst60000106: symbolic_constant6000008A -// CHECK:STDOUT: inst60000107: symbolic_constant600000B9 -// CHECK:STDOUT: inst60000108: symbolic_constant600000BA -// CHECK:STDOUT: inst60000109: symbolic_constant600000BB -// CHECK:STDOUT: inst6000010A: symbolic_constant600000BC -// CHECK:STDOUT: inst6000010B: symbolic_constant600000BD -// CHECK:STDOUT: inst6000010C: symbolic_constant600000BE -// CHECK:STDOUT: inst6000010D: symbolic_constant600000BF -// CHECK:STDOUT: inst6000010E: symbolic_constant600000C1 -// CHECK:STDOUT: inst6000010F: symbolic_constant600000C2 -// CHECK:STDOUT: inst60000110: constant -// CHECK:STDOUT: inst60000111: concrete_constant(inst60000111) -// CHECK:STDOUT: inst60000112: symbolic_constant600000C3 -// CHECK:STDOUT: inst60000113: symbolic_constant600000C4 -// CHECK:STDOUT: inst60000114: symbolic_constant600000C5 -// CHECK:STDOUT: inst60000115: constant -// CHECK:STDOUT: inst60000116: concrete_constant(inst60000116) -// CHECK:STDOUT: inst60000117: symbolic_constant600000C7 -// CHECK:STDOUT: inst60000118: symbolic_constant600000CB -// CHECK:STDOUT: inst60000119: symbolic_constant600000C9 -// CHECK:STDOUT: inst6000011A: symbolic_constant600000CA -// CHECK:STDOUT: inst6000011B: concrete_constant(inst6000011B) -// CHECK:STDOUT: inst6000011C: symbolic_constant600000CD -// CHECK:STDOUT: inst6000011D: symbolic_constant600000CE -// CHECK:STDOUT: inst6000011E: concrete_constant(inst6000011E) -// CHECK:STDOUT: inst6000011F: concrete_constant(inst6000011F) -// CHECK:STDOUT: inst60000120: concrete_constant(inst60000120) -// CHECK:STDOUT: inst60000121: concrete_constant(inst60000121) -// CHECK:STDOUT: inst60000122: symbolic_constant600000D0 -// CHECK:STDOUT: inst60000123: symbolic_constant600000DD -// CHECK:STDOUT: inst60000124: symbolic_constant600000DC -// CHECK:STDOUT: inst60000125: symbolic_constant600000DB -// CHECK:STDOUT: inst60000126: symbolic_constant600000DA -// CHECK:STDOUT: inst60000127: symbolic_constant600000D9 -// CHECK:STDOUT: inst60000128: symbolic_constant600000DE -// CHECK:STDOUT: inst60000129: symbolic_constant600000DF -// CHECK:STDOUT: inst6000012A: symbolic_constant600000E0 -// CHECK:STDOUT: inst6000012B: symbolic_constant600000E1 -// CHECK:STDOUT: inst6000012C: symbolic_constant600000E2 -// CHECK:STDOUT: inst6000012D: symbolic_constant600000E3 -// CHECK:STDOUT: inst6000012E: symbolic_constant600000E4 -// CHECK:STDOUT: inst6000012F: symbolic_constant600000E5 -// CHECK:STDOUT: inst60000130: symbolic_constant600000E6 -// CHECK:STDOUT: inst60000131: symbolic_constant600000E7 -// CHECK:STDOUT: inst60000132: symbolic_constant600000E8 -// CHECK:STDOUT: inst60000133: symbolic_constant600000E9 -// CHECK:STDOUT: inst60000134: symbolic_constant600000EA -// CHECK:STDOUT: inst60000135: symbolic_constant600000EC -// CHECK:STDOUT: inst60000136: symbolic_constant600000ED -// CHECK:STDOUT: inst60000137: symbolic_constant600000F1 -// CHECK:STDOUT: inst60000138: symbolic_constant600000FD -// CHECK:STDOUT: inst60000139: symbolic_constant600000FF -// CHECK:STDOUT: inst6000013A: symbolic_constant60000100 -// CHECK:STDOUT: inst6000013B: symbolic_constant60000101 -// CHECK:STDOUT: inst6000013C: symbolic_constant60000102 -// CHECK:STDOUT: inst6000013D: symbolic_constant60000103 -// CHECK:STDOUT: inst6000013E: symbolic_constant60000104 -// CHECK:STDOUT: inst6000013F: symbolic_constant60000105 -// CHECK:STDOUT: inst60000140: symbolic_constant60000106 -// CHECK:STDOUT: inst60000141: symbolic_constant60000107 -// CHECK:STDOUT: inst60000142: symbolic_constant60000108 -// CHECK:STDOUT: inst60000143: symbolic_constant60000109 -// CHECK:STDOUT: inst60000144: symbolic_constant6000010A -// CHECK:STDOUT: inst60000145: symbolic_constant6000010B -// CHECK:STDOUT: inst60000146: symbolic_constant6000010C -// CHECK:STDOUT: inst60000147: symbolic_constant6000010D -// CHECK:STDOUT: inst60000148: symbolic_constant6000010E -// CHECK:STDOUT: inst60000149: concrete_constant(inst60000149) -// CHECK:STDOUT: inst6000014A: concrete_constant(inst6000014A) -// CHECK:STDOUT: inst6000014B: concrete_constant(inst6000014B) -// CHECK:STDOUT: inst6000014C: symbolic_constant600000C6 -// CHECK:STDOUT: inst6000014D: concrete_constant(inst6000004E) -// CHECK:STDOUT: inst6000014E: symbolic_constant600000DB -// CHECK:STDOUT: inst6000014F: symbolic_constant600000DA -// CHECK:STDOUT: inst60000150: symbolic_constant600000D9 -// CHECK:STDOUT: inst60000151: symbolic_constant60000117 -// CHECK:STDOUT: inst60000152: symbolic_constant60000118 -// CHECK:STDOUT: inst60000153: symbolic_constant60000119 -// CHECK:STDOUT: inst60000154: symbolic_constant6000011A -// CHECK:STDOUT: inst60000155: symbolic_constant6000011B -// CHECK:STDOUT: inst60000156: symbolic_constant6000011C -// CHECK:STDOUT: inst60000157: symbolic_constant6000011D -// CHECK:STDOUT: inst60000158: symbolic_constant6000011E -// CHECK:STDOUT: inst60000159: symbolic_constant6000011F -// CHECK:STDOUT: inst6000015A: symbolic_constant60000121 -// CHECK:STDOUT: inst6000015B: symbolic_constant60000122 -// CHECK:STDOUT: inst6000015C: symbolic_constant60000125 -// CHECK:STDOUT: inst6000015D: symbolic_constant60000124 -// CHECK:STDOUT: inst6000015E: symbolic_constant60000125 -// CHECK:STDOUT: inst6000015F: symbolic_constant60000126 -// CHECK:STDOUT: inst60000160: symbolic_constant60000127 -// CHECK:STDOUT: inst60000161: symbolic_constant60000128 -// CHECK:STDOUT: inst60000162: symbolic_constant60000129 -// CHECK:STDOUT: inst60000163: symbolic_constant6000012D -// CHECK:STDOUT: inst60000164: symbolic_constant6000012A -// CHECK:STDOUT: inst60000165: symbolic_constant6000012B -// CHECK:STDOUT: inst60000166: symbolic_constant6000012C -// CHECK:STDOUT: inst60000167: symbolic_constant6000012D -// CHECK:STDOUT: inst60000169: symbolic_constant6000012F -// CHECK:STDOUT: inst6000016A: symbolic_constant6000012E -// CHECK:STDOUT: inst6000016B: symbolic_constant6000012F -// CHECK:STDOUT: inst6000016D: symbolic_constant60000010 -// CHECK:STDOUT: inst60000171: concrete_constant(inst60000027) -// CHECK:STDOUT: inst60000172: concrete_constant(inst60000027) +// CHECK:STDOUT: inst600000DF: symbolic_constant60000087 +// CHECK:STDOUT: inst600000E0: symbolic_constant6000008B +// CHECK:STDOUT: inst600000E1: symbolic_constant60000089 +// CHECK:STDOUT: inst600000E2: symbolic_constant6000008A +// CHECK:STDOUT: inst600000E3: concrete_constant(inst600000E3) +// CHECK:STDOUT: inst600000E4: symbolic_constant6000008D +// CHECK:STDOUT: inst600000E5: symbolic_constant6000008E +// CHECK:STDOUT: inst600000E6: concrete_constant(inst600000E6) +// CHECK:STDOUT: inst600000E7: concrete_constant(inst600000E7) +// CHECK:STDOUT: inst600000E8: concrete_constant(inst600000E8) +// CHECK:STDOUT: inst600000E9: concrete_constant(inst600000E9) +// CHECK:STDOUT: inst600000EA: symbolic_constant60000090 +// CHECK:STDOUT: inst600000EB: symbolic_constant6000009A +// CHECK:STDOUT: inst600000EC: symbolic_constant60000099 +// CHECK:STDOUT: inst600000ED: symbolic_constant60000098 +// CHECK:STDOUT: inst600000EE: symbolic_constant60000097 +// CHECK:STDOUT: inst600000EF: symbolic_constant6000009B +// CHECK:STDOUT: inst600000F0: symbolic_constant6000009C +// CHECK:STDOUT: inst600000F1: symbolic_constant6000009D +// CHECK:STDOUT: inst600000F2: symbolic_constant6000009E +// CHECK:STDOUT: inst600000F3: symbolic_constant6000009F +// CHECK:STDOUT: inst600000F4: symbolic_constant600000A0 +// CHECK:STDOUT: inst600000F5: symbolic_constant600000A1 +// CHECK:STDOUT: inst600000F6: symbolic_constant600000A2 +// CHECK:STDOUT: inst600000F7: symbolic_constant600000A3 +// CHECK:STDOUT: inst600000F8: symbolic_constant600000A4 +// CHECK:STDOUT: inst600000F9: symbolic_constant600000A5 +// CHECK:STDOUT: inst600000FA: symbolic_constant600000A6 +// CHECK:STDOUT: inst600000FB: symbolic_constant600000A7 +// CHECK:STDOUT: inst600000FC: symbolic_constant600000A9 +// CHECK:STDOUT: inst600000FD: symbolic_constant600000AA +// CHECK:STDOUT: inst600000FE: symbolic_constant600000AF +// CHECK:STDOUT: inst600000FF: symbolic_constant600000B7 +// CHECK:STDOUT: inst60000100: symbolic_constant600000B9 +// CHECK:STDOUT: inst60000101: symbolic_constant600000BA +// CHECK:STDOUT: inst60000102: symbolic_constant600000BB +// CHECK:STDOUT: inst60000103: symbolic_constant600000BC +// CHECK:STDOUT: inst60000104: symbolic_constant600000BD +// CHECK:STDOUT: inst60000105: symbolic_constant600000BE +// CHECK:STDOUT: inst60000106: symbolic_constant600000BF +// CHECK:STDOUT: inst60000107: symbolic_constant600000C0 +// CHECK:STDOUT: inst60000108: symbolic_constant600000C1 +// CHECK:STDOUT: inst60000109: symbolic_constant600000C2 +// CHECK:STDOUT: inst6000010A: symbolic_constant600000C3 +// CHECK:STDOUT: inst6000010B: symbolic_constant600000C4 +// CHECK:STDOUT: inst6000010C: symbolic_constant600000C5 +// CHECK:STDOUT: inst6000010D: concrete_constant(inst6000010D) +// CHECK:STDOUT: inst6000010E: concrete_constant(inst6000010E) +// CHECK:STDOUT: inst6000010F: symbolic_constant60000086 +// CHECK:STDOUT: inst60000110: concrete_constant(inst6000004E) +// CHECK:STDOUT: inst60000111: symbolic_constant60000098 +// CHECK:STDOUT: inst60000112: symbolic_constant60000097 +// CHECK:STDOUT: inst60000113: symbolic_constant600000CC +// CHECK:STDOUT: inst60000114: symbolic_constant600000CD +// CHECK:STDOUT: inst60000115: symbolic_constant600000CE +// CHECK:STDOUT: inst60000116: symbolic_constant600000CF +// CHECK:STDOUT: inst60000117: symbolic_constant600000D0 +// CHECK:STDOUT: inst60000118: symbolic_constant600000D1 +// CHECK:STDOUT: inst60000119: symbolic_constant600000D2 +// CHECK:STDOUT: inst6000011A: symbolic_constant600000D4 +// CHECK:STDOUT: inst6000011B: symbolic_constant600000D5 +// CHECK:STDOUT: inst6000011C: constant +// CHECK:STDOUT: inst6000011D: concrete_constant(inst6000011D) +// CHECK:STDOUT: inst6000011E: symbolic_constant600000D6 +// CHECK:STDOUT: inst6000011F: symbolic_constant600000D7 +// CHECK:STDOUT: inst60000120: symbolic_constant600000D8 +// CHECK:STDOUT: inst60000121: constant +// CHECK:STDOUT: inst60000122: concrete_constant(inst60000122) +// CHECK:STDOUT: inst60000123: symbolic_constant600000DA +// CHECK:STDOUT: inst60000124: symbolic_constant600000DE +// CHECK:STDOUT: inst60000125: symbolic_constant600000DC +// CHECK:STDOUT: inst60000126: symbolic_constant600000DD +// CHECK:STDOUT: inst60000127: concrete_constant(inst60000127) +// CHECK:STDOUT: inst60000128: symbolic_constant600000E0 +// CHECK:STDOUT: inst60000129: symbolic_constant600000E1 +// CHECK:STDOUT: inst6000012A: concrete_constant(inst6000012A) +// CHECK:STDOUT: inst6000012B: concrete_constant(inst6000012B) +// CHECK:STDOUT: inst6000012C: concrete_constant(inst6000012C) +// CHECK:STDOUT: inst6000012D: concrete_constant(inst6000012D) +// CHECK:STDOUT: inst6000012E: symbolic_constant600000E3 +// CHECK:STDOUT: inst6000012F: symbolic_constant600000F0 +// CHECK:STDOUT: inst60000130: symbolic_constant600000EF +// CHECK:STDOUT: inst60000131: symbolic_constant600000EE +// CHECK:STDOUT: inst60000132: symbolic_constant600000ED +// CHECK:STDOUT: inst60000133: symbolic_constant600000EC +// CHECK:STDOUT: inst60000134: symbolic_constant600000F1 +// CHECK:STDOUT: inst60000135: symbolic_constant600000F2 +// CHECK:STDOUT: inst60000136: symbolic_constant600000F3 +// CHECK:STDOUT: inst60000137: symbolic_constant600000F4 +// CHECK:STDOUT: inst60000138: symbolic_constant600000F5 +// CHECK:STDOUT: inst60000139: symbolic_constant600000F6 +// CHECK:STDOUT: inst6000013A: symbolic_constant600000F7 +// CHECK:STDOUT: inst6000013B: symbolic_constant600000F8 +// CHECK:STDOUT: inst6000013C: symbolic_constant600000F9 +// CHECK:STDOUT: inst6000013D: symbolic_constant600000FA +// CHECK:STDOUT: inst6000013E: symbolic_constant600000FB +// CHECK:STDOUT: inst6000013F: symbolic_constant600000FC +// CHECK:STDOUT: inst60000140: symbolic_constant600000FD +// CHECK:STDOUT: inst60000141: symbolic_constant600000FE +// CHECK:STDOUT: inst60000142: symbolic_constant600000FF +// CHECK:STDOUT: inst60000143: symbolic_constant60000101 +// CHECK:STDOUT: inst60000144: symbolic_constant60000102 +// CHECK:STDOUT: inst60000145: symbolic_constant60000107 +// CHECK:STDOUT: inst60000146: symbolic_constant60000115 +// CHECK:STDOUT: inst60000147: symbolic_constant60000117 +// CHECK:STDOUT: inst60000148: symbolic_constant60000118 +// CHECK:STDOUT: inst60000149: symbolic_constant60000119 +// CHECK:STDOUT: inst6000014A: symbolic_constant6000011A +// CHECK:STDOUT: inst6000014B: symbolic_constant6000011B +// CHECK:STDOUT: inst6000014C: symbolic_constant6000011C +// CHECK:STDOUT: inst6000014D: symbolic_constant6000011D +// CHECK:STDOUT: inst6000014E: symbolic_constant6000011E +// CHECK:STDOUT: inst6000014F: symbolic_constant6000011F +// CHECK:STDOUT: inst60000150: symbolic_constant60000120 +// CHECK:STDOUT: inst60000151: symbolic_constant60000121 +// CHECK:STDOUT: inst60000152: symbolic_constant60000122 +// CHECK:STDOUT: inst60000153: symbolic_constant60000123 +// CHECK:STDOUT: inst60000154: symbolic_constant60000124 +// CHECK:STDOUT: inst60000155: symbolic_constant60000125 +// CHECK:STDOUT: inst60000156: symbolic_constant60000126 +// CHECK:STDOUT: inst60000157: symbolic_constant60000127 +// CHECK:STDOUT: inst60000158: symbolic_constant60000128 +// CHECK:STDOUT: inst60000159: symbolic_constant60000129 +// CHECK:STDOUT: inst6000015A: concrete_constant(inst6000015A) +// CHECK:STDOUT: inst6000015B: concrete_constant(inst6000015B) +// CHECK:STDOUT: inst6000015C: concrete_constant(inst6000015C) +// CHECK:STDOUT: inst6000015D: symbolic_constant600000D9 +// CHECK:STDOUT: inst6000015E: concrete_constant(inst6000004E) +// CHECK:STDOUT: inst6000015F: symbolic_constant600000EE +// CHECK:STDOUT: inst60000160: symbolic_constant600000ED +// CHECK:STDOUT: inst60000161: symbolic_constant600000EC +// CHECK:STDOUT: inst60000162: symbolic_constant60000132 +// CHECK:STDOUT: inst60000163: symbolic_constant60000133 +// CHECK:STDOUT: inst60000164: symbolic_constant60000134 +// CHECK:STDOUT: inst60000165: symbolic_constant60000135 +// CHECK:STDOUT: inst60000166: symbolic_constant60000136 +// CHECK:STDOUT: inst60000167: symbolic_constant60000137 +// CHECK:STDOUT: inst60000168: symbolic_constant60000138 +// CHECK:STDOUT: inst60000169: symbolic_constant60000139 +// CHECK:STDOUT: inst6000016A: symbolic_constant6000013A +// CHECK:STDOUT: inst6000016B: symbolic_constant6000013C +// CHECK:STDOUT: inst6000016C: symbolic_constant6000013D +// CHECK:STDOUT: inst6000016D: symbolic_constant60000140 +// CHECK:STDOUT: inst6000016E: symbolic_constant6000013F +// CHECK:STDOUT: inst6000016F: symbolic_constant60000140 +// CHECK:STDOUT: inst60000170: symbolic_constant60000141 +// CHECK:STDOUT: inst60000171: symbolic_constant60000142 +// CHECK:STDOUT: inst60000172: symbolic_constant60000143 +// CHECK:STDOUT: inst60000173: symbolic_constant60000144 +// CHECK:STDOUT: inst60000174: symbolic_constant60000145 +// CHECK:STDOUT: inst60000175: symbolic_constant60000146 +// CHECK:STDOUT: inst60000176: symbolic_constant6000014B +// CHECK:STDOUT: inst60000177: symbolic_constant60000147 +// CHECK:STDOUT: inst60000178: symbolic_constant60000148 +// CHECK:STDOUT: inst60000179: symbolic_constant60000149 +// CHECK:STDOUT: inst6000017A: symbolic_constant6000014A +// CHECK:STDOUT: inst6000017B: symbolic_constant6000014B +// CHECK:STDOUT: inst6000017D: symbolic_constant6000014D +// CHECK:STDOUT: inst6000017E: symbolic_constant6000014C +// CHECK:STDOUT: inst6000017F: symbolic_constant6000014D +// CHECK:STDOUT: inst60000181: symbolic_constant60000010 +// CHECK:STDOUT: inst60000185: concrete_constant(inst60000027) +// CHECK:STDOUT: inst60000186: concrete_constant(inst60000027) // CHECK:STDOUT: symbolic_constants: // CHECK:STDOUT: symbolic_constant60000000: {inst: inst60000014, kind: self, attached: null} // CHECK:STDOUT: symbolic_constant60000001: {inst: inst60000016, kind: checked, attached: null} @@ -1157,290 +1224,320 @@ fn Foo[T:! type](p: T*) -> (T*, ()) { // CHECK:STDOUT: symbolic_constant60000011: {inst: inst60000042, kind: checked, attached: null} // CHECK:STDOUT: symbolic_constant60000012: {inst: inst60000044, kind: checked, attached: null} // CHECK:STDOUT: symbolic_constant60000013: {inst: inst60000044, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant60000014: {inst: inst6000004F, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000015: {inst: inst60000059, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000016: {inst: inst6000005A, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000017: {inst: inst6000005A, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000018: {inst: inst6000005F, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000019: {inst: inst6000005F, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant6000001A: {inst: inst60000059, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant6000001B: {inst: inst6000004F, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant6000001C: {inst: inst6000005F, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant6000001D: {inst: inst60000059, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant6000001E: {inst: inst6000004F, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant6000001F: {inst: inst60000059, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant60000020: {inst: inst6000005A, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000021: {inst: inst6000005F, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant60000022: {inst: inst6000006A, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000023: {inst: inst6000006B, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000024: {inst: inst6000006C, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000025: {inst: inst6000006C, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000026: {inst: inst6000006F, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000027: {inst: inst6000006F, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant60000028: {inst: inst60000071, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000029: {inst: inst60000072, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000002A: {inst: inst60000072, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant6000002B: {inst: inst60000071, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant6000002C: {inst: inst60000073, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000002D: {inst: inst60000073, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant6000002E: {inst: inst60000078, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000002F: {inst: inst60000078, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl4}} -// CHECK:STDOUT: symbolic_constant60000030: {inst: inst6000006C, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000031: {inst: inst6000006B, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant60000032: {inst: inst6000006A, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant60000033: {inst: inst6000006A, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant60000034: {inst: inst60000078, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl4}} -// CHECK:STDOUT: symbolic_constant60000035: {inst: inst6000006C, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000036: {inst: inst6000006A, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant60000037: {inst: inst6000006B, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant60000038: {inst: inst6000006C, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000039: {inst: inst60000073, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant6000003A: {inst: inst60000078, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl4}} -// CHECK:STDOUT: symbolic_constant6000003B: {inst: inst60000081, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000003C: {inst: inst60000082, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000003D: {inst: inst60000083, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000003E: {inst: inst60000084, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000003F: {inst: inst60000084, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def5}} -// CHECK:STDOUT: symbolic_constant60000040: {inst: inst60000085, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000041: {inst: inst60000086, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000042: {inst: inst60000083, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def4}} -// CHECK:STDOUT: symbolic_constant60000043: {inst: inst60000082, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def3}} -// CHECK:STDOUT: symbolic_constant60000044: {inst: inst60000081, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant60000014: {inst: inst60000050, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000015: {inst: inst60000055, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000016: {inst: inst60000056, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000017: {inst: inst60000056, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant60000018: {inst: inst60000057, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000019: {inst: inst60000055, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant6000001A: {inst: inst60000058, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000001B: {inst: inst60000058, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant6000001C: {inst: inst6000005D, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000001D: {inst: inst6000005D, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant6000001E: {inst: inst60000057, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant6000001F: {inst: inst60000050, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant60000020: {inst: inst6000005D, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant60000021: {inst: inst60000057, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant60000022: {inst: inst60000050, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant60000023: {inst: inst60000057, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant60000024: {inst: inst60000058, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant60000025: {inst: inst6000005D, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant60000026: {inst: inst60000056, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant60000027: {inst: inst60000050, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant60000028: {inst: inst60000050, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant60000029: {inst: inst60000055, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant6000002A: {inst: inst60000056, kind: checked, attached: {generic: generic60000001, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant6000002B: {inst: inst6000006F, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000002C: {inst: inst60000070, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000002D: {inst: inst60000071, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000002E: {inst: inst60000071, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant6000002F: {inst: inst60000074, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000030: {inst: inst60000074, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant60000031: {inst: inst60000076, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000032: {inst: inst60000077, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000033: {inst: inst60000077, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant60000034: {inst: inst60000076, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant60000035: {inst: inst60000078, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000036: {inst: inst60000078, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant60000037: {inst: inst6000007D, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000038: {inst: inst6000007D, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl4}} +// CHECK:STDOUT: symbolic_constant60000039: {inst: inst60000071, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant6000003A: {inst: inst60000070, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant6000003B: {inst: inst6000006F, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant6000003C: {inst: inst6000006F, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant6000003D: {inst: inst6000007D, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl4}} +// CHECK:STDOUT: symbolic_constant6000003E: {inst: inst60000071, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant6000003F: {inst: inst6000006F, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant60000040: {inst: inst60000070, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant60000041: {inst: inst60000071, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant60000042: {inst: inst60000078, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant60000043: {inst: inst6000007D, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl4}} +// CHECK:STDOUT: symbolic_constant60000044: {inst: inst60000086, kind: checked, attached: null} // CHECK:STDOUT: symbolic_constant60000045: {inst: inst60000087, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000046: {inst: inst60000087, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant60000047: {inst: inst60000088, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000048: {inst: inst60000088, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant60000049: {inst: inst60000088, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant6000004A: {inst: inst60000087, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant6000004B: {inst: inst60000081, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def2}} -// CHECK:STDOUT: symbolic_constant6000004C: {inst: inst60000082, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def3}} -// CHECK:STDOUT: symbolic_constant6000004D: {inst: inst60000083, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def4}} -// CHECK:STDOUT: symbolic_constant6000004E: {inst: inst60000084, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def5}} -// CHECK:STDOUT: symbolic_constant6000004F: {inst: inst6000006C, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000050: {inst: inst6000006B, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant60000051: {inst: inst6000006A, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant60000052: {inst: inst6000006A, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant60000053: {inst: inst6000006B, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant60000054: {inst: inst6000006C, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000055: {inst: inst6000006F, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant60000056: {inst: inst60000072, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant60000057: {inst: inst60000071, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant60000058: {inst: inst60000072, kind: checked, attached: {generic: generic60000002, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant60000059: {inst: inst6000001C, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant6000005A: {inst: inst600000AE, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000005B: {inst: inst600000AE, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant6000005C: {inst: inst6000001C, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant6000005D: {inst: inst60000016, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant6000005E: {inst: inst60000016, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant6000005F: {inst: inst60000016, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant60000060: {inst: inst6000001C, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant60000061: {inst: inst600000AE, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000062: {inst: inst60000040, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def2}} -// CHECK:STDOUT: symbolic_constant60000063: {inst: inst600000B7, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000064: {inst: inst600000B8, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000065: {inst: inst600000B8, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant60000066: {inst: inst600000B7, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant60000067: {inst: inst6000001F, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000068: {inst: inst600000BD, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000069: {inst: inst600000BD, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant6000006A: {inst: inst6000001C, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant60000046: {inst: inst60000088, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000047: {inst: inst60000089, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000048: {inst: inst6000008A, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000049: {inst: inst6000008B, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000004A: {inst: inst6000008B, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def6}} +// CHECK:STDOUT: symbolic_constant6000004B: {inst: inst6000008C, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000004C: {inst: inst6000008D, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000004D: {inst: inst6000008A, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def5}} +// CHECK:STDOUT: symbolic_constant6000004E: {inst: inst60000089, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def4}} +// CHECK:STDOUT: symbolic_constant6000004F: {inst: inst60000087, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def3}} +// CHECK:STDOUT: symbolic_constant60000050: {inst: inst60000086, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant60000051: {inst: inst6000008E, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000052: {inst: inst6000008E, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant60000053: {inst: inst6000008F, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000054: {inst: inst6000008F, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant60000055: {inst: inst6000008F, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant60000056: {inst: inst6000008E, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant60000057: {inst: inst60000086, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant60000058: {inst: inst60000087, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def3}} +// CHECK:STDOUT: symbolic_constant60000059: {inst: inst60000089, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def4}} +// CHECK:STDOUT: symbolic_constant6000005A: {inst: inst6000008A, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def5}} +// CHECK:STDOUT: symbolic_constant6000005B: {inst: inst6000008B, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def6}} +// CHECK:STDOUT: symbolic_constant6000005C: {inst: inst60000071, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant6000005D: {inst: inst60000070, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant6000005E: {inst: inst6000006F, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant6000005F: {inst: inst6000006F, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant60000060: {inst: inst60000070, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant60000061: {inst: inst60000071, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant60000062: {inst: inst60000074, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant60000063: {inst: inst60000077, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant60000064: {inst: inst60000076, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant60000065: {inst: inst60000077, kind: checked, attached: {generic: generic60000003, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant60000066: {inst: inst6000001C, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant60000067: {inst: inst600000B6, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000068: {inst: inst600000B6, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant60000069: {inst: inst6000001C, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant6000006A: {inst: inst60000016, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl0}} // CHECK:STDOUT: symbolic_constant6000006B: {inst: inst60000016, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant6000006C: {inst: inst600000BD, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant6000006C: {inst: inst60000016, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl0}} // CHECK:STDOUT: symbolic_constant6000006D: {inst: inst6000001C, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant6000006E: {inst: inst60000016, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant6000006F: {inst: inst6000001C, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant60000070: {inst: inst6000001F, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000071: {inst: inst600000BD, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant60000072: {inst: inst600000B8, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant60000073: {inst: inst600000B7, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant60000074: {inst: inst600000B8, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant60000075: {inst: inst60000040, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_def2}} -// CHECK:STDOUT: symbolic_constant60000076: {inst: inst600000D2, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000077: {inst: inst600000D3, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000078: {inst: inst600000D4, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000079: {inst: inst600000D4, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl5}} -// CHECK:STDOUT: symbolic_constant6000007A: {inst: inst600000D7, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000007B: {inst: inst600000D7, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl6}} -// CHECK:STDOUT: symbolic_constant6000007C: {inst: inst600000D9, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000007D: {inst: inst600000DA, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000007E: {inst: inst600000DA, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant6000007F: {inst: inst600000D9, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant60000080: {inst: inst600000DC, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000081: {inst: inst600000DD, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000082: {inst: inst600000DD, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl5}} -// CHECK:STDOUT: symbolic_constant60000083: {inst: inst600000E2, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000084: {inst: inst600000E2, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl6}} -// CHECK:STDOUT: symbolic_constant60000085: {inst: inst600000D4, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl4}} -// CHECK:STDOUT: symbolic_constant60000086: {inst: inst600000D3, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant60000087: {inst: inst600000D2, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000088: {inst: inst6000006B, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant60000089: {inst: inst6000006A, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant6000008A: {inst: inst600000D2, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant6000008B: {inst: inst6000006A, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant6000008C: {inst: inst600000E2, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl6}} -// CHECK:STDOUT: symbolic_constant6000008D: {inst: inst600000D4, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl4}} -// CHECK:STDOUT: symbolic_constant6000008E: {inst: inst6000006A, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant6000008F: {inst: inst6000006B, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant60000090: {inst: inst600000D2, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000091: {inst: inst600000D3, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant60000092: {inst: inst600000D4, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl4}} -// CHECK:STDOUT: symbolic_constant60000093: {inst: inst600000DD, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl5}} -// CHECK:STDOUT: symbolic_constant60000094: {inst: inst600000E2, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl6}} -// CHECK:STDOUT: symbolic_constant60000095: {inst: inst600000EE, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000096: {inst: inst600000EF, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000097: {inst: inst600000F0, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000098: {inst: inst600000F1, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000099: {inst: inst600000F1, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def10}} -// CHECK:STDOUT: symbolic_constant6000009A: {inst: inst600000F2, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000009B: {inst: inst600000F3, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000009C: {inst: inst600000F0, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def9}} -// CHECK:STDOUT: symbolic_constant6000009D: {inst: inst600000EF, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def8}} -// CHECK:STDOUT: symbolic_constant6000009E: {inst: inst600000EE, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def7}} -// CHECK:STDOUT: symbolic_constant6000009F: {inst: inst600000F4, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000A0: {inst: inst600000F4, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def6}} -// CHECK:STDOUT: symbolic_constant600000A1: {inst: inst60000084, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def5}} -// CHECK:STDOUT: symbolic_constant600000A2: {inst: inst60000083, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def4}} -// CHECK:STDOUT: symbolic_constant600000A3: {inst: inst60000082, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def3}} -// CHECK:STDOUT: symbolic_constant600000A4: {inst: inst60000081, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def2}} -// CHECK:STDOUT: symbolic_constant600000A5: {inst: inst60000087, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant600000A6: {inst: inst600000F5, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000A7: {inst: inst600000F5, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant600000A8: {inst: inst600000F5, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant600000A9: {inst: inst60000087, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant600000AA: {inst: inst60000081, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def2}} -// CHECK:STDOUT: symbolic_constant600000AB: {inst: inst60000082, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def3}} -// CHECK:STDOUT: symbolic_constant600000AC: {inst: inst60000083, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def4}} -// CHECK:STDOUT: symbolic_constant600000AD: {inst: inst60000084, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def5}} -// CHECK:STDOUT: symbolic_constant600000AE: {inst: inst600000F4, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def6}} -// CHECK:STDOUT: symbolic_constant600000AF: {inst: inst600000EE, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def7}} -// CHECK:STDOUT: symbolic_constant600000B0: {inst: inst600000EF, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def8}} -// CHECK:STDOUT: symbolic_constant600000B1: {inst: inst600000F0, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def9}} -// CHECK:STDOUT: symbolic_constant600000B2: {inst: inst600000F1, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def10}} -// CHECK:STDOUT: symbolic_constant600000B3: {inst: inst600000D4, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl5}} -// CHECK:STDOUT: symbolic_constant600000B4: {inst: inst600000D3, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl4}} -// CHECK:STDOUT: symbolic_constant600000B5: {inst: inst6000006B, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant600000B6: {inst: inst600000DC, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant600000B7: {inst: inst600000D2, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant600000B8: {inst: inst6000006A, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant600000B9: {inst: inst6000006A, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant600000BA: {inst: inst600000D2, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant600000BB: {inst: inst600000DC, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant600000BC: {inst: inst6000006B, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant600000BD: {inst: inst600000D3, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl4}} -// CHECK:STDOUT: symbolic_constant600000BE: {inst: inst600000D4, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl5}} -// CHECK:STDOUT: symbolic_constant600000BF: {inst: inst600000D7, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl6}} -// CHECK:STDOUT: symbolic_constant600000C0: {inst: inst600000DA, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant600000C1: {inst: inst600000D9, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant600000C2: {inst: inst600000DA, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant600000C3: {inst: inst60000112, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000C4: {inst: inst60000113, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000C5: {inst: inst60000114, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000C6: {inst: inst60000114, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl7}} -// CHECK:STDOUT: symbolic_constant600000C7: {inst: inst60000117, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000C8: {inst: inst60000117, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl8}} -// CHECK:STDOUT: symbolic_constant600000C9: {inst: inst60000119, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000CA: {inst: inst6000011A, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000CB: {inst: inst6000011A, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant600000CC: {inst: inst60000119, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant600000CD: {inst: inst6000011C, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000CE: {inst: inst6000011D, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000CF: {inst: inst6000011D, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl7}} -// CHECK:STDOUT: symbolic_constant600000D0: {inst: inst60000122, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000D1: {inst: inst60000122, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl8}} -// CHECK:STDOUT: symbolic_constant600000D2: {inst: inst60000114, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl6}} -// CHECK:STDOUT: symbolic_constant600000D3: {inst: inst60000113, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl5}} -// CHECK:STDOUT: symbolic_constant600000D4: {inst: inst60000112, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl4}} -// CHECK:STDOUT: symbolic_constant600000D5: {inst: inst600000D3, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant600000D6: {inst: inst600000D2, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant600000D7: {inst: inst6000006B, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant600000D8: {inst: inst6000006A, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant600000D9: {inst: inst60000112, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant600000DA: {inst: inst600000D2, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant600000DB: {inst: inst6000006A, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant600000DC: {inst: inst60000122, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl8}} -// CHECK:STDOUT: symbolic_constant600000DD: {inst: inst60000114, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl6}} -// CHECK:STDOUT: symbolic_constant600000DE: {inst: inst6000006A, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant600000DF: {inst: inst6000006B, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant600000E0: {inst: inst600000D2, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant600000E1: {inst: inst600000D3, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant600000E2: {inst: inst60000112, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl4}} -// CHECK:STDOUT: symbolic_constant600000E3: {inst: inst60000113, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl5}} -// CHECK:STDOUT: symbolic_constant600000E4: {inst: inst60000114, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl6}} -// CHECK:STDOUT: symbolic_constant600000E5: {inst: inst6000011D, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl7}} -// CHECK:STDOUT: symbolic_constant600000E6: {inst: inst60000122, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl8}} -// CHECK:STDOUT: symbolic_constant600000E7: {inst: inst60000131, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000E8: {inst: inst60000132, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000E9: {inst: inst60000133, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000EA: {inst: inst60000134, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000EB: {inst: inst60000134, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def15}} -// CHECK:STDOUT: symbolic_constant600000EC: {inst: inst60000135, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000ED: {inst: inst60000136, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000EE: {inst: inst60000133, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def14}} -// CHECK:STDOUT: symbolic_constant600000EF: {inst: inst60000132, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def13}} -// CHECK:STDOUT: symbolic_constant600000F0: {inst: inst60000131, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def12}} -// CHECK:STDOUT: symbolic_constant600000F1: {inst: inst60000137, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000F2: {inst: inst60000137, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def11}} -// CHECK:STDOUT: symbolic_constant600000F3: {inst: inst600000F1, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def10}} -// CHECK:STDOUT: symbolic_constant600000F4: {inst: inst600000F0, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def9}} -// CHECK:STDOUT: symbolic_constant600000F5: {inst: inst600000EF, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def8}} -// CHECK:STDOUT: symbolic_constant600000F6: {inst: inst600000EE, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def7}} -// CHECK:STDOUT: symbolic_constant600000F7: {inst: inst600000F4, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def6}} -// CHECK:STDOUT: symbolic_constant600000F8: {inst: inst60000084, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def5}} -// CHECK:STDOUT: symbolic_constant600000F9: {inst: inst60000083, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def4}} -// CHECK:STDOUT: symbolic_constant600000FA: {inst: inst60000082, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def3}} -// CHECK:STDOUT: symbolic_constant600000FB: {inst: inst60000081, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def2}} -// CHECK:STDOUT: symbolic_constant600000FC: {inst: inst60000087, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant600000FD: {inst: inst60000138, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant600000FE: {inst: inst60000138, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant600000FF: {inst: inst60000138, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant60000100: {inst: inst60000087, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant60000101: {inst: inst60000081, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def2}} -// CHECK:STDOUT: symbolic_constant60000102: {inst: inst60000082, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def3}} -// CHECK:STDOUT: symbolic_constant60000103: {inst: inst60000083, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def4}} -// CHECK:STDOUT: symbolic_constant60000104: {inst: inst60000084, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def5}} -// CHECK:STDOUT: symbolic_constant60000105: {inst: inst600000F4, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def6}} -// CHECK:STDOUT: symbolic_constant60000106: {inst: inst600000EE, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def7}} -// CHECK:STDOUT: symbolic_constant60000107: {inst: inst600000EF, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def8}} -// CHECK:STDOUT: symbolic_constant60000108: {inst: inst600000F0, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def9}} -// CHECK:STDOUT: symbolic_constant60000109: {inst: inst600000F1, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def10}} -// CHECK:STDOUT: symbolic_constant6000010A: {inst: inst60000137, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def11}} -// CHECK:STDOUT: symbolic_constant6000010B: {inst: inst60000131, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def12}} -// CHECK:STDOUT: symbolic_constant6000010C: {inst: inst60000132, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def13}} -// CHECK:STDOUT: symbolic_constant6000010D: {inst: inst60000133, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def14}} -// CHECK:STDOUT: symbolic_constant6000010E: {inst: inst60000134, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def15}} -// CHECK:STDOUT: symbolic_constant6000010F: {inst: inst60000114, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl7}} -// CHECK:STDOUT: symbolic_constant60000110: {inst: inst60000113, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl6}} -// CHECK:STDOUT: symbolic_constant60000111: {inst: inst600000D3, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl5}} -// CHECK:STDOUT: symbolic_constant60000112: {inst: inst6000006B, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl4}} -// CHECK:STDOUT: symbolic_constant60000113: {inst: inst6000011C, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant60000114: {inst: inst60000112, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000115: {inst: inst600000D2, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant60000116: {inst: inst6000006A, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant60000117: {inst: inst6000006A, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl0}} -// CHECK:STDOUT: symbolic_constant60000118: {inst: inst600000D2, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl1}} -// CHECK:STDOUT: symbolic_constant60000119: {inst: inst60000112, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant6000011A: {inst: inst6000011C, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl3}} -// CHECK:STDOUT: symbolic_constant6000011B: {inst: inst6000006B, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl4}} -// CHECK:STDOUT: symbolic_constant6000011C: {inst: inst600000D3, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl5}} -// CHECK:STDOUT: symbolic_constant6000011D: {inst: inst60000113, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl6}} -// CHECK:STDOUT: symbolic_constant6000011E: {inst: inst60000114, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl7}} -// CHECK:STDOUT: symbolic_constant6000011F: {inst: inst60000117, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl8}} -// CHECK:STDOUT: symbolic_constant60000120: {inst: inst6000011A, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant60000121: {inst: inst60000119, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def0}} -// CHECK:STDOUT: symbolic_constant60000122: {inst: inst6000011A, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def1}} -// CHECK:STDOUT: symbolic_constant60000123: {inst: inst600000AE, kind: checked, attached: {generic: generic60000004, index: generic_inst_in_decl2}} -// CHECK:STDOUT: symbolic_constant60000124: {inst: inst6000015D, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000125: {inst: inst6000015D, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def2}} -// CHECK:STDOUT: symbolic_constant60000126: {inst: inst6000015F, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000127: {inst: inst6000015F, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def3}} -// CHECK:STDOUT: symbolic_constant60000128: {inst: inst60000161, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant60000129: {inst: inst60000162, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000012A: {inst: inst60000164, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000012B: {inst: inst60000161, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def4}} -// CHECK:STDOUT: symbolic_constant6000012C: {inst: inst60000162, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def5}} -// CHECK:STDOUT: symbolic_constant6000012D: {inst: inst60000164, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def6}} -// CHECK:STDOUT: symbolic_constant6000012E: {inst: inst6000016A, kind: checked, attached: null} -// CHECK:STDOUT: symbolic_constant6000012F: {inst: inst6000016A, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def7}} +// CHECK:STDOUT: symbolic_constant6000006E: {inst: inst600000B6, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant6000006F: {inst: inst60000040, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant60000070: {inst: inst600000BF, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000071: {inst: inst600000C0, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000072: {inst: inst600000C0, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant60000073: {inst: inst600000BF, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant60000074: {inst: inst6000001F, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant60000075: {inst: inst600000C5, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000076: {inst: inst600000C5, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant60000077: {inst: inst6000001C, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant60000078: {inst: inst60000016, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant60000079: {inst: inst600000C5, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant6000007A: {inst: inst6000001C, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant6000007B: {inst: inst60000016, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant6000007C: {inst: inst6000001C, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant6000007D: {inst: inst6000001F, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant6000007E: {inst: inst600000C5, kind: checked, attached: {generic: generic60000006, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant6000007F: {inst: inst600000C0, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant60000080: {inst: inst600000BF, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant60000081: {inst: inst600000C0, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant60000082: {inst: inst60000040, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant60000083: {inst: inst600000DA, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000084: {inst: inst600000DB, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000085: {inst: inst600000DC, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000086: {inst: inst600000DC, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl5}} +// CHECK:STDOUT: symbolic_constant60000087: {inst: inst600000DF, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000088: {inst: inst600000DF, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl6}} +// CHECK:STDOUT: symbolic_constant60000089: {inst: inst600000E1, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000008A: {inst: inst600000E2, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000008B: {inst: inst600000E2, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant6000008C: {inst: inst600000E1, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant6000008D: {inst: inst600000E4, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000008E: {inst: inst600000E5, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000008F: {inst: inst600000E5, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl5}} +// CHECK:STDOUT: symbolic_constant60000090: {inst: inst600000EA, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000091: {inst: inst600000EA, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl6}} +// CHECK:STDOUT: symbolic_constant60000092: {inst: inst600000DC, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl4}} +// CHECK:STDOUT: symbolic_constant60000093: {inst: inst600000DB, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant60000094: {inst: inst600000DA, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant60000095: {inst: inst60000070, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant60000096: {inst: inst6000006F, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant60000097: {inst: inst600000DA, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant60000098: {inst: inst6000006F, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant60000099: {inst: inst600000EA, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl6}} +// CHECK:STDOUT: symbolic_constant6000009A: {inst: inst600000DC, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl4}} +// CHECK:STDOUT: symbolic_constant6000009B: {inst: inst6000006F, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant6000009C: {inst: inst60000070, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant6000009D: {inst: inst600000DA, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant6000009E: {inst: inst600000DB, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant6000009F: {inst: inst600000DC, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl4}} +// CHECK:STDOUT: symbolic_constant600000A0: {inst: inst600000E5, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl5}} +// CHECK:STDOUT: symbolic_constant600000A1: {inst: inst600000EA, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_decl6}} +// CHECK:STDOUT: symbolic_constant600000A2: {inst: inst600000F6, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000A3: {inst: inst600000F7, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000A4: {inst: inst600000F8, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000A5: {inst: inst600000F9, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000A6: {inst: inst600000FA, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000A7: {inst: inst600000FB, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000A8: {inst: inst600000FB, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def12}} +// CHECK:STDOUT: symbolic_constant600000A9: {inst: inst600000FC, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000AA: {inst: inst600000FD, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000AB: {inst: inst600000FA, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def11}} +// CHECK:STDOUT: symbolic_constant600000AC: {inst: inst600000F9, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def10}} +// CHECK:STDOUT: symbolic_constant600000AD: {inst: inst600000F7, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def9}} +// CHECK:STDOUT: symbolic_constant600000AE: {inst: inst600000F6, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def8}} +// CHECK:STDOUT: symbolic_constant600000AF: {inst: inst600000FE, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000B0: {inst: inst600000FE, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def7}} +// CHECK:STDOUT: symbolic_constant600000B1: {inst: inst6000008B, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def6}} +// CHECK:STDOUT: symbolic_constant600000B2: {inst: inst6000008A, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def5}} +// CHECK:STDOUT: symbolic_constant600000B3: {inst: inst60000089, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def4}} +// CHECK:STDOUT: symbolic_constant600000B4: {inst: inst60000087, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def3}} +// CHECK:STDOUT: symbolic_constant600000B5: {inst: inst60000086, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant600000B6: {inst: inst6000008E, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant600000B7: {inst: inst600000FF, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000B8: {inst: inst600000FF, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant600000B9: {inst: inst600000FF, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant600000BA: {inst: inst6000008E, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant600000BB: {inst: inst60000086, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant600000BC: {inst: inst60000087, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def3}} +// CHECK:STDOUT: symbolic_constant600000BD: {inst: inst60000089, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def4}} +// CHECK:STDOUT: symbolic_constant600000BE: {inst: inst6000008A, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def5}} +// CHECK:STDOUT: symbolic_constant600000BF: {inst: inst6000008B, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def6}} +// CHECK:STDOUT: symbolic_constant600000C0: {inst: inst600000FE, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def7}} +// CHECK:STDOUT: symbolic_constant600000C1: {inst: inst600000F6, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def8}} +// CHECK:STDOUT: symbolic_constant600000C2: {inst: inst600000F7, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def9}} +// CHECK:STDOUT: symbolic_constant600000C3: {inst: inst600000F9, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def10}} +// CHECK:STDOUT: symbolic_constant600000C4: {inst: inst600000FA, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def11}} +// CHECK:STDOUT: symbolic_constant600000C5: {inst: inst600000FB, kind: checked, attached: {generic: generic60000008, index: generic_inst_in_def12}} +// CHECK:STDOUT: symbolic_constant600000C6: {inst: inst600000DC, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl5}} +// CHECK:STDOUT: symbolic_constant600000C7: {inst: inst600000DB, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl4}} +// CHECK:STDOUT: symbolic_constant600000C8: {inst: inst60000070, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant600000C9: {inst: inst600000E4, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant600000CA: {inst: inst600000DA, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant600000CB: {inst: inst6000006F, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant600000CC: {inst: inst6000006F, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant600000CD: {inst: inst600000DA, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant600000CE: {inst: inst600000E4, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant600000CF: {inst: inst60000070, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant600000D0: {inst: inst600000DB, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl4}} +// CHECK:STDOUT: symbolic_constant600000D1: {inst: inst600000DC, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl5}} +// CHECK:STDOUT: symbolic_constant600000D2: {inst: inst600000DF, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_decl6}} +// CHECK:STDOUT: symbolic_constant600000D3: {inst: inst600000E2, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant600000D4: {inst: inst600000E1, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant600000D5: {inst: inst600000E2, kind: checked, attached: {generic: generic60000007, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant600000D6: {inst: inst6000011E, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000D7: {inst: inst6000011F, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000D8: {inst: inst60000120, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000D9: {inst: inst60000120, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl7}} +// CHECK:STDOUT: symbolic_constant600000DA: {inst: inst60000123, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000DB: {inst: inst60000123, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl8}} +// CHECK:STDOUT: symbolic_constant600000DC: {inst: inst60000125, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000DD: {inst: inst60000126, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000DE: {inst: inst60000126, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant600000DF: {inst: inst60000125, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant600000E0: {inst: inst60000128, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000E1: {inst: inst60000129, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000E2: {inst: inst60000129, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl7}} +// CHECK:STDOUT: symbolic_constant600000E3: {inst: inst6000012E, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000E4: {inst: inst6000012E, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl8}} +// CHECK:STDOUT: symbolic_constant600000E5: {inst: inst60000120, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl6}} +// CHECK:STDOUT: symbolic_constant600000E6: {inst: inst6000011F, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl5}} +// CHECK:STDOUT: symbolic_constant600000E7: {inst: inst6000011E, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl4}} +// CHECK:STDOUT: symbolic_constant600000E8: {inst: inst600000DB, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant600000E9: {inst: inst600000DA, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant600000EA: {inst: inst60000070, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant600000EB: {inst: inst6000006F, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant600000EC: {inst: inst6000011E, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant600000ED: {inst: inst600000DA, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant600000EE: {inst: inst6000006F, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant600000EF: {inst: inst6000012E, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl8}} +// CHECK:STDOUT: symbolic_constant600000F0: {inst: inst60000120, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl6}} +// CHECK:STDOUT: symbolic_constant600000F1: {inst: inst6000006F, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant600000F2: {inst: inst60000070, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant600000F3: {inst: inst600000DA, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant600000F4: {inst: inst600000DB, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant600000F5: {inst: inst6000011E, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl4}} +// CHECK:STDOUT: symbolic_constant600000F6: {inst: inst6000011F, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl5}} +// CHECK:STDOUT: symbolic_constant600000F7: {inst: inst60000120, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl6}} +// CHECK:STDOUT: symbolic_constant600000F8: {inst: inst60000129, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl7}} +// CHECK:STDOUT: symbolic_constant600000F9: {inst: inst6000012E, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_decl8}} +// CHECK:STDOUT: symbolic_constant600000FA: {inst: inst6000013D, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000FB: {inst: inst6000013E, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000FC: {inst: inst6000013F, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000FD: {inst: inst60000140, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000FE: {inst: inst60000141, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant600000FF: {inst: inst60000142, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000100: {inst: inst60000142, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def18}} +// CHECK:STDOUT: symbolic_constant60000101: {inst: inst60000143, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000102: {inst: inst60000144, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000103: {inst: inst60000141, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def17}} +// CHECK:STDOUT: symbolic_constant60000104: {inst: inst60000140, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def16}} +// CHECK:STDOUT: symbolic_constant60000105: {inst: inst6000013E, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def15}} +// CHECK:STDOUT: symbolic_constant60000106: {inst: inst6000013D, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def14}} +// CHECK:STDOUT: symbolic_constant60000107: {inst: inst60000145, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000108: {inst: inst60000145, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def13}} +// CHECK:STDOUT: symbolic_constant60000109: {inst: inst600000FB, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def12}} +// CHECK:STDOUT: symbolic_constant6000010A: {inst: inst600000FA, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def11}} +// CHECK:STDOUT: symbolic_constant6000010B: {inst: inst600000F9, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def10}} +// CHECK:STDOUT: symbolic_constant6000010C: {inst: inst600000F7, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def9}} +// CHECK:STDOUT: symbolic_constant6000010D: {inst: inst600000F6, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def8}} +// CHECK:STDOUT: symbolic_constant6000010E: {inst: inst600000FE, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def7}} +// CHECK:STDOUT: symbolic_constant6000010F: {inst: inst6000008B, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def6}} +// CHECK:STDOUT: symbolic_constant60000110: {inst: inst6000008A, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def5}} +// CHECK:STDOUT: symbolic_constant60000111: {inst: inst60000089, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def4}} +// CHECK:STDOUT: symbolic_constant60000112: {inst: inst60000087, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def3}} +// CHECK:STDOUT: symbolic_constant60000113: {inst: inst60000086, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant60000114: {inst: inst6000008E, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant60000115: {inst: inst60000146, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000116: {inst: inst60000146, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant60000117: {inst: inst60000146, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant60000118: {inst: inst6000008E, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant60000119: {inst: inst60000086, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant6000011A: {inst: inst60000087, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def3}} +// CHECK:STDOUT: symbolic_constant6000011B: {inst: inst60000089, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def4}} +// CHECK:STDOUT: symbolic_constant6000011C: {inst: inst6000008A, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def5}} +// CHECK:STDOUT: symbolic_constant6000011D: {inst: inst6000008B, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def6}} +// CHECK:STDOUT: symbolic_constant6000011E: {inst: inst600000FE, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def7}} +// CHECK:STDOUT: symbolic_constant6000011F: {inst: inst600000F6, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def8}} +// CHECK:STDOUT: symbolic_constant60000120: {inst: inst600000F7, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def9}} +// CHECK:STDOUT: symbolic_constant60000121: {inst: inst600000F9, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def10}} +// CHECK:STDOUT: symbolic_constant60000122: {inst: inst600000FA, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def11}} +// CHECK:STDOUT: symbolic_constant60000123: {inst: inst600000FB, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def12}} +// CHECK:STDOUT: symbolic_constant60000124: {inst: inst60000145, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def13}} +// CHECK:STDOUT: symbolic_constant60000125: {inst: inst6000013D, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def14}} +// CHECK:STDOUT: symbolic_constant60000126: {inst: inst6000013E, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def15}} +// CHECK:STDOUT: symbolic_constant60000127: {inst: inst60000140, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def16}} +// CHECK:STDOUT: symbolic_constant60000128: {inst: inst60000141, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def17}} +// CHECK:STDOUT: symbolic_constant60000129: {inst: inst60000142, kind: checked, attached: {generic: generic6000000A, index: generic_inst_in_def18}} +// CHECK:STDOUT: symbolic_constant6000012A: {inst: inst60000120, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl7}} +// CHECK:STDOUT: symbolic_constant6000012B: {inst: inst6000011F, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl6}} +// CHECK:STDOUT: symbolic_constant6000012C: {inst: inst600000DB, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl5}} +// CHECK:STDOUT: symbolic_constant6000012D: {inst: inst60000070, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl4}} +// CHECK:STDOUT: symbolic_constant6000012E: {inst: inst60000128, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant6000012F: {inst: inst6000011E, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant60000130: {inst: inst600000DA, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant60000131: {inst: inst6000006F, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant60000132: {inst: inst6000006F, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl0}} +// CHECK:STDOUT: symbolic_constant60000133: {inst: inst600000DA, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl1}} +// CHECK:STDOUT: symbolic_constant60000134: {inst: inst6000011E, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant60000135: {inst: inst60000128, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl3}} +// CHECK:STDOUT: symbolic_constant60000136: {inst: inst60000070, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl4}} +// CHECK:STDOUT: symbolic_constant60000137: {inst: inst600000DB, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl5}} +// CHECK:STDOUT: symbolic_constant60000138: {inst: inst6000011F, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl6}} +// CHECK:STDOUT: symbolic_constant60000139: {inst: inst60000120, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl7}} +// CHECK:STDOUT: symbolic_constant6000013A: {inst: inst60000123, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_decl8}} +// CHECK:STDOUT: symbolic_constant6000013B: {inst: inst60000126, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant6000013C: {inst: inst60000125, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def0}} +// CHECK:STDOUT: symbolic_constant6000013D: {inst: inst60000126, kind: checked, attached: {generic: generic60000009, index: generic_inst_in_def1}} +// CHECK:STDOUT: symbolic_constant6000013E: {inst: inst600000B6, kind: checked, attached: {generic: generic60000005, index: generic_inst_in_decl2}} +// CHECK:STDOUT: symbolic_constant6000013F: {inst: inst6000016E, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000140: {inst: inst6000016E, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def2}} +// CHECK:STDOUT: symbolic_constant60000141: {inst: inst60000170, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000142: {inst: inst60000170, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def3}} +// CHECK:STDOUT: symbolic_constant60000143: {inst: inst60000172, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000144: {inst: inst60000173, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000145: {inst: inst60000174, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000146: {inst: inst60000175, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000147: {inst: inst60000177, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant60000148: {inst: inst60000172, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def4}} +// CHECK:STDOUT: symbolic_constant60000149: {inst: inst60000173, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def5}} +// CHECK:STDOUT: symbolic_constant6000014A: {inst: inst60000175, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def6}} +// CHECK:STDOUT: symbolic_constant6000014B: {inst: inst60000177, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def7}} +// CHECK:STDOUT: symbolic_constant6000014C: {inst: inst6000017E, kind: checked, attached: null} +// CHECK:STDOUT: symbolic_constant6000014D: {inst: inst6000017E, kind: checked, attached: {generic: generic60000000, index: generic_inst_in_def8}} // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: inst_block_empty: {} // CHECK:STDOUT: exports: @@ -1449,115 +1546,117 @@ fn Foo[T:! type](p: T*) -> (T*, ()) { // CHECK:STDOUT: 0: inst60000011 // CHECK:STDOUT: 1: inst6000004C // CHECK:STDOUT: 2: inst6000004D -// CHECK:STDOUT: 3: inst60000050 +// CHECK:STDOUT: 3: inst6000004F // CHECK:STDOUT: 4: inst60000051 // CHECK:STDOUT: 5: inst60000052 -// CHECK:STDOUT: 6: inst60000054 -// CHECK:STDOUT: 7: inst60000056 -// CHECK:STDOUT: 8: inst6000005B -// CHECK:STDOUT: 9: inst6000005C -// CHECK:STDOUT: 10: inst6000005D -// CHECK:STDOUT: 11: inst6000005E -// CHECK:STDOUT: 12: inst60000060 -// CHECK:STDOUT: 13: inst60000061 -// CHECK:STDOUT: 14: inst60000062 +// CHECK:STDOUT: 6: inst60000053 +// CHECK:STDOUT: 7: inst60000054 +// CHECK:STDOUT: 8: inst60000059 +// CHECK:STDOUT: 9: inst6000005A +// CHECK:STDOUT: 10: inst6000005B +// CHECK:STDOUT: 11: inst6000005C +// CHECK:STDOUT: 12: inst6000005E +// CHECK:STDOUT: 13: inst6000005F +// CHECK:STDOUT: 14: inst60000060 // CHECK:STDOUT: 15: inst60000068 -// CHECK:STDOUT: 16: inst60000069 +// CHECK:STDOUT: 16: inst6000006A // CHECK:STDOUT: 17: inst6000006D // CHECK:STDOUT: 18: inst6000006E -// CHECK:STDOUT: 19: inst60000070 -// CHECK:STDOUT: 20: inst60000074 +// CHECK:STDOUT: 19: inst60000072 +// CHECK:STDOUT: 20: inst60000073 // CHECK:STDOUT: 21: inst60000075 -// CHECK:STDOUT: 22: inst60000076 -// CHECK:STDOUT: 23: inst60000077 -// CHECK:STDOUT: 24: inst60000079 -// CHECK:STDOUT: 25: inst6000007A -// CHECK:STDOUT: 26: inst6000007B -// CHECK:STDOUT: 27: inst60000090 -// CHECK:STDOUT: 28: inst60000091 -// CHECK:STDOUT: 29: inst60000092 -// CHECK:STDOUT: 30: inst60000093 +// CHECK:STDOUT: 22: inst60000079 +// CHECK:STDOUT: 23: inst6000007A +// CHECK:STDOUT: 24: inst6000007B +// CHECK:STDOUT: 25: inst6000007C +// CHECK:STDOUT: 26: inst6000007E +// CHECK:STDOUT: 27: inst6000007F +// CHECK:STDOUT: 28: inst60000080 +// CHECK:STDOUT: 29: inst60000098 +// CHECK:STDOUT: 30: inst60000099 // CHECK:STDOUT: 31: inst6000009A // CHECK:STDOUT: 32: inst6000009B -// CHECK:STDOUT: 33: inst6000009C -// CHECK:STDOUT: 34: inst6000009D -// CHECK:STDOUT: 35: inst6000009E -// CHECK:STDOUT: 36: inst6000009F -// CHECK:STDOUT: 37: inst600000A0 -// CHECK:STDOUT: 38: inst600000A1 -// CHECK:STDOUT: 39: inst600000A2 -// CHECK:STDOUT: 40: inst600000A3 -// CHECK:STDOUT: 41: inst600000A4 -// CHECK:STDOUT: 42: inst600000A5 -// CHECK:STDOUT: 43: inst600000A6 -// CHECK:STDOUT: 44: inst600000A7 -// CHECK:STDOUT: 45: inst600000A8 -// CHECK:STDOUT: 46: inst600000A9 -// CHECK:STDOUT: 47: inst600000AA -// CHECK:STDOUT: 48: inst600000AB -// CHECK:STDOUT: 49: inst600000AC -// CHECK:STDOUT: 50: inst600000AD -// CHECK:STDOUT: 51: inst600000AF -// CHECK:STDOUT: 52: inst600000B0 -// CHECK:STDOUT: 53: inst600000B1 -// CHECK:STDOUT: 54: inst600000B2 -// CHECK:STDOUT: 55: inst600000B6 -// CHECK:STDOUT: 56: inst600000B9 -// CHECK:STDOUT: 57: inst600000BA -// CHECK:STDOUT: 58: inst600000BB -// CHECK:STDOUT: 59: inst600000BC -// CHECK:STDOUT: 60: inst600000BE -// CHECK:STDOUT: 61: inst600000BF -// CHECK:STDOUT: 62: inst600000C0 -// CHECK:STDOUT: 63: inst600000C8 -// CHECK:STDOUT: 64: inst600000C9 -// CHECK:STDOUT: 65: inst600000CA -// CHECK:STDOUT: 66: inst600000CB -// CHECK:STDOUT: 67: inst600000CC -// CHECK:STDOUT: 68: inst600000CD -// CHECK:STDOUT: 69: inst600000CE -// CHECK:STDOUT: 70: inst600000CF -// CHECK:STDOUT: 71: inst600000D0 -// CHECK:STDOUT: 72: inst600000D1 -// CHECK:STDOUT: 73: inst600000D5 -// CHECK:STDOUT: 74: inst600000D6 -// CHECK:STDOUT: 75: inst600000D8 +// CHECK:STDOUT: 33: inst600000A2 +// CHECK:STDOUT: 34: inst600000A3 +// CHECK:STDOUT: 35: inst600000A4 +// CHECK:STDOUT: 36: inst600000A5 +// CHECK:STDOUT: 37: inst600000A6 +// CHECK:STDOUT: 38: inst600000A7 +// CHECK:STDOUT: 39: inst600000A8 +// CHECK:STDOUT: 40: inst600000A9 +// CHECK:STDOUT: 41: inst600000AA +// CHECK:STDOUT: 42: inst600000AB +// CHECK:STDOUT: 43: inst600000AC +// CHECK:STDOUT: 44: inst600000AD +// CHECK:STDOUT: 45: inst600000AE +// CHECK:STDOUT: 46: inst600000AF +// CHECK:STDOUT: 47: inst600000B0 +// CHECK:STDOUT: 48: inst600000B1 +// CHECK:STDOUT: 49: inst600000B2 +// CHECK:STDOUT: 50: inst600000B3 +// CHECK:STDOUT: 51: inst600000B4 +// CHECK:STDOUT: 52: inst600000B5 +// CHECK:STDOUT: 53: inst600000B7 +// CHECK:STDOUT: 54: inst600000B8 +// CHECK:STDOUT: 55: inst600000B9 +// CHECK:STDOUT: 56: inst600000BA +// CHECK:STDOUT: 57: inst600000BE +// CHECK:STDOUT: 58: inst600000C1 +// CHECK:STDOUT: 59: inst600000C2 +// CHECK:STDOUT: 60: inst600000C3 +// CHECK:STDOUT: 61: inst600000C4 +// CHECK:STDOUT: 62: inst600000C6 +// CHECK:STDOUT: 63: inst600000C7 +// CHECK:STDOUT: 64: inst600000C8 +// CHECK:STDOUT: 65: inst600000D0 +// CHECK:STDOUT: 66: inst600000D1 +// CHECK:STDOUT: 67: inst600000D2 +// CHECK:STDOUT: 68: inst600000D3 +// CHECK:STDOUT: 69: inst600000D4 +// CHECK:STDOUT: 70: inst600000D5 +// CHECK:STDOUT: 71: inst600000D6 +// CHECK:STDOUT: 72: inst600000D7 +// CHECK:STDOUT: 73: inst600000D8 +// CHECK:STDOUT: 74: inst600000D9 +// CHECK:STDOUT: 75: inst600000DD // CHECK:STDOUT: 76: inst600000DE -// CHECK:STDOUT: 77: inst600000DF -// CHECK:STDOUT: 78: inst600000E0 -// CHECK:STDOUT: 79: inst600000E1 -// CHECK:STDOUT: 80: inst600000E3 -// CHECK:STDOUT: 81: inst600000E4 -// CHECK:STDOUT: 82: inst600000E5 -// CHECK:STDOUT: 83: inst600000E6 -// CHECK:STDOUT: 84: inst60000101 -// CHECK:STDOUT: 85: inst60000102 -// CHECK:STDOUT: 86: inst60000103 -// CHECK:STDOUT: 87: inst60000104 -// CHECK:STDOUT: 88: inst60000105 -// CHECK:STDOUT: 89: inst60000106 -// CHECK:STDOUT: 90: inst60000110 -// CHECK:STDOUT: 91: inst60000111 -// CHECK:STDOUT: 92: inst60000115 -// CHECK:STDOUT: 93: inst60000116 -// CHECK:STDOUT: 94: inst60000118 -// CHECK:STDOUT: 95: inst6000011E -// CHECK:STDOUT: 96: inst6000011F -// CHECK:STDOUT: 97: inst60000120 -// CHECK:STDOUT: 98: inst60000121 -// CHECK:STDOUT: 99: inst60000123 -// CHECK:STDOUT: 100: inst60000124 -// CHECK:STDOUT: 101: inst60000125 -// CHECK:STDOUT: 102: inst60000126 -// CHECK:STDOUT: 103: inst60000127 -// CHECK:STDOUT: 104: inst60000149 -// CHECK:STDOUT: 105: inst6000014A -// CHECK:STDOUT: 106: inst6000014B -// CHECK:STDOUT: 107: inst6000014C -// CHECK:STDOUT: 108: inst6000014D -// CHECK:STDOUT: 109: inst6000014E -// CHECK:STDOUT: 110: inst6000014F -// CHECK:STDOUT: 111: inst60000150 +// CHECK:STDOUT: 77: inst600000E0 +// CHECK:STDOUT: 78: inst600000E6 +// CHECK:STDOUT: 79: inst600000E7 +// CHECK:STDOUT: 80: inst600000E8 +// CHECK:STDOUT: 81: inst600000E9 +// CHECK:STDOUT: 82: inst600000EB +// CHECK:STDOUT: 83: inst600000EC +// CHECK:STDOUT: 84: inst600000ED +// CHECK:STDOUT: 85: inst600000EE +// CHECK:STDOUT: 86: inst6000010D +// CHECK:STDOUT: 87: inst6000010E +// CHECK:STDOUT: 88: inst6000010F +// CHECK:STDOUT: 89: inst60000110 +// CHECK:STDOUT: 90: inst60000111 +// CHECK:STDOUT: 91: inst60000112 +// CHECK:STDOUT: 92: inst6000011C +// CHECK:STDOUT: 93: inst6000011D +// CHECK:STDOUT: 94: inst60000121 +// CHECK:STDOUT: 95: inst60000122 +// CHECK:STDOUT: 96: inst60000124 +// CHECK:STDOUT: 97: inst6000012A +// CHECK:STDOUT: 98: inst6000012B +// CHECK:STDOUT: 99: inst6000012C +// CHECK:STDOUT: 100: inst6000012D +// CHECK:STDOUT: 101: inst6000012F +// CHECK:STDOUT: 102: inst60000130 +// CHECK:STDOUT: 103: inst60000131 +// CHECK:STDOUT: 104: inst60000132 +// CHECK:STDOUT: 105: inst60000133 +// CHECK:STDOUT: 106: inst6000015A +// CHECK:STDOUT: 107: inst6000015B +// CHECK:STDOUT: 108: inst6000015C +// CHECK:STDOUT: 109: inst6000015D +// CHECK:STDOUT: 110: inst6000015E +// CHECK:STDOUT: 111: inst6000015F +// CHECK:STDOUT: 112: inst60000160 +// CHECK:STDOUT: 113: inst60000161 // CHECK:STDOUT: global_init: {} // CHECK:STDOUT: inst_block60000004: // CHECK:STDOUT: 0: inst60000013 @@ -1642,415 +1741,464 @@ fn Foo[T:! type](p: T*) -> (T*, ()) { // CHECK:STDOUT: 0: inst60000046 // CHECK:STDOUT: 1: inst60000047 // CHECK:STDOUT: 2: inst60000048 -// CHECK:STDOUT: 3: inst60000163 -// CHECK:STDOUT: 4: inst60000168 -// CHECK:STDOUT: 5: inst60000169 -// CHECK:STDOUT: 6: inst6000016C -// CHECK:STDOUT: 7: inst6000016E +// CHECK:STDOUT: 3: inst60000176 +// CHECK:STDOUT: 4: inst6000017C +// CHECK:STDOUT: 5: inst6000017D +// CHECK:STDOUT: 6: inst60000180 +// CHECK:STDOUT: 7: inst60000182 // CHECK:STDOUT: 8: inst6000004A -// CHECK:STDOUT: 9: inst6000016F -// CHECK:STDOUT: 10: inst60000170 -// CHECK:STDOUT: 11: inst60000171 -// CHECK:STDOUT: 12: inst60000172 -// CHECK:STDOUT: 13: inst60000173 -// CHECK:STDOUT: 14: inst60000174 -// CHECK:STDOUT: 15: inst60000175 +// CHECK:STDOUT: 9: inst60000183 +// CHECK:STDOUT: 10: inst60000184 +// CHECK:STDOUT: 11: inst60000185 +// CHECK:STDOUT: 12: inst60000186 +// CHECK:STDOUT: 13: inst60000187 +// CHECK:STDOUT: 14: inst60000188 +// CHECK:STDOUT: 15: inst60000189 // CHECK:STDOUT: inst_block60000019: // CHECK:STDOUT: 0: inst60000046 // CHECK:STDOUT: 1: inst60000047 // CHECK:STDOUT: inst_block6000001A: // CHECK:STDOUT: 0: inst60000052 // CHECK:STDOUT: inst_block6000001B: -// CHECK:STDOUT: 0: inst6000005E -// CHECK:STDOUT: 1: inst6000005C +// CHECK:STDOUT: 0: inst60000053 // CHECK:STDOUT: inst_block6000001C: -// CHECK:STDOUT: 0: inst6000005E +// CHECK:STDOUT: 0: inst60000050 // CHECK:STDOUT: inst_block6000001D: -// CHECK:STDOUT: 0: inst6000005C +// CHECK:STDOUT: 0: inst60000050 +// CHECK:STDOUT: 1: inst60000055 +// CHECK:STDOUT: 2: inst60000056 // CHECK:STDOUT: inst_block6000001E: -// CHECK:STDOUT: 0: inst60000062 +// CHECK:STDOUT: 0: inst6000005C +// CHECK:STDOUT: 1: inst6000005A // CHECK:STDOUT: inst_block6000001F: -// CHECK:STDOUT: 0: inst60000063 -// CHECK:STDOUT: 1: inst60000064 -// CHECK:STDOUT: 2: inst60000065 -// CHECK:STDOUT: 3: inst60000066 +// CHECK:STDOUT: 0: inst6000005C // CHECK:STDOUT: inst_block60000020: -// CHECK:STDOUT: 0: inst6000004F +// CHECK:STDOUT: 0: inst6000005A // CHECK:STDOUT: inst_block60000021: -// CHECK:STDOUT: 0: inst6000004F -// CHECK:STDOUT: 1: inst60000059 -// CHECK:STDOUT: 2: inst6000005A -// CHECK:STDOUT: 3: inst6000005F +// CHECK:STDOUT: 0: inst60000060 // CHECK:STDOUT: inst_block60000022: -// CHECK:STDOUT: 0: inst6000006D +// CHECK:STDOUT: 0: inst60000061 +// CHECK:STDOUT: 1: inst60000062 +// CHECK:STDOUT: 2: inst60000063 +// CHECK:STDOUT: 3: inst60000064 // CHECK:STDOUT: inst_block60000023: -// CHECK:STDOUT: 0: inst6000006A +// CHECK:STDOUT: 0: inst60000050 +// CHECK:STDOUT: 1: inst60000057 +// CHECK:STDOUT: 2: inst60000058 +// CHECK:STDOUT: 3: inst6000005D // CHECK:STDOUT: inst_block60000024: -// CHECK:STDOUT: 0: inst6000006A -// CHECK:STDOUT: 1: inst6000006B -// CHECK:STDOUT: 2: inst6000006C -// CHECK:STDOUT: 3: inst6000006F +// CHECK:STDOUT: 0: inst60000065 // CHECK:STDOUT: inst_block60000025: -// CHECK:STDOUT: 0: inst60000071 -// CHECK:STDOUT: 1: inst60000072 +// CHECK:STDOUT: 0: inst60000065 +// CHECK:STDOUT: 1: inst60000066 +// CHECK:STDOUT: 2: inst60000067 // CHECK:STDOUT: inst_block60000026: -// CHECK:STDOUT: 0: inst60000077 -// CHECK:STDOUT: 1: inst60000075 +// CHECK:STDOUT: 0: inst60000072 // CHECK:STDOUT: inst_block60000027: -// CHECK:STDOUT: 0: inst60000077 +// CHECK:STDOUT: 0: inst6000006F // CHECK:STDOUT: inst_block60000028: -// CHECK:STDOUT: 0: inst60000075 +// CHECK:STDOUT: 0: inst6000006F +// CHECK:STDOUT: 1: inst60000070 +// CHECK:STDOUT: 2: inst60000071 +// CHECK:STDOUT: 3: inst60000074 // CHECK:STDOUT: inst_block60000029: -// CHECK:STDOUT: 0: inst6000007B +// CHECK:STDOUT: 0: inst60000076 +// CHECK:STDOUT: 1: inst60000077 // CHECK:STDOUT: inst_block6000002A: // CHECK:STDOUT: 0: inst6000007C -// CHECK:STDOUT: 1: inst6000007D -// CHECK:STDOUT: 2: inst6000007E -// CHECK:STDOUT: 3: inst6000007F -// CHECK:STDOUT: 4: inst60000080 +// CHECK:STDOUT: 1: inst6000007A // CHECK:STDOUT: inst_block6000002B: -// CHECK:STDOUT: 0: inst6000006A -// CHECK:STDOUT: 1: inst6000006B -// CHECK:STDOUT: 2: inst60000086 -// CHECK:STDOUT: 3: inst60000085 -// CHECK:STDOUT: inst_block6000002C: // CHECK:STDOUT: 0: inst6000007C +// CHECK:STDOUT: inst_block6000002C: +// CHECK:STDOUT: 0: inst6000007A // CHECK:STDOUT: inst_block6000002D: -// CHECK:STDOUT: 0: inst60000089 -// CHECK:STDOUT: 1: inst6000008A -// CHECK:STDOUT: 2: inst6000008B -// CHECK:STDOUT: 3: inst6000008C -// CHECK:STDOUT: 4: inst6000008D -// CHECK:STDOUT: 5: inst6000008E +// CHECK:STDOUT: 0: inst60000080 // CHECK:STDOUT: inst_block6000002E: -// CHECK:STDOUT: 0: inst6000006A -// CHECK:STDOUT: 1: inst6000006B -// CHECK:STDOUT: 2: inst6000006C -// CHECK:STDOUT: 3: inst60000073 -// CHECK:STDOUT: 4: inst60000078 +// CHECK:STDOUT: 0: inst60000081 +// CHECK:STDOUT: 1: inst60000082 +// CHECK:STDOUT: 2: inst60000083 +// CHECK:STDOUT: 3: inst60000084 +// CHECK:STDOUT: 4: inst60000085 // CHECK:STDOUT: inst_block6000002F: -// CHECK:STDOUT: 0: inst60000090 +// CHECK:STDOUT: 0: inst6000006F +// CHECK:STDOUT: 1: inst60000087 +// CHECK:STDOUT: 2: inst60000088 // CHECK:STDOUT: inst_block60000030: -// CHECK:STDOUT: 0: inst60000093 +// CHECK:STDOUT: 0: inst6000006F +// CHECK:STDOUT: 1: inst60000070 +// CHECK:STDOUT: 2: inst6000008D +// CHECK:STDOUT: 3: inst6000008C // CHECK:STDOUT: inst_block60000031: -// CHECK:STDOUT: 0: inst60000094 +// CHECK:STDOUT: 0: inst60000081 // CHECK:STDOUT: inst_block60000032: -// CHECK:STDOUT: 0: inst60000094 -// CHECK:STDOUT: 1: inst60000095 -// CHECK:STDOUT: 2: inst60000096 -// CHECK:STDOUT: 3: inst60000097 +// CHECK:STDOUT: 0: inst60000081 // CHECK:STDOUT: inst_block60000033: -// CHECK:STDOUT: 0: inst60000094 +// CHECK:STDOUT: 0: inst60000090 +// CHECK:STDOUT: 1: inst60000091 +// CHECK:STDOUT: 2: inst60000092 +// CHECK:STDOUT: 3: inst60000093 +// CHECK:STDOUT: 4: inst60000094 +// CHECK:STDOUT: 5: inst60000095 +// CHECK:STDOUT: 6: inst60000096 // CHECK:STDOUT: inst_block60000034: -// CHECK:STDOUT: 0: inst60000098 -// CHECK:STDOUT: 1: inst60000099 +// CHECK:STDOUT: 0: inst6000006F +// CHECK:STDOUT: 1: inst60000070 +// CHECK:STDOUT: 2: inst60000071 +// CHECK:STDOUT: 3: inst60000078 +// CHECK:STDOUT: 4: inst6000007D // CHECK:STDOUT: inst_block60000035: -// CHECK:STDOUT: 0: inst600000AC +// CHECK:STDOUT: 0: inst60000098 // CHECK:STDOUT: inst_block60000036: +// CHECK:STDOUT: 0: inst6000009B +// CHECK:STDOUT: inst_block60000037: +// CHECK:STDOUT: 0: inst6000009C +// CHECK:STDOUT: inst_block60000038: +// CHECK:STDOUT: 0: inst6000009C +// CHECK:STDOUT: 1: inst6000009D +// CHECK:STDOUT: 2: inst6000009E +// CHECK:STDOUT: 3: inst6000009F +// CHECK:STDOUT: inst_block60000039: +// CHECK:STDOUT: 0: inst6000009C +// CHECK:STDOUT: inst_block6000003A: +// CHECK:STDOUT: 0: inst600000A0 +// CHECK:STDOUT: 1: inst600000A1 +// CHECK:STDOUT: inst_block6000003B: +// CHECK:STDOUT: 0: inst600000B4 +// CHECK:STDOUT: inst_block6000003C: // CHECK:STDOUT: 0: inst60000016 // CHECK:STDOUT: 1: inst6000001C -// CHECK:STDOUT: 2: inst600000AE -// CHECK:STDOUT: inst_block60000037: -// CHECK:STDOUT: 0: inst600000AF -// CHECK:STDOUT: inst_block60000038: -// CHECK:STDOUT: 0: inst600000B2 -// CHECK:STDOUT: inst_block60000039: -// CHECK:STDOUT: 0: inst600000B3 -// CHECK:STDOUT: inst_block6000003A: -// CHECK:STDOUT: 0: inst600000B3 -// CHECK:STDOUT: 1: inst600000B4 -// CHECK:STDOUT: 2: inst600000B5 -// CHECK:STDOUT: inst_block6000003B: -// CHECK:STDOUT: 0: inst600000BC -// CHECK:STDOUT: 1: inst600000BA -// CHECK:STDOUT: inst_block6000003C: -// CHECK:STDOUT: 0: inst600000BC +// CHECK:STDOUT: 2: inst600000B6 // CHECK:STDOUT: inst_block6000003D: -// CHECK:STDOUT: 0: inst600000BA +// CHECK:STDOUT: 0: inst600000B7 // CHECK:STDOUT: inst_block6000003E: -// CHECK:STDOUT: 0: inst600000C0 +// CHECK:STDOUT: 0: inst600000BA // CHECK:STDOUT: inst_block6000003F: -// CHECK:STDOUT: 0: inst600000C1 -// CHECK:STDOUT: 1: inst600000C2 -// CHECK:STDOUT: 2: inst600000C3 -// CHECK:STDOUT: 3: inst600000C4 +// CHECK:STDOUT: 0: inst600000BB // CHECK:STDOUT: inst_block60000040: +// CHECK:STDOUT: 0: inst600000BB +// CHECK:STDOUT: 1: inst600000BC +// CHECK:STDOUT: 2: inst600000BD +// CHECK:STDOUT: inst_block60000041: +// CHECK:STDOUT: 0: inst600000C4 +// CHECK:STDOUT: 1: inst600000C2 +// CHECK:STDOUT: inst_block60000042: +// CHECK:STDOUT: 0: inst600000C4 +// CHECK:STDOUT: inst_block60000043: +// CHECK:STDOUT: 0: inst600000C2 +// CHECK:STDOUT: inst_block60000044: +// CHECK:STDOUT: 0: inst600000C8 +// CHECK:STDOUT: inst_block60000045: +// CHECK:STDOUT: 0: inst600000C9 +// CHECK:STDOUT: 1: inst600000CA +// CHECK:STDOUT: 2: inst600000CB +// CHECK:STDOUT: 3: inst600000CC +// CHECK:STDOUT: inst_block60000046: // CHECK:STDOUT: 0: inst60000016 // CHECK:STDOUT: 1: inst6000001C // CHECK:STDOUT: 2: inst6000001F -// CHECK:STDOUT: 3: inst600000BD -// CHECK:STDOUT: inst_block60000041: -// CHECK:STDOUT: 0: inst600000B3 -// CHECK:STDOUT: inst_block60000042: -// CHECK:STDOUT: 0: inst600000C5 -// CHECK:STDOUT: 1: inst600000C6 -// CHECK:STDOUT: 2: inst600000C7 -// CHECK:STDOUT: inst_block60000043: -// CHECK:STDOUT: 0: inst6000006B -// CHECK:STDOUT: 1: inst600000D3 -// CHECK:STDOUT: inst_block60000044: -// CHECK:STDOUT: 0: inst600000D5 -// CHECK:STDOUT: inst_block60000045: -// CHECK:STDOUT: 0: inst6000006A -// CHECK:STDOUT: 1: inst600000D2 -// CHECK:STDOUT: inst_block60000046: +// CHECK:STDOUT: 3: inst600000C5 +// CHECK:STDOUT: inst_block60000047: +// CHECK:STDOUT: 0: inst600000BB +// CHECK:STDOUT: inst_block60000048: +// CHECK:STDOUT: 0: inst600000CD +// CHECK:STDOUT: 1: inst600000CE +// CHECK:STDOUT: 2: inst600000CF +// CHECK:STDOUT: inst_block60000049: +// CHECK:STDOUT: 0: inst60000070 +// CHECK:STDOUT: 1: inst600000DB +// CHECK:STDOUT: inst_block6000004A: +// CHECK:STDOUT: 0: inst600000DD +// CHECK:STDOUT: inst_block6000004B: +// CHECK:STDOUT: 0: inst6000006F +// CHECK:STDOUT: 1: inst600000DA +// CHECK:STDOUT: inst_block6000004C: // CHECK:STDOUT: 0: inst6000004E // CHECK:STDOUT: 1: inst6000004E -// CHECK:STDOUT: inst_block60000047: -// CHECK:STDOUT: 0: inst6000006A -// CHECK:STDOUT: 1: inst600000D2 -// CHECK:STDOUT: 2: inst600000DC -// CHECK:STDOUT: 3: inst6000006B -// CHECK:STDOUT: 4: inst600000D3 -// CHECK:STDOUT: 5: inst600000D4 -// CHECK:STDOUT: 6: inst600000D7 -// CHECK:STDOUT: inst_block60000048: -// CHECK:STDOUT: 0: inst600000D9 -// CHECK:STDOUT: 1: inst600000DA -// CHECK:STDOUT: inst_block60000049: -// CHECK:STDOUT: 0: inst600000E1 -// CHECK:STDOUT: 1: inst600000DF -// CHECK:STDOUT: inst_block6000004A: -// CHECK:STDOUT: 0: inst600000E1 -// CHECK:STDOUT: inst_block6000004B: -// CHECK:STDOUT: 0: inst600000DF -// CHECK:STDOUT: inst_block6000004C: -// CHECK:STDOUT: 0: inst600000E5 -// CHECK:STDOUT: 1: inst600000E6 // CHECK:STDOUT: inst_block6000004D: -// CHECK:STDOUT: 0: inst600000E8 -// CHECK:STDOUT: 1: inst600000EA +// CHECK:STDOUT: 0: inst6000006F +// CHECK:STDOUT: 1: inst600000DA +// CHECK:STDOUT: 2: inst600000E4 +// CHECK:STDOUT: 3: inst60000070 +// CHECK:STDOUT: 4: inst600000DB +// CHECK:STDOUT: 5: inst600000DC +// CHECK:STDOUT: 6: inst600000DF // CHECK:STDOUT: inst_block6000004E: -// CHECK:STDOUT: 0: inst600000E7 -// CHECK:STDOUT: 1: inst600000E8 -// CHECK:STDOUT: 2: inst600000E9 -// CHECK:STDOUT: 3: inst600000EA -// CHECK:STDOUT: 4: inst600000EB -// CHECK:STDOUT: 5: inst600000EC -// CHECK:STDOUT: 6: inst600000ED +// CHECK:STDOUT: 0: inst600000E1 +// CHECK:STDOUT: 1: inst600000E2 // CHECK:STDOUT: inst_block6000004F: -// CHECK:STDOUT: 0: inst600000D2 +// CHECK:STDOUT: 0: inst600000E9 +// CHECK:STDOUT: 1: inst600000E7 // CHECK:STDOUT: inst_block60000050: -// CHECK:STDOUT: 0: inst600000D2 -// CHECK:STDOUT: 1: inst600000D3 -// CHECK:STDOUT: 2: inst600000F3 -// CHECK:STDOUT: 3: inst600000F2 +// CHECK:STDOUT: 0: inst600000E9 // CHECK:STDOUT: inst_block60000051: // CHECK:STDOUT: 0: inst600000E7 // CHECK:STDOUT: inst_block60000052: -// CHECK:STDOUT: 0: inst600000E9 +// CHECK:STDOUT: 0: inst600000ED +// CHECK:STDOUT: 1: inst600000EE // CHECK:STDOUT: inst_block60000053: -// CHECK:STDOUT: 0: inst600000F6 +// CHECK:STDOUT: 0: inst600000F0 +// CHECK:STDOUT: 1: inst600000F2 +// CHECK:STDOUT: inst_block60000054: +// CHECK:STDOUT: 0: inst600000EF +// CHECK:STDOUT: 1: inst600000F0 +// CHECK:STDOUT: 2: inst600000F1 +// CHECK:STDOUT: 3: inst600000F2 +// CHECK:STDOUT: 4: inst600000F3 +// CHECK:STDOUT: 5: inst600000F4 +// CHECK:STDOUT: 6: inst600000F5 +// CHECK:STDOUT: inst_block60000055: +// CHECK:STDOUT: 0: inst600000DA +// CHECK:STDOUT: inst_block60000056: +// CHECK:STDOUT: 0: inst600000DA // CHECK:STDOUT: 1: inst600000F7 // CHECK:STDOUT: 2: inst600000F8 -// CHECK:STDOUT: 3: inst600000F9 -// CHECK:STDOUT: 4: inst600000FA -// CHECK:STDOUT: 5: inst600000FB -// CHECK:STDOUT: 6: inst600000FC -// CHECK:STDOUT: 7: inst600000FD -// CHECK:STDOUT: 8: inst600000FE -// CHECK:STDOUT: 9: inst600000FF -// CHECK:STDOUT: 10: inst60000100 -// CHECK:STDOUT: inst_block60000054: -// CHECK:STDOUT: 0: inst6000006A -// CHECK:STDOUT: 1: inst6000006B -// CHECK:STDOUT: 2: inst600000D2 -// CHECK:STDOUT: 3: inst600000D3 -// CHECK:STDOUT: 4: inst600000D4 -// CHECK:STDOUT: 5: inst600000DD -// CHECK:STDOUT: 6: inst600000E2 -// CHECK:STDOUT: inst_block60000055: -// CHECK:STDOUT: 0: inst60000102 -// CHECK:STDOUT: 1: inst60000101 -// CHECK:STDOUT: inst_block60000056: -// CHECK:STDOUT: 0: inst60000105 -// CHECK:STDOUT: 1: inst60000106 // CHECK:STDOUT: inst_block60000057: -// CHECK:STDOUT: 0: inst60000107 -// CHECK:STDOUT: 1: inst60000108 +// CHECK:STDOUT: 0: inst600000DA +// CHECK:STDOUT: 1: inst600000DB +// CHECK:STDOUT: 2: inst600000FD +// CHECK:STDOUT: 3: inst600000FC // CHECK:STDOUT: inst_block60000058: -// CHECK:STDOUT: 0: inst6000010A -// CHECK:STDOUT: 1: inst6000010B +// CHECK:STDOUT: 0: inst600000EF // CHECK:STDOUT: inst_block60000059: -// CHECK:STDOUT: 0: inst60000107 -// CHECK:STDOUT: 1: inst60000108 +// CHECK:STDOUT: 0: inst600000EF // CHECK:STDOUT: inst_block6000005A: -// CHECK:STDOUT: 0: inst60000107 -// CHECK:STDOUT: 1: inst60000108 -// CHECK:STDOUT: 2: inst60000109 -// CHECK:STDOUT: 3: inst6000010A -// CHECK:STDOUT: 4: inst6000010B -// CHECK:STDOUT: 5: inst6000010C -// CHECK:STDOUT: 6: inst6000010D +// CHECK:STDOUT: 0: inst600000F1 // CHECK:STDOUT: inst_block6000005B: -// CHECK:STDOUT: 0: inst60000107 -// CHECK:STDOUT: 1: inst60000108 +// CHECK:STDOUT: 0: inst600000F1 // CHECK:STDOUT: inst_block6000005C: -// CHECK:STDOUT: 0: inst6000010E -// CHECK:STDOUT: 1: inst6000010F +// CHECK:STDOUT: 0: inst60000100 +// CHECK:STDOUT: 1: inst60000101 +// CHECK:STDOUT: 2: inst60000102 +// CHECK:STDOUT: 3: inst60000103 +// CHECK:STDOUT: 4: inst60000104 +// CHECK:STDOUT: 5: inst60000105 +// CHECK:STDOUT: 6: inst60000106 +// CHECK:STDOUT: 7: inst60000107 +// CHECK:STDOUT: 8: inst60000108 +// CHECK:STDOUT: 9: inst60000109 +// CHECK:STDOUT: 10: inst6000010A +// CHECK:STDOUT: 11: inst6000010B +// CHECK:STDOUT: 12: inst6000010C // CHECK:STDOUT: inst_block6000005D: -// CHECK:STDOUT: 0: inst6000006B -// CHECK:STDOUT: 1: inst600000D3 -// CHECK:STDOUT: 2: inst60000113 +// CHECK:STDOUT: 0: inst6000006F +// CHECK:STDOUT: 1: inst60000070 +// CHECK:STDOUT: 2: inst600000DA +// CHECK:STDOUT: 3: inst600000DB +// CHECK:STDOUT: 4: inst600000DC +// CHECK:STDOUT: 5: inst600000E5 +// CHECK:STDOUT: 6: inst600000EA // CHECK:STDOUT: inst_block6000005E: -// CHECK:STDOUT: 0: inst60000115 +// CHECK:STDOUT: 0: inst6000010E +// CHECK:STDOUT: 1: inst6000010D // CHECK:STDOUT: inst_block6000005F: -// CHECK:STDOUT: 0: inst6000006A -// CHECK:STDOUT: 1: inst600000D2 -// CHECK:STDOUT: 2: inst60000112 +// CHECK:STDOUT: 0: inst60000111 +// CHECK:STDOUT: 1: inst60000112 // CHECK:STDOUT: inst_block60000060: +// CHECK:STDOUT: 0: inst60000113 +// CHECK:STDOUT: 1: inst60000114 +// CHECK:STDOUT: inst_block60000061: +// CHECK:STDOUT: 0: inst60000116 +// CHECK:STDOUT: 1: inst60000117 +// CHECK:STDOUT: inst_block60000062: +// CHECK:STDOUT: 0: inst60000113 +// CHECK:STDOUT: 1: inst60000114 +// CHECK:STDOUT: inst_block60000063: +// CHECK:STDOUT: 0: inst60000113 +// CHECK:STDOUT: 1: inst60000114 +// CHECK:STDOUT: 2: inst60000115 +// CHECK:STDOUT: 3: inst60000116 +// CHECK:STDOUT: 4: inst60000117 +// CHECK:STDOUT: 5: inst60000118 +// CHECK:STDOUT: 6: inst60000119 +// CHECK:STDOUT: inst_block60000064: +// CHECK:STDOUT: 0: inst60000113 +// CHECK:STDOUT: 1: inst60000114 +// CHECK:STDOUT: inst_block60000065: +// CHECK:STDOUT: 0: inst6000011A +// CHECK:STDOUT: 1: inst6000011B +// CHECK:STDOUT: inst_block60000066: +// CHECK:STDOUT: 0: inst60000070 +// CHECK:STDOUT: 1: inst600000DB +// CHECK:STDOUT: 2: inst6000011F +// CHECK:STDOUT: inst_block60000067: +// CHECK:STDOUT: 0: inst60000121 +// CHECK:STDOUT: inst_block60000068: +// CHECK:STDOUT: 0: inst6000006F +// CHECK:STDOUT: 1: inst600000DA +// CHECK:STDOUT: 2: inst6000011E +// CHECK:STDOUT: inst_block60000069: // CHECK:STDOUT: 0: inst6000004E // CHECK:STDOUT: 1: inst6000004E // CHECK:STDOUT: 2: inst6000004E -// CHECK:STDOUT: inst_block60000061: -// CHECK:STDOUT: 0: inst6000006A -// CHECK:STDOUT: 1: inst600000D2 -// CHECK:STDOUT: 2: inst60000112 -// CHECK:STDOUT: 3: inst6000011C -// CHECK:STDOUT: 4: inst6000006B -// CHECK:STDOUT: 5: inst600000D3 -// CHECK:STDOUT: 6: inst60000113 -// CHECK:STDOUT: 7: inst60000114 -// CHECK:STDOUT: 8: inst60000117 -// CHECK:STDOUT: inst_block60000062: -// CHECK:STDOUT: 0: inst60000119 -// CHECK:STDOUT: 1: inst6000011A -// CHECK:STDOUT: inst_block60000063: -// CHECK:STDOUT: 0: inst60000121 -// CHECK:STDOUT: 1: inst6000011F -// CHECK:STDOUT: inst_block60000064: -// CHECK:STDOUT: 0: inst60000121 -// CHECK:STDOUT: inst_block60000065: -// CHECK:STDOUT: 0: inst6000011F -// CHECK:STDOUT: inst_block60000066: +// CHECK:STDOUT: inst_block6000006A: +// CHECK:STDOUT: 0: inst6000006F +// CHECK:STDOUT: 1: inst600000DA +// CHECK:STDOUT: 2: inst6000011E +// CHECK:STDOUT: 3: inst60000128 +// CHECK:STDOUT: 4: inst60000070 +// CHECK:STDOUT: 5: inst600000DB +// CHECK:STDOUT: 6: inst6000011F +// CHECK:STDOUT: 7: inst60000120 +// CHECK:STDOUT: 8: inst60000123 +// CHECK:STDOUT: inst_block6000006B: // CHECK:STDOUT: 0: inst60000125 // CHECK:STDOUT: 1: inst60000126 -// CHECK:STDOUT: 2: inst60000127 -// CHECK:STDOUT: inst_block60000067: -// CHECK:STDOUT: 0: inst60000129 -// CHECK:STDOUT: 1: inst6000012B -// CHECK:STDOUT: 2: inst6000012D -// CHECK:STDOUT: inst_block60000068: -// CHECK:STDOUT: 0: inst60000128 -// CHECK:STDOUT: 1: inst60000129 -// CHECK:STDOUT: 2: inst6000012A -// CHECK:STDOUT: 3: inst6000012B -// CHECK:STDOUT: 4: inst6000012C -// CHECK:STDOUT: 5: inst6000012D -// CHECK:STDOUT: 6: inst6000012E -// CHECK:STDOUT: 7: inst6000012F -// CHECK:STDOUT: 8: inst60000130 -// CHECK:STDOUT: inst_block60000069: -// CHECK:STDOUT: 0: inst60000112 -// CHECK:STDOUT: inst_block6000006A: -// CHECK:STDOUT: 0: inst60000112 -// CHECK:STDOUT: 1: inst60000113 -// CHECK:STDOUT: 2: inst60000136 -// CHECK:STDOUT: 3: inst60000135 -// CHECK:STDOUT: inst_block6000006B: -// CHECK:STDOUT: 0: inst60000128 // CHECK:STDOUT: inst_block6000006C: -// CHECK:STDOUT: 0: inst6000012A +// CHECK:STDOUT: 0: inst6000012D +// CHECK:STDOUT: 1: inst6000012B // CHECK:STDOUT: inst_block6000006D: -// CHECK:STDOUT: 0: inst6000012C +// CHECK:STDOUT: 0: inst6000012D // CHECK:STDOUT: inst_block6000006E: -// CHECK:STDOUT: 0: inst60000139 -// CHECK:STDOUT: 1: inst6000013A -// CHECK:STDOUT: 2: inst6000013B -// CHECK:STDOUT: 3: inst6000013C -// CHECK:STDOUT: 4: inst6000013D -// CHECK:STDOUT: 5: inst6000013E -// CHECK:STDOUT: 6: inst6000013F -// CHECK:STDOUT: 7: inst60000140 -// CHECK:STDOUT: 8: inst60000141 -// CHECK:STDOUT: 9: inst60000142 -// CHECK:STDOUT: 10: inst60000143 -// CHECK:STDOUT: 11: inst60000144 -// CHECK:STDOUT: 12: inst60000145 -// CHECK:STDOUT: 13: inst60000146 -// CHECK:STDOUT: 14: inst60000147 -// CHECK:STDOUT: 15: inst60000148 +// CHECK:STDOUT: 0: inst6000012B // CHECK:STDOUT: inst_block6000006F: -// CHECK:STDOUT: 0: inst6000006A -// CHECK:STDOUT: 1: inst6000006B -// CHECK:STDOUT: 2: inst600000D2 -// CHECK:STDOUT: 3: inst600000D3 -// CHECK:STDOUT: 4: inst60000112 -// CHECK:STDOUT: 5: inst60000113 -// CHECK:STDOUT: 6: inst60000114 -// CHECK:STDOUT: 7: inst6000011D -// CHECK:STDOUT: 8: inst60000122 +// CHECK:STDOUT: 0: inst60000131 +// CHECK:STDOUT: 1: inst60000132 +// CHECK:STDOUT: 2: inst60000133 // CHECK:STDOUT: inst_block60000070: -// CHECK:STDOUT: 0: inst6000014B -// CHECK:STDOUT: 1: inst6000014A -// CHECK:STDOUT: 2: inst60000149 +// CHECK:STDOUT: 0: inst60000135 +// CHECK:STDOUT: 1: inst60000137 +// CHECK:STDOUT: 2: inst60000139 // CHECK:STDOUT: inst_block60000071: -// CHECK:STDOUT: 0: inst6000014E -// CHECK:STDOUT: 1: inst6000014F -// CHECK:STDOUT: 2: inst60000150 +// CHECK:STDOUT: 0: inst60000134 +// CHECK:STDOUT: 1: inst60000135 +// CHECK:STDOUT: 2: inst60000136 +// CHECK:STDOUT: 3: inst60000137 +// CHECK:STDOUT: 4: inst60000138 +// CHECK:STDOUT: 5: inst60000139 +// CHECK:STDOUT: 6: inst6000013A +// CHECK:STDOUT: 7: inst6000013B +// CHECK:STDOUT: 8: inst6000013C // CHECK:STDOUT: inst_block60000072: -// CHECK:STDOUT: 0: inst60000151 -// CHECK:STDOUT: 1: inst60000152 -// CHECK:STDOUT: 2: inst60000153 +// CHECK:STDOUT: 0: inst6000011E // CHECK:STDOUT: inst_block60000073: -// CHECK:STDOUT: 0: inst60000155 -// CHECK:STDOUT: 1: inst60000156 -// CHECK:STDOUT: 2: inst60000157 +// CHECK:STDOUT: 0: inst6000011E +// CHECK:STDOUT: 1: inst6000013E +// CHECK:STDOUT: 2: inst6000013F // CHECK:STDOUT: inst_block60000074: -// CHECK:STDOUT: 0: inst60000151 -// CHECK:STDOUT: 1: inst60000152 -// CHECK:STDOUT: 2: inst60000153 +// CHECK:STDOUT: 0: inst6000011E +// CHECK:STDOUT: 1: inst6000011F +// CHECK:STDOUT: 2: inst60000144 +// CHECK:STDOUT: 3: inst60000143 // CHECK:STDOUT: inst_block60000075: -// CHECK:STDOUT: 0: inst60000151 -// CHECK:STDOUT: 1: inst60000152 -// CHECK:STDOUT: 2: inst60000153 -// CHECK:STDOUT: 3: inst60000154 -// CHECK:STDOUT: 4: inst60000155 -// CHECK:STDOUT: 5: inst60000156 -// CHECK:STDOUT: 6: inst60000157 -// CHECK:STDOUT: 7: inst60000158 -// CHECK:STDOUT: 8: inst60000159 +// CHECK:STDOUT: 0: inst60000134 // CHECK:STDOUT: inst_block60000076: -// CHECK:STDOUT: 0: inst60000151 -// CHECK:STDOUT: 1: inst60000152 -// CHECK:STDOUT: 2: inst60000153 +// CHECK:STDOUT: 0: inst60000134 // CHECK:STDOUT: inst_block60000077: -// CHECK:STDOUT: 0: inst6000015A -// CHECK:STDOUT: 1: inst6000015B +// CHECK:STDOUT: 0: inst60000136 // CHECK:STDOUT: inst_block60000078: -// CHECK:STDOUT: 0: inst600000B7 -// CHECK:STDOUT: 1: inst600000B8 -// CHECK:STDOUT: 2: inst60000040 +// CHECK:STDOUT: 0: inst60000136 // CHECK:STDOUT: inst_block60000079: -// CHECK:STDOUT: 0: inst60000017 +// CHECK:STDOUT: 0: inst60000138 // CHECK:STDOUT: inst_block6000007A: -// CHECK:STDOUT: 0: inst6000015F +// CHECK:STDOUT: 0: inst60000138 // CHECK:STDOUT: inst_block6000007B: -// CHECK:STDOUT: 0: inst60000160 +// CHECK:STDOUT: 0: inst60000147 +// CHECK:STDOUT: 1: inst60000148 +// CHECK:STDOUT: 2: inst60000149 +// CHECK:STDOUT: 3: inst6000014A +// CHECK:STDOUT: 4: inst6000014B +// CHECK:STDOUT: 5: inst6000014C +// CHECK:STDOUT: 6: inst6000014D +// CHECK:STDOUT: 7: inst6000014E +// CHECK:STDOUT: 8: inst6000014F +// CHECK:STDOUT: 9: inst60000150 +// CHECK:STDOUT: 10: inst60000151 +// CHECK:STDOUT: 11: inst60000152 +// CHECK:STDOUT: 12: inst60000153 +// CHECK:STDOUT: 13: inst60000154 +// CHECK:STDOUT: 14: inst60000155 +// CHECK:STDOUT: 15: inst60000156 +// CHECK:STDOUT: 16: inst60000157 +// CHECK:STDOUT: 17: inst60000158 +// CHECK:STDOUT: 18: inst60000159 // CHECK:STDOUT: inst_block6000007C: -// CHECK:STDOUT: 0: inst60000161 +// CHECK:STDOUT: 0: inst6000006F +// CHECK:STDOUT: 1: inst60000070 +// CHECK:STDOUT: 2: inst600000DA +// CHECK:STDOUT: 3: inst600000DB +// CHECK:STDOUT: 4: inst6000011E +// CHECK:STDOUT: 5: inst6000011F +// CHECK:STDOUT: 6: inst60000120 +// CHECK:STDOUT: 7: inst60000129 +// CHECK:STDOUT: 8: inst6000012E // CHECK:STDOUT: inst_block6000007D: -// CHECK:STDOUT: 0: inst60000161 +// CHECK:STDOUT: 0: inst6000015C +// CHECK:STDOUT: 1: inst6000015B +// CHECK:STDOUT: 2: inst6000015A +// CHECK:STDOUT: inst_block6000007E: +// CHECK:STDOUT: 0: inst6000015F +// CHECK:STDOUT: 1: inst60000160 +// CHECK:STDOUT: 2: inst60000161 +// CHECK:STDOUT: inst_block6000007F: +// CHECK:STDOUT: 0: inst60000162 +// CHECK:STDOUT: 1: inst60000163 +// CHECK:STDOUT: 2: inst60000164 +// CHECK:STDOUT: inst_block60000080: +// CHECK:STDOUT: 0: inst60000166 +// CHECK:STDOUT: 1: inst60000167 +// CHECK:STDOUT: 2: inst60000168 +// CHECK:STDOUT: inst_block60000081: +// CHECK:STDOUT: 0: inst60000162 +// CHECK:STDOUT: 1: inst60000163 +// CHECK:STDOUT: 2: inst60000164 +// CHECK:STDOUT: inst_block60000082: +// CHECK:STDOUT: 0: inst60000162 +// CHECK:STDOUT: 1: inst60000163 +// CHECK:STDOUT: 2: inst60000164 +// CHECK:STDOUT: 3: inst60000165 +// CHECK:STDOUT: 4: inst60000166 +// CHECK:STDOUT: 5: inst60000167 +// CHECK:STDOUT: 6: inst60000168 +// CHECK:STDOUT: 7: inst60000169 +// CHECK:STDOUT: 8: inst6000016A +// CHECK:STDOUT: inst_block60000083: +// CHECK:STDOUT: 0: inst60000162 +// CHECK:STDOUT: 1: inst60000163 +// CHECK:STDOUT: 2: inst60000164 +// CHECK:STDOUT: inst_block60000084: +// CHECK:STDOUT: 0: inst6000016B +// CHECK:STDOUT: 1: inst6000016C +// CHECK:STDOUT: inst_block60000085: +// CHECK:STDOUT: 0: inst600000BF +// CHECK:STDOUT: 1: inst600000C0 +// CHECK:STDOUT: 2: inst60000040 +// CHECK:STDOUT: inst_block60000086: +// CHECK:STDOUT: 0: inst60000017 +// CHECK:STDOUT: inst_block60000087: +// CHECK:STDOUT: 0: inst60000170 +// CHECK:STDOUT: inst_block60000088: +// CHECK:STDOUT: 0: inst60000172 +// CHECK:STDOUT: inst_block60000089: +// CHECK:STDOUT: 0: inst60000172 +// CHECK:STDOUT: 1: inst60000173 +// CHECK:STDOUT: 2: inst60000174 +// CHECK:STDOUT: inst_block6000008A: +// CHECK:STDOUT: 0: inst60000171 +// CHECK:STDOUT: inst_block6000008B: +// CHECK:STDOUT: 0: inst60000178 +// CHECK:STDOUT: inst_block6000008C: +// CHECK:STDOUT: 0: inst60000172 // CHECK:STDOUT: 1: inst6000001C // CHECK:STDOUT: 2: inst6000001F -// CHECK:STDOUT: 3: inst600000BD -// CHECK:STDOUT: inst_block6000007E: -// CHECK:STDOUT: 0: inst60000165 -// CHECK:STDOUT: inst_block6000007F: +// CHECK:STDOUT: 3: inst600000C5 +// CHECK:STDOUT: inst_block6000008D: +// CHECK:STDOUT: 0: inst60000178 +// CHECK:STDOUT: inst_block6000008E: // CHECK:STDOUT: 0: inst60000046 -// CHECK:STDOUT: inst_block60000080: -// CHECK:STDOUT: 0: inst6000016F -// CHECK:STDOUT: 1: inst60000172 -// CHECK:STDOUT: inst_block60000081: +// CHECK:STDOUT: inst_block6000008F: +// CHECK:STDOUT: 0: inst60000183 +// CHECK:STDOUT: 1: inst60000186 +// CHECK:STDOUT: inst_block60000090: // CHECK:STDOUT: 0: inst60000041 // CHECK:STDOUT: 1: inst60000045 -// CHECK:STDOUT: 2: inst6000015E -// CHECK:STDOUT: 3: inst60000160 -// CHECK:STDOUT: 4: inst60000165 -// CHECK:STDOUT: 5: inst60000166 -// CHECK:STDOUT: 6: inst60000167 -// CHECK:STDOUT: 7: inst6000016B -// CHECK:STDOUT: inst_block60000082: +// CHECK:STDOUT: 2: inst6000016F +// CHECK:STDOUT: 3: inst60000171 +// CHECK:STDOUT: 4: inst60000178 +// CHECK:STDOUT: 5: inst60000179 +// CHECK:STDOUT: 6: inst6000017A +// CHECK:STDOUT: 7: inst6000017B +// CHECK:STDOUT: 8: inst6000017F +// CHECK:STDOUT: inst_block60000091: // CHECK:STDOUT: 0: instF // CHECK:STDOUT: 1: inst60000010 // CHECK:STDOUT: 2: inst6000003C diff --git a/toolchain/check/testdata/builtins/bool/eq.carbon b/toolchain/check/testdata/builtins/bool/eq.carbon index 9ed87f8e969f..c8a68bec5ef5 100644 --- a/toolchain/check/testdata/builtins/bool/eq.carbon +++ b/toolchain/check/testdata/builtins/bool/eq.carbon @@ -100,10 +100,10 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %True.type: type = fn_type @True [concrete] // CHECK:STDOUT: %True: %True.type = struct_value () [concrete] // CHECK:STDOUT: %EqWith.type.863: type = facet_type <@EqWith, @EqWith(bool)> [concrete] -// CHECK:STDOUT: %EqWith.Equal.type.a58: type = fn_type @EqWith.Equal, @EqWith(bool) [concrete] // CHECK:STDOUT: %EqWith.impl_witness: = impl_witness imports.%EqWith.impl_witness_table [concrete] // CHECK:STDOUT: %EqWith.facet: %EqWith.type.863 = facet_value bool, (%EqWith.impl_witness) [concrete] -// CHECK:STDOUT: %.239: type = fn_type_with_self_type %EqWith.Equal.type.a58, %EqWith.facet [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.8c0: type = fn_type @EqWith.WithSelf.Equal, @EqWith(bool, %EqWith.facet) [concrete] +// CHECK:STDOUT: %.483: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.8c0, %EqWith.facet [concrete] // CHECK:STDOUT: %bool.as.EqWith.impl.Equal.type: type = fn_type @bool.as.EqWith.impl.Equal [concrete] // CHECK:STDOUT: %bool.as.EqWith.impl.Equal: %bool.as.EqWith.impl.Equal.type = struct_value () [concrete] // CHECK:STDOUT: %bool.as.EqWith.impl.Equal.bound.40b: = bound_method %true, %bool.as.EqWith.impl.Equal [concrete] @@ -125,7 +125,7 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %true.loc10_10: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %true.loc10_18: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc10: %.239 = impl_witness_access constants.%EqWith.impl_witness, element0 [concrete = constants.%bool.as.EqWith.impl.Equal] +// CHECK:STDOUT: %impl.elem0.loc10: %.483 = impl_witness_access constants.%EqWith.impl_witness, element0 [concrete = constants.%bool.as.EqWith.impl.Equal] // CHECK:STDOUT: %bound_method.loc10: = bound_method %true.loc10_10, %impl.elem0.loc10 [concrete = constants.%bool.as.EqWith.impl.Equal.bound.40b] // CHECK:STDOUT: %bool.as.EqWith.impl.Equal.call.loc10: init bool = call %bound_method.loc10(%true.loc10_10, %true.loc10_18) [concrete = constants.%true] // CHECK:STDOUT: %.loc10_22.2: bool = value_of_initializer %bool.as.EqWith.impl.Equal.call.loc10 [concrete = constants.%true] diff --git a/toolchain/check/testdata/builtins/bool/neq.carbon b/toolchain/check/testdata/builtins/bool/neq.carbon index 771593daaae3..ba7ea3c7c069 100644 --- a/toolchain/check/testdata/builtins/bool/neq.carbon +++ b/toolchain/check/testdata/builtins/bool/neq.carbon @@ -102,10 +102,10 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %False.type: type = fn_type @False [concrete] // CHECK:STDOUT: %False: %False.type = struct_value () [concrete] // CHECK:STDOUT: %EqWith.type.863: type = facet_type <@EqWith, @EqWith(bool)> [concrete] -// CHECK:STDOUT: %EqWith.NotEqual.type.f03: type = fn_type @EqWith.NotEqual, @EqWith(bool) [concrete] // CHECK:STDOUT: %EqWith.impl_witness: = impl_witness imports.%EqWith.impl_witness_table [concrete] // CHECK:STDOUT: %EqWith.facet: %EqWith.type.863 = facet_value bool, (%EqWith.impl_witness) [concrete] -// CHECK:STDOUT: %.cf9: type = fn_type_with_self_type %EqWith.NotEqual.type.f03, %EqWith.facet [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.14c: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith(bool, %EqWith.facet) [concrete] +// CHECK:STDOUT: %.d13: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.14c, %EqWith.facet [concrete] // CHECK:STDOUT: %bool.as.EqWith.impl.NotEqual.type: type = fn_type @bool.as.EqWith.impl.NotEqual [concrete] // CHECK:STDOUT: %bool.as.EqWith.impl.NotEqual: %bool.as.EqWith.impl.NotEqual.type = struct_value () [concrete] // CHECK:STDOUT: %bool.as.EqWith.impl.NotEqual.bound.a7d: = bound_method %true, %bool.as.EqWith.impl.NotEqual [concrete] @@ -127,7 +127,7 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %true.loc10_10: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %true.loc10_18: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem1.loc10: %.cf9 = impl_witness_access constants.%EqWith.impl_witness, element1 [concrete = constants.%bool.as.EqWith.impl.NotEqual] +// CHECK:STDOUT: %impl.elem1.loc10: %.d13 = impl_witness_access constants.%EqWith.impl_witness, element1 [concrete = constants.%bool.as.EqWith.impl.NotEqual] // CHECK:STDOUT: %bound_method.loc10: = bound_method %true.loc10_10, %impl.elem1.loc10 [concrete = constants.%bool.as.EqWith.impl.NotEqual.bound.a7d] // CHECK:STDOUT: %bool.as.EqWith.impl.NotEqual.call.loc10: init bool = call %bound_method.loc10(%true.loc10_10, %true.loc10_18) [concrete = constants.%false] // CHECK:STDOUT: %.loc10_22.2: bool = value_of_initializer %bool.as.EqWith.impl.NotEqual.call.loc10 [concrete = constants.%false] diff --git a/toolchain/check/testdata/builtins/float/convert_checked.carbon b/toolchain/check/testdata/builtins/float/convert_checked.carbon index be12ce7eaf7b..b3a75d250843 100644 --- a/toolchain/check/testdata/builtins/float/convert_checked.carbon +++ b/toolchain/check/testdata/builtins/float/convert_checked.carbon @@ -337,7 +337,6 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Float64ToFloat64: %Float64ToFloat64.type = struct_value () [concrete] // CHECK:STDOUT: %float.1f7: Core.FloatLiteral = float_literal_value 0e-1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.4a8: type = facet_type <@ImplicitAs, @ImplicitAs(%f64.d77)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.726: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f64.d77) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] @@ -345,7 +344,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.4a8 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.cb2) [concrete] -// CHECK:STDOUT: %.b13: type = fn_type_with_self_type %ImplicitAs.Convert.type.726, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a33: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f64.d77, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.6c5: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a33, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound.8c6: = bound_method %float.1f7, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.f2b: = bound_method %float.1f7, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -403,7 +403,7 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Float64ToFloat64.ref.loc6: %Float64ToFloat64.type = name_ref Float64ToFloat64, imports.%Main.Float64ToFloat64 [concrete = constants.%Float64ToFloat64] // CHECK:STDOUT: %float.loc6: Core.FloatLiteral = float_literal_value 0e-1 [concrete = constants.%float.1f7] -// CHECK:STDOUT: %impl.elem0.loc6: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] +// CHECK:STDOUT: %impl.elem0.loc6: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] // CHECK:STDOUT: %bound_method.loc6_31.1: = bound_method %float.loc6, %impl.elem0.loc6 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound.8c6] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_31.2: = bound_method %float.loc6, %specific_fn.loc6 [concrete = constants.%bound_method.f2b] @@ -413,7 +413,7 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Float64ToFloat64.call.loc6: init %f64.d77 = call %Float64ToFloat64.ref.loc6(%.loc6_31.2) [concrete = constants.%float.0a8] // CHECK:STDOUT: %Float64ToFloat64.ref.loc7: %Float64ToFloat64.type = name_ref Float64ToFloat64, imports.%Main.Float64ToFloat64 [concrete = constants.%Float64ToFloat64] // CHECK:STDOUT: %float.loc7: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] -// CHECK:STDOUT: %impl.elem0.loc7: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] +// CHECK:STDOUT: %impl.elem0.loc7: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] // CHECK:STDOUT: %bound_method.loc7_31.1: = bound_method %float.loc7, %impl.elem0.loc7 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound.d80] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_31.2: = bound_method %float.loc7, %specific_fn.loc7 [concrete = constants.%bound_method.581] @@ -423,7 +423,7 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Float64ToFloat64.call.loc7: init %f64.d77 = call %Float64ToFloat64.ref.loc7(%.loc7_31.2) [concrete = constants.%float.d20] // CHECK:STDOUT: %Float64ToFloat64.ref.loc8: %Float64ToFloat64.type = name_ref Float64ToFloat64, imports.%Main.Float64ToFloat64 [concrete = constants.%Float64ToFloat64] // CHECK:STDOUT: %float.loc8: Core.FloatLiteral = float_literal_value 10e307 [concrete = constants.%float.173] -// CHECK:STDOUT: %impl.elem0.loc8: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] +// CHECK:STDOUT: %impl.elem0.loc8: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] // CHECK:STDOUT: %bound_method.loc8_31.1: = bound_method %float.loc8, %impl.elem0.loc8 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound.d3f] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_31.2: = bound_method %float.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.0fc] @@ -444,7 +444,6 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Float32ToFloat32: %Float32ToFloat32.type = struct_value () [concrete] // CHECK:STDOUT: %float.1f7: Core.FloatLiteral = float_literal_value 0e-1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] @@ -452,7 +451,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete] -// CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e4d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f32.97e, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.98d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e4d, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound.c2d: = bound_method %float.1f7, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.577: = bound_method %float.1f7, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -510,7 +510,7 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Float32ToFloat32.ref.loc6: %Float32ToFloat32.type = name_ref Float32ToFloat32, imports.%Main.Float32ToFloat32 [concrete = constants.%Float32ToFloat32] // CHECK:STDOUT: %float.loc6: Core.FloatLiteral = float_literal_value 0e-1 [concrete = constants.%float.1f7] -// CHECK:STDOUT: %impl.elem0.loc6: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc6: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc6_31.1: = bound_method %float.loc6, %impl.elem0.loc6 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound.c2d] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_31.2: = bound_method %float.loc6, %specific_fn.loc6 [concrete = constants.%bound_method.577] @@ -520,7 +520,7 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Float32ToFloat32.call.loc6: init %f32.97e = call %Float32ToFloat32.ref.loc6(%.loc6_31.2) [concrete = constants.%float.4db] // CHECK:STDOUT: %Float32ToFloat32.ref.loc7: %Float32ToFloat32.type = name_ref Float32ToFloat32, imports.%Main.Float32ToFloat32 [concrete = constants.%Float32ToFloat32] // CHECK:STDOUT: %float.loc7: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] -// CHECK:STDOUT: %impl.elem0.loc7: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc7: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc7_31.1: = bound_method %float.loc7, %impl.elem0.loc7 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound.3ff] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_31.2: = bound_method %float.loc7, %specific_fn.loc7 [concrete = constants.%bound_method.1e4] @@ -530,7 +530,7 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Float32ToFloat32.call.loc7: init %f32.97e = call %Float32ToFloat32.ref.loc7(%.loc7_31.2) [concrete = constants.%float.e3b] // CHECK:STDOUT: %Float32ToFloat32.ref.loc8: %Float32ToFloat32.type = name_ref Float32ToFloat32, imports.%Main.Float32ToFloat32 [concrete = constants.%Float32ToFloat32] // CHECK:STDOUT: %float.loc8: Core.FloatLiteral = float_literal_value 10e37 [concrete = constants.%float.516] -// CHECK:STDOUT: %impl.elem0.loc8: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc8: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc8_31.1: = bound_method %float.loc8, %impl.elem0.loc8 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound.b7f] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_31.2: = bound_method %float.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.40e] @@ -553,7 +553,6 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %f64.d77: type = class_type @Float, @Float(%int_64) [concrete] // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.4a8: type = facet_type <@ImplicitAs, @ImplicitAs(%f64.d77)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.726: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f64.d77) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] @@ -561,7 +560,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.4a8 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.cb2) [concrete] -// CHECK:STDOUT: %.b13: type = fn_type_with_self_type %ImplicitAs.Convert.type.726, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a33: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f64.d77, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.6c5: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a33, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -592,7 +592,7 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Float64ToFloat32.ref: %Float64ToFloat32.type = name_ref Float64ToFloat32, imports.%Main.Float64ToFloat32 [concrete = constants.%Float64ToFloat32] // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] -// CHECK:STDOUT: %impl.elem0: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] +// CHECK:STDOUT: %impl.elem0: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] // CHECK:STDOUT: %bound_method.loc6_31.1: = bound_method %float, %impl.elem0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_31.2: = bound_method %float, %specific_fn [concrete = constants.%bound_method] @@ -616,7 +616,6 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %pattern_type.0ae: type = pattern_type %f64.d77 [concrete] // CHECK:STDOUT: %float.bfd691.1: Core.FloatLiteral = float_literal_value 10e38 [concrete] // CHECK:STDOUT: %ImplicitAs.type.4a8: type = facet_type <@ImplicitAs, @ImplicitAs(%f64.d77)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.726: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f64.d77) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] @@ -624,7 +623,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.4a8 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.cb2) [concrete] -// CHECK:STDOUT: %.b13: type = fn_type_with_self_type %ImplicitAs.Convert.type.726, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a33: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f64.d77, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.6c5: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a33, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.bfd691.1, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.bfd691.1, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -682,7 +682,7 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Float64ToFloat32.ref: %Float64ToFloat32.type = name_ref Float64ToFloat32, imports.%Main.Float64ToFloat32 [concrete = constants.%Float64ToFloat32] // CHECK:STDOUT: %float.loc11: Core.FloatLiteral = float_literal_value 10e38 [concrete = constants.%float.bfd691.1] -// CHECK:STDOUT: %impl.elem0: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] +// CHECK:STDOUT: %impl.elem0: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] // CHECK:STDOUT: %bound_method.loc11_31.1: = bound_method %float.loc11, %impl.elem0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_31.2: = bound_method %float.loc11, %specific_fn [concrete = constants.%bound_method] @@ -711,7 +711,6 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete] // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] @@ -719,7 +718,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete] -// CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e4d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f32.97e, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.98d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e4d, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound.3ff: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.1e4: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -765,7 +765,7 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Float32ToFloat64.ref.loc6: %Float32ToFloat64.type = name_ref Float32ToFloat64, imports.%Main.Float32ToFloat64 [concrete = constants.%Float32ToFloat64] // CHECK:STDOUT: %float.loc6: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] -// CHECK:STDOUT: %impl.elem0.loc6: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc6: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc6_31.1: = bound_method %float.loc6, %impl.elem0.loc6 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound.3ff] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_31.2: = bound_method %float.loc6, %specific_fn.loc6 [concrete = constants.%bound_method.1e4] @@ -775,7 +775,7 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Float32ToFloat64.call.loc6: init %f64.d77 = call %Float32ToFloat64.ref.loc6(%.loc6_31.2) [concrete = constants.%float.d20] // CHECK:STDOUT: %Float32ToFloat64.ref.loc7: %Float32ToFloat64.type = name_ref Float32ToFloat64, imports.%Main.Float32ToFloat64 [concrete = constants.%Float32ToFloat64] // CHECK:STDOUT: %float.loc7: Core.FloatLiteral = float_literal_value 10e29 [concrete = constants.%float.9bd] -// CHECK:STDOUT: %impl.elem0.loc7: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc7: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc7_31.1: = bound_method %float.loc7, %impl.elem0.loc7 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound.204] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_31.2: = bound_method %float.loc7, %specific_fn.loc7 [concrete = constants.%bound_method.0b8] @@ -794,7 +794,6 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %pattern_type.0ae: type = pattern_type %f64.d77 [concrete] // CHECK:STDOUT: %float.1f7: Core.FloatLiteral = float_literal_value 0e-1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.4a8: type = facet_type <@ImplicitAs, @ImplicitAs(%f64.d77)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.726: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f64.d77) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] @@ -802,7 +801,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.4a8 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.cb2) [concrete] -// CHECK:STDOUT: %.b13: type = fn_type_with_self_type %ImplicitAs.Convert.type.726, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a33: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f64.d77, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.6c5: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a33, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.1f7, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.1f7, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -825,7 +825,7 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64); // CHECK:STDOUT: %int_64.loc6: Core.IntLiteral = int_value 64 [concrete = constants.%int_64] // CHECK:STDOUT: %f64.loc6: type = class_type @Float, @Float(constants.%int_64) [concrete = constants.%f64.d77] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] +// CHECK:STDOUT: %impl.elem0: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] // CHECK:STDOUT: %bound_method.loc6_28.1: = bound_method @__global_init.%float, %impl.elem0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_28.2: = bound_method @__global_init.%float, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/builtins/int/convert_checked.carbon b/toolchain/check/testdata/builtins/int/convert_checked.carbon index 28f3e75fb987..89fc9fd8028a 100644 --- a/toolchain/check/testdata/builtins/int/convert_checked.carbon +++ b/toolchain/check/testdata/builtins/int/convert_checked.carbon @@ -273,7 +273,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cf3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6da: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.004: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.255: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.004 = struct_value () [symbolic] @@ -281,7 +280,8 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.199: 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.5f4: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.199 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.cf3 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.58d) [concrete] -// CHECK:STDOUT: %.952: type = fn_type_with_self_type %ImplicitAs.Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.979: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.7c3: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.979, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -346,7 +346,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint32.ref: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%Main.Int32ToUint32 [concrete = constants.%Int32ToUint32] // CHECK:STDOUT: %int_1.loc6: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc6: %.952 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] +// CHECK:STDOUT: %impl.elem0.loc6: %.7c3 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] // CHECK:STDOUT: %bound_method.loc6_41.1: = bound_method %int_1.loc6, %impl.elem0.loc6 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_41.2: = bound_method %int_1.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] @@ -356,7 +356,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Int32ToUint32.call: init %u32 = call %Int32ToUint32.ref(%.loc6_41.2) [concrete = constants.%int_1.c1d] // CHECK:STDOUT: %Int32ToInt16.ref: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%Main.Int32ToInt16 [concrete = constants.%Int32ToInt16] // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc7: %.952 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] +// CHECK:STDOUT: %impl.elem0.loc7: %.7c3 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] // CHECK:STDOUT: %bound_method.loc7_35.1: = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_35.2: = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method] @@ -366,7 +366,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Int32ToInt16.call: init %i16 = call %Int32ToInt16.ref(%.loc7_35.2) [concrete = constants.%int_1.c22] // CHECK:STDOUT: %Int32ToInt64.ref: %Int32ToInt64.type = name_ref Int32ToInt64, imports.%Main.Int32ToInt64 [concrete = constants.%Int32ToInt64] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.952 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] +// CHECK:STDOUT: %impl.elem0.loc8: %.7c3 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] // CHECK:STDOUT: %bound_method.loc8_34.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_34.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/builtins/print/char.carbon b/toolchain/check/testdata/builtins/print/char.carbon index e411410250e6..d2c2e8b04022 100644 --- a/toolchain/check/testdata/builtins/print/char.carbon +++ b/toolchain/check/testdata/builtins/print/char.carbon @@ -35,10 +35,10 @@ fn Main() { // 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.d99: type = facet_type <@ImplicitAs, @ImplicitAs(%char)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.f57: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%char) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.158: = impl_witness imports.%ImplicitAs.impl_witness_table.4bc [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d99 = facet_value Core.CharLiteral, (%ImplicitAs.impl_witness.158) [concrete] -// CHECK:STDOUT: %.93b: type = fn_type_with_self_type %ImplicitAs.Convert.type.f57, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.95b: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%char, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.734: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.95b, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.CharLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert: %Core.CharLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.bound.75d: = bound_method %.75c, %Core.CharLiteral.as.ImplicitAs.impl.Convert [concrete] @@ -72,7 +72,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %PrintChar.ref.loc19: %PrintChar.type.7fc = name_ref PrintChar, file.%PrintChar.decl [concrete = constants.%PrintChar.f2e] // CHECK:STDOUT: %.loc19_13.1: Core.CharLiteral = char_value U+0031 [concrete = constants.%.75c] -// CHECK:STDOUT: %impl.elem0.loc19: %.93b = impl_witness_access constants.%ImplicitAs.impl_witness.158, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc19: %.734 = impl_witness_access constants.%ImplicitAs.impl_witness.158, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc19: = bound_method %.loc19_13.1, %impl.elem0.loc19 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert.bound.75d] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.call.loc19: init %char = call %bound_method.loc19(%.loc19_13.1) [concrete = constants.%int_49] // CHECK:STDOUT: %.loc19_13.2: %char = value_of_initializer %Core.CharLiteral.as.ImplicitAs.impl.Convert.call.loc19 [concrete = constants.%int_49] @@ -81,7 +81,7 @@ fn Main() { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %PrintChar.ref.loc20: %PrintChar.type.089 = name_ref PrintChar, imports.%Core.PrintChar [concrete = constants.%PrintChar.d75] // CHECK:STDOUT: %.loc20_18.1: Core.CharLiteral = char_value U+0032 [concrete = constants.%.f8d] -// CHECK:STDOUT: %impl.elem0.loc20: %.93b = impl_witness_access constants.%ImplicitAs.impl_witness.158, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc20: %.734 = impl_witness_access constants.%ImplicitAs.impl_witness.158, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc20: = bound_method %.loc20_18.1, %impl.elem0.loc20 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert.bound.957] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.call.loc20: init %char = call %bound_method.loc20(%.loc20_18.1) [concrete = constants.%int_50] // CHECK:STDOUT: %.loc20_18.2: %char = value_of_initializer %Core.CharLiteral.as.ImplicitAs.impl.Convert.call.loc20 [concrete = constants.%int_50] diff --git a/toolchain/check/testdata/builtins/print/int.carbon b/toolchain/check/testdata/builtins/print/int.carbon index cf3ac39248cd..4dd1c0c26a96 100644 --- a/toolchain/check/testdata/builtins/print/int.carbon +++ b/toolchain/check/testdata/builtins/print/int.carbon @@ -35,7 +35,6 @@ fn Main() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -43,7 +42,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -76,7 +76,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Print.ref.loc19: %Print.type.543 = name_ref Print, file.%Print.decl [concrete = constants.%Print.029] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc19: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc19: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc19_9.1: = bound_method %int_1, %impl.elem0.loc19 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_9.2: = bound_method %int_1, %specific_fn.loc19 [concrete = constants.%bound_method.38b] @@ -87,7 +87,7 @@ fn Main() { // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Print.ref.loc20: %Print.type.6ed = name_ref Print, imports.%Core.Print [concrete = constants.%Print.723] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc20: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc20: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc20_14.1: = bound_method %int_2, %impl.elem0.loc20 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_14.2: = bound_method %int_2, %specific_fn.loc20 [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/choice/basic.carbon b/toolchain/check/testdata/choice/basic.carbon index a90f0330b543..39821e149ac7 100644 --- a/toolchain/check/testdata/choice/basic.carbon +++ b/toolchain/check/testdata/choice/basic.carbon @@ -146,7 +146,6 @@ let never: Never = {}; // CHECK:STDOUT: %complete_type.de2: = complete_type_witness %struct_type.discriminant [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.a92: type = facet_type <@ImplicitAs, @ImplicitAs(%u2)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.f0e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u2) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.46e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6 = struct_value () [symbolic] @@ -154,21 +153,22 @@ let never: Never = {}; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.c8c: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_2.ecc) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0ed: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.c8c = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.a92 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.762) [concrete] -// CHECK:STDOUT: %.02a: type = fn_type_with_self_type %ImplicitAs.Convert.type.f0e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.539: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%u2, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.055: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.539, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.dd9: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0ed [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0ed, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_2.ecc) [concrete] // CHECK:STDOUT: %bound_method.f58: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.9fd: %u2 = int_value 0 [concrete] // CHECK:STDOUT: %struct.559: %struct_type.discriminant = struct_value (%int_0.9fd) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.type.68f: type = fn_type @UInt.as.Copy.impl.Op, @UInt.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.576: %UInt.as.Copy.impl.Op.type.68f = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.a32: = impl_witness imports.%Copy.impl_witness_table.bd0, @UInt.as.Copy.impl(%int_2.ecc) [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.type.f98: type = fn_type @UInt.as.Copy.impl.Op, @UInt.as.Copy.impl(%int_2.ecc) [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.b2d: %UInt.as.Copy.impl.Op.type.f98 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %u2, (%Copy.impl_witness.a32) [concrete] -// CHECK:STDOUT: %.d67: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.bd7: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.a82: type = fn_type_with_self_type %Copy.WithSelf.Op.type.bd7, %Copy.facet [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.bound.fba: = bound_method %int_0.9fd, %UInt.as.Copy.impl.Op.b2d [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.specific_fn: = specific_function %UInt.as.Copy.impl.Op.b2d, @UInt.as.Copy.impl.Op(%int_2.ecc) [concrete] // CHECK:STDOUT: %bound_method.428: = bound_method %int_0.9fd, %UInt.as.Copy.impl.Op.specific_fn [concrete] @@ -235,7 +235,7 @@ let never: Never = {}; // CHECK:STDOUT: %u2: type = class_type @UInt, @UInt(constants.%int_2.ecc) [concrete = constants.%u2] // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%struct_type.discriminant [concrete = constants.%complete_type.de2] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc5_7.1: %.02a = impl_witness_access constants.%ImplicitAs.impl_witness.762, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0ed] +// CHECK:STDOUT: %impl.elem0.loc5_7.1: %.055 = impl_witness_access constants.%ImplicitAs.impl_witness.762, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0ed] // CHECK:STDOUT: %bound_method.loc5_7.1: = bound_method %int_0, %impl.elem0.loc5_7.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.dd9] // CHECK:STDOUT: %specific_fn.loc5_7.1: = specific_function %impl.elem0.loc5_7.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_2.ecc) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_7.2: = bound_method %int_0, %specific_fn.loc5_7.1 [concrete = constants.%bound_method.f58] @@ -243,7 +243,7 @@ let never: Never = {}; // CHECK:STDOUT: %.loc5_7.1: %u2 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc5 [concrete = constants.%int_0.9fd] // CHECK:STDOUT: %.loc5_7.2: %u2 = converted %int_0, %.loc5_7.1 [concrete = constants.%int_0.9fd] // CHECK:STDOUT: %.loc5_7.3: %struct_type.discriminant = struct_literal (%.loc5_7.2) [concrete = constants.%struct.559] -// CHECK:STDOUT: %impl.elem0.loc5_7.2: %.d67 = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%UInt.as.Copy.impl.Op.b2d] +// CHECK:STDOUT: %impl.elem0.loc5_7.2: %.a82 = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%UInt.as.Copy.impl.Op.b2d] // CHECK:STDOUT: %bound_method.loc5_7.3: = bound_method %.loc5_7.2, %impl.elem0.loc5_7.2 [concrete = constants.%UInt.as.Copy.impl.Op.bound.fba] // CHECK:STDOUT: %specific_fn.loc5_7.2: = specific_function %impl.elem0.loc5_7.2, @UInt.as.Copy.impl.Op(constants.%int_2.ecc) [concrete = constants.%UInt.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc5_7.4: = bound_method %.loc5_7.2, %specific_fn.loc5_7.2 [concrete = constants.%bound_method.428] @@ -257,7 +257,7 @@ let never: Never = {}; // CHECK:STDOUT: %.loc5_7.10: %Ordering = acquire_value %.loc5_7.9 // CHECK:STDOUT: %Less: %Ordering = value_binding Less, %.loc5_7.10 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc6_13.1: %.02a = impl_witness_access constants.%ImplicitAs.impl_witness.762, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0ed] +// CHECK:STDOUT: %impl.elem0.loc6_13.1: %.055 = impl_witness_access constants.%ImplicitAs.impl_witness.762, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0ed] // CHECK:STDOUT: %bound_method.loc6_13.1: = bound_method %int_1, %impl.elem0.loc6_13.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6b7] // CHECK:STDOUT: %specific_fn.loc6_13.1: = specific_function %impl.elem0.loc6_13.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_2.ecc) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_13.2: = bound_method %int_1, %specific_fn.loc6_13.1 [concrete = constants.%bound_method.a4b] @@ -265,7 +265,7 @@ let never: Never = {}; // CHECK:STDOUT: %.loc6_13.1: %u2 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6 [concrete = constants.%int_1.b2c] // CHECK:STDOUT: %.loc6_13.2: %u2 = converted %int_1, %.loc6_13.1 [concrete = constants.%int_1.b2c] // CHECK:STDOUT: %.loc6_13.3: %struct_type.discriminant = struct_literal (%.loc6_13.2) [concrete = constants.%struct.0ff] -// CHECK:STDOUT: %impl.elem0.loc6_13.2: %.d67 = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%UInt.as.Copy.impl.Op.b2d] +// CHECK:STDOUT: %impl.elem0.loc6_13.2: %.a82 = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%UInt.as.Copy.impl.Op.b2d] // CHECK:STDOUT: %bound_method.loc6_13.3: = bound_method %.loc6_13.2, %impl.elem0.loc6_13.2 [concrete = constants.%UInt.as.Copy.impl.Op.bound.67d] // CHECK:STDOUT: %specific_fn.loc6_13.2: = specific_function %impl.elem0.loc6_13.2, @UInt.as.Copy.impl.Op(constants.%int_2.ecc) [concrete = constants.%UInt.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_13.4: = bound_method %.loc6_13.2, %specific_fn.loc6_13.2 [concrete = constants.%bound_method.8f6] @@ -279,7 +279,7 @@ let never: Never = {}; // CHECK:STDOUT: %.loc6_13.10: %Ordering = acquire_value %.loc6_13.9 // CHECK:STDOUT: %Equivalent: %Ordering = value_binding Equivalent, %.loc6_13.10 // CHECK:STDOUT: %int_2.loc7: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc7_10.1: %.02a = impl_witness_access constants.%ImplicitAs.impl_witness.762, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0ed] +// CHECK:STDOUT: %impl.elem0.loc7_10.1: %.055 = impl_witness_access constants.%ImplicitAs.impl_witness.762, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0ed] // CHECK:STDOUT: %bound_method.loc7_10.1: = bound_method %int_2.loc7, %impl.elem0.loc7_10.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.c76] // CHECK:STDOUT: %specific_fn.loc7_10.1: = specific_function %impl.elem0.loc7_10.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_2.ecc) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_10.2: = bound_method %int_2.loc7, %specific_fn.loc7_10.1 [concrete = constants.%bound_method.c5b] @@ -287,7 +287,7 @@ let never: Never = {}; // CHECK:STDOUT: %.loc7_10.1: %u2 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7 [concrete = constants.%int_2.788] // CHECK:STDOUT: %.loc7_10.2: %u2 = converted %int_2.loc7, %.loc7_10.1 [concrete = constants.%int_2.788] // CHECK:STDOUT: %.loc7_10.3: %struct_type.discriminant = struct_literal (%.loc7_10.2) [concrete = constants.%struct.6e6] -// CHECK:STDOUT: %impl.elem0.loc7_10.2: %.d67 = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%UInt.as.Copy.impl.Op.b2d] +// CHECK:STDOUT: %impl.elem0.loc7_10.2: %.a82 = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%UInt.as.Copy.impl.Op.b2d] // CHECK:STDOUT: %bound_method.loc7_10.3: = bound_method %.loc7_10.2, %impl.elem0.loc7_10.2 [concrete = constants.%UInt.as.Copy.impl.Op.bound.f0c] // CHECK:STDOUT: %specific_fn.loc7_10.2: = specific_function %impl.elem0.loc7_10.2, @UInt.as.Copy.impl.Op(constants.%int_2.ecc) [concrete = constants.%UInt.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_10.4: = bound_method %.loc7_10.2, %specific_fn.loc7_10.2 [concrete = constants.%bound_method.f1a] @@ -301,7 +301,7 @@ let never: Never = {}; // CHECK:STDOUT: %.loc7_10.10: %Ordering = acquire_value %.loc7_10.9 // CHECK:STDOUT: %Greater: %Ordering = value_binding Greater, %.loc7_10.10 // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc9_1.1: %.02a = impl_witness_access constants.%ImplicitAs.impl_witness.762, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0ed] +// CHECK:STDOUT: %impl.elem0.loc9_1.1: %.055 = impl_witness_access constants.%ImplicitAs.impl_witness.762, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0ed] // CHECK:STDOUT: %bound_method.loc9_1.1: = bound_method %int_3, %impl.elem0.loc9_1.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cdf] // CHECK:STDOUT: %specific_fn.loc9_1.1: = specific_function %impl.elem0.loc9_1.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_2.ecc) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_1.2: = bound_method %int_3, %specific_fn.loc9_1.1 [concrete = constants.%bound_method.898] @@ -309,7 +309,7 @@ let never: Never = {}; // CHECK:STDOUT: %.loc9_1.1: %u2 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_3.975] // CHECK:STDOUT: %.loc9_1.2: %u2 = converted %int_3, %.loc9_1.1 [concrete = constants.%int_3.975] // CHECK:STDOUT: %.loc9_1.3: %struct_type.discriminant = struct_literal (%.loc9_1.2) [concrete = constants.%struct.7bd] -// CHECK:STDOUT: %impl.elem0.loc9_1.2: %.d67 = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%UInt.as.Copy.impl.Op.b2d] +// CHECK:STDOUT: %impl.elem0.loc9_1.2: %.a82 = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%UInt.as.Copy.impl.Op.b2d] // CHECK:STDOUT: %bound_method.loc9_1.3: = bound_method %.loc9_1.2, %impl.elem0.loc9_1.2 [concrete = constants.%UInt.as.Copy.impl.Op.bound.7b5] // CHECK:STDOUT: %specific_fn.loc9_1.2: = specific_function %impl.elem0.loc9_1.2, @UInt.as.Copy.impl.Op(constants.%int_2.ecc) [concrete = constants.%UInt.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_1.4: = bound_method %.loc9_1.2, %specific_fn.loc9_1.2 [concrete = constants.%bound_method.824] diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index 7db75046a3a7..d09fd4766be4 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -165,7 +165,6 @@ class A { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -173,7 +172,8 @@ class A { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.e9d: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -239,7 +239,7 @@ class A { // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_45.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005] // 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.loc6_45.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method.e9d] @@ -280,7 +280,7 @@ class A { // CHECK:STDOUT: fn @Circle.SomeInternalFunction() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_13.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // 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.loc9_13.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.d2e] @@ -293,7 +293,7 @@ class A { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %.loc13_24.1: %struct_type.radius.f47 = struct_literal (%int_5) [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_24.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005] // 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_24.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method.e9d] @@ -430,20 +430,19 @@ class A { // CHECK:STDOUT: %struct_type.radius: type = struct_type {.radius: %i32} [concrete] // CHECK:STDOUT: %complete_type.5a5: = complete_type_witness %struct_type.radius [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -451,7 +450,8 @@ class A { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -545,7 +545,7 @@ class A { // CHECK:STDOUT: %radius.ref: %Circle.elem = name_ref radius, @Circle.%.loc5 [concrete = @Circle.%.loc5] // CHECK:STDOUT: %.loc8_16.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc8_16.2: %i32 = acquire_value %.loc8_16.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc8_16.1: = bound_method %.loc8_16.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_16.2: = bound_method %.loc8_16.2, %specific_fn @@ -556,7 +556,7 @@ class A { // CHECK:STDOUT: fn @Circle.SomeInternalFunction() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_13.1: = bound_method %int_0, %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.loc12_13.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -586,7 +586,6 @@ class A { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -594,7 +593,8 @@ class A { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -643,7 +643,7 @@ class A { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc5_16.1: = bound_method %int_5, %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.loc5_16.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] @@ -679,7 +679,6 @@ class A { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -687,7 +686,8 @@ class A { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -745,7 +745,7 @@ class A { // CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc5: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc5: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc5_26.1: = bound_method %int_5.loc5, %impl.elem0.loc5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_26.2: = bound_method %int_5.loc5, %specific_fn.loc5 [concrete = constants.%bound_method] @@ -761,7 +761,7 @@ class A { // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc6: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_24.1: = bound_method %int_5.loc6, %impl.elem0.loc6 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_24.2: = bound_method %int_5.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/adapter/adapt.carbon b/toolchain/check/testdata/class/adapter/adapt.carbon index 3a8f4c3bfa97..91a6f336002c 100644 --- a/toolchain/check/testdata/class/adapter/adapt.carbon +++ b/toolchain/check/testdata/class/adapter/adapt.carbon @@ -253,6 +253,9 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: @@ -270,3 +273,5 @@ interface I { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/adapter/adapt_copy.carbon b/toolchain/check/testdata/class/adapter/adapt_copy.carbon index c9841debe835..01e835df5a97 100644 --- a/toolchain/check/testdata/class/adapter/adapt_copy.carbon +++ b/toolchain/check/testdata/class/adapter/adapt_copy.carbon @@ -340,14 +340,14 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.de4: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc9 [concrete] @@ -367,7 +367,8 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %UInt.as.Copy.impl.Op.type.2fc: type = fn_type @UInt.as.Copy.impl.Op, @UInt.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.c10: %UInt.as.Copy.impl.Op.type.2fc = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.10b: %Copy.type = facet_value %u32, (%Copy.impl_witness.514) [concrete] -// CHECK:STDOUT: %.fcc: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.10b [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.ad7: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.10b) [concrete] +// CHECK:STDOUT: %.38c: type = fn_type_with_self_type %Copy.WithSelf.Op.type.ad7, %Copy.facet.10b [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.specific_fn: = specific_function %UInt.as.Copy.impl.Op.c10, @UInt.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc14 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.2: %DestroyOp.type.3e79c2.2 = struct_value () [concrete] @@ -466,7 +467,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %c.ref: %AdaptTuple = name_ref c, %c // CHECK:STDOUT: %.loc9_3.1: %tuple.type.d07 = as_compatible %c.ref // CHECK:STDOUT: %tuple.elem0.loc9_3.1: %i32 = tuple_access %.loc9_3.1, element0 -// CHECK:STDOUT: %impl.elem0.loc9_3.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc9_3.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %tuple.elem0.loc9_3.1, %impl.elem0.loc9_3.1 // CHECK:STDOUT: %specific_fn.loc9_3.1: = specific_function %impl.elem0.loc9_3.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %tuple.elem0.loc9_3.1, %specific_fn.loc9_3.1 @@ -475,7 +476,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %tuple.elem0.loc9_3.2: ref %i32 = tuple_access %.loc9_3.2, element0 // CHECK:STDOUT: %.loc9_3.3: init %i32 to %tuple.elem0.loc9_3.2 = in_place_init %Int.as.Copy.impl.Op.call.loc9_3.1 // CHECK:STDOUT: %tuple.elem1.loc9_3.1: %i32 = tuple_access %.loc9_3.1, element1 -// CHECK:STDOUT: %impl.elem0.loc9_3.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc9_3.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc9_3.3: = bound_method %tuple.elem1.loc9_3.1, %impl.elem0.loc9_3.2 // CHECK:STDOUT: %specific_fn.loc9_3.2: = specific_function %impl.elem0.loc9_3.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_3.4: = bound_method %tuple.elem1.loc9_3.1, %specific_fn.loc9_3.2 @@ -492,7 +493,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc10_11.1: ref %tuple.type.d07 = as_compatible %d.ref // CHECK:STDOUT: %tuple.elem0.loc10_11.1: ref %i32 = tuple_access %.loc10_11.1, element0 // CHECK:STDOUT: %.loc10_11.2: %i32 = acquire_value %tuple.elem0.loc10_11.1 -// CHECK:STDOUT: %impl.elem0.loc10_11.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc10_11.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc10_11.1: = bound_method %.loc10_11.2, %impl.elem0.loc10_11.1 // CHECK:STDOUT: %specific_fn.loc10_11.1: = specific_function %impl.elem0.loc10_11.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc10_11.2: = bound_method %.loc10_11.2, %specific_fn.loc10_11.1 @@ -502,7 +503,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc10_11.4: init %i32 to %tuple.elem0.loc10_11.2 = in_place_init %Int.as.Copy.impl.Op.call.loc10_11.1 // CHECK:STDOUT: %tuple.elem1.loc10_11.1: ref %i32 = tuple_access %.loc10_11.1, element1 // CHECK:STDOUT: %.loc10_11.5: %i32 = acquire_value %tuple.elem1.loc10_11.1 -// CHECK:STDOUT: %impl.elem0.loc10_11.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc10_11.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc10_11.3: = bound_method %.loc10_11.5, %impl.elem0.loc10_11.2 // CHECK:STDOUT: %specific_fn.loc10_11.2: = specific_function %impl.elem0.loc10_11.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc10_11.4: = bound_method %.loc10_11.5, %specific_fn.loc10_11.2 @@ -530,7 +531,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %tuple.elem0.loc14_30.1: %AdaptTuple = tuple_access %c.ref, element0 // CHECK:STDOUT: %.loc14_30.1: %tuple.type.d07 = as_compatible %tuple.elem0.loc14_30.1 // CHECK:STDOUT: %tuple.elem0.loc14_30.2: %i32 = tuple_access %.loc14_30.1, element0 -// CHECK:STDOUT: %impl.elem0.loc14_30.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc14_30.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc14_30.1: = bound_method %tuple.elem0.loc14_30.2, %impl.elem0.loc14_30.1 // CHECK:STDOUT: %specific_fn.loc14_30.1: = specific_function %impl.elem0.loc14_30.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_30.2: = bound_method %tuple.elem0.loc14_30.2, %specific_fn.loc14_30.1 @@ -540,7 +541,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %tuple.elem0.loc14_30.4: ref %i32 = tuple_access %.loc14_30.2, element0 // CHECK:STDOUT: %.loc14_30.3: init %i32 to %tuple.elem0.loc14_30.4 = in_place_init %Int.as.Copy.impl.Op.call.loc14_30.1 // CHECK:STDOUT: %tuple.elem1.loc14_30.1: %i32 = tuple_access %.loc14_30.1, element1 -// CHECK:STDOUT: %impl.elem0.loc14_30.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc14_30.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc14_30.3: = bound_method %tuple.elem1.loc14_30.1, %impl.elem0.loc14_30.2 // CHECK:STDOUT: %specific_fn.loc14_30.2: = specific_function %impl.elem0.loc14_30.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_30.4: = bound_method %tuple.elem1.loc14_30.1, %specific_fn.loc14_30.2 @@ -551,7 +552,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc14_30.6: init %AdaptTuple = as_compatible %.loc14_30.5 // CHECK:STDOUT: %.loc14_30.7: init %AdaptTuple = converted %tuple.elem0.loc14_30.1, %.loc14_30.6 // CHECK:STDOUT: %tuple.elem1.loc14_30.3: %u32 = tuple_access %c.ref, element1 -// CHECK:STDOUT: %impl.elem0.loc14_30.3: %.fcc = impl_witness_access constants.%Copy.impl_witness.514, element0 [concrete = constants.%UInt.as.Copy.impl.Op.c10] +// CHECK:STDOUT: %impl.elem0.loc14_30.3: %.38c = impl_witness_access constants.%Copy.impl_witness.514, element0 [concrete = constants.%UInt.as.Copy.impl.Op.c10] // CHECK:STDOUT: %bound_method.loc14_30.5: = bound_method %tuple.elem1.loc14_30.3, %impl.elem0.loc14_30.3 // CHECK:STDOUT: %specific_fn.loc14_30.3: = specific_function %impl.elem0.loc14_30.3, @UInt.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%UInt.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_30.6: = bound_method %tuple.elem1.loc14_30.3, %specific_fn.loc14_30.3 @@ -574,7 +575,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc15_10.1: ref %tuple.type.d07 = as_compatible %tuple.elem0.loc15_10.1 // CHECK:STDOUT: %tuple.elem0.loc15_10.2: ref %i32 = tuple_access %.loc15_10.1, element0 // CHECK:STDOUT: %.loc15_10.2: %i32 = acquire_value %tuple.elem0.loc15_10.2 -// CHECK:STDOUT: %impl.elem0.loc15_10.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc15_10.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc15_10.1: = bound_method %.loc15_10.2, %impl.elem0.loc15_10.1 // CHECK:STDOUT: %specific_fn.loc15_10.1: = specific_function %impl.elem0.loc15_10.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_10.2: = bound_method %.loc15_10.2, %specific_fn.loc15_10.1 @@ -585,7 +586,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc15_10.4: init %i32 to %tuple.elem0.loc15_10.4 = in_place_init %Int.as.Copy.impl.Op.call.loc15_10.1 // CHECK:STDOUT: %tuple.elem1.loc15_10.1: ref %i32 = tuple_access %.loc15_10.1, element1 // CHECK:STDOUT: %.loc15_10.5: %i32 = acquire_value %tuple.elem1.loc15_10.1 -// CHECK:STDOUT: %impl.elem0.loc15_10.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc15_10.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc15_10.3: = bound_method %.loc15_10.5, %impl.elem0.loc15_10.2 // CHECK:STDOUT: %specific_fn.loc15_10.2: = specific_function %impl.elem0.loc15_10.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_10.4: = bound_method %.loc15_10.5, %specific_fn.loc15_10.2 @@ -597,7 +598,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc15_10.9: init %AdaptTuple = converted %tuple.elem0.loc15_10.1, %.loc15_10.8 // CHECK:STDOUT: %tuple.elem1.loc15_10.3: ref %u32 = tuple_access %d.ref, element1 // CHECK:STDOUT: %.loc15_10.10: %u32 = acquire_value %tuple.elem1.loc15_10.3 -// CHECK:STDOUT: %impl.elem0.loc15_10.3: %.fcc = impl_witness_access constants.%Copy.impl_witness.514, element0 [concrete = constants.%UInt.as.Copy.impl.Op.c10] +// CHECK:STDOUT: %impl.elem0.loc15_10.3: %.38c = impl_witness_access constants.%Copy.impl_witness.514, element0 [concrete = constants.%UInt.as.Copy.impl.Op.c10] // CHECK:STDOUT: %bound_method.loc15_10.5: = bound_method %.loc15_10.10, %impl.elem0.loc15_10.3 // CHECK:STDOUT: %specific_fn.loc15_10.3: = specific_function %impl.elem0.loc15_10.3, @UInt.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%UInt.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_10.6: = bound_method %.loc15_10.10, %specific_fn.loc15_10.3 @@ -729,14 +730,14 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -819,7 +820,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %a.ref: %AdaptNoncopyableIndirect = name_ref a, %a // CHECK:STDOUT: %.loc23_3.1: %tuple.type.7f9 = as_compatible %a.ref // CHECK:STDOUT: %tuple.elem0.loc23_3.1: %i32 = tuple_access %.loc23_3.1, element0 -// CHECK:STDOUT: %impl.elem0.loc23: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc23: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc23_3.1: = bound_method %tuple.elem0.loc23_3.1, %impl.elem0.loc23 // CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc23_3.2: = bound_method %tuple.elem0.loc23_3.1, %specific_fn.loc23 @@ -835,7 +836,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc34_11.1: ref %tuple.type.7f9 = as_compatible %b.ref // CHECK:STDOUT: %tuple.elem0.loc34_11.1: ref %i32 = tuple_access %.loc34_11.1, element0 // CHECK:STDOUT: %.loc34_11.2: %i32 = acquire_value %tuple.elem0.loc34_11.1 -// CHECK:STDOUT: %impl.elem0.loc34: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc34: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc34_11.1: = bound_method %.loc34_11.2, %impl.elem0.loc34 // CHECK:STDOUT: %specific_fn.loc34: = specific_function %impl.elem0.loc34, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc34_11.2: = bound_method %.loc34_11.2, %specific_fn.loc34 @@ -869,14 +870,14 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %I.type: type = fn_type @I [concrete] // CHECK:STDOUT: %I: %I.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.de4: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc9 [concrete] @@ -897,7 +898,8 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %UInt.as.Copy.impl.Op.type.2fc: type = fn_type @UInt.as.Copy.impl.Op, @UInt.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.c10: %UInt.as.Copy.impl.Op.type.2fc = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.10b: %Copy.type = facet_value %u32, (%Copy.impl_witness.514) [concrete] -// CHECK:STDOUT: %.fcc: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.10b [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.ad7: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.10b) [concrete] +// CHECK:STDOUT: %.38c: type = fn_type_with_self_type %Copy.WithSelf.Op.type.ad7, %Copy.facet.10b [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.specific_fn: = specific_function %UInt.as.Copy.impl.Op.c10, @UInt.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc14 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.2: %DestroyOp.type.3e79c2.2 = struct_value () [concrete] @@ -995,7 +997,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %g.ref: %AdaptStruct = name_ref g, %g // CHECK:STDOUT: %.loc9_3.1: %struct_type.e.f = as_compatible %g.ref // CHECK:STDOUT: %.loc9_3.2: %i32 = struct_access %.loc9_3.1, element0 -// CHECK:STDOUT: %impl.elem0.loc9_3.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc9_3.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc9_3.1: = bound_method %.loc9_3.2, %impl.elem0.loc9_3.1 // CHECK:STDOUT: %specific_fn.loc9_3.1: = specific_function %impl.elem0.loc9_3.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_3.2: = bound_method %.loc9_3.2, %specific_fn.loc9_3.1 @@ -1004,7 +1006,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc9_3.4: ref %i32 = struct_access %.loc9_3.3, element0 // CHECK:STDOUT: %.loc9_3.5: init %i32 to %.loc9_3.4 = in_place_init %Int.as.Copy.impl.Op.call.loc9_3.1 // CHECK:STDOUT: %.loc9_3.6: %i32 = struct_access %.loc9_3.1, element1 -// CHECK:STDOUT: %impl.elem0.loc9_3.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc9_3.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc9_3.3: = bound_method %.loc9_3.6, %impl.elem0.loc9_3.2 // CHECK:STDOUT: %specific_fn.loc9_3.2: = specific_function %impl.elem0.loc9_3.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_3.4: = bound_method %.loc9_3.6, %specific_fn.loc9_3.2 @@ -1021,7 +1023,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc10_11.1: ref %struct_type.e.f = as_compatible %h.ref // CHECK:STDOUT: %.loc10_11.2: ref %i32 = struct_access %.loc10_11.1, element0 // CHECK:STDOUT: %.loc10_11.3: %i32 = acquire_value %.loc10_11.2 -// CHECK:STDOUT: %impl.elem0.loc10_11.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc10_11.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc10_11.1: = bound_method %.loc10_11.3, %impl.elem0.loc10_11.1 // CHECK:STDOUT: %specific_fn.loc10_11.1: = specific_function %impl.elem0.loc10_11.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc10_11.2: = bound_method %.loc10_11.3, %specific_fn.loc10_11.1 @@ -1031,7 +1033,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc10_11.6: init %i32 to %.loc10_11.5 = in_place_init %Int.as.Copy.impl.Op.call.loc10_11.1 // CHECK:STDOUT: %.loc10_11.7: ref %i32 = struct_access %.loc10_11.1, element1 // CHECK:STDOUT: %.loc10_11.8: %i32 = acquire_value %.loc10_11.7 -// CHECK:STDOUT: %impl.elem0.loc10_11.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc10_11.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc10_11.3: = bound_method %.loc10_11.8, %impl.elem0.loc10_11.2 // CHECK:STDOUT: %specific_fn.loc10_11.2: = specific_function %impl.elem0.loc10_11.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc10_11.4: = bound_method %.loc10_11.8, %specific_fn.loc10_11.2 @@ -1059,7 +1061,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %tuple.elem0.loc14_31.1: %AdaptStruct = tuple_access %c.ref, element0 // CHECK:STDOUT: %.loc14_31.1: %struct_type.e.f = as_compatible %tuple.elem0.loc14_31.1 // CHECK:STDOUT: %.loc14_31.2: %i32 = struct_access %.loc14_31.1, element0 -// CHECK:STDOUT: %impl.elem0.loc14_31.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc14_31.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc14_31.1: = bound_method %.loc14_31.2, %impl.elem0.loc14_31.1 // CHECK:STDOUT: %specific_fn.loc14_31.1: = specific_function %impl.elem0.loc14_31.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_31.2: = bound_method %.loc14_31.2, %specific_fn.loc14_31.1 @@ -1069,7 +1071,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc14_31.4: ref %i32 = struct_access %.loc14_31.3, element0 // CHECK:STDOUT: %.loc14_31.5: init %i32 to %.loc14_31.4 = in_place_init %Int.as.Copy.impl.Op.call.loc14_31.1 // CHECK:STDOUT: %.loc14_31.6: %i32 = struct_access %.loc14_31.1, element1 -// CHECK:STDOUT: %impl.elem0.loc14_31.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc14_31.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc14_31.3: = bound_method %.loc14_31.6, %impl.elem0.loc14_31.2 // CHECK:STDOUT: %specific_fn.loc14_31.2: = specific_function %impl.elem0.loc14_31.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_31.4: = bound_method %.loc14_31.6, %specific_fn.loc14_31.2 @@ -1080,7 +1082,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc14_31.10: init %AdaptStruct = as_compatible %.loc14_31.9 // CHECK:STDOUT: %.loc14_31.11: init %AdaptStruct = converted %tuple.elem0.loc14_31.1, %.loc14_31.10 // CHECK:STDOUT: %tuple.elem1.loc14_31.1: %u32 = tuple_access %c.ref, element1 -// CHECK:STDOUT: %impl.elem0.loc14_31.3: %.fcc = impl_witness_access constants.%Copy.impl_witness.514, element0 [concrete = constants.%UInt.as.Copy.impl.Op.c10] +// CHECK:STDOUT: %impl.elem0.loc14_31.3: %.38c = impl_witness_access constants.%Copy.impl_witness.514, element0 [concrete = constants.%UInt.as.Copy.impl.Op.c10] // CHECK:STDOUT: %bound_method.loc14_31.5: = bound_method %tuple.elem1.loc14_31.1, %impl.elem0.loc14_31.3 // CHECK:STDOUT: %specific_fn.loc14_31.3: = specific_function %impl.elem0.loc14_31.3, @UInt.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%UInt.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_31.6: = bound_method %tuple.elem1.loc14_31.1, %specific_fn.loc14_31.3 @@ -1103,7 +1105,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc15_10.1: ref %struct_type.e.f = as_compatible %tuple.elem0.loc15_10.1 // CHECK:STDOUT: %.loc15_10.2: ref %i32 = struct_access %.loc15_10.1, element0 // CHECK:STDOUT: %.loc15_10.3: %i32 = acquire_value %.loc15_10.2 -// CHECK:STDOUT: %impl.elem0.loc15_10.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc15_10.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc15_10.1: = bound_method %.loc15_10.3, %impl.elem0.loc15_10.1 // CHECK:STDOUT: %specific_fn.loc15_10.1: = specific_function %impl.elem0.loc15_10.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_10.2: = bound_method %.loc15_10.3, %specific_fn.loc15_10.1 @@ -1114,7 +1116,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc15_10.6: init %i32 to %.loc15_10.5 = in_place_init %Int.as.Copy.impl.Op.call.loc15_10.1 // CHECK:STDOUT: %.loc15_10.7: ref %i32 = struct_access %.loc15_10.1, element1 // CHECK:STDOUT: %.loc15_10.8: %i32 = acquire_value %.loc15_10.7 -// CHECK:STDOUT: %impl.elem0.loc15_10.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc15_10.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc15_10.3: = bound_method %.loc15_10.8, %impl.elem0.loc15_10.2 // CHECK:STDOUT: %specific_fn.loc15_10.2: = specific_function %impl.elem0.loc15_10.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_10.4: = bound_method %.loc15_10.8, %specific_fn.loc15_10.2 @@ -1126,7 +1128,7 @@ fn InTuple(c: (AdaptStruct, u32)) -> (AdaptStruct, u32) { // CHECK:STDOUT: %.loc15_10.13: init %AdaptStruct = converted %tuple.elem0.loc15_10.1, %.loc15_10.12 // CHECK:STDOUT: %tuple.elem1.loc15_10.1: ref %u32 = tuple_access %d.ref, element1 // CHECK:STDOUT: %.loc15_10.14: %u32 = acquire_value %tuple.elem1.loc15_10.1 -// CHECK:STDOUT: %impl.elem0.loc15_10.3: %.fcc = impl_witness_access constants.%Copy.impl_witness.514, element0 [concrete = constants.%UInt.as.Copy.impl.Op.c10] +// CHECK:STDOUT: %impl.elem0.loc15_10.3: %.38c = impl_witness_access constants.%Copy.impl_witness.514, element0 [concrete = constants.%UInt.as.Copy.impl.Op.c10] // CHECK:STDOUT: %bound_method.loc15_10.5: = bound_method %.loc15_10.14, %impl.elem0.loc15_10.3 // CHECK:STDOUT: %specific_fn.loc15_10.3: = specific_function %impl.elem0.loc15_10.3, @UInt.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%UInt.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_10.6: = bound_method %.loc15_10.14, %specific_fn.loc15_10.3 diff --git a/toolchain/check/testdata/class/adapter/init_adapt.carbon b/toolchain/check/testdata/class/adapter/init_adapt.carbon index 2f5731aff0f8..23338e02db9b 100644 --- a/toolchain/check/testdata/class/adapter/init_adapt.carbon +++ b/toolchain/check/testdata/class/adapter/init_adapt.carbon @@ -116,7 +116,6 @@ var e: C = MakeAdaptC(); // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -124,7 +123,8 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -175,7 +175,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %a.patt: %pattern_type.7c7 = value_binding_pattern a [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [concrete = constants.%C] -// CHECK:STDOUT: %impl.elem0.loc13_27.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc13_27.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_27.1: = bound_method @__global_init.%int_1, %impl.elem0.loc13_27.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc13_27.1: = specific_function %impl.elem0.loc13_27.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.2: = bound_method @__global_init.%int_1, %specific_fn.loc13_27.1 [concrete = constants.%bound_method.38b] @@ -184,7 +184,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_27.2: ref %C = temporary_storage // CHECK:STDOUT: %.loc13_27.3: ref %i32 = class_element_access %.loc13_27.2, element0 // CHECK:STDOUT: %.loc13_27.4: init %i32 to %.loc13_27.3 = in_place_init %.loc13_27.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc13_27.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc13_27.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_27.3: = bound_method @__global_init.%int_2, %impl.elem0.loc13_27.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc13_27.2: = specific_function %impl.elem0.loc13_27.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.4: = bound_method @__global_init.%int_2, %specific_fn.loc13_27.2 [concrete = constants.%bound_method.646] @@ -322,7 +322,6 @@ var e: C = MakeAdaptC(); // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -330,7 +329,8 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -381,7 +381,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %a.patt: %pattern_type.7c7 = value_binding_pattern a [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [concrete = constants.%C] -// CHECK:STDOUT: %impl.elem0.loc13_27.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc13_27.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_27.1: = bound_method @__global_init.%int_1, %impl.elem0.loc13_27.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc13_27.1: = specific_function %impl.elem0.loc13_27.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.2: = bound_method @__global_init.%int_1, %specific_fn.loc13_27.1 [concrete = constants.%bound_method.38b] @@ -390,7 +390,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_27.2: ref %C = temporary_storage // CHECK:STDOUT: %.loc13_27.3: ref %i32 = class_element_access %.loc13_27.2, element0 // CHECK:STDOUT: %.loc13_27.4: init %i32 to %.loc13_27.3 = in_place_init %.loc13_27.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc13_27.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc13_27.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_27.3: = bound_method @__global_init.%int_2, %impl.elem0.loc13_27.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc13_27.2: = specific_function %impl.elem0.loc13_27.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_27.4: = bound_method @__global_init.%int_2, %specific_fn.loc13_27.2 [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/class/base.carbon b/toolchain/check/testdata/class/base.carbon index e05f0c5a03a0..f5fb46add808 100644 --- a/toolchain/check/testdata/class/base.carbon +++ b/toolchain/check/testdata/class/base.carbon @@ -79,7 +79,6 @@ class Derived { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -87,7 +86,8 @@ class Derived { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.6d7: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -105,14 +105,14 @@ class Derived { // CHECK:STDOUT: %Access.type: type = fn_type @Access [concrete] // CHECK:STDOUT: %Access: %Access.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -209,7 +209,7 @@ class Derived { // CHECK:STDOUT: %.loc14_26.1: %struct_type.b.a15 = struct_literal (%int_4) [concrete = constants.%struct.a2e] // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7.29f] // CHECK:STDOUT: %.loc14_35.1: %struct_type.base.d.a20 = struct_literal (%.loc14_26.1, %int_7) [concrete = constants.%struct.ab7] -// CHECK:STDOUT: %impl.elem0.loc14_26: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc14_26: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc14_26.1: = bound_method %int_4, %impl.elem0.loc14_26 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc14_26: = specific_function %impl.elem0.loc14_26, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_26.2: = bound_method %int_4, %specific_fn.loc14_26 [concrete = constants.%bound_method.6d7] @@ -220,7 +220,7 @@ class Derived { // CHECK:STDOUT: %.loc14_26.4: init %i32 to %.loc14_26.3 = in_place_init %.loc14_26.2 [concrete = constants.%int_4.940] // CHECK:STDOUT: %.loc14_26.5: init %Base to %.loc14_35.2 = class_init (%.loc14_26.4) [concrete = constants.%Base.val] // CHECK:STDOUT: %.loc14_35.3: init %Base = converted %.loc14_26.1, %.loc14_26.5 [concrete = constants.%Base.val] -// CHECK:STDOUT: %impl.elem0.loc14_35: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc14_35: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc14_35.1: = bound_method %int_7, %impl.elem0.loc14_35 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.1e0] // CHECK:STDOUT: %specific_fn.loc14_35: = specific_function %impl.elem0.loc14_35, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_35.2: = bound_method %int_7, %specific_fn.loc14_35 [concrete = constants.%bound_method.bf2] @@ -247,14 +247,14 @@ class Derived { // CHECK:STDOUT: %.loc18_22.1: ref %i32 = class_element_access %.loc18_17.2, element0 // CHECK:STDOUT: %.loc18_22.2: %i32 = acquire_value %.loc18_22.1 // CHECK:STDOUT: %.loc18_24.1: %tuple.type.d07 = tuple_literal (%.loc18_12.2, %.loc18_22.2) -// CHECK:STDOUT: %impl.elem0.loc18_12: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc18_12: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc18_12.1: = bound_method %.loc18_12.2, %impl.elem0.loc18_12 // CHECK:STDOUT: %specific_fn.loc18_12: = specific_function %impl.elem0.loc18_12, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc18_12.2: = bound_method %.loc18_12.2, %specific_fn.loc18_12 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc18_12: init %i32 = call %bound_method.loc18_12.2(%.loc18_12.2) // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return.param, element0 // CHECK:STDOUT: %.loc18_24.2: init %i32 to %tuple.elem0 = in_place_init %Int.as.Copy.impl.Op.call.loc18_12 -// CHECK:STDOUT: %impl.elem0.loc18_22: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc18_22: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc18_22.1: = bound_method %.loc18_22.2, %impl.elem0.loc18_22 // CHECK:STDOUT: %specific_fn.loc18_22: = specific_function %impl.elem0.loc18_22, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc18_22.2: = bound_method %.loc18_22.2, %specific_fn.loc18_22 diff --git a/toolchain/check/testdata/class/base_field.carbon b/toolchain/check/testdata/class/base_field.carbon index dddffb60bd61..860d2109c91d 100644 --- a/toolchain/check/testdata/class/base_field.carbon +++ b/toolchain/check/testdata/class/base_field.carbon @@ -53,7 +53,6 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: %Access.type: type = fn_type @Access [concrete] // CHECK:STDOUT: %Access: %Access.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -61,7 +60,8 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.c3c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -160,7 +160,7 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: %.loc29_15.2: ref %Base = converted %.loc29_12, %.loc29_15.1 // CHECK:STDOUT: %.loc29_15.3: ref %i32 = class_element_access %.loc29_15.2, element2 // CHECK:STDOUT: %addr: %ptr.235 = addr_of %.loc29_15.3 -// CHECK:STDOUT: %impl.elem0: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc29_10.1: = bound_method %addr, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc29_10.2: = bound_method %addr, %specific_fn diff --git a/toolchain/check/testdata/class/base_method.carbon b/toolchain/check/testdata/class/base_method.carbon index 2889e63ddeec..d2261461c082 100644 --- a/toolchain/check/testdata/class/base_method.carbon +++ b/toolchain/check/testdata/class/base_method.carbon @@ -49,7 +49,6 @@ fn Call(p: Derived*) { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -57,7 +56,8 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -157,7 +157,7 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc16 [concrete = @Base.%.loc16] // CHECK:STDOUT: %.loc22_7: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc22_10.1: = bound_method %int_1, %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.loc22_10.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/basic.carbon b/toolchain/check/testdata/class/basic.carbon index 82d4cab57ce0..d9c3101c13fe 100644 --- a/toolchain/check/testdata/class/basic.carbon +++ b/toolchain/check/testdata/class/basic.carbon @@ -49,14 +49,14 @@ fn Run() -> i32 { // CHECK:STDOUT: %struct_type.k: type = struct_type {.k: %i32} [concrete] // CHECK:STDOUT: %complete_type.954: = complete_type_witness %struct_type.k [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %.437: Core.Form = init_form %i32, call_param0 [concrete] // CHECK:STDOUT: %Run.type: type = fn_type @Run [concrete] @@ -65,7 +65,6 @@ fn Run() -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -73,7 +72,8 @@ fn Run() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @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] @@ -190,7 +190,7 @@ fn Run() -> i32 { // CHECK:STDOUT: fn @Class.F(%n.param: %i32) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc17_12.1: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_12.2: = bound_method %n.ref, %specific_fn @@ -201,7 +201,7 @@ fn Run() -> i32 { // CHECK:STDOUT: fn @Class.G(%n.param.loc25: %i32) -> out %return.param.loc25: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n.loc25 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc26_10.1: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc26_10.2: = bound_method %n.ref, %specific_fn @@ -214,7 +214,7 @@ fn Run() -> i32 { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] // CHECK:STDOUT: %F.ref: %Class.F.type = name_ref F, @Class.%Class.F.decl [concrete = constants.%Class.F] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc30_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.loc30_18.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/complete_in_member_fn.carbon b/toolchain/check/testdata/class/complete_in_member_fn.carbon index bb025cc3a0f9..372c3d8afedd 100644 --- a/toolchain/check/testdata/class/complete_in_member_fn.carbon +++ b/toolchain/check/testdata/class/complete_in_member_fn.carbon @@ -36,14 +36,14 @@ class C { // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [concrete] // CHECK:STDOUT: %complete_type.fd7: = complete_type_witness %struct_type.a [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -104,7 +104,7 @@ class C { // CHECK:STDOUT: %a.ref: %C.elem = name_ref a, @C.%.loc18 [concrete = @C.%.loc18] // CHECK:STDOUT: %.loc16_31.1: ref %i32 = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc16_31.2: %i32 = acquire_value %.loc16_31.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc16_31.1: = bound_method %.loc16_31.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_31.2: = bound_method %.loc16_31.2, %specific_fn diff --git a/toolchain/check/testdata/class/compound_field.carbon b/toolchain/check/testdata/class/compound_field.carbon index d6191328ac04..0f2f091d3991 100644 --- a/toolchain/check/testdata/class/compound_field.carbon +++ b/toolchain/check/testdata/class/compound_field.carbon @@ -64,7 +64,6 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %AccessDerived.type: type = fn_type @AccessDerived [concrete] // CHECK:STDOUT: %AccessDerived: %AccessDerived.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] @@ -74,7 +73,8 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.de4: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %AccessBase.type: type = fn_type @AccessBase [concrete] // CHECK:STDOUT: %AccessBase: %AccessBase.type = struct_value () [concrete] @@ -89,7 +89,8 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.c3c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.a7b: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.a7b [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.a7b) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet.a7b [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %AccessBaseIndirect.type: type = fn_type @AccessBaseIndirect [concrete] // CHECK:STDOUT: %AccessBaseIndirect: %AccessBaseIndirect.type = struct_value () [concrete] @@ -241,7 +242,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %d.ref.loc29_20: %Derived.elem.530 = name_ref d, @Derived.%.loc24 [concrete = @Derived.%.loc24] // CHECK:STDOUT: %.loc29_11.1: ref %i32 = class_element_access %d.ref.loc29_10, element1 // CHECK:STDOUT: %.loc29_11.2: %i32 = acquire_value %.loc29_11.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc29_11.1: = bound_method %.loc29_11.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc29_11.2: = bound_method %.loc29_11.2, %specific_fn @@ -258,7 +259,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %.loc33_11.2: ref %Base = converted %d.ref, %.loc33_11.1 // CHECK:STDOUT: %.loc33_11.3: ref %i32 = class_element_access %.loc33_11.2, element1 // CHECK:STDOUT: %.loc33_11.4: %i32 = acquire_value %.loc33_11.3 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc33_11.1: = bound_method %.loc33_11.4, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc33_11.2: = bound_method %.loc33_11.4, %specific_fn @@ -274,7 +275,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %.loc37_12.1: ref %Derived = deref %p.ref // CHECK:STDOUT: %.loc37_12.2: ref %i32 = class_element_access %.loc37_12.1, element1 // CHECK:STDOUT: %addr: %ptr.235 = addr_of %.loc37_12.2 -// CHECK:STDOUT: %impl.elem0: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc37_10.1: = bound_method %addr, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc37_10.2: = bound_method %addr, %specific_fn @@ -292,7 +293,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %.loc41_12.3: ref %Base = converted %.loc41_12.1, %.loc41_12.2 // CHECK:STDOUT: %.loc41_12.4: ref %i32 = class_element_access %.loc41_12.3, element1 // CHECK:STDOUT: %addr: %ptr.235 = addr_of %.loc41_12.4 -// CHECK:STDOUT: %impl.elem0: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc41_10.1: = bound_method %addr, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc41_10.2: = bound_method %addr, %specific_fn diff --git a/toolchain/check/testdata/class/derived_to_base.carbon b/toolchain/check/testdata/class/derived_to_base.carbon index 3593947aa3b2..1778c5ad08a4 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -133,7 +133,6 @@ fn PassConstB(p: const B) { // CHECK:STDOUT: %ConvertCToB.type: type = fn_type @ConvertCToB [concrete] // CHECK:STDOUT: %ConvertCToB: %ConvertCToB.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -141,7 +140,8 @@ fn PassConstB(p: const B) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.0fc: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%B) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.20b: %ptr.as.Copy.impl.Op.type.0fc = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.069: %Copy.type = facet_value %ptr.27c, (%Copy.impl_witness.672) [concrete] -// CHECK:STDOUT: %.116: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.069 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d34: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.069) [concrete] +// CHECK:STDOUT: %.cc8: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d34, %Copy.facet.069 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn.695: = specific_function %ptr.as.Copy.impl.Op.20b, @ptr.as.Copy.impl.Op(%B) [concrete] // CHECK:STDOUT: %ptr.643: type = ptr_type %A [concrete] // CHECK:STDOUT: %.6ec: Core.Form = init_form %ptr.643, call_param1 [concrete] @@ -152,7 +152,8 @@ fn PassConstB(p: const B) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.772: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%A) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.510: %ptr.as.Copy.impl.Op.type.772 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.f6a: %Copy.type = facet_value %ptr.643, (%Copy.impl_witness.551) [concrete] -// CHECK:STDOUT: %.393: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.f6a [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.f6f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.f6a) [concrete] +// CHECK:STDOUT: %.2f8: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f6f, %Copy.facet.f6a [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn.05b: = specific_function %ptr.as.Copy.impl.Op.510, @ptr.as.Copy.impl.Op(%A) [concrete] // CHECK:STDOUT: %ConvertCToA.type: type = fn_type @ConvertCToA [concrete] // CHECK:STDOUT: %ConvertCToA: %ConvertCToA.type = struct_value () [concrete] @@ -174,7 +175,6 @@ fn PassConstB(p: const B) { // CHECK:STDOUT: %struct_type.base.c.136: type = struct_type {.base: %struct_type.base.b.bf0, .c: Core.IntLiteral} [concrete] // CHECK:STDOUT: %struct.2aa: %struct_type.base.c.136 = struct_value (%struct.ff9, %int_3.1ba) [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -182,7 +182,8 @@ fn PassConstB(p: const B) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -298,7 +299,7 @@ fn PassConstB(p: const B) { // CHECK:STDOUT: %.loc19_39.2: ref %B = class_element_access %.loc19_39.1, element0 // CHECK:STDOUT: %addr: %ptr.27c = addr_of %.loc19_39.2 // CHECK:STDOUT: %.loc19_39.3: %ptr.27c = converted %p.ref, %addr -// CHECK:STDOUT: %impl.elem0: %.116 = impl_witness_access constants.%Copy.impl_witness.672, element0 [concrete = constants.%ptr.as.Copy.impl.Op.20b] +// CHECK:STDOUT: %impl.elem0: %.cc8 = impl_witness_access constants.%Copy.impl_witness.672, element0 [concrete = constants.%ptr.as.Copy.impl.Op.20b] // CHECK:STDOUT: %bound_method.loc19_39.1: = bound_method %.loc19_39.3, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%B) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.695] // CHECK:STDOUT: %bound_method.loc19_39.2: = bound_method %.loc19_39.3, %specific_fn @@ -313,7 +314,7 @@ fn PassConstB(p: const B) { // CHECK:STDOUT: %.loc20_39.2: ref %A = class_element_access %.loc20_39.1, element0 // CHECK:STDOUT: %addr: %ptr.643 = addr_of %.loc20_39.2 // CHECK:STDOUT: %.loc20_39.3: %ptr.643 = converted %p.ref, %addr -// CHECK:STDOUT: %impl.elem0: %.393 = impl_witness_access constants.%Copy.impl_witness.551, element0 [concrete = constants.%ptr.as.Copy.impl.Op.510] +// CHECK:STDOUT: %impl.elem0: %.2f8 = impl_witness_access constants.%Copy.impl_witness.551, element0 [concrete = constants.%ptr.as.Copy.impl.Op.510] // CHECK:STDOUT: %bound_method.loc20_39.1: = bound_method %.loc20_39.3, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%A) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.05b] // CHECK:STDOUT: %bound_method.loc20_39.2: = bound_method %.loc20_39.3, %specific_fn @@ -329,7 +330,7 @@ fn PassConstB(p: const B) { // CHECK:STDOUT: %.loc21_39.3: ref %A = class_element_access %.loc21_39.2, element0 // CHECK:STDOUT: %addr: %ptr.643 = addr_of %.loc21_39.3 // CHECK:STDOUT: %.loc21_39.4: %ptr.643 = converted %p.ref, %addr -// CHECK:STDOUT: %impl.elem0: %.393 = impl_witness_access constants.%Copy.impl_witness.551, element0 [concrete = constants.%ptr.as.Copy.impl.Op.510] +// CHECK:STDOUT: %impl.elem0: %.2f8 = impl_witness_access constants.%Copy.impl_witness.551, element0 [concrete = constants.%ptr.as.Copy.impl.Op.510] // CHECK:STDOUT: %bound_method.loc21_39.1: = bound_method %.loc21_39.4, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%A) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.05b] // CHECK:STDOUT: %bound_method.loc21_39.2: = bound_method %.loc21_39.4, %specific_fn @@ -361,7 +362,7 @@ fn PassConstB(p: const B) { // CHECK:STDOUT: %.loc28_15.2: ref %A = class_element_access %.loc28_15.1, element0 // CHECK:STDOUT: %.loc28_15.3: ref %A = converted %.loc28_12, %.loc28_15.2 // CHECK:STDOUT: %addr: %ptr.643 = addr_of %.loc28_15.3 -// CHECK:STDOUT: %impl.elem0: %.393 = impl_witness_access constants.%Copy.impl_witness.551, element0 [concrete = constants.%ptr.as.Copy.impl.Op.510] +// CHECK:STDOUT: %impl.elem0: %.2f8 = impl_witness_access constants.%Copy.impl_witness.551, element0 [concrete = constants.%ptr.as.Copy.impl.Op.510] // CHECK:STDOUT: %bound_method.loc28_10.1: = bound_method %addr, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%A) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.05b] // CHECK:STDOUT: %bound_method.loc28_10.2: = bound_method %addr, %specific_fn @@ -381,7 +382,7 @@ fn PassConstB(p: const B) { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc32_57.1: %struct_type.base.c.136 = struct_literal (%.loc32_48.1, %int_3) [concrete = constants.%struct.2aa] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %impl.elem0.loc32_39: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc32_39: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc32_39.1: = bound_method %int_1, %impl.elem0.loc32_39 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc32_39: = specific_function %impl.elem0.loc32_39, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc32_39.2: = bound_method %int_1, %specific_fn.loc32_39 [concrete = constants.%bound_method.38b] @@ -394,7 +395,7 @@ fn PassConstB(p: const B) { // CHECK:STDOUT: %.loc32_39.4: init %i32 to %.loc32_39.3 = in_place_init %.loc32_39.2 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc32_39.5: init %A to %.loc32_48.2 = class_init (%.loc32_39.4) [concrete = constants.%A.val] // CHECK:STDOUT: %.loc32_48.3: init %A = converted %.loc32_39.1, %.loc32_39.5 [concrete = constants.%A.val] -// CHECK:STDOUT: %impl.elem0.loc32_48: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc32_48: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc32_48.1: = bound_method %int_2, %impl.elem0.loc32_48 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc32_48: = specific_function %impl.elem0.loc32_48, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc32_48.2: = bound_method %int_2, %specific_fn.loc32_48 [concrete = constants.%bound_method.646] @@ -404,7 +405,7 @@ fn PassConstB(p: const B) { // CHECK:STDOUT: %.loc32_48.6: init %i32 to %.loc32_48.5 = in_place_init %.loc32_48.4 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc32_48.7: init %B to %.loc32_57.3 = class_init (%.loc32_48.3, %.loc32_48.6) [concrete = constants.%B.val] // CHECK:STDOUT: %.loc32_57.4: init %B = converted %.loc32_48.1, %.loc32_48.7 [concrete = constants.%B.val] -// CHECK:STDOUT: %impl.elem0.loc32_57: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc32_57: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc32_57.1: = bound_method %int_3, %impl.elem0.loc32_57 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc32_57: = specific_function %impl.elem0.loc32_57, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc32_57.2: = bound_method %int_3, %specific_fn.loc32_57 [concrete = constants.%bound_method.fa7] diff --git a/toolchain/check/testdata/class/destroy_calls.carbon b/toolchain/check/testdata/class/destroy_calls.carbon index ea70a10eacad..13e8c2a39613 100644 --- a/toolchain/check/testdata/class/destroy_calls.carbon +++ b/toolchain/check/testdata/class/destroy_calls.carbon @@ -346,19 +346,20 @@ fn G() { F({}); } // CHECK:STDOUT: %require_complete: = require_complete_type %C.5a3 [template] // CHECK:STDOUT: %pattern_type.3d5: type = pattern_type %C.5a3 [template] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %C.5a3, @Destroy [template] // CHECK:STDOUT: %Destroy.facet.472: %Destroy.type = facet_value %C.5a3, (%Destroy.lookup_impl_witness) [template] -// CHECK:STDOUT: %.790: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.472 [template] -// CHECK:STDOUT: %impl.elem0: %.790 = impl_witness_access %Destroy.lookup_impl_witness, element0 [template] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet.472) [template] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.7d1: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.472) [template] +// CHECK:STDOUT: %.306: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.7d1, %Destroy.facet.472 [template] +// CHECK:STDOUT: %impl.elem0: %.306 = impl_witness_access %Destroy.lookup_impl_witness, element0 [template] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet.472) [template] // CHECK:STDOUT: %C.850: type = class_type @C, @C(%empty_struct_type) [concrete] // CHECK:STDOUT: %pattern_type.526: type = pattern_type %C.850 [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.809: = custom_witness (%DestroyOp), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.bc0: %Destroy.type = facet_value %C.850, (%custom_witness.809) [concrete] -// CHECK:STDOUT: %.cb1: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.bc0 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.379: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.bc0) [concrete] +// CHECK:STDOUT: %.ea5: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.379, %Destroy.facet.bc0 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -382,9 +383,10 @@ fn G() { F({}); } // CHECK:STDOUT: %pattern_type: type = pattern_type %C.loc7_13.2 [template = %pattern_type (constants.%pattern_type.3d5)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %C.loc7_13.2, @Destroy [template = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C.loc7_13.2, (%Destroy.lookup_impl_witness) [template = %Destroy.facet (constants.%Destroy.facet.472)] -// CHECK:STDOUT: %.loc7_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [template = %.loc7_3 (constants.%.790)] -// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3 (%.790) = impl_witness_access %Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.Op(%Destroy.facet) [template = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [template = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.7d1)] +// CHECK:STDOUT: %.loc7_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [template = %.loc7_3 (constants.%.306)] +// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3 (%.306) = impl_witness_access %Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [template = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -399,11 +401,11 @@ fn G() { F({}); } // CHECK:STDOUT: %C.loc7_13.1: type = class_type @C, @C(constants.%T) [template = %C.loc7_13.2 (constants.%C.5a3)] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref @F.%C.loc7_13.2 (%C.5a3) = ref_binding v, %v.var -// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3 (%.790) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3 (%.306) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem0.loc7_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.Op(constants.%Destroy.facet.472) [template = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.472) [template = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_impl_fn.loc7_3.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%v.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -423,7 +425,8 @@ fn G() { F({}); } // CHECK:STDOUT: %pattern_type => constants.%pattern_type.526 // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.809 // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.bc0 -// CHECK:STDOUT: %.loc7_3 => constants.%.cb1 +// CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.379 +// CHECK:STDOUT: %.loc7_3 => constants.%.ea5 // CHECK:STDOUT: %impl.elem0.loc7_3.2 => constants.%DestroyOp // CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%DestroyOp // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/field_access.carbon b/toolchain/check/testdata/class/field_access.carbon index 1c70efa785b9..46e6156aa9d0 100644 --- a/toolchain/check/testdata/class/field_access.carbon +++ b/toolchain/check/testdata/class/field_access.carbon @@ -45,7 +45,6 @@ fn Run() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -53,7 +52,8 @@ fn Run() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -64,14 +64,14 @@ fn Run() { // CHECK:STDOUT: %bound_method.646: = 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: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc25 [concrete] @@ -139,7 +139,7 @@ fn Run() { // CHECK:STDOUT: %j.ref.loc22: %Class.elem = name_ref j, @Class.%.loc16 [concrete = @Class.%.loc16] // CHECK:STDOUT: %.loc22_4: ref %i32 = class_element_access %c.ref.loc22, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc22: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc22_7.1: = bound_method %int_1, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // 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_7.2: = bound_method %int_1, %specific_fn.loc22 [concrete = constants.%bound_method.38b] @@ -150,7 +150,7 @@ fn Run() { // CHECK:STDOUT: %k.ref.loc23: %Class.elem = name_ref k, @Class.%.loc17 [concrete = @Class.%.loc17] // CHECK:STDOUT: %.loc23_4: ref %i32 = class_element_access %c.ref.loc23, element1 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc23: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc23: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc23_7.1: = bound_method %int_2, %impl.elem0.loc23 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // 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_7.2: = bound_method %int_2, %specific_fn.loc23 [concrete = constants.%bound_method.646] @@ -166,7 +166,7 @@ fn Run() { // CHECK:STDOUT: %j.ref.loc24: %Class.elem = name_ref j, @Class.%.loc16 [concrete = @Class.%.loc16] // CHECK:STDOUT: %.loc24_18.1: ref %i32 = class_element_access %c.ref.loc24, element0 // CHECK:STDOUT: %.loc24_18.2: %i32 = acquire_value %.loc24_18.1 -// CHECK:STDOUT: %impl.elem0.loc24: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc24: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc24_18.1: = bound_method %.loc24_18.2, %impl.elem0.loc24 // CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc24_18.2: = bound_method %.loc24_18.2, %specific_fn.loc24 @@ -186,7 +186,7 @@ fn Run() { // CHECK:STDOUT: %k.ref.loc25: %Class.elem = name_ref k, @Class.%.loc17 [concrete = @Class.%.loc17] // CHECK:STDOUT: %.loc25_18.1: ref %i32 = class_element_access %c.ref.loc25, element1 // CHECK:STDOUT: %.loc25_18.2: %i32 = acquire_value %.loc25_18.1 -// CHECK:STDOUT: %impl.elem0.loc25: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc25: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc25_18.1: = bound_method %.loc25_18.2, %impl.elem0.loc25 // CHECK:STDOUT: %specific_fn.loc25: = specific_function %impl.elem0.loc25, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc25_18.2: = bound_method %.loc25_18.2, %specific_fn.loc25 diff --git a/toolchain/check/testdata/class/field_access_in_value.carbon b/toolchain/check/testdata/class/field_access_in_value.carbon index 909c294cfb8d..8c2f1316d162 100644 --- a/toolchain/check/testdata/class/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field_access_in_value.carbon @@ -46,7 +46,6 @@ fn Test() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -54,7 +53,8 @@ fn Test() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -65,14 +65,14 @@ fn Test() { // CHECK:STDOUT: %bound_method.646: = 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: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc26 [concrete] @@ -140,7 +140,7 @@ fn Test() { // CHECK:STDOUT: %j.ref.loc22: %Class.elem = name_ref j, @Class.%.loc16 [concrete = @Class.%.loc16] // CHECK:STDOUT: %.loc22_5: ref %i32 = class_element_access %cv.ref.loc22, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc22: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc22_8.1: = bound_method %int_1, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // 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_8.2: = bound_method %int_1, %specific_fn.loc22 [concrete = constants.%bound_method.38b] @@ -151,7 +151,7 @@ fn Test() { // CHECK:STDOUT: %k.ref.loc23: %Class.elem = name_ref k, @Class.%.loc17 [concrete = @Class.%.loc17] // CHECK:STDOUT: %.loc23_5: ref %i32 = class_element_access %cv.ref.loc23, element1 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc23: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc23: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc23_8.1: = bound_method %int_2, %impl.elem0.loc23 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // 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_8.2: = bound_method %int_2, %specific_fn.loc23 [concrete = constants.%bound_method.646] @@ -174,7 +174,7 @@ fn Test() { // CHECK:STDOUT: %j.ref.loc25: %Class.elem = name_ref j, @Class.%.loc16 [concrete = @Class.%.loc16] // CHECK:STDOUT: %.loc25_18.1: ref %i32 = class_element_access %c.ref.loc25, element0 // CHECK:STDOUT: %.loc25_18.2: %i32 = acquire_value %.loc25_18.1 -// CHECK:STDOUT: %impl.elem0.loc25: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc25: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc25_18.1: = bound_method %.loc25_18.2, %impl.elem0.loc25 // CHECK:STDOUT: %specific_fn.loc25: = specific_function %impl.elem0.loc25, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc25_18.2: = bound_method %.loc25_18.2, %specific_fn.loc25 @@ -194,7 +194,7 @@ fn Test() { // CHECK:STDOUT: %k.ref.loc26: %Class.elem = name_ref k, @Class.%.loc17 [concrete = @Class.%.loc17] // CHECK:STDOUT: %.loc26_18.1: ref %i32 = class_element_access %c.ref.loc26, element1 // CHECK:STDOUT: %.loc26_18.2: %i32 = acquire_value %.loc26_18.1 -// CHECK:STDOUT: %impl.elem0.loc26: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc26: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc26_18.1: = bound_method %.loc26_18.2, %impl.elem0.loc26 // CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc26_18.2: = bound_method %.loc26_18.2, %specific_fn.loc26 diff --git a/toolchain/check/testdata/class/forward_declared.carbon b/toolchain/check/testdata/class/forward_declared.carbon index 85c1ebcc60ff..50b0ceac2c97 100644 --- a/toolchain/check/testdata/class/forward_declared.carbon +++ b/toolchain/check/testdata/class/forward_declared.carbon @@ -26,7 +26,6 @@ fn F(p: Class*) -> Class* { return p; } // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -34,7 +33,8 @@ fn F(p: Class*) -> Class* { return p; } // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.02e: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Class) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.120: %ptr.as.Copy.impl.Op.type.02e = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.8e5, (%Copy.impl_witness.9d3) [concrete] -// CHECK:STDOUT: %.105: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.130: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.370: type = fn_type_with_self_type %Copy.WithSelf.Op.type.130, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.120, @ptr.as.Copy.impl.Op(%Class) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -82,7 +82,7 @@ fn F(p: Class*) -> Class* { return p; } // CHECK:STDOUT: fn @F(%p.param: %ptr.8e5) -> out %return.param: %ptr.8e5 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.8e5 = name_ref p, %p -// CHECK:STDOUT: %impl.elem0: %.105 = impl_witness_access constants.%Copy.impl_witness.9d3, element0 [concrete = constants.%ptr.as.Copy.impl.Op.120] +// CHECK:STDOUT: %impl.elem0: %.370 = impl_witness_access constants.%Copy.impl_witness.9d3, element0 [concrete = constants.%ptr.as.Copy.impl.Op.120] // CHECK:STDOUT: %bound_method.loc17_36.1: = bound_method %p.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%Class) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_36.2: = bound_method %p.ref, %specific_fn diff --git a/toolchain/check/testdata/class/generic/adapt.carbon b/toolchain/check/testdata/class/generic/adapt.carbon index befbc958da1b..fe4b9fcc1bb3 100644 --- a/toolchain/check/testdata/class/generic/adapt.carbon +++ b/toolchain/check/testdata/class/generic/adapt.carbon @@ -157,14 +157,14 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %Access.type: type = fn_type @Access [concrete] // CHECK:STDOUT: %Access: %Access.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -262,7 +262,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %x.ref: %C.elem.8f4 = name_ref x, @C.%.loc5 [concrete = @C.%.loc5] // CHECK:STDOUT: %.loc13_23.1: ref %i32 = class_element_access %.loc13_13.2, element0 // CHECK:STDOUT: %.loc13_23.2: %i32 = acquire_value %.loc13_23.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc13_23.1: = bound_method %.loc13_23.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc13_23.2: = bound_method %.loc13_23.2, %specific_fn @@ -314,14 +314,14 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %ImportedAccess.type: type = fn_type @ImportedAccess [concrete] // CHECK:STDOUT: %ImportedAccess: %ImportedAccess.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.08e: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.014: %Int.as.Copy.impl.Op.type.08e = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.a2f: = impl_witness imports.%Copy.impl_witness_table.d6d, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.837: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.2b1: %Int.as.Copy.impl.Op.type.837 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.a2f) [concrete] -// CHECK:STDOUT: %.70e: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.67d: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.d31: type = fn_type_with_self_type %Copy.WithSelf.Op.type.67d, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.2b1, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -413,7 +413,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %x.ref: %C.elem.fd3 = name_ref x, imports.%Main.import_ref.b94 [concrete = imports.%.68d] // CHECK:STDOUT: %.loc7_23.1: ref %i32 = class_element_access %.loc7_13.2, element0 // CHECK:STDOUT: %.loc7_23.2: %i32 = acquire_value %.loc7_23.1 -// CHECK:STDOUT: %impl.elem0: %.70e = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] +// CHECK:STDOUT: %impl.elem0: %.d31 = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] // CHECK:STDOUT: %bound_method.loc7_23.1: = bound_method %.loc7_23.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_23.2: = bound_method %.loc7_23.2, %specific_fn @@ -836,14 +836,14 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %complete_type.f8a: = complete_type_witness %i32.builtin [concrete] // CHECK:STDOUT: %complete_type.1eb: = complete_type_witness %i32 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -921,7 +921,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc9_12.1: %i32 = as_compatible %a.ref // CHECK:STDOUT: %.loc9_12.2: %i32 = converted %a.ref, %.loc9_12.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc9_12.1: = bound_method %.loc9_12.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_12.2: = bound_method %.loc9_12.2, %specific_fn @@ -964,14 +964,14 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %complete_type.f8a: = complete_type_witness %i32.builtin [concrete] // CHECK:STDOUT: %complete_type.1eb: = complete_type_witness %i32 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [concrete] @@ -1089,7 +1089,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc7_12.1: %i32 = as_compatible %a.ref // CHECK:STDOUT: %.loc7_12.2: %i32 = converted %a.ref, %.loc7_12.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc7_12.1: = bound_method %.loc7_12.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_12.2: = bound_method %.loc7_12.2, %specific_fn @@ -1106,7 +1106,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %n.ref: %C.elem = name_ref n, @C.%.loc11 [concrete = @C.%.loc11] // CHECK:STDOUT: %.loc15_18.1: ref %i32 = class_element_access %.loc15_13.2, element0 // CHECK:STDOUT: %.loc15_18.2: %i32 = acquire_value %.loc15_18.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc15_18.1: = bound_method %.loc15_18.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_18.2: = bound_method %.loc15_18.2, %specific_fn diff --git a/toolchain/check/testdata/class/generic/base_is_generic.carbon b/toolchain/check/testdata/class/generic/base_is_generic.carbon index dca13f74c379..d74b0255bf68 100644 --- a/toolchain/check/testdata/class/generic/base_is_generic.carbon +++ b/toolchain/check/testdata/class/generic/base_is_generic.carbon @@ -126,14 +126,14 @@ fn H() { // CHECK:STDOUT: %DoubleFieldAccess.type: type = fn_type @DoubleFieldAccess [concrete] // CHECK:STDOUT: %DoubleFieldAccess: %DoubleFieldAccess.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -246,7 +246,7 @@ fn H() { // CHECK:STDOUT: %y.ref: %Param.elem = name_ref y, @Param.%.loc9 [concrete = @Param.%.loc9] // CHECK:STDOUT: %.loc17_13.1: ref %i32 = class_element_access %.loc17_11.3, element0 // CHECK:STDOUT: %.loc17_13.2: %i32 = acquire_value %.loc17_13.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc17_13.1: = bound_method %.loc17_13.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_13.2: = bound_method %.loc17_13.2, %specific_fn @@ -300,14 +300,14 @@ fn H() { // CHECK:STDOUT: %ImportedDoubleFieldAccess: %ImportedDoubleFieldAccess.type = struct_value () [concrete] // CHECK:STDOUT: %Param.elem: type = unbound_element_type %Param, %i32 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.08e: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.014: %Int.as.Copy.impl.Op.type.08e = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.a2f: = impl_witness imports.%Copy.impl_witness_table.d6d, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.837: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.2b1: %Int.as.Copy.impl.Op.type.837 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.a2f) [concrete] -// CHECK:STDOUT: %.70e: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.67d: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.d31: type = fn_type_with_self_type %Copy.WithSelf.Op.type.67d, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.2b1, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -416,7 +416,7 @@ fn H() { // CHECK:STDOUT: %y.ref: %Param.elem = name_ref y, imports.%Main.import_ref.0c2 [concrete = imports.%.e89] // CHECK:STDOUT: %.loc7_13.1: ref %i32 = class_element_access %.loc7_11.3, element0 // CHECK:STDOUT: %.loc7_13.2: %i32 = acquire_value %.loc7_13.1 -// CHECK:STDOUT: %impl.elem0: %.70e = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] +// CHECK:STDOUT: %impl.elem0: %.d31 = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %.loc7_13.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %.loc7_13.2, %specific_fn diff --git a/toolchain/check/testdata/class/generic/basic.carbon b/toolchain/check/testdata/class/generic/basic.carbon index e0e2714ad5f0..a69ca229f7c8 100644 --- a/toolchain/check/testdata/class/generic/basic.carbon +++ b/toolchain/check/testdata/class/generic/basic.carbon @@ -46,8 +46,8 @@ class Declaration(T:! type); // CHECK:STDOUT: %pattern_type.65a: type = pattern_type %ptr.e7d [symbolic] // CHECK:STDOUT: %Class.GetAddr.type: type = fn_type @Class.GetAddr, @Class(%T.035) [symbolic] // CHECK:STDOUT: %Class.GetAddr: %Class.GetAddr.type = struct_value () [symbolic] -// CHECK:STDOUT: %.6c815b.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %Class.GetValue.type: type = fn_type @Class.GetValue, @Class(%T.035) [symbolic] // CHECK:STDOUT: %Class.GetValue: %Class.GetValue.type = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.67c: = require_complete_type %T.binding.as_type [symbolic] @@ -56,19 +56,20 @@ class Declaration(T:! type); // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k [symbolic] // CHECK:STDOUT: %require_complete.904: = require_complete_type %Class [symbolic] // CHECK:STDOUT: %require_complete.9dc: = require_complete_type %ptr.e7d [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.lookup_impl_witness.58d: = lookup_impl_witness %T.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9: = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic] +// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdc: = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %.3a3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.2e7: = lookup_impl_witness %ptr.e7d, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e7d, (%Copy.lookup_impl_witness.2e7) [symbolic] -// CHECK:STDOUT: %.f11: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.a55: %.f11 = impl_witness_access %Copy.lookup_impl_witness.2e7, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.0df: = specific_impl_function %impl.elem0.a55, @Copy.Op(%Copy.facet) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.486: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic] +// CHECK:STDOUT: %.b63: type = fn_type_with_self_type %Copy.WithSelf.Op.type.486, %Copy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.387: %.b63 = impl_witness_access %Copy.lookup_impl_witness.2e7, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.7f8: = specific_impl_function %impl.elem0.387, @Copy.WithSelf.Op(%Copy.facet) [symbolic] // CHECK:STDOUT: %Declaration.type: type = generic_class_type @Declaration [concrete] // CHECK:STDOUT: %Declaration.generic: %Declaration.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -140,13 +141,13 @@ class Declaration(T:! type); // CHECK:STDOUT: %Class.GetValue.decl: @Class.%Class.GetValue.type (%Class.GetValue.type) = fn_decl @Class.GetValue [symbolic = @Class.%Class.GetValue (constants.%Class.GetValue)] { // CHECK:STDOUT: %self.patt: @Class.GetValue.%pattern_type.loc10_15 (%pattern_type.893) = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @Class.GetValue.%pattern_type.loc10_15 (%pattern_type.893) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Class.GetValue.%pattern_type.loc10_29 (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Class.GetValue.%pattern_type.loc10_29 (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @Class.GetValue.%pattern_type.loc10_29 (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Class.GetValue.%pattern_type.loc10_29 (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, @Class.%T.loc5_13.2 [symbolic = %T (constants.%T.035)] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc10_32.3: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc10_32.4: Core.Form = init_form %.loc10_32.3, call_param1 [symbolic = %.loc10_32.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %.loc10_32.4: Core.Form = init_form %.loc10_32.3, call_param1 [symbolic = %.loc10_32.2 (constants.%.6c815b.2)] // CHECK:STDOUT: %self.param: @Class.GetValue.%Class (%Class) = value_param call_param0 // CHECK:STDOUT: %.loc10_21.1: type = splice_block %Self.ref [symbolic = %Class (constants.%Class)] { // CHECK:STDOUT: %.loc10_21.2: type = specific_constant constants.%Class, @Class(constants.%T.035) [symbolic = %Class (constants.%Class)] @@ -194,9 +195,10 @@ class Declaration(T:! type); // CHECK:STDOUT: %.loc7_12.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic = %.loc7_12.1 (constants.%.3a3)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc6_36.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e7)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc6_36.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc7_12.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc7_12.2 (constants.%.f11)] -// CHECK:STDOUT: %impl.elem0.loc7_12.2: @Class.GetAddr.%.loc7_12.2 (%.f11) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.a55)] -// CHECK:STDOUT: %specific_impl_fn.loc7_12.2: = specific_impl_function %impl.elem0.loc7_12.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc7_12.2 (constants.%specific_impl_fn.0df)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.486)] +// CHECK:STDOUT: %.loc7_12.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc7_12.2 (constants.%.b63)] +// CHECK:STDOUT: %impl.elem0.loc7_12.2: @Class.GetAddr.%.loc7_12.2 (%.b63) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.387)] +// CHECK:STDOUT: %specific_impl_fn.loc7_12.2: = specific_impl_function %impl.elem0.loc7_12.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc7_12.2 (constants.%specific_impl_fn.7f8)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: ref @Class.GetAddr.%Class (%Class)) -> out %return.param: @Class.GetAddr.%ptr.loc6_36.1 (%ptr.e7d) { // CHECK:STDOUT: !entry: @@ -204,12 +206,12 @@ class Declaration(T:! type); // CHECK:STDOUT: %k.ref: @Class.GetAddr.%Class.elem (%Class.elem) = name_ref k, @Class.%.loc14_8 [concrete = @Class.%.loc14_8] // CHECK:STDOUT: %.loc7_17: ref @Class.GetAddr.%T.binding.as_type (%T.binding.as_type) = class_element_access %self.ref, element0 // CHECK:STDOUT: %addr: @Class.GetAddr.%ptr.loc6_36.1 (%ptr.e7d) = addr_of %.loc7_17 -// CHECK:STDOUT: %impl.elem0.loc7_12.1: @Class.GetAddr.%.loc7_12.2 (%.f11) = impl_witness_access constants.%Copy.lookup_impl_witness.2e7, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.a55)] +// CHECK:STDOUT: %impl.elem0.loc7_12.1: @Class.GetAddr.%.loc7_12.2 (%.b63) = impl_witness_access constants.%Copy.lookup_impl_witness.2e7, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.387)] // CHECK:STDOUT: %bound_method.loc7_12.1: = bound_method %addr, %impl.elem0.loc7_12.1 -// CHECK:STDOUT: %specific_impl_fn.loc7_12.1: = specific_impl_function %impl.elem0.loc7_12.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc7_12.2 (constants.%specific_impl_fn.0df)] +// CHECK:STDOUT: %specific_impl_fn.loc7_12.1: = specific_impl_function %impl.elem0.loc7_12.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc7_12.2 (constants.%specific_impl_fn.7f8)] // CHECK:STDOUT: %bound_method.loc7_12.2: = bound_method %addr, %specific_impl_fn.loc7_12.1 -// CHECK:STDOUT: %Copy.Op.call: init @Class.GetAddr.%ptr.loc6_36.1 (%ptr.e7d) = call %bound_method.loc7_12.2(%addr) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Class.GetAddr.%ptr.loc6_36.1 (%ptr.e7d) = call %bound_method.loc7_12.2(%addr) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -218,17 +220,18 @@ class Declaration(T:! type); // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %pattern_type.loc10_15: type = pattern_type %Class [symbolic = %pattern_type.loc10_15 (constants.%pattern_type.893)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc10_32.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc10_32.2 (constants.%.6c815b.1)] -// CHECK:STDOUT: %pattern_type.loc10_29: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc10_29 (constants.%pattern_type.9b9f0c.1)] +// CHECK:STDOUT: %.loc10_32.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc10_32.2 (constants.%.6c815b.2)] +// CHECK:STDOUT: %pattern_type.loc10_29: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc10_29 (constants.%pattern_type.9b9f0c.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc10: = require_complete_type %Class [symbolic = %require_complete.loc10 (constants.%require_complete.904)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: %require_complete.loc11: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc11 (constants.%require_complete.67c)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc11_16.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc11_16.3 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc11_16.2: @Class.GetValue.%.loc11_16.3 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc11_16.2: = specific_impl_function %impl.elem0.loc11_16.2, @Copy.Op(%T) [symbolic = %specific_impl_fn.loc11_16.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc11_16.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T [symbolic = %.loc11_16.3 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc11_16.2: @Class.GetValue.%.loc11_16.3 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc11_16.2: = specific_impl_function %impl.elem0.loc11_16.2, @Copy.WithSelf.Op(%T) [symbolic = %specific_impl_fn.loc11_16.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @Class.GetValue.%Class (%Class)) -> out %return.param: @Class.GetValue.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: @@ -236,13 +239,13 @@ class Declaration(T:! type); // CHECK:STDOUT: %k.ref: @Class.GetValue.%Class.elem (%Class.elem) = name_ref k, @Class.%.loc14_8 [concrete = @Class.%.loc14_8] // CHECK:STDOUT: %.loc11_16.1: ref @Class.GetValue.%T.binding.as_type (%T.binding.as_type) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc11_16.2: @Class.GetValue.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc11_16.1 -// CHECK:STDOUT: %impl.elem0.loc11_16.1: @Class.GetValue.%.loc11_16.3 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc11_16.1: @Class.GetValue.%.loc11_16.3 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc11_16.1: = bound_method %.loc11_16.2, %impl.elem0.loc11_16.1 -// CHECK:STDOUT: %specific_impl_fn.loc11_16.1: = specific_impl_function %impl.elem0.loc11_16.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc11_16.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc11_16.1: = specific_impl_function %impl.elem0.loc11_16.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc11_16.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc11_16.2: = bound_method %.loc11_16.2, %specific_impl_fn.loc11_16.1 // CHECK:STDOUT: %.loc10_32.1: ref @Class.GetValue.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.Op.call: init @Class.GetValue.%T.binding.as_type (%T.binding.as_type) to %.loc10_32.1 = call %bound_method.loc11_16.2(%.loc11_16.2) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Class.GetValue.%T.binding.as_type (%T.binding.as_type) to %.loc10_32.1 = call %bound_method.loc11_16.2(%.loc11_16.2) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -277,8 +280,8 @@ class Declaration(T:! type); // CHECK:STDOUT: %Class => constants.%Class // CHECK:STDOUT: %pattern_type.loc10_15 => constants.%pattern_type.893 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %.loc10_32.2 => constants.%.6c815b.1 -// CHECK:STDOUT: %pattern_type.loc10_29 => constants.%pattern_type.9b9f0c.1 +// CHECK:STDOUT: %.loc10_32.2 => constants.%.6c815b.2 +// CHECK:STDOUT: %pattern_type.loc10_29 => constants.%pattern_type.9b9f0c.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Declaration(constants.%T.67d) { diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 48ac8ceb6723..c6b7a4f51768 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -114,7 +114,6 @@ class Outer(T:! type) { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -122,7 +121,8 @@ class Outer(T:! type) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.e9d: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -183,7 +183,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [concrete = constants.%ptr.235] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0.loc6: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_21.1: = bound_method %int_5, %impl.elem0.loc6 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_21.2: = bound_method %int_5, %specific_fn.loc6 [concrete = constants.%bound_method.e9d] @@ -203,7 +203,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc9_15: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc9_19.2: type = converted %.loc9_15, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %impl.elem0.loc9: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_19.1: = bound_method %int_0, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc9: = 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_19.2: = bound_method %int_0, %specific_fn.loc9 [concrete = constants.%bound_method.d2e] diff --git a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon index b6f09071661a..7fee8346bae1 100644 --- a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon +++ b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon @@ -63,7 +63,6 @@ fn F(a: A(0)*) { // 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: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -74,7 +73,8 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.290: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete] -// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.290 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.290) [concrete] +// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet.290 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound.d32: = bound_method %N.5de, %Int.as.ImplicitAs.impl.Convert.dd4 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d76: = bound_method %N.5de, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic] @@ -86,12 +86,12 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %complete_type.8c7: = complete_type_witness %struct_type.base.n [symbolic] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.6bc: = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -172,7 +172,7 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %.loc15_13: type = splice_block %ptr.loc15 [concrete = constants.%ptr.0e2] { // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A.generic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_12.1: = bound_method %int_0, %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_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.d2e] @@ -216,7 +216,7 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %.loc7: @A.%A.elem.loc7 (%A.elem.ade) = base_decl %B.ref, element0 [concrete] // CHECK:STDOUT: %Int.ref: %Int.type.b3e = name_ref Int, file.%Int.decl [concrete = constants.%Int.d6d] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc6_9.2 [symbolic = %N.loc6_9.1 (constants.%N.5de)] -// CHECK:STDOUT: %impl.elem0: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %impl.elem0: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] // CHECK:STDOUT: %bound_method.loc12_14.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound.d32)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_14.2: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc12_14.3 (constants.%bound_method.d76)] diff --git a/toolchain/check/testdata/class/generic/field.carbon b/toolchain/check/testdata/class/generic/field.carbon index ec424ea52be9..6e56ace5bd53 100644 --- a/toolchain/check/testdata/class/generic/field.carbon +++ b/toolchain/check/testdata/class/generic/field.carbon @@ -61,15 +61,15 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %struct_type.x.ed6: type = struct_type {.x: %i32} [concrete] // CHECK:STDOUT: %complete_type.1ec: = complete_type_witness %struct_type.x.ed6 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %T.035: %Copy.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.58dce0.1: = lookup_impl_witness %T.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e61c.1: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b224.1: %.72e61c.1 = impl_witness_access %Copy.lookup_impl_witness.58dce0.1, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9874.1: = specific_impl_function %impl.elem0.07b224.1, @Copy.Op(%T.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic] +// CHECK:STDOUT: %.023143.1: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594c59.1: %.023143.1 = impl_witness_access %Copy.lookup_impl_witness.58dce0.1, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdce5c.1: = specific_impl_function %impl.elem0.594c59.1, @Copy.WithSelf.Op(%T.035) [symbolic] // CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %require_complete.67ca8d.1: = require_complete_type %T.binding.as_type [symbolic] @@ -78,7 +78,8 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Class.3168aa.1: type = class_type @Class, @Class(%T.binding.as_type) [symbolic] // CHECK:STDOUT: %pattern_type.c542f5.1: type = pattern_type %Class.3168aa.1 [symbolic] @@ -102,9 +103,10 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %complete_type.e78b36.2: = complete_type_witness %struct_type.x.8dcd6b.2 [symbolic] // CHECK:STDOUT: %require_complete.ae7bfa.2: = require_complete_type %Class.3168aa.2 [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.58dce0.2: = lookup_impl_witness %U.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e61c.2: type = fn_type_with_self_type %Copy.Op.type, %U.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b224.2: %.72e61c.2 = impl_witness_access %Copy.lookup_impl_witness.58dce0.2, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9874.2: = specific_impl_function %impl.elem0.07b224.2, @Copy.Op(%U.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.3: type = fn_type @Copy.WithSelf.Op, @Copy(%U.035) [symbolic] +// CHECK:STDOUT: %.023143.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.3, %U.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594c59.2: %.023143.2 = impl_witness_access %Copy.lookup_impl_witness.58dce0.2, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdce5c.2: = specific_impl_function %impl.elem0.594c59.2, @Copy.WithSelf.Op(%U.035) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -236,7 +238,7 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %x.ref: %Class.elem.927 = name_ref x, @Class.%.loc6 [concrete = @Class.%.loc6] // CHECK:STDOUT: %.loc10_11.1: ref %i32 = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc10_11.2: %i32 = acquire_value %.loc10_11.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc10_11.1: = bound_method %.loc10_11.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc10_11.2: = bound_method %.loc10_11.2, %specific_fn @@ -257,9 +259,10 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc13_31.1, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem.7657d6.1)] // CHECK:STDOUT: %require_complete.loc14: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc14 (constants.%require_complete.67ca8d.1)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc13_6.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58dce0.1)] -// CHECK:STDOUT: %.loc14_11.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc13_6.1 [symbolic = %.loc14_11.3 (constants.%.72e61c.1)] -// CHECK:STDOUT: %impl.elem0.loc14_11.2: @G.%.loc14_11.3 (%.72e61c.1) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_11.2 (constants.%impl.elem0.07b224.1)] -// CHECK:STDOUT: %specific_impl_fn.loc14_11.2: = specific_impl_function %impl.elem0.loc14_11.2, @Copy.Op(%T.loc13_6.1) [symbolic = %specific_impl_fn.loc14_11.2 (constants.%specific_impl_fn.2c9874.1)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T.loc13_6.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc14_11.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc13_6.1 [symbolic = %.loc14_11.3 (constants.%.023143.1)] +// CHECK:STDOUT: %impl.elem0.loc14_11.2: @G.%.loc14_11.3 (%.023143.1) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_11.2 (constants.%impl.elem0.594c59.1)] +// CHECK:STDOUT: %specific_impl_fn.loc14_11.2: = specific_impl_function %impl.elem0.loc14_11.2, @Copy.WithSelf.Op(%T.loc13_6.1) [symbolic = %specific_impl_fn.loc14_11.2 (constants.%specific_impl_fn.bdce5c.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%c.param: @G.%Class.loc13_31.1 (%Class.3168aa.1)) -> out %return.param: @G.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: @@ -267,13 +270,13 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %x.ref: @G.%Class.elem (%Class.elem.7657d6.1) = name_ref x, @Class.%.loc6 [concrete = @Class.%.loc6] // CHECK:STDOUT: %.loc14_11.1: ref @G.%T.binding.as_type (%T.binding.as_type) = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc14_11.2: @G.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc14_11.1 -// CHECK:STDOUT: %impl.elem0.loc14_11.1: @G.%.loc14_11.3 (%.72e61c.1) = impl_witness_access constants.%Copy.lookup_impl_witness.58dce0.1, element0 [symbolic = %impl.elem0.loc14_11.2 (constants.%impl.elem0.07b224.1)] +// CHECK:STDOUT: %impl.elem0.loc14_11.1: @G.%.loc14_11.3 (%.023143.1) = impl_witness_access constants.%Copy.lookup_impl_witness.58dce0.1, element0 [symbolic = %impl.elem0.loc14_11.2 (constants.%impl.elem0.594c59.1)] // CHECK:STDOUT: %bound_method.loc14_11.1: = bound_method %.loc14_11.2, %impl.elem0.loc14_11.1 -// CHECK:STDOUT: %specific_impl_fn.loc14_11.1: = specific_impl_function %impl.elem0.loc14_11.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc14_11.2 (constants.%specific_impl_fn.2c9874.1)] +// CHECK:STDOUT: %specific_impl_fn.loc14_11.1: = specific_impl_function %impl.elem0.loc14_11.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc14_11.2 (constants.%specific_impl_fn.bdce5c.1)] // CHECK:STDOUT: %bound_method.loc14_11.2: = bound_method %.loc14_11.2, %specific_impl_fn.loc14_11.1 // CHECK:STDOUT: %.loc13_37.1: ref @G.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.Op.call: init @G.%T.binding.as_type (%T.binding.as_type) to %.loc13_37.1 = call %bound_method.loc14_11.2(%.loc14_11.2) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @G.%T.binding.as_type (%T.binding.as_type) to %.loc13_37.1 = call %bound_method.loc14_11.2(%.loc14_11.2) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -290,9 +293,10 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc17_31.1, %U.binding.as_type [symbolic = %Class.elem (constants.%Class.elem.7657d6.2)] // CHECK:STDOUT: %require_complete.loc18: = require_complete_type %U.binding.as_type [symbolic = %require_complete.loc18 (constants.%require_complete.67ca8d.2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %U.loc17_6.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58dce0.2)] -// CHECK:STDOUT: %.loc18_11.3: type = fn_type_with_self_type constants.%Copy.Op.type, %U.loc17_6.1 [symbolic = %.loc18_11.3 (constants.%.72e61c.2)] -// CHECK:STDOUT: %impl.elem0.loc18_11.2: @H.%.loc18_11.3 (%.72e61c.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_11.2 (constants.%impl.elem0.07b224.2)] -// CHECK:STDOUT: %specific_impl_fn.loc18_11.2: = specific_impl_function %impl.elem0.loc18_11.2, @Copy.Op(%U.loc17_6.1) [symbolic = %specific_impl_fn.loc18_11.2 (constants.%specific_impl_fn.2c9874.2)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%U.loc17_6.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.3)] +// CHECK:STDOUT: %.loc18_11.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc17_6.1 [symbolic = %.loc18_11.3 (constants.%.023143.2)] +// CHECK:STDOUT: %impl.elem0.loc18_11.2: @H.%.loc18_11.3 (%.023143.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_11.2 (constants.%impl.elem0.594c59.2)] +// CHECK:STDOUT: %specific_impl_fn.loc18_11.2: = specific_impl_function %impl.elem0.loc18_11.2, @Copy.WithSelf.Op(%U.loc17_6.1) [symbolic = %specific_impl_fn.loc18_11.2 (constants.%specific_impl_fn.bdce5c.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%c.param: @H.%Class.loc17_31.1 (%Class.3168aa.2)) -> out %return.param: @H.%U.binding.as_type (%U.binding.as_type.14b) { // CHECK:STDOUT: !entry: @@ -300,13 +304,13 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %x.ref: @H.%Class.elem (%Class.elem.7657d6.2) = name_ref x, @Class.%.loc6 [concrete = @Class.%.loc6] // CHECK:STDOUT: %.loc18_11.1: ref @H.%U.binding.as_type (%U.binding.as_type.14b) = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc18_11.2: @H.%U.binding.as_type (%U.binding.as_type.14b) = acquire_value %.loc18_11.1 -// CHECK:STDOUT: %impl.elem0.loc18_11.1: @H.%.loc18_11.3 (%.72e61c.2) = impl_witness_access constants.%Copy.lookup_impl_witness.58dce0.2, element0 [symbolic = %impl.elem0.loc18_11.2 (constants.%impl.elem0.07b224.2)] +// CHECK:STDOUT: %impl.elem0.loc18_11.1: @H.%.loc18_11.3 (%.023143.2) = impl_witness_access constants.%Copy.lookup_impl_witness.58dce0.2, element0 [symbolic = %impl.elem0.loc18_11.2 (constants.%impl.elem0.594c59.2)] // CHECK:STDOUT: %bound_method.loc18_11.1: = bound_method %.loc18_11.2, %impl.elem0.loc18_11.1 -// CHECK:STDOUT: %specific_impl_fn.loc18_11.1: = specific_impl_function %impl.elem0.loc18_11.1, @Copy.Op(constants.%U.035) [symbolic = %specific_impl_fn.loc18_11.2 (constants.%specific_impl_fn.2c9874.2)] +// CHECK:STDOUT: %specific_impl_fn.loc18_11.1: = specific_impl_function %impl.elem0.loc18_11.1, @Copy.WithSelf.Op(constants.%U.035) [symbolic = %specific_impl_fn.loc18_11.2 (constants.%specific_impl_fn.bdce5c.2)] // CHECK:STDOUT: %bound_method.loc18_11.2: = bound_method %.loc18_11.2, %specific_impl_fn.loc18_11.1 // CHECK:STDOUT: %.loc17_37.1: ref @H.%U.binding.as_type (%U.binding.as_type.14b) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.Op.call: init @H.%U.binding.as_type (%U.binding.as_type.14b) to %.loc17_37.1 = call %bound_method.loc18_11.2(%.loc18_11.2) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @H.%U.binding.as_type (%U.binding.as_type.14b) to %.loc17_37.1 = call %bound_method.loc18_11.2(%.loc18_11.2) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 08c1027c9204..94a894f89b96 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -116,7 +116,6 @@ class Class(U:! type) { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -124,7 +123,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -228,7 +228,7 @@ class Class(U:! type) { // CHECK:STDOUT: fn() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_27.1: = bound_method %int_0, %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.loc8_27.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -303,12 +303,12 @@ class Class(U:! type) { // CHECK:STDOUT: %struct_type.n.44a: type = struct_type {.n: Core.IntLiteral} [concrete] // CHECK:STDOUT: %struct: %struct_type.n.44a = struct_value (%int_1.5b8) [concrete] // CHECK:STDOUT: %ImplicitAs.type.ea1: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.ea0: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.574: = impl_witness imports.%ImplicitAs.impl_witness_table.4e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.dbb: 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.022: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.dbb = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.ea1 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.574) [concrete] -// CHECK:STDOUT: %.2f1: type = fn_type_with_self_type %ImplicitAs.Convert.type.ea0, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.7cd6: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.d94: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.7cd6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.022 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.022, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -419,7 +419,7 @@ class Class(U:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc9_17.1: %struct_type.n.44a = struct_literal (%int_1) [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0: %.2f1 = impl_witness_access constants.%ImplicitAs.impl_witness.574, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.022] +// CHECK:STDOUT: %impl.elem0: %.d94 = impl_witness_access constants.%ImplicitAs.impl_witness.574, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.022] // CHECK:STDOUT: %bound_method.loc9_17.1: = bound_method %int_1, %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.loc9_17.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -494,14 +494,14 @@ class Class(U:! type) { // CHECK:STDOUT: %UseField.type: type = fn_type @UseField [concrete] // CHECK:STDOUT: %UseField: %UseField.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -642,7 +642,7 @@ class Class(U:! type) { // CHECK:STDOUT: %n.ref: %CompleteClass.elem.2bc = name_ref n, imports.%Main.import_ref.a08 [concrete = imports.%.744] // CHECK:STDOUT: %.loc12_11.1: ref %i32 = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc12_11.2: %i32 = acquire_value %.loc12_11.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc12_11.1: = bound_method %.loc12_11.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc12_11.2: = bound_method %.loc12_11.2, %specific_fn diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index 0e8218674d4f..554bc9bf4173 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -58,8 +58,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.035: %Copy.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.ce2: type = pattern_type %Copy.type [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic] -// CHECK:STDOUT: %.6c815b.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] // CHECK:STDOUT: %InitFromStructGeneric.type: type = fn_type @InitFromStructGeneric [concrete] // CHECK:STDOUT: %InitFromStructGeneric: %InitFromStructGeneric.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.67c: = require_complete_type %T.binding.as_type [symbolic] @@ -68,18 +68,18 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %struct_type.k.436: type = struct_type {.k: %T.binding.as_type} [symbolic] // CHECK:STDOUT: %require_complete.ae7: = require_complete_type %Class.316 [symbolic] // CHECK:STDOUT: %pattern_type.c54: type = pattern_type %Class.316 [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.lookup_impl_witness.58d: = lookup_impl_witness %T.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9: = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic] +// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdc: = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Class.316, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.88b: %Destroy.type = facet_value %Class.316, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.849: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.88b [symbolic] -// CHECK:STDOUT: %impl.elem0.d1e: %.849 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2bb: = specific_impl_function %impl.elem0.d1e, @Destroy.Op(%Destroy.facet.88b) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.5c9: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.88b) [symbolic] +// CHECK:STDOUT: %.0dd: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.5c9, %Destroy.facet.88b [symbolic] +// CHECK:STDOUT: %impl.elem0.799: %.0dd = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.d17: = specific_impl_function %impl.elem0.799, @Destroy.WithSelf.Op(%Destroy.facet.88b) [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -99,7 +99,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] @@ -123,15 +124,15 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: file { // CHECK:STDOUT: %InitFromStructGeneric.decl: %InitFromStructGeneric.type = fn_decl @InitFromStructGeneric [concrete = constants.%InitFromStructGeneric] { // CHECK:STDOUT: %T.patt: %pattern_type.ce2 = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: %x.patt: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.9b9f0c.1) = value_binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.9b9f0c.1) = value_param_pattern %x.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %x.patt: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.9b9f0c.2) = value_binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.9b9f0c.2) = value_param_pattern %x.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @InitFromStructGeneric.%pattern_type.loc9 (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc9_50: %Copy.type = name_ref T, %T.loc9_26.2 [symbolic = %T.loc9_26.1 (constants.%T.035)] // CHECK:STDOUT: %T.as_type.loc9_50: type = facet_access_type %T.ref.loc9_50 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc9_50.3: type = converted %T.ref.loc9_50, %T.as_type.loc9_50 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc9_50.4: Core.Form = init_form %.loc9_50.3, call_param1 [symbolic = %.loc9_50.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %.loc9_50.4: Core.Form = init_form %.loc9_50.3, call_param1 [symbolic = %.loc9_50.2 (constants.%.6c815b.2)] // CHECK:STDOUT: %.loc9_34: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] @@ -171,8 +172,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: generic fn @InitFromStructGeneric(%T.loc9_26.2: %Copy.type) { // CHECK:STDOUT: %T.loc9_26.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc9_26.1 (constants.%T.035)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc9_26.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %pattern_type.loc9: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc9 (constants.%pattern_type.9b9f0c.1)] -// CHECK:STDOUT: %.loc9_50.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc9_50.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %pattern_type.loc9: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc9 (constants.%pattern_type.9b9f0c.2)] +// CHECK:STDOUT: %.loc9_50.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc9_50.2 (constants.%.6c815b.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc9: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc9 (constants.%require_complete.67c)] @@ -181,15 +182,17 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %pattern_type.loc10: type = pattern_type %Class.loc10_17.2 [symbolic = %pattern_type.loc10 (constants.%pattern_type.c54)] // CHECK:STDOUT: %struct_type.k: type = struct_type {.k: @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type)} [symbolic = %struct_type.k (constants.%struct_type.k.436)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc9_26.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc10_27: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc9_26.1 [symbolic = %.loc10_27 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc10_27.2: @InitFromStructGeneric.%.loc10_27 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc10_27.2: = specific_impl_function %impl.elem0.loc10_27.2, @Copy.Op(%T.loc9_26.1) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T.loc9_26.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc10_27: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc9_26.1 [symbolic = %.loc10_27 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc10_27.2: @InitFromStructGeneric.%.loc10_27 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc10_27.2: = specific_impl_function %impl.elem0.loc10_27.2, @Copy.WithSelf.Op(%T.loc9_26.1) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc10_17.2, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem.765)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Class.loc10_17.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class.loc10_17.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.88b)] -// CHECK:STDOUT: %.loc10_3.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc10_3.2 (constants.%.849)] -// CHECK:STDOUT: %impl.elem0.loc10_3.2: @InitFromStructGeneric.%.loc10_3.2 (%.849) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_3.2 (constants.%impl.elem0.d1e)] -// CHECK:STDOUT: %specific_impl_fn.loc10_3.2: = specific_impl_function %impl.elem0.loc10_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc10_3.2 (constants.%specific_impl_fn.2bb)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.5c9)] +// CHECK:STDOUT: %.loc10_3.2: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc10_3.2 (constants.%.0dd)] +// CHECK:STDOUT: %impl.elem0.loc10_3.2: @InitFromStructGeneric.%.loc10_3.2 (%.0dd) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_3.2 (constants.%impl.elem0.799)] +// CHECK:STDOUT: %specific_impl_fn.loc10_3.2: = specific_impl_function %impl.elem0.loc10_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc10_3.2 (constants.%specific_impl_fn.d17)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: @@ -200,13 +203,13 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class.loc10_17.2 (%Class.316) = var %v.var_patt // CHECK:STDOUT: %x.ref: @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x // CHECK:STDOUT: %.loc10_28.1: @InitFromStructGeneric.%struct_type.k (%struct_type.k.436) = struct_literal (%x.ref) -// CHECK:STDOUT: %impl.elem0.loc10_27.1: @InitFromStructGeneric.%.loc10_27 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc10_27.1: @InitFromStructGeneric.%.loc10_27 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc10_27.1: = bound_method %x.ref, %impl.elem0.loc10_27.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_27.1: = specific_impl_function %impl.elem0.loc10_27.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc10_27.1: = specific_impl_function %impl.elem0.loc10_27.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc10_27.2: = bound_method %x.ref, %specific_impl_fn.loc10_27.1 // CHECK:STDOUT: %.loc10_28.2: ref @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = class_element_access %v.var, element0 -// CHECK:STDOUT: %Copy.Op.call.loc10: init @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) to %.loc10_28.2 = call %bound_method.loc10_27.2(%x.ref) -// CHECK:STDOUT: %.loc10_28.3: init @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) to %.loc10_28.2 = in_place_init %Copy.Op.call.loc10 +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc10: init @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) to %.loc10_28.2 = call %bound_method.loc10_27.2(%x.ref) +// CHECK:STDOUT: %.loc10_28.3: init @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) to %.loc10_28.2 = in_place_init %Copy.WithSelf.Op.call.loc10 // CHECK:STDOUT: %.loc10_28.4: init @InitFromStructGeneric.%Class.loc10_17.2 (%Class.316) to %v.var = class_init (%.loc10_28.3) // CHECK:STDOUT: %.loc10_3.1: init @InitFromStructGeneric.%Class.loc10_17.2 (%Class.316) = converted %.loc10_28.1, %.loc10_28.4 // CHECK:STDOUT: assign %v.var, %.loc10_3.1 @@ -222,18 +225,18 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %k.ref: @InitFromStructGeneric.%Class.elem (%Class.elem.765) = name_ref k, @Class.%.loc5 [concrete = @Class.%.loc5] // CHECK:STDOUT: %.loc11_11.1: ref @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc11_11.2: @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc11_11.1 -// CHECK:STDOUT: %impl.elem0.loc11: @InitFromStructGeneric.%.loc10_27 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc11: @InitFromStructGeneric.%.loc10_27 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc11_11.1: = bound_method %.loc11_11.2, %impl.elem0.loc11 -// CHECK:STDOUT: %specific_impl_fn.loc11: = specific_impl_function %impl.elem0.loc11, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc11: = specific_impl_function %impl.elem0.loc11, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc11_11.2: = bound_method %.loc11_11.2, %specific_impl_fn.loc11 // CHECK:STDOUT: %.loc9_50.1: ref @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.Op.call.loc11: init @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) to %.loc9_50.1 = call %bound_method.loc11_11.2(%.loc11_11.2) -// CHECK:STDOUT: %impl.elem0.loc10_3.1: @InitFromStructGeneric.%.loc10_3.2 (%.849) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_3.2 (constants.%impl.elem0.d1e)] +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc11: init @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) to %.loc9_50.1 = call %bound_method.loc11_11.2(%.loc11_11.2) +// CHECK:STDOUT: %impl.elem0.loc10_3.1: @InitFromStructGeneric.%.loc10_3.2 (%.0dd) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_3.2 (constants.%impl.elem0.799)] // CHECK:STDOUT: %bound_method.loc10_3.1: = bound_method %v.var, %impl.elem0.loc10_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_3.1: = specific_impl_function %impl.elem0.loc10_3.1, @Destroy.Op(constants.%Destroy.facet.88b) [symbolic = %specific_impl_fn.loc10_3.2 (constants.%specific_impl_fn.2bb)] +// CHECK:STDOUT: %specific_impl_fn.loc10_3.1: = specific_impl_function %impl.elem0.loc10_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.88b) [symbolic = %specific_impl_fn.loc10_3.2 (constants.%specific_impl_fn.d17)] // CHECK:STDOUT: %bound_method.loc10_3.2: = bound_method %v.var, %specific_impl_fn.loc10_3.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc10_3.2(%v.var) -// CHECK:STDOUT: return %Copy.Op.call.loc11 to %return.param +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc10_3.2(%v.var) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call.loc11 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -246,7 +249,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %v.var: ref %Class.805 = var %v.var_patt // CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x // CHECK:STDOUT: %.loc15_30.1: %struct_type.k.0bf = struct_literal (%x.ref) -// CHECK:STDOUT: %impl.elem0.loc15: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc15: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc15_29.1: = bound_method %x.ref, %impl.elem0.loc15 // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_29.2: = bound_method %x.ref, %specific_fn.loc15 @@ -267,7 +270,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %k.ref: %Class.elem.927 = name_ref k, @Class.%.loc5 [concrete = @Class.%.loc5] // CHECK:STDOUT: %.loc16_11.1: ref %i32 = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc16_11.2: %i32 = acquire_value %.loc16_11.1 -// CHECK:STDOUT: %impl.elem0.loc16: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc16: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc16_11.1: = bound_method %.loc16_11.2, %impl.elem0.loc16 // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_11.2: = bound_method %.loc16_11.2, %specific_fn.loc16 @@ -282,8 +285,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: specific @InitFromStructGeneric(constants.%T.035) { // CHECK:STDOUT: %T.loc9_26.1 => constants.%T.035 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %pattern_type.loc9 => constants.%pattern_type.9b9f0c.1 -// CHECK:STDOUT: %.loc9_50.2 => constants.%.6c815b.1 +// CHECK:STDOUT: %pattern_type.loc9 => constants.%pattern_type.9b9f0c.2 +// CHECK:STDOUT: %.loc9_50.2 => constants.%.6c815b.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- adapt.carbon @@ -295,18 +298,18 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.035: %Copy.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.ce2: type = pattern_type %Copy.type [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic] -// CHECK:STDOUT: %.6c815b.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] // CHECK:STDOUT: %InitFromAdaptedGeneric.type: type = fn_type @InitFromAdaptedGeneric [concrete] // CHECK:STDOUT: %InitFromAdaptedGeneric: %InitFromAdaptedGeneric.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.67c: = require_complete_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %Adapt.f64: type = class_type @Adapt, @Adapt(%T.binding.as_type) [symbolic] // CHECK:STDOUT: %require_complete.888: = require_complete_type %Adapt.f64 [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.lookup_impl_witness.58d: = lookup_impl_witness %T.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9: = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic] +// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdc: = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -323,7 +326,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -343,15 +347,15 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: file { // CHECK:STDOUT: %InitFromAdaptedGeneric.decl: %InitFromAdaptedGeneric.type = fn_decl @InitFromAdaptedGeneric [concrete = constants.%InitFromAdaptedGeneric] { // CHECK:STDOUT: %T.patt: %pattern_type.ce2 = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: %x.patt: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.9b9f0c.1) = value_binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.9b9f0c.1) = value_param_pattern %x.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %x.patt: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.9b9f0c.2) = value_binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.9b9f0c.2) = value_param_pattern %x.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @InitFromAdaptedGeneric.%pattern_type (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc9_51: %Copy.type = name_ref T, %T.loc9_27.2 [symbolic = %T.loc9_27.1 (constants.%T.035)] // CHECK:STDOUT: %T.as_type.loc9_51: type = facet_access_type %T.ref.loc9_51 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc9_51.3: type = converted %T.ref.loc9_51, %T.as_type.loc9_51 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc9_51.4: Core.Form = init_form %.loc9_51.3, call_param1 [symbolic = %.loc9_51.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %.loc9_51.4: Core.Form = init_form %.loc9_51.3, call_param1 [symbolic = %.loc9_51.2 (constants.%.6c815b.2)] // CHECK:STDOUT: %.loc9_35: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] @@ -391,17 +395,18 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: generic fn @InitFromAdaptedGeneric(%T.loc9_27.2: %Copy.type) { // CHECK:STDOUT: %T.loc9_27.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc9_27.1 (constants.%T.035)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc9_27.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.1)] -// CHECK:STDOUT: %.loc9_51.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc9_51.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.2)] +// CHECK:STDOUT: %.loc9_51.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc9_51.2 (constants.%.6c815b.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc9: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc9 (constants.%require_complete.67c)] // CHECK:STDOUT: %Adapt.loc10_23.2: type = class_type @Adapt, @Adapt(%T.binding.as_type) [symbolic = %Adapt.loc10_23.2 (constants.%Adapt.f64)] // CHECK:STDOUT: %require_complete.loc10: = require_complete_type %Adapt.loc10_23.2 [symbolic = %require_complete.loc10 (constants.%require_complete.888)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc9_27.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc10_26.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc9_27.1 [symbolic = %.loc10_26.3 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc10_26.2: @InitFromAdaptedGeneric.%.loc10_26.3 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_26.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc10_26.2: = specific_impl_function %impl.elem0.loc10_26.2, @Copy.Op(%T.loc9_27.1) [symbolic = %specific_impl_fn.loc10_26.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T.loc9_27.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc10_26.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc9_27.1 [symbolic = %.loc10_26.3 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc10_26.2: @InitFromAdaptedGeneric.%.loc10_26.3 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_26.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc10_26.2: = specific_impl_function %impl.elem0.loc10_26.2, @Copy.WithSelf.Op(%T.loc9_27.1) [symbolic = %specific_impl_fn.loc10_26.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: @@ -418,13 +423,13 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %.loc10_29: type = converted %T.ref.loc10_29, %T.as_type.loc10_29 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc10_26.1: @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type) = as_compatible %.loc10_13.2 // CHECK:STDOUT: %.loc10_26.2: @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type) = converted %.loc10_13.2, %.loc10_26.1 -// CHECK:STDOUT: %impl.elem0.loc10_26.1: @InitFromAdaptedGeneric.%.loc10_26.3 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc10_26.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc10_26.1: @InitFromAdaptedGeneric.%.loc10_26.3 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc10_26.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc10_26.1: = bound_method %.loc10_26.2, %impl.elem0.loc10_26.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_26.1: = specific_impl_function %impl.elem0.loc10_26.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc10_26.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc10_26.1: = specific_impl_function %impl.elem0.loc10_26.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc10_26.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc10_26.2: = bound_method %.loc10_26.2, %specific_impl_fn.loc10_26.1 // CHECK:STDOUT: %.loc9_51.1: ref @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.Op.call: init @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type) to %.loc9_51.1 = call %bound_method.loc10_26.2(%.loc10_26.2) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type) to %.loc9_51.1 = call %bound_method.loc10_26.2(%.loc10_26.2) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -441,7 +446,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %i32.loc14_31: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc14_28.1: %i32 = as_compatible %.loc14_13.2 // CHECK:STDOUT: %.loc14_28.2: %i32 = converted %.loc14_13.2, %.loc14_28.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc14_28.1: = bound_method %.loc14_28.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_28.2: = bound_method %.loc14_28.2, %specific_fn @@ -452,7 +457,7 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: specific @InitFromAdaptedGeneric(constants.%T.035) { // CHECK:STDOUT: %T.loc9_27.1 => constants.%T.035 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1 -// CHECK:STDOUT: %.loc9_51.2 => constants.%.6c815b.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2 +// CHECK:STDOUT: %.loc9_51.2 => constants.%.6c815b.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index da1d459a581a..bef5c17709bd 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -72,8 +72,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %require_complete.67c: = require_complete_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %Class.elem.05d: type = unbound_element_type %Class.847, %T.binding.as_type [symbolic] // CHECK:STDOUT: %pattern_type.893: type = pattern_type %Class.847 [symbolic] -// CHECK:STDOUT: %.6c815b.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %Class.Get.type.8ea: type = fn_type @Class.Get, @Class(%T.035) [symbolic] // CHECK:STDOUT: %Class.Get.7d3: %Class.Get.type.8ea = struct_value () [symbolic] // CHECK:STDOUT: %ptr.e7d: type = ptr_type %T.binding.as_type [symbolic] @@ -83,20 +83,21 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.GetAddr.7a1: %Class.GetAddr.type.437 = struct_value () [symbolic] // CHECK:STDOUT: %struct_type.x.8dc: type = struct_type {.x: %T.binding.as_type} [symbolic] // CHECK:STDOUT: %complete_type.e78: = complete_type_witness %struct_type.x.8dc [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.lookup_impl_witness.58d: = lookup_impl_witness %T.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9: = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic] +// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdc: = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] // CHECK:STDOUT: %.3a3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.2e7: = lookup_impl_witness %ptr.e7d, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet.8e7: %Copy.type = facet_value %ptr.e7d, (%Copy.lookup_impl_witness.2e7) [symbolic] -// CHECK:STDOUT: %.f11: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.8e7 [symbolic] -// CHECK:STDOUT: %impl.elem0.a55: %.f11 = impl_witness_access %Copy.lookup_impl_witness.2e7, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.0df: = specific_impl_function %impl.elem0.a55, @Copy.Op(%Copy.facet.8e7) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.486: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.8e7) [symbolic] +// CHECK:STDOUT: %.b63: type = fn_type_with_self_type %Copy.WithSelf.Op.type.486, %Copy.facet.8e7 [symbolic] +// CHECK:STDOUT: %impl.elem0.387: %.b63 = impl_witness_access %Copy.lookup_impl_witness.2e7, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.7f8: = specific_impl_function %impl.elem0.387, @Copy.WithSelf.Op(%Copy.facet.8e7) [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] @@ -119,7 +120,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.GetAddr.7d7: %Class.GetAddr.type.d64 = struct_value () [concrete] // CHECK:STDOUT: %struct_type.x.ed6: type = struct_type {.x: %i32} [concrete] // CHECK:STDOUT: %complete_type.1ec: = complete_type_witness %struct_type.x.ed6 [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Class.Get.specific_fn: = specific_function %Class.Get.275, @Class.Get(%Copy.facet.de4) [concrete] // CHECK:STDOUT: %ptr.7d6: type = ptr_type %Class.06a [concrete] @@ -133,7 +135,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %.cab: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %Copy.facet.a7b: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.a7b [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.a7b) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet.a7b [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -171,9 +174,10 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem.05d)] // CHECK:STDOUT: %require_complete.loc9: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc9 (constants.%require_complete.67c)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc9_16.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc9_16.3 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc9_16.2: @Class.Get.%.loc9_16.3 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_16.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc9_16.2: = specific_impl_function %impl.elem0.loc9_16.2, @Copy.Op(%T) [symbolic = %specific_impl_fn.loc9_16.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc9_16.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T [symbolic = %.loc9_16.3 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc9_16.2: @Class.Get.%.loc9_16.3 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_16.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc9_16.2: = specific_impl_function %impl.elem0.loc9_16.2, @Copy.WithSelf.Op(%T) [symbolic = %specific_impl_fn.loc9_16.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @Class.Get.%Class (%Class.847)) -> out %return.param: @Class.Get.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: @@ -181,13 +185,13 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %x.ref: @Class.Get.%Class.elem (%Class.elem.05d) = name_ref x, @Class.%.loc5_8 [concrete = @Class.%.loc5_8] // CHECK:STDOUT: %.loc9_16.1: ref @Class.Get.%T.binding.as_type (%T.binding.as_type) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc9_16.2: @Class.Get.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc9_16.1 -// CHECK:STDOUT: %impl.elem0.loc9_16.1: @Class.Get.%.loc9_16.3 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc9_16.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc9_16.1: @Class.Get.%.loc9_16.3 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc9_16.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc9_16.1: = bound_method %.loc9_16.2, %impl.elem0.loc9_16.1 -// CHECK:STDOUT: %specific_impl_fn.loc9_16.1: = specific_impl_function %impl.elem0.loc9_16.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc9_16.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc9_16.1: = specific_impl_function %impl.elem0.loc9_16.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc9_16.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc9_16.2: = bound_method %.loc9_16.2, %specific_impl_fn.loc9_16.1 // CHECK:STDOUT: -// CHECK:STDOUT: %Copy.Op.call: init @Class.Get.%T.binding.as_type (%T.binding.as_type) to %.loc7_27.1 = call %bound_method.loc9_16.2(%.loc9_16.2) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Class.Get.%T.binding.as_type (%T.binding.as_type) to %.loc7_27.1 = call %bound_method.loc9_16.2(%.loc9_16.2) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -200,9 +204,10 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %.loc15_12.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic = %.loc15_12.1 (constants.%.3a3)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc13_36.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e7)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc13_36.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.8e7)] -// CHECK:STDOUT: %.loc15_12.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc15_12.2 (constants.%.f11)] -// CHECK:STDOUT: %impl.elem0.loc15_12.2: @Class.GetAddr.%.loc15_12.2 (%.f11) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_12.2 (constants.%impl.elem0.a55)] -// CHECK:STDOUT: %specific_impl_fn.loc15_12.2: = specific_impl_function %impl.elem0.loc15_12.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc15_12.2 (constants.%specific_impl_fn.0df)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.486)] +// CHECK:STDOUT: %.loc15_12.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc15_12.2 (constants.%.b63)] +// CHECK:STDOUT: %impl.elem0.loc15_12.2: @Class.GetAddr.%.loc15_12.2 (%.b63) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_12.2 (constants.%impl.elem0.387)] +// CHECK:STDOUT: %specific_impl_fn.loc15_12.2: = specific_impl_function %impl.elem0.loc15_12.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc15_12.2 (constants.%specific_impl_fn.7f8)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: ref @Class.GetAddr.%Class (%Class.847)) -> out %return.param: @Class.GetAddr.%ptr.loc13_36.1 (%ptr.e7d) { // CHECK:STDOUT: !entry: @@ -210,12 +215,12 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %x.ref: @Class.GetAddr.%Class.elem (%Class.elem.05d) = name_ref x, @Class.%.loc5_8 [concrete = @Class.%.loc5_8] // CHECK:STDOUT: %.loc15_17: ref @Class.GetAddr.%T.binding.as_type (%T.binding.as_type) = class_element_access %self.ref, element0 // CHECK:STDOUT: %addr: @Class.GetAddr.%ptr.loc13_36.1 (%ptr.e7d) = addr_of %.loc15_17 -// CHECK:STDOUT: %impl.elem0.loc15_12.1: @Class.GetAddr.%.loc15_12.2 (%.f11) = impl_witness_access constants.%Copy.lookup_impl_witness.2e7, element0 [symbolic = %impl.elem0.loc15_12.2 (constants.%impl.elem0.a55)] +// CHECK:STDOUT: %impl.elem0.loc15_12.1: @Class.GetAddr.%.loc15_12.2 (%.b63) = impl_witness_access constants.%Copy.lookup_impl_witness.2e7, element0 [symbolic = %impl.elem0.loc15_12.2 (constants.%impl.elem0.387)] // CHECK:STDOUT: %bound_method.loc15_12.1: = bound_method %addr, %impl.elem0.loc15_12.1 -// CHECK:STDOUT: %specific_impl_fn.loc15_12.1: = specific_impl_function %impl.elem0.loc15_12.1, @Copy.Op(constants.%Copy.facet.8e7) [symbolic = %specific_impl_fn.loc15_12.2 (constants.%specific_impl_fn.0df)] +// CHECK:STDOUT: %specific_impl_fn.loc15_12.1: = specific_impl_function %impl.elem0.loc15_12.1, @Copy.WithSelf.Op(constants.%Copy.facet.8e7) [symbolic = %specific_impl_fn.loc15_12.2 (constants.%specific_impl_fn.7f8)] // CHECK:STDOUT: %bound_method.loc15_12.2: = bound_method %addr, %specific_impl_fn.loc15_12.1 -// CHECK:STDOUT: %Copy.Op.call: init @Class.GetAddr.%ptr.loc13_36.1 (%ptr.e7d) = call %bound_method.loc15_12.2(%addr) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Class.GetAddr.%ptr.loc13_36.1 (%ptr.e7d) = call %bound_method.loc15_12.2(%addr) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -225,7 +230,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %x.ref.loc22_11: %Class.elem.da5 = name_ref x, @Class.%.loc5_8 [concrete = @Class.%.loc5_8] // CHECK:STDOUT: %.loc22_11.1: ref %i32 = class_element_access %x.ref.loc22_10, element0 // CHECK:STDOUT: %.loc22_11.2: %i32 = acquire_value %.loc22_11.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc22_11.1: = bound_method %.loc22_11.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc22_11.2: = bound_method %.loc22_11.2, %specific_fn @@ -259,7 +264,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %.loc34_22.2: %ptr.235 = converted %Class.GetAddr.call, %.loc34_22.1 // CHECK:STDOUT: %.loc34_10.1: ref %i32 = deref %.loc34_22.2 // CHECK:STDOUT: %.loc34_10.2: %i32 = acquire_value %.loc34_10.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc34_10.1: = bound_method %.loc34_10.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc34_10.2: = bound_method %.loc34_10.2, %specific_fn @@ -288,8 +293,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class => constants.%Class.847 // CHECK:STDOUT: %pattern_type.loc7_10 => constants.%pattern_type.893 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %.loc7_27.2 => constants.%.6c815b.1 -// CHECK:STDOUT: %pattern_type.loc7_24 => constants.%pattern_type.9b9f0c.1 +// CHECK:STDOUT: %.loc7_27.2 => constants.%.6c815b.2 +// CHECK:STDOUT: %pattern_type.loc7_24 => constants.%pattern_type.9b9f0c.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class.GetAddr(constants.%T.035) { @@ -331,7 +336,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.elem => constants.%Class.elem.da5 // CHECK:STDOUT: %require_complete.loc9 => constants.%complete_type.f8a // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.f17 -// CHECK:STDOUT: %.loc9_16.3 => constants.%.f79 +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.081 +// CHECK:STDOUT: %.loc9_16.3 => constants.%.8e2 // CHECK:STDOUT: %impl.elem0.loc9_16.2 => constants.%Int.as.Copy.impl.Op.664 // CHECK:STDOUT: %specific_impl_fn.loc9_16.2 => constants.%Int.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } @@ -352,7 +358,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %.loc15_12.1 => constants.%.cab // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.843 // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.a7b -// CHECK:STDOUT: %.loc15_12.2 => constants.%.e6f +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.e01 +// CHECK:STDOUT: %.loc15_12.2 => constants.%.a62 // CHECK:STDOUT: %impl.elem0.loc15_12.2 => constants.%ptr.as.Copy.impl.Op.011 // CHECK:STDOUT: %specific_impl_fn.loc15_12.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index e4801993e6ae..20becef587c6 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -55,8 +55,8 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.035) [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic] -// CHECK:STDOUT: %.6c815b.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] // CHECK:STDOUT: %Class.F.type: type = fn_type @Class.F, @Class(%T.035) [symbolic] // CHECK:STDOUT: %Class.F: %Class.F.type = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.893: type = pattern_type %Class [symbolic] @@ -66,11 +66,11 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.binding.as_type [symbolic] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %T.binding.as_type} [symbolic] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.lookup_impl_witness.58d: = lookup_impl_witness %T.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9: = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic] +// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdc: = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic] // CHECK:STDOUT: %require_complete.904: = require_complete_type %Class [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -113,15 +113,15 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Class.F.decl: @Class.%Class.F.type (%Class.F.type) = fn_decl @Class.F [symbolic = @Class.%Class.F (constants.%Class.F)] { -// CHECK:STDOUT: %n.patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.1) = value_binding_pattern n [concrete] -// CHECK:STDOUT: %n.param_patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.1) = value_param_pattern %n.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %n.patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.2) = value_binding_pattern n [concrete] +// CHECK:STDOUT: %n.param_patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.2) = value_param_pattern %n.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_17: %Copy.type = name_ref T, @Class.%T.loc5_13.2 [symbolic = %T (constants.%T.035)] // CHECK:STDOUT: %T.as_type.loc6_17: type = facet_access_type %T.ref.loc6_17 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc6_17.3: type = converted %T.ref.loc6_17, %T.as_type.loc6_17 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc6_17.4: Core.Form = init_form %.loc6_17.3, call_param1 [symbolic = %.loc6_17.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %.loc6_17.4: Core.Form = init_form %.loc6_17.3, call_param1 [symbolic = %.loc6_17.2 (constants.%.6c815b.2)] // CHECK:STDOUT: %n.param: @Class.F.%T.binding.as_type (%T.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc6_11.1: type = splice_block %.loc6_11.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] { // CHECK:STDOUT: %T.ref.loc6_11: %Copy.type = name_ref T, @Class.%T.loc5_13.2 [symbolic = %T (constants.%T.035)] @@ -135,13 +135,13 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: %Class.G.decl: @Class.%Class.G.type (%Class.G.type) = fn_decl @Class.G [symbolic = @Class.%Class.G (constants.%Class.G)] { // CHECK:STDOUT: %self.patt: @Class.G.%pattern_type.loc10_8 (%pattern_type.893) = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @Class.G.%pattern_type.loc10_8 (%pattern_type.893) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Class.G.%pattern_type.loc10_22 (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Class.G.%pattern_type.loc10_22 (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @Class.G.%pattern_type.loc10_22 (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Class.G.%pattern_type.loc10_22 (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, @Class.%T.loc5_13.2 [symbolic = %T (constants.%T.035)] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc10_25.3: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc10_25.4: Core.Form = init_form %.loc10_25.3, call_param1 [symbolic = %.loc10_25.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %.loc10_25.4: Core.Form = init_form %.loc10_25.3, call_param1 [symbolic = %.loc10_25.2 (constants.%.6c815b.2)] // CHECK:STDOUT: %self.param: @Class.G.%Class (%Class) = value_param call_param0 // CHECK:STDOUT: %.loc10_14.1: type = splice_block %Self.ref [symbolic = %Class (constants.%Class)] { // CHECK:STDOUT: %.loc10_14.2: type = specific_constant constants.%Class, @Class(constants.%T.035) [symbolic = %Class (constants.%Class)] @@ -170,26 +170,27 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: generic fn @Class.F(@Class.%T.loc5_13.2: %Copy.type) { // CHECK:STDOUT: %T: %Copy.type = symbolic_binding T, 0 [symbolic = %T (constants.%T.035)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.1)] -// CHECK:STDOUT: %.loc6_17.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc6_17.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.2)] +// CHECK:STDOUT: %.loc6_17.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc6_17.2 (constants.%.6c815b.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.67c)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc7: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc7 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc7_12.2: @Class.F.%.loc7 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc7_12.2: = specific_impl_function %impl.elem0.loc7_12.2, @Copy.Op(%T) [symbolic = %specific_impl_fn.loc7_12.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc7: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T [symbolic = %.loc7 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc7_12.2: @Class.F.%.loc7 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc7_12.2: = specific_impl_function %impl.elem0.loc7_12.2, @Copy.WithSelf.Op(%T) [symbolic = %specific_impl_fn.loc7_12.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%n.param: @Class.F.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @Class.F.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: @Class.F.%T.binding.as_type (%T.binding.as_type) = name_ref n, %n -// CHECK:STDOUT: %impl.elem0.loc7_12.1: @Class.F.%.loc7 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc7_12.1: @Class.F.%.loc7 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc7_12.1: = bound_method %n.ref, %impl.elem0.loc7_12.1 -// CHECK:STDOUT: %specific_impl_fn.loc7_12.1: = specific_impl_function %impl.elem0.loc7_12.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc7_12.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc7_12.1: = specific_impl_function %impl.elem0.loc7_12.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc7_12.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc7_12.2: = bound_method %n.ref, %specific_impl_fn.loc7_12.1 // CHECK:STDOUT: %.loc6_17.1: ref @Class.F.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.Op.call: init @Class.F.%T.binding.as_type (%T.binding.as_type) to %.loc6_17.1 = call %bound_method.loc7_12.2(%n.ref) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Class.F.%T.binding.as_type (%T.binding.as_type) to %.loc6_17.1 = call %bound_method.loc7_12.2(%n.ref) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -198,17 +199,18 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %pattern_type.loc10_8: type = pattern_type %Class [symbolic = %pattern_type.loc10_8 (constants.%pattern_type.893)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc10_25.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc10_25.2 (constants.%.6c815b.1)] -// CHECK:STDOUT: %pattern_type.loc10_22: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc10_22 (constants.%pattern_type.9b9f0c.1)] +// CHECK:STDOUT: %.loc10_25.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc10_25.2 (constants.%.6c815b.2)] +// CHECK:STDOUT: %pattern_type.loc10_22: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc10_22 (constants.%pattern_type.9b9f0c.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc10: = require_complete_type %Class [symbolic = %require_complete.loc10 (constants.%require_complete.904)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: %require_complete.loc11: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc11 (constants.%require_complete.67c)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc11_16.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc11_16.3 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc11_16.2: @Class.G.%.loc11_16.3 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc11_16.2: = specific_impl_function %impl.elem0.loc11_16.2, @Copy.Op(%T) [symbolic = %specific_impl_fn.loc11_16.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc11_16.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T [symbolic = %.loc11_16.3 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc11_16.2: @Class.G.%.loc11_16.3 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc11_16.2: = specific_impl_function %impl.elem0.loc11_16.2, @Copy.WithSelf.Op(%T) [symbolic = %specific_impl_fn.loc11_16.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @Class.G.%Class (%Class)) -> out %return.param: @Class.G.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: @@ -216,13 +218,13 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: %n.ref: @Class.G.%Class.elem (%Class.elem) = name_ref n, @Class.%.loc14_8 [concrete = @Class.%.loc14_8] // CHECK:STDOUT: %.loc11_16.1: ref @Class.G.%T.binding.as_type (%T.binding.as_type) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc11_16.2: @Class.G.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc11_16.1 -// CHECK:STDOUT: %impl.elem0.loc11_16.1: @Class.G.%.loc11_16.3 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc11_16.1: @Class.G.%.loc11_16.3 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc11_16.1: = bound_method %.loc11_16.2, %impl.elem0.loc11_16.1 -// CHECK:STDOUT: %specific_impl_fn.loc11_16.1: = specific_impl_function %impl.elem0.loc11_16.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc11_16.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc11_16.1: = specific_impl_function %impl.elem0.loc11_16.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc11_16.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc11_16.2: = bound_method %.loc11_16.2, %specific_impl_fn.loc11_16.1 // CHECK:STDOUT: %.loc10_25.1: ref @Class.G.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.Op.call: init @Class.G.%T.binding.as_type (%T.binding.as_type) to %.loc10_25.1 = call %bound_method.loc11_16.2(%.loc11_16.2) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Class.G.%T.binding.as_type (%T.binding.as_type) to %.loc10_25.1 = call %bound_method.loc11_16.2(%.loc11_16.2) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -245,8 +247,8 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: specific @Class.F(constants.%T.035) { // CHECK:STDOUT: %T => constants.%T.035 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1 -// CHECK:STDOUT: %.loc6_17.2 => constants.%.6c815b.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2 +// CHECK:STDOUT: %.loc6_17.2 => constants.%.6c815b.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class.G(constants.%T.035) { @@ -254,8 +256,8 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: %Class => constants.%Class // CHECK:STDOUT: %pattern_type.loc10_8 => constants.%pattern_type.893 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %.loc10_25.2 => constants.%.6c815b.1 -// CHECK:STDOUT: %pattern_type.loc10_22 => constants.%pattern_type.9b9f0c.1 +// CHECK:STDOUT: %.loc10_25.2 => constants.%.6c815b.2 +// CHECK:STDOUT: %pattern_type.loc10_22 => constants.%pattern_type.9b9f0c.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_member_inline_missing_self_dot.carbon @@ -263,7 +265,7 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %T: %Copy.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %pattern_type: type = pattern_type %Copy.type [concrete] +// CHECK:STDOUT: %pattern_type.ce2: type = pattern_type %Copy.type [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic] @@ -287,7 +289,7 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] { -// CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 0 [concrete] +// CHECK:STDOUT: %T.patt: %pattern_type.ce2 = symbolic_binding_pattern T, 0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc5: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_lookup.carbon b/toolchain/check/testdata/class/generic/member_lookup.carbon index 0054080fb6e4..64c71039d32f 100644 --- a/toolchain/check/testdata/class/generic/member_lookup.carbon +++ b/toolchain/check/testdata/class/generic/member_lookup.carbon @@ -84,18 +84,18 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic] // CHECK:STDOUT: %Derived.ad7: type = class_type @Derived, @Derived(%T.binding.as_type) [symbolic] // CHECK:STDOUT: %pattern_type.d85: type = pattern_type %Derived.ad7 [symbolic] -// CHECK:STDOUT: %.6c815b.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %Base.ab3: type = class_type @Base, @Base(%T.binding.as_type) [symbolic] // CHECK:STDOUT: %require_complete.b68: = require_complete_type %Base.ab3 [symbolic] // CHECK:STDOUT: %require_complete.67c: = require_complete_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %Derived.elem.d6f: type = unbound_element_type %Derived.ad7, %T.binding.as_type [symbolic] // CHECK:STDOUT: %Base.elem.384: type = unbound_element_type %Base.ab3, %T.binding.as_type [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.lookup_impl_witness.58d: = lookup_impl_witness %T.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9: = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic] +// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdc: = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -109,9 +109,10 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived.loc13_45.1, %T.binding.as_type [symbolic = %Derived.elem (constants.%Derived.elem.d6f)] // CHECK:STDOUT: %require_complete.loc15: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc15 (constants.%require_complete.67c)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc13_18.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc15_11.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc13_18.1 [symbolic = %.loc15_11.3 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc15_11.2: @AccessDerived.%.loc15_11.3 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_11.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc15_11.2: = specific_impl_function %impl.elem0.loc15_11.2, @Copy.Op(%T.loc13_18.1) [symbolic = %specific_impl_fn.loc15_11.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T.loc13_18.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc15_11.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc13_18.1 [symbolic = %.loc15_11.3 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc15_11.2: @AccessDerived.%.loc15_11.3 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_11.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc15_11.2: = specific_impl_function %impl.elem0.loc15_11.2, @Copy.WithSelf.Op(%T.loc13_18.1) [symbolic = %specific_impl_fn.loc15_11.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @AccessDerived.%Derived.loc13_45.1 (%Derived.ad7)) -> out %return.param: @AccessDerived.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: @@ -119,13 +120,13 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %d.ref: @AccessDerived.%Derived.elem (%Derived.elem.d6f) = name_ref d, @Derived.%.loc10 [concrete = @Derived.%.loc10] // CHECK:STDOUT: %.loc15_11.1: ref @AccessDerived.%T.binding.as_type (%T.binding.as_type) = class_element_access %x.ref, element1 // CHECK:STDOUT: %.loc15_11.2: @AccessDerived.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc15_11.1 -// CHECK:STDOUT: %impl.elem0.loc15_11.1: @AccessDerived.%.loc15_11.3 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc15_11.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc15_11.1: @AccessDerived.%.loc15_11.3 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc15_11.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc15_11.1: = bound_method %.loc15_11.2, %impl.elem0.loc15_11.1 -// CHECK:STDOUT: %specific_impl_fn.loc15_11.1: = specific_impl_function %impl.elem0.loc15_11.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc15_11.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc15_11.1: = specific_impl_function %impl.elem0.loc15_11.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc15_11.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc15_11.2: = bound_method %.loc15_11.2, %specific_impl_fn.loc15_11.1 // CHECK:STDOUT: -// CHECK:STDOUT: %Copy.Op.call: init @AccessDerived.%T.binding.as_type (%T.binding.as_type) to %.loc13_51.1 = call %bound_method.loc15_11.2(%.loc15_11.2) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @AccessDerived.%T.binding.as_type (%T.binding.as_type) to %.loc13_51.1 = call %bound_method.loc15_11.2(%.loc15_11.2) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -139,9 +140,10 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %T.binding.as_type [symbolic = %Base.elem (constants.%Base.elem.384)] // CHECK:STDOUT: %require_complete.loc21_13: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc21_13 (constants.%require_complete.67c)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc19_15.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc21_11.5: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc19_15.1 [symbolic = %.loc21_11.5 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc21_11.2: @AccessBase.%.loc21_11.5 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc21_11.2: = specific_impl_function %impl.elem0.loc21_11.2, @Copy.Op(%T.loc19_15.1) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T.loc19_15.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc21_11.5: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc19_15.1 [symbolic = %.loc21_11.5 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc21_11.2: @AccessBase.%.loc21_11.5 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc21_11.2: = specific_impl_function %impl.elem0.loc21_11.2, @Copy.WithSelf.Op(%T.loc19_15.1) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @AccessBase.%Derived.loc19_42.1 (%Derived.ad7)) -> out %return.param: @AccessBase.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: @@ -151,13 +153,13 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %.loc21_11.2: ref @AccessBase.%Base (%Base.ab3) = converted %x.ref, %.loc21_11.1 // CHECK:STDOUT: %.loc21_11.3: ref @AccessBase.%T.binding.as_type (%T.binding.as_type) = class_element_access %.loc21_11.2, element0 // CHECK:STDOUT: %.loc21_11.4: @AccessBase.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc21_11.3 -// CHECK:STDOUT: %impl.elem0.loc21_11.1: @AccessBase.%.loc21_11.5 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc21_11.1: @AccessBase.%.loc21_11.5 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc21_11.1: = bound_method %.loc21_11.4, %impl.elem0.loc21_11.1 -// CHECK:STDOUT: %specific_impl_fn.loc21_11.1: = specific_impl_function %impl.elem0.loc21_11.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc21_11.1: = specific_impl_function %impl.elem0.loc21_11.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc21_11.2: = bound_method %.loc21_11.4, %specific_impl_fn.loc21_11.1 // CHECK:STDOUT: -// CHECK:STDOUT: %Copy.Op.call: init @AccessBase.%T.binding.as_type (%T.binding.as_type) to %.loc19_48.1 = call %bound_method.loc21_11.2(%.loc21_11.4) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @AccessBase.%T.binding.as_type (%T.binding.as_type) to %.loc19_48.1 = call %bound_method.loc21_11.2(%.loc21_11.4) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -166,8 +168,8 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %Derived.loc13_45.1 => constants.%Derived.ad7 // CHECK:STDOUT: %pattern_type.loc13_33 => constants.%pattern_type.d85 -// CHECK:STDOUT: %.loc13_51.2 => constants.%.6c815b.1 -// CHECK:STDOUT: %pattern_type.loc13_48 => constants.%pattern_type.9b9f0c.1 +// CHECK:STDOUT: %.loc13_51.2 => constants.%.6c815b.2 +// CHECK:STDOUT: %pattern_type.loc13_48 => constants.%pattern_type.9b9f0c.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AccessBase(constants.%T.035) { @@ -175,7 +177,7 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %Derived.loc19_42.1 => constants.%Derived.ad7 // CHECK:STDOUT: %pattern_type.loc19_30 => constants.%pattern_type.d85 -// CHECK:STDOUT: %.loc19_48.2 => constants.%.6c815b.1 -// CHECK:STDOUT: %pattern_type.loc19_45 => constants.%pattern_type.9b9f0c.1 +// CHECK:STDOUT: %.loc19_48.2 => constants.%.6c815b.2 +// CHECK:STDOUT: %pattern_type.loc19_45 => constants.%pattern_type.9b9f0c.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_out_of_line.carbon b/toolchain/check/testdata/class/generic/member_out_of_line.carbon index aaf28c01b1c5..ee4311c007d4 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -122,8 +122,8 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [concrete] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.035) [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic] -// CHECK:STDOUT: %.6c815b.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] // CHECK:STDOUT: %Class.F.type: type = fn_type @Class.F, @Class(%T.035) [symbolic] // CHECK:STDOUT: %Class.F: %Class.F.type = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.893: type = pattern_type %Class [symbolic] @@ -133,11 +133,11 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.binding.as_type [symbolic] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %T.binding.as_type} [symbolic] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.lookup_impl_witness.58d: = lookup_impl_witness %T.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9: = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic] +// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdc: = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic] // CHECK:STDOUT: %require_complete.904: = require_complete_type %Class [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -162,10 +162,10 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T.loc5_13.2: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T.035)] // CHECK:STDOUT: } // CHECK:STDOUT: %Class.F.decl: %Class.F.type = fn_decl @Class.F [symbolic = constants.%Class.F] { -// CHECK:STDOUT: %n.patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.1) = value_binding_pattern n [concrete] -// CHECK:STDOUT: %n.param_patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.1) = value_param_pattern %n.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %n.patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.2) = value_binding_pattern n [concrete] +// CHECK:STDOUT: %n.param_patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.2) = value_param_pattern %n.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc11_18: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: @@ -176,7 +176,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T.ref.loc11_36: %Copy.type = name_ref T, %T.loc11 [symbolic = %T.loc6 (constants.%T.035)] // CHECK:STDOUT: %T.as_type.loc11_36: type = facet_access_type %T.ref.loc11_36 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc11_36.2: type = converted %T.ref.loc11_36, %T.as_type.loc11_36 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc11_36.3: Core.Form = init_form %.loc11_36.2, call_param1 [symbolic = %.loc6_17.1 (constants.%.6c815b.1)] +// CHECK:STDOUT: %.loc11_36.3: Core.Form = init_form %.loc11_36.2, call_param1 [symbolic = %.loc6_17.1 (constants.%.6c815b.2)] // CHECK:STDOUT: %n.param.loc11: @Class.F.%T.binding.as_type (%T.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc11_30.1: type = splice_block %.loc11_30.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] { // CHECK:STDOUT: %T.ref.loc11_30: %Copy.type = name_ref T, %T.loc11 [symbolic = %T.loc6 (constants.%T.035)] @@ -190,8 +190,8 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Class.G.decl: %Class.G.type = fn_decl @Class.G [symbolic = constants.%Class.G] { // CHECK:STDOUT: %self.patt: @Class.G.%pattern_type.loc7_8 (%pattern_type.893) = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @Class.G.%pattern_type.loc7_8 (%pattern_type.893) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Class.G.%pattern_type.loc7_22 (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Class.G.%pattern_type.loc7_22 (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @Class.G.%pattern_type.loc7_22 (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Class.G.%pattern_type.loc7_22 (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc15_18: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: @@ -202,7 +202,7 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T.ref.loc15: %Copy.type = name_ref T, %T.loc15 [symbolic = %T.loc7 (constants.%T.035)] // CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc15_44.2: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc15_44.3: Core.Form = init_form %.loc15_44.2, call_param1 [symbolic = %.loc7_25.1 (constants.%.6c815b.1)] +// CHECK:STDOUT: %.loc15_44.3: Core.Form = init_form %.loc15_44.2, call_param1 [symbolic = %.loc7_25.1 (constants.%.6c815b.2)] // CHECK:STDOUT: %self.param.loc15: @Class.G.%Class (%Class) = value_param call_param0 // CHECK:STDOUT: %.loc15_33.1: type = splice_block %Self.ref.loc15 [symbolic = %Class (constants.%Class)] { // CHECK:STDOUT: %.loc15_33.2: type = specific_constant constants.%Class, @Class(constants.%T.035) [symbolic = %Class (constants.%Class)] @@ -231,15 +231,15 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Class.F.decl: @Class.%Class.F.type (%Class.F.type) = fn_decl @Class.F [symbolic = @Class.%Class.F (constants.%Class.F)] { -// CHECK:STDOUT: %n.patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.1) = value_binding_pattern n [concrete] -// CHECK:STDOUT: %n.param_patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.1) = value_param_pattern %n.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %n.patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.2) = value_binding_pattern n [concrete] +// CHECK:STDOUT: %n.param_patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.2) = value_param_pattern %n.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Class.F.%pattern_type (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc6_17: %Copy.type = name_ref T, @Class.%T.loc5_13.2 [symbolic = %T.loc6 (constants.%T.035)] // CHECK:STDOUT: %T.as_type.loc6_17: type = facet_access_type %T.ref.loc6_17 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc6_17.2: type = converted %T.ref.loc6_17, %T.as_type.loc6_17 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc6_17.3: Core.Form = init_form %.loc6_17.2, call_param1 [symbolic = %.loc6_17.1 (constants.%.6c815b.1)] +// CHECK:STDOUT: %.loc6_17.3: Core.Form = init_form %.loc6_17.2, call_param1 [symbolic = %.loc6_17.1 (constants.%.6c815b.2)] // CHECK:STDOUT: %n.param.loc6: @Class.F.%T.binding.as_type (%T.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc6_11.1: type = splice_block %.loc6_11.2 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] { // CHECK:STDOUT: %T.ref.loc6_11: %Copy.type = name_ref T, @Class.%T.loc5_13.2 [symbolic = %T.loc6 (constants.%T.035)] @@ -253,13 +253,13 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Class.G.decl: @Class.%Class.G.type (%Class.G.type) = fn_decl @Class.G [symbolic = @Class.%Class.G (constants.%Class.G)] { // CHECK:STDOUT: %self.patt: @Class.G.%pattern_type.loc7_8 (%pattern_type.893) = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: @Class.G.%pattern_type.loc7_8 (%pattern_type.893) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Class.G.%pattern_type.loc7_22 (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Class.G.%pattern_type.loc7_22 (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @Class.G.%pattern_type.loc7_22 (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Class.G.%pattern_type.loc7_22 (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc7: %Copy.type = name_ref T, @Class.%T.loc5_13.2 [symbolic = %T.loc7 (constants.%T.035)] // CHECK:STDOUT: %T.as_type.loc7: type = facet_access_type %T.ref.loc7 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc7_25.2: type = converted %T.ref.loc7, %T.as_type.loc7 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc7_25.3: Core.Form = init_form %.loc7_25.2, call_param1 [symbolic = %.loc7_25.1 (constants.%.6c815b.1)] +// CHECK:STDOUT: %.loc7_25.3: Core.Form = init_form %.loc7_25.2, call_param1 [symbolic = %.loc7_25.1 (constants.%.6c815b.2)] // CHECK:STDOUT: %self.param.loc7: @Class.G.%Class (%Class) = value_param call_param0 // CHECK:STDOUT: %.loc7_14.1: type = splice_block %Self.ref.loc7 [symbolic = %Class (constants.%Class)] { // CHECK:STDOUT: %.loc7_14.2: type = specific_constant constants.%Class, @Class(constants.%T.035) [symbolic = %Class (constants.%Class)] @@ -288,26 +288,27 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: generic fn @Class.F(@Class.%T.loc5_13.2: %Copy.type) { // CHECK:STDOUT: %T.loc6: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc6 (constants.%T.035)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc6 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.1)] -// CHECK:STDOUT: %.loc6_17.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc6_17.1 (constants.%.6c815b.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.2)] +// CHECK:STDOUT: %.loc6_17.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc6_17.1 (constants.%.6c815b.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.67c)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc6, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc12: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc6 [symbolic = %.loc12 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc12_10.2: @Class.F.%.loc12 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_10.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc12_10.2: = specific_impl_function %impl.elem0.loc12_10.2, @Copy.Op(%T.loc6) [symbolic = %specific_impl_fn.loc12_10.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T.loc6) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc12: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc6 [symbolic = %.loc12 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc12_10.2: @Class.F.%.loc12 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_10.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc12_10.2: = specific_impl_function %impl.elem0.loc12_10.2, @Copy.WithSelf.Op(%T.loc6) [symbolic = %specific_impl_fn.loc12_10.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%n.param.loc11: @Class.F.%T.binding.as_type (%T.binding.as_type)) -> out %return.param.loc11: @Class.F.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: @Class.F.%T.binding.as_type (%T.binding.as_type) = name_ref n, %n.loc11 -// CHECK:STDOUT: %impl.elem0.loc12_10.1: @Class.F.%.loc12 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc12_10.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc12_10.1: @Class.F.%.loc12 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc12_10.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc12_10.1: = bound_method %n.ref, %impl.elem0.loc12_10.1 -// CHECK:STDOUT: %specific_impl_fn.loc12_10.1: = specific_impl_function %impl.elem0.loc12_10.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc12_10.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc12_10.1: = specific_impl_function %impl.elem0.loc12_10.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc12_10.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc12_10.2: = bound_method %n.ref, %specific_impl_fn.loc12_10.1 // CHECK:STDOUT: %.loc11_36.1: ref @Class.F.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param.loc11 {} -// CHECK:STDOUT: %Copy.Op.call: init @Class.F.%T.binding.as_type (%T.binding.as_type) to %.loc11_36.1 = call %bound_method.loc12_10.2(%n.ref) -// CHECK:STDOUT: return %Copy.Op.call to %return.param.loc11 +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Class.F.%T.binding.as_type (%T.binding.as_type) to %.loc11_36.1 = call %bound_method.loc12_10.2(%n.ref) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -316,17 +317,18 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc7) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %pattern_type.loc7_8: type = pattern_type %Class [symbolic = %pattern_type.loc7_8 (constants.%pattern_type.893)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc7 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc7_25.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc7_25.1 (constants.%.6c815b.1)] -// CHECK:STDOUT: %pattern_type.loc7_22: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc7_22 (constants.%pattern_type.9b9f0c.1)] +// CHECK:STDOUT: %.loc7_25.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc7_25.1 (constants.%.6c815b.2)] +// CHECK:STDOUT: %pattern_type.loc7_22: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc7_22 (constants.%pattern_type.9b9f0c.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc15: = require_complete_type %Class [symbolic = %require_complete.loc15 (constants.%require_complete.904)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: %require_complete.loc16: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc16 (constants.%require_complete.67c)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc7, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc16_14.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc7 [symbolic = %.loc16_14.3 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc16_14.2: @Class.G.%.loc16_14.3 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_14.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc16_14.2: = specific_impl_function %impl.elem0.loc16_14.2, @Copy.Op(%T.loc7) [symbolic = %specific_impl_fn.loc16_14.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T.loc7) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc16_14.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc7 [symbolic = %.loc16_14.3 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc16_14.2: @Class.G.%.loc16_14.3 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_14.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc16_14.2: = specific_impl_function %impl.elem0.loc16_14.2, @Copy.WithSelf.Op(%T.loc7) [symbolic = %specific_impl_fn.loc16_14.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param.loc15: @Class.G.%Class (%Class)) -> out %return.param.loc15: @Class.G.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: @@ -334,13 +336,13 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %n.ref: @Class.G.%Class.elem (%Class.elem) = name_ref n, @Class.%.loc8_8 [concrete = @Class.%.loc8_8] // CHECK:STDOUT: %.loc16_14.1: ref @Class.G.%T.binding.as_type (%T.binding.as_type) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc16_14.2: @Class.G.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc16_14.1 -// CHECK:STDOUT: %impl.elem0.loc16_14.1: @Class.G.%.loc16_14.3 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc16_14.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc16_14.1: @Class.G.%.loc16_14.3 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc16_14.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc16_14.1: = bound_method %.loc16_14.2, %impl.elem0.loc16_14.1 -// CHECK:STDOUT: %specific_impl_fn.loc16_14.1: = specific_impl_function %impl.elem0.loc16_14.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc16_14.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc16_14.1: = specific_impl_function %impl.elem0.loc16_14.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc16_14.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc16_14.2: = bound_method %.loc16_14.2, %specific_impl_fn.loc16_14.1 // CHECK:STDOUT: %.loc15_44.1: ref @Class.G.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param.loc15 {} -// CHECK:STDOUT: %Copy.Op.call: init @Class.G.%T.binding.as_type (%T.binding.as_type) to %.loc15_44.1 = call %bound_method.loc16_14.2(%.loc16_14.2) -// CHECK:STDOUT: return %Copy.Op.call to %return.param.loc15 +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Class.G.%T.binding.as_type (%T.binding.as_type) to %.loc15_44.1 = call %bound_method.loc16_14.2(%.loc16_14.2) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -363,8 +365,8 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: specific @Class.F(constants.%T.035) { // CHECK:STDOUT: %T.loc6 => constants.%T.035 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1 -// CHECK:STDOUT: %.loc6_17.1 => constants.%.6c815b.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2 +// CHECK:STDOUT: %.loc6_17.1 => constants.%.6c815b.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class.G(constants.%T.035) { @@ -372,8 +374,8 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Class => constants.%Class // CHECK:STDOUT: %pattern_type.loc7_8 => constants.%pattern_type.893 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %.loc7_25.1 => constants.%.6c815b.1 -// CHECK:STDOUT: %pattern_type.loc7_22 => constants.%pattern_type.9b9f0c.1 +// CHECK:STDOUT: %.loc7_25.1 => constants.%.6c815b.2 +// CHECK:STDOUT: %pattern_type.loc7_22 => constants.%pattern_type.9b9f0c.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- nested.carbon diff --git a/toolchain/check/testdata/class/generic/member_type.carbon b/toolchain/check/testdata/class/generic/member_type.carbon index b9edf4830ed4..d78478790122 100644 --- a/toolchain/check/testdata/class/generic/member_type.carbon +++ b/toolchain/check/testdata/class/generic/member_type.carbon @@ -74,7 +74,7 @@ fn Test() -> i32 { // CHECK:STDOUT: %Inner.elem.f8d: type = unbound_element_type %Inner.bcf, %T.binding.as_type [symbolic] // CHECK:STDOUT: %struct_type.n.47a: type = struct_type {.n: %T.binding.as_type} [symbolic] // CHECK:STDOUT: %complete_type.072: = complete_type_witness %struct_type.n.47a [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %.b20: Core.Form = init_form %Inner.bcf, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.611: type = pattern_type %Inner.bcf [symbolic] // CHECK:STDOUT: %Outer.F.type.2fb: type = fn_type @Outer.F, @Outer(%T.035) [symbolic] @@ -82,11 +82,11 @@ fn Test() -> i32 { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %require_complete.e6c: = require_complete_type %Inner.bcf [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.lookup_impl_witness.58d: = lookup_impl_witness %T.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9: = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic] +// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdc: = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -120,7 +120,6 @@ fn Test() -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -128,12 +127,14 @@ fn Test() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -201,8 +202,8 @@ fn Test() -> i32 { // CHECK:STDOUT: class { // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [symbolic = @Outer.%Inner (constants.%Inner.bcf)] {} {} // CHECK:STDOUT: %Outer.F.decl: @Outer.%Outer.F.type (%Outer.F.type.2fb) = fn_decl @Outer.F [symbolic = @Outer.%Outer.F (constants.%Outer.F.5e3)] { -// CHECK:STDOUT: %n.patt: @Outer.F.%pattern_type.loc9_8 (%pattern_type.9b9f0c.1) = value_binding_pattern n [concrete] -// CHECK:STDOUT: %n.param_patt: @Outer.F.%pattern_type.loc9_8 (%pattern_type.9b9f0c.1) = value_param_pattern %n.patt, call_param0 [concrete] +// CHECK:STDOUT: %n.patt: @Outer.F.%pattern_type.loc9_8 (%pattern_type.9b9f0c.2) = value_binding_pattern n [concrete] +// CHECK:STDOUT: %n.param_patt: @Outer.F.%pattern_type.loc9_8 (%pattern_type.9b9f0c.2) = value_param_pattern %n.patt, call_param0 [concrete] // CHECK:STDOUT: %return.patt: @Outer.F.%pattern_type.loc9_14 (%pattern_type.611) = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: @Outer.F.%pattern_type.loc9_14 (%pattern_type.611) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { @@ -258,7 +259,7 @@ fn Test() -> i32 { // CHECK:STDOUT: generic fn @Outer.F(@Outer.%T.loc4_13.2: %Copy.type) { // CHECK:STDOUT: %T: %Copy.type = symbolic_binding T, 0 [symbolic = %T (constants.%T.035)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %pattern_type.loc9_8: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc9_8 (constants.%pattern_type.9b9f0c.1)] +// CHECK:STDOUT: %pattern_type.loc9_8: type = pattern_type %T.binding.as_type [symbolic = %pattern_type.loc9_8 (constants.%pattern_type.9b9f0c.2)] // CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(%T) [symbolic = %Inner (constants.%Inner.bcf)] // CHECK:STDOUT: %.loc9_17.1: Core.Form = init_form %Inner, call_param1 [symbolic = %.loc9_17.1 (constants.%.b20)] // CHECK:STDOUT: %pattern_type.loc9_14: type = pattern_type %Inner [symbolic = %pattern_type.loc9_14 (constants.%pattern_type.611)] @@ -268,21 +269,22 @@ fn Test() -> i32 { // CHECK:STDOUT: %require_complete.loc9_17: = require_complete_type %Inner [symbolic = %require_complete.loc9_17 (constants.%require_complete.e6c)] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: @Outer.F.%T.binding.as_type (%T.binding.as_type)} [symbolic = %struct_type.n (constants.%struct_type.n.47a)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc9_38: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc9_38 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc9_38.2: @Outer.F.%.loc9_38 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_38.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc9_38.2: = specific_impl_function %impl.elem0.loc9_38.2, @Copy.Op(%T) [symbolic = %specific_impl_fn.loc9_38.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc9_38: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T [symbolic = %.loc9_38 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc9_38.2: @Outer.F.%.loc9_38 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_38.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc9_38.2: = specific_impl_function %impl.elem0.loc9_38.2, @Copy.WithSelf.Op(%T) [symbolic = %specific_impl_fn.loc9_38.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%n.param: @Outer.F.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @Outer.F.%Inner (%Inner.bcf) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: @Outer.F.%T.binding.as_type (%T.binding.as_type) = name_ref n, %n // CHECK:STDOUT: %.loc9_39.1: @Outer.F.%struct_type.n (%struct_type.n.47a) = struct_literal (%n.ref) -// CHECK:STDOUT: %impl.elem0.loc9_38.1: @Outer.F.%.loc9_38 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc9_38.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc9_38.1: @Outer.F.%.loc9_38 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc9_38.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc9_38.1: = bound_method %n.ref, %impl.elem0.loc9_38.1 -// CHECK:STDOUT: %specific_impl_fn.loc9_38.1: = specific_impl_function %impl.elem0.loc9_38.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc9_38.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc9_38.1: = specific_impl_function %impl.elem0.loc9_38.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc9_38.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc9_38.2: = bound_method %n.ref, %specific_impl_fn.loc9_38.1 // CHECK:STDOUT: %.loc9_39.2: ref @Outer.F.%T.binding.as_type (%T.binding.as_type) = class_element_access %return.param, element0 -// CHECK:STDOUT: %Copy.Op.call: init @Outer.F.%T.binding.as_type (%T.binding.as_type) to %.loc9_39.2 = call %bound_method.loc9_38.2(%n.ref) -// CHECK:STDOUT: %.loc9_39.3: init @Outer.F.%T.binding.as_type (%T.binding.as_type) to %.loc9_39.2 = in_place_init %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Outer.F.%T.binding.as_type (%T.binding.as_type) to %.loc9_39.2 = call %bound_method.loc9_38.2(%n.ref) +// CHECK:STDOUT: %.loc9_39.3: init @Outer.F.%T.binding.as_type (%T.binding.as_type) to %.loc9_39.2 = in_place_init %Copy.WithSelf.Op.call // CHECK:STDOUT: %.loc9_39.4: init @Outer.F.%Inner (%Inner.bcf) to %return.param = class_init (%.loc9_39.3) // CHECK:STDOUT: %.loc9_40: init @Outer.F.%Inner (%Inner.bcf) = converted %.loc9_39.1, %.loc9_39.4 // CHECK:STDOUT: return %.loc9_40 to %return.param @@ -311,7 +313,7 @@ fn Test() -> i32 { // CHECK:STDOUT: %.loc13_43.2: %Copy.type = converted Core.IntLiteral, %Copy.facet.loc13_43.2 [concrete = constants.%Copy.facet.cdd] // CHECK:STDOUT: %Outer.F.specific_fn: = specific_function %F.ref, @Outer.F(constants.%Copy.facet.de4) [concrete = constants.%Outer.F.specific_fn] // CHECK:STDOUT: %.loc13_3: ref %Inner.74c = splice_block %c.var {} -// CHECK:STDOUT: %impl.elem0.loc13: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc13: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_42.1: = bound_method %int_1, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_42.2: = bound_method %int_1, %specific_fn.loc13 [concrete = constants.%bound_method] @@ -335,7 +337,7 @@ fn Test() -> i32 { // CHECK:STDOUT: %n.ref: %Inner.elem.34c = name_ref n, @Inner.%.loc6_10 [concrete = @Inner.%.loc6_10] // CHECK:STDOUT: %.loc14_11.1: ref %i32 = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc14_11.2: %i32 = acquire_value %.loc14_11.1 -// CHECK:STDOUT: %impl.elem0.loc14: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc14: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc14_11.1: = bound_method %.loc14_11.2, %impl.elem0.loc14 // CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_11.2: = bound_method %.loc14_11.2, %specific_fn.loc14 @@ -370,7 +372,7 @@ fn Test() -> i32 { // CHECK:STDOUT: specific @Outer.F(constants.%T.035) { // CHECK:STDOUT: %T => constants.%T.035 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %pattern_type.loc9_8 => constants.%pattern_type.9b9f0c.1 +// CHECK:STDOUT: %pattern_type.loc9_8 => constants.%pattern_type.9b9f0c.2 // CHECK:STDOUT: %Inner => constants.%Inner.bcf // CHECK:STDOUT: %.loc9_17.1 => constants.%.b20 // CHECK:STDOUT: %pattern_type.loc9_14 => constants.%pattern_type.611 @@ -409,7 +411,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %require_complete.loc9_17 => constants.%complete_type.54b // CHECK:STDOUT: %struct_type.n => constants.%struct_type.n.033 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.f17 -// CHECK:STDOUT: %.loc9_38 => constants.%.f79 +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.081 +// CHECK:STDOUT: %.loc9_38 => constants.%.8e2 // CHECK:STDOUT: %impl.elem0.loc9_38.2 => constants.%Int.as.Copy.impl.Op.664 // CHECK:STDOUT: %specific_impl_fn.loc9_38.2 => constants.%Int.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } @@ -431,10 +434,10 @@ fn Test() -> i32 { // CHECK:STDOUT: %pattern_type.72a: type = pattern_type %Self.binding.as_type.534 [symbolic] // CHECK:STDOUT: %.3cf: Core.Form = init_form %T, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] -// CHECK:STDOUT: %Inner.F.type.31e: type = fn_type @Inner.F, @Inner(%T) [symbolic] -// CHECK:STDOUT: %Inner.F.3c5: %Inner.F.type.31e = struct_value () [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.type.675: type = fn_type @Inner.WithSelf.F, @Inner(%T, %Self.d55) [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.06f: %Inner.WithSelf.F.type.675 = struct_value () [symbolic] // CHECK:STDOUT: %Inner.assoc_type.be2: type = assoc_entity_type @Inner, @Inner(%T) [symbolic] -// CHECK:STDOUT: %assoc0.0a9: %Inner.assoc_type.be2 = assoc_entity element0, @Inner.%Inner.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.058: %Inner.assoc_type.be2 = assoc_entity element0, @Inner.%Inner.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %C.131: type = class_type @C, @C(%T) [symbolic] // CHECK:STDOUT: %Inner.impl_witness.eb2: = impl_witness @C.as.Inner.impl.%Inner.impl_witness_table, @C.as.Inner.impl(%T) [symbolic] // CHECK:STDOUT: %require_complete.8b6: = require_complete_type %Inner.type.6ef [symbolic] @@ -442,6 +445,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %C.as.Inner.impl.F.type.72e: type = fn_type @C.as.Inner.impl.F, @C.as.Inner.impl(%T) [symbolic] // CHECK:STDOUT: %C.as.Inner.impl.F.28d: %C.as.Inner.impl.F.type.72e = struct_value () [symbolic] // CHECK:STDOUT: %Inner.facet.921: %Inner.type.6ef = facet_value %C.131, (%Inner.impl_witness.eb2) [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.type.704: type = fn_type @Inner.WithSelf.F, @Inner(%T, %Inner.facet.921) [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.118: %Inner.WithSelf.F.type.704 = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %require_complete.4fd: = require_complete_type %C.131 [symbolic] @@ -449,9 +454,11 @@ fn Test() -> i32 { // CHECK:STDOUT: %.1f8: require_specific_def_type = require_specific_def @C.as.Inner.impl(%T) [symbolic] // CHECK:STDOUT: %Inner.lookup_impl_witness: = lookup_impl_witness %C.131, @Inner, @Inner(%T) [symbolic] // CHECK:STDOUT: %Inner.facet.f78: %Inner.type.6ef = facet_value %C.131, (%Inner.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.455: type = fn_type_with_self_type %Inner.F.type.31e, %Inner.facet.f78 [symbolic] -// CHECK:STDOUT: %impl.elem0: %.455 = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Inner.F(%T, %Inner.facet.f78) [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.type.d96: type = fn_type @Inner.WithSelf.F, @Inner(%T, %Inner.facet.f78) [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.66d: %Inner.WithSelf.F.type.d96 = struct_value () [symbolic] +// CHECK:STDOUT: %.29b: type = fn_type_with_self_type %Inner.WithSelf.F.type.d96, %Inner.facet.f78 [symbolic] +// CHECK:STDOUT: %impl.elem0: %.29b = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Inner.WithSelf.F(%T, %Inner.facet.f78) [symbolic] // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -462,16 +469,18 @@ fn Test() -> i32 { // CHECK:STDOUT: %C.d3f: type = class_type @C, @C(%i32) [concrete] // CHECK:STDOUT: %Inner.impl_witness.667: = impl_witness @D.as.Inner.impl.%Inner.impl_witness_table [concrete] // CHECK:STDOUT: %Self.f19: %Inner.type.94a = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Inner.F.type.c8b: type = fn_type @Inner.F, @Inner(%i32) [concrete] -// CHECK:STDOUT: %Inner.F.1cd: %Inner.F.type.c8b = struct_value () [concrete] +// CHECK:STDOUT: %Inner.WithSelf.F.type.74d: type = fn_type @Inner.WithSelf.F, @Inner(%i32, %Self.d55) [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.b36: %Inner.WithSelf.F.type.74d = struct_value () [symbolic] // CHECK:STDOUT: %Inner.assoc_type.564: type = assoc_entity_type @Inner, @Inner(%i32) [concrete] -// CHECK:STDOUT: %assoc0.43a: %Inner.assoc_type.564 = assoc_entity element0, @Inner.%Inner.F.decl [concrete] +// CHECK:STDOUT: %assoc0.958: %Inner.assoc_type.564 = assoc_entity element0, @Inner.%Inner.WithSelf.F.decl [concrete] // CHECK:STDOUT: %pattern_type.9c8: type = pattern_type %D [concrete] // CHECK:STDOUT: %.e54: Core.Form = init_form %i32, call_param1 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %D.as.Inner.impl.F.type: type = fn_type @D.as.Inner.impl.F [concrete] // CHECK:STDOUT: %D.as.Inner.impl.F: %D.as.Inner.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %Inner.facet.dc9: %Inner.type.94a = facet_value %D, (%Inner.impl_witness.667) [concrete] +// CHECK:STDOUT: %Inner.WithSelf.F.type.6b0: type = fn_type @Inner.WithSelf.F, @Inner(%i32, %Inner.facet.dc9) [concrete] +// CHECK:STDOUT: %Inner.WithSelf.F.17e: %Inner.WithSelf.F.type.6b0 = struct_value () [concrete] // CHECK:STDOUT: %.437: Core.Form = init_form %i32, call_param0 [concrete] // CHECK:STDOUT: %Test.type: type = fn_type @Test [concrete] // CHECK:STDOUT: %Test: %Test.type = struct_value () [concrete] @@ -486,7 +495,9 @@ fn Test() -> i32 { // CHECK:STDOUT: %C.as.Inner.impl.F.356: %C.as.Inner.impl.F.type.7ce = struct_value () [concrete] // CHECK:STDOUT: %.c0b: require_specific_def_type = require_specific_def @C.as.Inner.impl(%i32) [concrete] // CHECK:STDOUT: %Inner.facet.ac9: %Inner.type.94a = facet_value %C.d3f, (%Inner.impl_witness.d48) [concrete] -// CHECK:STDOUT: %.95f: type = fn_type_with_self_type %Inner.F.type.c8b, %Inner.facet.ac9 [concrete] +// CHECK:STDOUT: %Inner.WithSelf.F.type.96b: type = fn_type @Inner.WithSelf.F, @Inner(%i32, %Inner.facet.ac9) [concrete] +// CHECK:STDOUT: %Inner.WithSelf.F.4b0: %Inner.WithSelf.F.type.96b = struct_value () [concrete] +// CHECK:STDOUT: %.fd6: type = fn_type_with_self_type %Inner.WithSelf.F.type.96b, %Inner.facet.ac9 [concrete] // CHECK:STDOUT: %C.as.Inner.impl.F.specific_fn: = specific_function %C.as.Inner.impl.F.356, @C.as.Inner.impl.F(%i32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -533,42 +544,42 @@ fn Test() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: generic interface @Inner(@Outer.%T.loc4_13.2: type) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%T)> [symbolic = %Inner.type (constants.%Inner.type.6ef)] -// CHECK:STDOUT: %Self.loc5_19.2: @Inner.%Inner.type (%Inner.type.6ef) = symbolic_binding Self, 1 [symbolic = %Self.loc5_19.2 (constants.%Self.d55)] -// CHECK:STDOUT: %Inner.F.type: type = fn_type @Inner.F, @Inner(%T) [symbolic = %Inner.F.type (constants.%Inner.F.type.31e)] -// CHECK:STDOUT: %Inner.F: @Inner.%Inner.F.type (%Inner.F.type.31e) = struct_value () [symbolic = %Inner.F (constants.%Inner.F.3c5)] -// CHECK:STDOUT: %Inner.assoc_type: type = assoc_entity_type @Inner, @Inner(%T) [symbolic = %Inner.assoc_type (constants.%Inner.assoc_type.be2)] -// CHECK:STDOUT: %assoc0.loc6_28.2: @Inner.%Inner.assoc_type (%Inner.assoc_type.be2) = assoc_entity element0, %Inner.F.decl [symbolic = %assoc0.loc6_28.2 (constants.%assoc0.0a9)] +// CHECK:STDOUT: %T.loc5: type = symbolic_binding T, 0 [symbolic = %T.loc5 (constants.%T)] +// CHECK:STDOUT: %Inner.type.loc5: type = facet_type <@Inner, @Inner(%T.loc5)> [symbolic = %Inner.type.loc5 (constants.%Inner.type.6ef)] +// CHECK:STDOUT: %Self.loc5_19.2: @Inner.%Inner.type.loc5 (%Inner.type.6ef) = symbolic_binding Self, 1 [symbolic = %Self.loc5_19.2 (constants.%Self.d55)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc5_19.1: @Inner.%Inner.type (%Inner.type.6ef) = symbolic_binding Self, 1 [symbolic = %Self.loc5_19.2 (constants.%Self.d55)] -// CHECK:STDOUT: %Inner.F.decl: @Inner.%Inner.F.type (%Inner.F.type.31e) = fn_decl @Inner.F [symbolic = @Inner.%Inner.F (constants.%Inner.F.3c5)] { -// CHECK:STDOUT: %self.patt: @Inner.F.%pattern_type.loc6_10 (%pattern_type.72a) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Inner.F.%pattern_type.loc6_10 (%pattern_type.72a) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Inner.F.%pattern_type.loc6_24 (%pattern_type.51d) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Inner.F.%pattern_type.loc6_24 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %Self.loc5_19.1: @Inner.%Inner.type.loc5 (%Inner.type.6ef) = symbolic_binding Self, 1 [symbolic = %Self.loc5_19.2 (constants.%Self.d55)] +// CHECK:STDOUT: interface_with_self_decl @Inner [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Inner.WithSelf.F.decl: @Inner.%Inner.WithSelf.F.type (%Inner.WithSelf.F.type.675) = fn_decl @Inner.WithSelf.F [symbolic = @Inner.%Inner.WithSelf.F (constants.%Inner.WithSelf.F.06f)] { +// CHECK:STDOUT: %self.patt: @Inner.WithSelf.F.%pattern_type.loc6_10 (%pattern_type.72a) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Inner.WithSelf.F.%pattern_type.loc6_10 (%pattern_type.72a) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @Inner.WithSelf.F.%pattern_type.loc6_24 (%pattern_type.51d) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Inner.WithSelf.F.%pattern_type.loc6_24 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc4_13.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %.loc6_27.2: Core.Form = init_form %T.ref, call_param1 [symbolic = %.loc6_27.1 (constants.%.3cf)] -// CHECK:STDOUT: %self.param: @Inner.F.%Self.binding.as_type (%Self.binding.as_type.534) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Inner.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.534) = value_param call_param0 // CHECK:STDOUT: %.loc6_16.1: type = splice_block %.loc6_16.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.534)] { -// CHECK:STDOUT: %.loc6_16.2: @Inner.F.%Inner.type (%Inner.type.6ef) = specific_constant @Inner.%Self.loc5_19.1, @Inner(constants.%T) [symbolic = %Self (constants.%Self.d55)] -// CHECK:STDOUT: %Self.ref: @Inner.F.%Inner.type (%Inner.type.6ef) = name_ref Self, %.loc6_16.2 [symbolic = %Self (constants.%Self.d55)] +// CHECK:STDOUT: %.loc6_16.2: @Inner.WithSelf.F.%Inner.type (%Inner.type.6ef) = specific_constant @Inner.%Self.loc5_19.1, @Inner(constants.%T) [symbolic = %Self (constants.%Self.d55)] +// CHECK:STDOUT: %Self.ref: @Inner.WithSelf.F.%Inner.type (%Inner.type.6ef) = name_ref Self, %.loc6_16.2 [symbolic = %Self (constants.%Self.d55)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.534)] // CHECK:STDOUT: %.loc6_16.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.534)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Inner.F.%Self.binding.as_type (%Self.binding.as_type.534) = value_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @Inner.F.%T (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @Inner.F.%T (%T) = return_slot %return.param +// CHECK:STDOUT: %self: @Inner.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.534) = value_binding self, %self.param +// CHECK:STDOUT: %return.param: ref @Inner.WithSelf.F.%T (%T) = out_param call_param1 +// CHECK:STDOUT: %return: ref @Inner.WithSelf.F.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc6_28.1: @Inner.%Inner.assoc_type (%Inner.assoc_type.be2) = assoc_entity element0, %Inner.F.decl [symbolic = %assoc0.loc6_28.2 (constants.%assoc0.0a9)] +// CHECK:STDOUT: %assoc0.loc6_28.1: @Inner.%Inner.assoc_type (%Inner.assoc_type.be2) = assoc_entity element0, %Inner.WithSelf.F.decl [symbolic = %assoc0.loc6_28.2 (constants.%assoc0.058)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc5_19.1 // CHECK:STDOUT: .T = +// CHECK:STDOUT: .T = // CHECK:STDOUT: .F = %assoc0.loc6_28.1 -// CHECK:STDOUT: witness = (%Inner.F.decl) +// CHECK:STDOUT: witness = (%Inner.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -700,16 +711,16 @@ fn Test() -> i32 { // CHECK:STDOUT: .D = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Inner.F(@Outer.%T.loc4_13.2: type, @Inner.%Self.loc5_19.1: @Inner.%Inner.type (%Inner.type.6ef)) { +// CHECK:STDOUT: generic fn @Inner.WithSelf.F(@Outer.%T.loc4_13.2: type, @Inner.%Self.loc5_19.1: @Inner.%Inner.type.loc5 (%Inner.type.6ef)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%T)> [symbolic = %Inner.type (constants.%Inner.type.6ef)] -// CHECK:STDOUT: %Self: @Inner.F.%Inner.type (%Inner.type.6ef) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.d55)] +// CHECK:STDOUT: %Self: @Inner.WithSelf.F.%Inner.type (%Inner.type.6ef) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.d55)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.534)] // CHECK:STDOUT: %pattern_type.loc6_10: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc6_10 (constants.%pattern_type.72a)] // CHECK:STDOUT: %.loc6_27.1: Core.Form = init_form %T, call_param1 [symbolic = %.loc6_27.1 (constants.%.3cf)] // CHECK:STDOUT: %pattern_type.loc6_24: type = pattern_type %T [symbolic = %pattern_type.loc6_24 (constants.%pattern_type.51d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Inner.F.%Self.binding.as_type (%Self.binding.as_type.534)) -> out %return.param: @Inner.F.%T (%T); +// CHECK:STDOUT: fn(%self.param: @Inner.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.534)) -> out %return.param: @Inner.WithSelf.F.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @C.as.Inner.impl.F(@Outer.%T.loc4_13.2: type) { @@ -725,29 +736,29 @@ fn Test() -> i32 { // CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%T)> [symbolic = %Inner.type (constants.%Inner.type.6ef)] // CHECK:STDOUT: %require_complete.loc11_48: = require_complete_type %Inner.type [symbolic = %require_complete.loc11_48 (constants.%require_complete.8b6)] // CHECK:STDOUT: %Inner.assoc_type: type = assoc_entity_type @Inner, @Inner(%T) [symbolic = %Inner.assoc_type (constants.%Inner.assoc_type.be2)] -// CHECK:STDOUT: %assoc0: @C.as.Inner.impl.F.%Inner.assoc_type (%Inner.assoc_type.be2) = assoc_entity element0, @Inner.%Inner.F.decl [symbolic = %assoc0 (constants.%assoc0.0a9)] +// CHECK:STDOUT: %assoc0: @C.as.Inner.impl.F.%Inner.assoc_type (%Inner.assoc_type.be2) = assoc_entity element0, @Inner.%Inner.WithSelf.F.decl [symbolic = %assoc0 (constants.%assoc0.058)] // CHECK:STDOUT: %.loc11_41.1: require_specific_def_type = require_specific_def @C.as.Inner.impl(%T) [symbolic = %.loc11_41.1 (constants.%.1f8)] // CHECK:STDOUT: %Inner.lookup_impl_witness: = lookup_impl_witness %C, @Inner, @Inner(%T) [symbolic = %Inner.lookup_impl_witness (constants.%Inner.lookup_impl_witness)] -// CHECK:STDOUT: %Inner.F.type: type = fn_type @Inner.F, @Inner(%T) [symbolic = %Inner.F.type (constants.%Inner.F.type.31e)] // CHECK:STDOUT: %Inner.facet: @C.as.Inner.impl.F.%Inner.type (%Inner.type.6ef) = facet_value %C, (%Inner.lookup_impl_witness) [symbolic = %Inner.facet (constants.%Inner.facet.f78)] -// CHECK:STDOUT: %.loc11_41.2: type = fn_type_with_self_type %Inner.F.type, %Inner.facet [symbolic = %.loc11_41.2 (constants.%.455)] -// CHECK:STDOUT: %impl.elem0.loc11_41.2: @C.as.Inner.impl.F.%.loc11_41.2 (%.455) = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_41.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc11_41.2: = specific_impl_function %impl.elem0.loc11_41.2, @Inner.F(%T, %Inner.facet) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Inner.WithSelf.F.type: type = fn_type @Inner.WithSelf.F, @Inner(%T, %Inner.facet) [symbolic = %Inner.WithSelf.F.type (constants.%Inner.WithSelf.F.type.d96)] +// CHECK:STDOUT: %.loc11_41.2: type = fn_type_with_self_type %Inner.WithSelf.F.type, %Inner.facet [symbolic = %.loc11_41.2 (constants.%.29b)] +// CHECK:STDOUT: %impl.elem0.loc11_41.2: @C.as.Inner.impl.F.%.loc11_41.2 (%.29b) = impl_witness_access %Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_41.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc11_41.2: = specific_impl_function %impl.elem0.loc11_41.2, @Inner.WithSelf.F(%T, %Inner.facet) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @C.as.Inner.impl.F.%C (%C.131)) -> out %return.param: @C.as.Inner.impl.F.%T (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @C.as.Inner.impl.F.%C (%C.131) = name_ref self, %self // CHECK:STDOUT: %.loc11_43: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.type (constants.%Inner.type.6ef)] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %.loc11_43 [symbolic = %Inner.type (constants.%Inner.type.6ef)] -// CHECK:STDOUT: %.loc11_48: @C.as.Inner.impl.F.%Inner.assoc_type (%Inner.assoc_type.be2) = specific_constant @Inner.%assoc0.loc6_28.1, @Inner(constants.%T) [symbolic = %assoc0 (constants.%assoc0.0a9)] -// CHECK:STDOUT: %F.ref: @C.as.Inner.impl.F.%Inner.assoc_type (%Inner.assoc_type.be2) = name_ref F, %.loc11_48 [symbolic = %assoc0 (constants.%assoc0.0a9)] -// CHECK:STDOUT: %impl.elem0.loc11_41.1: @C.as.Inner.impl.F.%.loc11_41.2 (%.455) = impl_witness_access constants.%Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_41.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %.loc11_48: @C.as.Inner.impl.F.%Inner.assoc_type (%Inner.assoc_type.be2) = specific_constant @Inner.%assoc0.loc6_28.1, @Inner(constants.%T, constants.%Self.d55) [symbolic = %assoc0 (constants.%assoc0.058)] +// CHECK:STDOUT: %F.ref: @C.as.Inner.impl.F.%Inner.assoc_type (%Inner.assoc_type.be2) = name_ref F, %.loc11_48 [symbolic = %assoc0 (constants.%assoc0.058)] +// CHECK:STDOUT: %impl.elem0.loc11_41.1: @C.as.Inner.impl.F.%.loc11_41.2 (%.29b) = impl_witness_access constants.%Inner.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_41.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc11_41: = bound_method %self.ref, %impl.elem0.loc11_41.1 -// CHECK:STDOUT: %specific_impl_fn.loc11_41.1: = specific_impl_function %impl.elem0.loc11_41.1, @Inner.F(constants.%T, constants.%Inner.facet.f78) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc11_41.1: = specific_impl_function %impl.elem0.loc11_41.1, @Inner.WithSelf.F(constants.%T, constants.%Inner.facet.f78) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc11_52: = bound_method %self.ref, %specific_impl_fn.loc11_41.1 // CHECK:STDOUT: %.loc11_26.1: ref @C.as.Inner.impl.F.%T (%T) = splice_block %return.param {} -// CHECK:STDOUT: %Inner.F.call: init @C.as.Inner.impl.F.%T (%T) to %.loc11_26.1 = call %bound_method.loc11_52(%self.ref) -// CHECK:STDOUT: return %Inner.F.call to %return.param +// CHECK:STDOUT: %Inner.WithSelf.F.call: init @C.as.Inner.impl.F.%T (%T) to %.loc11_26.1 = call %bound_method.loc11_52(%self.ref) +// CHECK:STDOUT: return %Inner.WithSelf.F.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -780,9 +791,9 @@ fn Test() -> i32 { // CHECK:STDOUT: %Outer.loc24: type = class_type @Outer, @Outer(constants.%i32) [concrete = constants.%Outer.d71] // CHECK:STDOUT: %.loc24_23: type = specific_constant @Outer.%Inner.decl, @Outer(constants.%i32) [concrete = constants.%Inner.type.94a] // CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %.loc24_23 [concrete = constants.%Inner.type.94a] -// CHECK:STDOUT: %.loc24_29: %Inner.assoc_type.564 = specific_constant @Inner.%assoc0.loc6_28.1, @Inner(constants.%i32) [concrete = constants.%assoc0.43a] -// CHECK:STDOUT: %F.ref: %Inner.assoc_type.564 = name_ref F, %.loc24_29 [concrete = constants.%assoc0.43a] -// CHECK:STDOUT: %impl.elem0: %.95f = impl_witness_access constants.%Inner.impl_witness.d48, element0 [concrete = constants.%C.as.Inner.impl.F.356] +// CHECK:STDOUT: %.loc24_29: %Inner.assoc_type.564 = specific_constant @Inner.%assoc0.loc6_28.1, @Inner(constants.%i32, constants.%Self.d55) [concrete = constants.%assoc0.958] +// CHECK:STDOUT: %F.ref: %Inner.assoc_type.564 = name_ref F, %.loc24_29 [concrete = constants.%assoc0.958] +// CHECK:STDOUT: %impl.elem0: %.fd6 = impl_witness_access constants.%Inner.impl_witness.d48, element0 [concrete = constants.%C.as.Inner.impl.F.356] // CHECK:STDOUT: %bound_method.loc24_11: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @C.as.Inner.impl.F(constants.%i32) [concrete = constants.%C.as.Inner.impl.F.specific_fn] // CHECK:STDOUT: %bound_method.loc24_33: = bound_method %c.ref, %specific_fn @@ -805,16 +816,23 @@ fn Test() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(constants.%T) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Inner.type => constants.%Inner.type.6ef +// CHECK:STDOUT: %T.loc5 => constants.%T +// CHECK:STDOUT: %Inner.type.loc5 => constants.%Inner.type.6ef // CHECK:STDOUT: %Self.loc5_19.2 => constants.%Self.d55 -// CHECK:STDOUT: %Inner.F.type => constants.%Inner.F.type.31e -// CHECK:STDOUT: %Inner.F => constants.%Inner.F.3c5 -// CHECK:STDOUT: %Inner.assoc_type => constants.%Inner.assoc_type.be2 -// CHECK:STDOUT: %assoc0.loc6_28.2 => constants.%assoc0.0a9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.F(constants.%T, constants.%Self.d55) { +// CHECK:STDOUT: specific @Inner(constants.%T, constants.%Self.d55) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%T +// CHECK:STDOUT: %Inner.type.loc6 => constants.%Inner.type.6ef +// CHECK:STDOUT: %Self.loc6 => constants.%Self.d55 +// CHECK:STDOUT: %Inner.WithSelf.F.type => constants.%Inner.WithSelf.F.type.675 +// CHECK:STDOUT: %Inner.WithSelf.F => constants.%Inner.WithSelf.F.06f +// CHECK:STDOUT: %Inner.assoc_type => constants.%Inner.assoc_type.be2 +// CHECK:STDOUT: %assoc0.loc6_28.2 => constants.%assoc0.058 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Inner.WithSelf.F(constants.%T, constants.%Self.d55) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Inner.type => constants.%Inner.type.6ef // CHECK:STDOUT: %Self => constants.%Self.d55 @@ -848,7 +866,18 @@ fn Test() -> i32 { // CHECK:STDOUT: %pattern_type.loc11_23 => constants.%pattern_type.51d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.F(constants.%T, constants.%Inner.facet.921) { +// CHECK:STDOUT: specific @Inner(constants.%T, constants.%Inner.facet.921) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%T +// CHECK:STDOUT: %Inner.type.loc6 => constants.%Inner.type.6ef +// CHECK:STDOUT: %Self.loc6 => constants.%Inner.facet.921 +// CHECK:STDOUT: %Inner.WithSelf.F.type => constants.%Inner.WithSelf.F.type.704 +// CHECK:STDOUT: %Inner.WithSelf.F => constants.%Inner.WithSelf.F.118 +// CHECK:STDOUT: %Inner.assoc_type => constants.%Inner.assoc_type.be2 +// CHECK:STDOUT: %assoc0.loc6_28.2 => constants.%assoc0.058 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Inner.WithSelf.F(constants.%T, constants.%Inner.facet.921) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Inner.type => constants.%Inner.type.6ef // CHECK:STDOUT: %Self => constants.%Inner.facet.921 @@ -858,7 +887,18 @@ fn Test() -> i32 { // CHECK:STDOUT: %pattern_type.loc6_24 => constants.%pattern_type.51d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.F(constants.%T, constants.%Inner.facet.f78) { +// CHECK:STDOUT: specific @Inner(constants.%T, constants.%Inner.facet.f78) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%T +// CHECK:STDOUT: %Inner.type.loc6 => constants.%Inner.type.6ef +// CHECK:STDOUT: %Self.loc6 => constants.%Inner.facet.f78 +// CHECK:STDOUT: %Inner.WithSelf.F.type => constants.%Inner.WithSelf.F.type.d96 +// CHECK:STDOUT: %Inner.WithSelf.F => constants.%Inner.WithSelf.F.66d +// CHECK:STDOUT: %Inner.assoc_type => constants.%Inner.assoc_type.be2 +// CHECK:STDOUT: %assoc0.loc6_28.2 => constants.%assoc0.058 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Inner.WithSelf.F(constants.%T, constants.%Inner.facet.f78) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Inner.type => constants.%Inner.type.6ef // CHECK:STDOUT: %Self => constants.%Inner.facet.f78 @@ -878,20 +918,38 @@ fn Test() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(constants.%i32) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T => constants.%i32 -// CHECK:STDOUT: %Inner.type => constants.%Inner.type.94a +// CHECK:STDOUT: %T.loc5 => constants.%i32 +// CHECK:STDOUT: %Inner.type.loc5 => constants.%Inner.type.94a // CHECK:STDOUT: %Self.loc5_19.2 => constants.%Self.f19 -// CHECK:STDOUT: %Inner.F.type => constants.%Inner.F.type.c8b -// CHECK:STDOUT: %Inner.F => constants.%Inner.F.1cd -// CHECK:STDOUT: %Inner.assoc_type => constants.%Inner.assoc_type.564 -// CHECK:STDOUT: %assoc0.loc6_28.2 => constants.%assoc0.43a // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%i32) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.F(constants.%i32, constants.%Inner.facet.dc9) { +// CHECK:STDOUT: specific @Inner(constants.%i32, constants.%Self.d55) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%i32 +// CHECK:STDOUT: %Inner.type.loc6 => constants.%Inner.type.94a +// CHECK:STDOUT: %Self.loc6 => constants.%Self.d55 +// CHECK:STDOUT: %Inner.WithSelf.F.type => constants.%Inner.WithSelf.F.type.74d +// CHECK:STDOUT: %Inner.WithSelf.F => constants.%Inner.WithSelf.F.b36 +// CHECK:STDOUT: %Inner.assoc_type => constants.%Inner.assoc_type.564 +// CHECK:STDOUT: %assoc0.loc6_28.2 => constants.%assoc0.958 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Inner(constants.%i32, constants.%Inner.facet.dc9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%i32 +// CHECK:STDOUT: %Inner.type.loc6 => constants.%Inner.type.94a +// CHECK:STDOUT: %Self.loc6 => constants.%Inner.facet.dc9 +// CHECK:STDOUT: %Inner.WithSelf.F.type => constants.%Inner.WithSelf.F.type.6b0 +// CHECK:STDOUT: %Inner.WithSelf.F => constants.%Inner.WithSelf.F.17e +// CHECK:STDOUT: %Inner.assoc_type => constants.%Inner.assoc_type.564 +// CHECK:STDOUT: %assoc0.loc6_28.2 => constants.%assoc0.958 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Inner.WithSelf.F(constants.%i32, constants.%Inner.facet.dc9) { // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.94a // CHECK:STDOUT: %Self => constants.%Inner.facet.dc9 @@ -913,6 +971,17 @@ fn Test() -> i32 { // CHECK:STDOUT: %C.as.Inner.impl.F => constants.%C.as.Inner.impl.F.356 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Inner(constants.%i32, constants.%Inner.facet.ac9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%i32 +// CHECK:STDOUT: %Inner.type.loc6 => constants.%Inner.type.94a +// CHECK:STDOUT: %Self.loc6 => constants.%Inner.facet.ac9 +// CHECK:STDOUT: %Inner.WithSelf.F.type => constants.%Inner.WithSelf.F.type.96b +// CHECK:STDOUT: %Inner.WithSelf.F => constants.%Inner.WithSelf.F.4b0 +// CHECK:STDOUT: %Inner.assoc_type => constants.%Inner.assoc_type.564 +// CHECK:STDOUT: %assoc0.loc6_28.2 => constants.%assoc0.958 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.Inner.impl.F(constants.%i32) { // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: %C => constants.%C.d3f @@ -926,17 +995,17 @@ fn Test() -> i32 { // CHECK:STDOUT: %Inner.type => constants.%Inner.type.94a // CHECK:STDOUT: %require_complete.loc11_48 => constants.%complete_type.087 // CHECK:STDOUT: %Inner.assoc_type => constants.%Inner.assoc_type.564 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.43a +// CHECK:STDOUT: %assoc0 => constants.%assoc0.958 // CHECK:STDOUT: %.loc11_41.1 => constants.%.c0b // CHECK:STDOUT: %Inner.lookup_impl_witness => constants.%Inner.impl_witness.d48 -// CHECK:STDOUT: %Inner.F.type => constants.%Inner.F.type.c8b // CHECK:STDOUT: %Inner.facet => constants.%Inner.facet.ac9 -// CHECK:STDOUT: %.loc11_41.2 => constants.%.95f +// CHECK:STDOUT: %Inner.WithSelf.F.type => constants.%Inner.WithSelf.F.type.96b +// CHECK:STDOUT: %.loc11_41.2 => constants.%.fd6 // CHECK:STDOUT: %impl.elem0.loc11_41.2 => constants.%C.as.Inner.impl.F.356 // CHECK:STDOUT: %specific_impl_fn.loc11_41.2 => constants.%C.as.Inner.impl.F.specific_fn // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.F(constants.%i32, constants.%Inner.facet.ac9) { +// CHECK:STDOUT: specific @Inner.WithSelf.F(constants.%i32, constants.%Inner.facet.ac9) { // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.94a // CHECK:STDOUT: %Self => constants.%Inner.facet.ac9 diff --git a/toolchain/check/testdata/class/generic/self.carbon b/toolchain/check/testdata/class/generic/self.carbon index 341b0d4845b7..acf1062ff99a 100644 --- a/toolchain/check/testdata/class/generic/self.carbon +++ b/toolchain/check/testdata/class/generic/self.carbon @@ -50,12 +50,12 @@ class Class(T:! type) { // CHECK:STDOUT: %Class.MakeSelf.specific_fn: = specific_function %Class.MakeSelf, @Class.MakeSelf(%T) [symbolic] // CHECK:STDOUT: %Class.MakeClass.specific_fn: = specific_function %Class.MakeClass, @Class.MakeClass(%T) [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Class, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.acb: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.acb = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.609: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %.2f5: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.609, %Destroy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.2f5 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -180,9 +180,10 @@ class Class(T:! type) { // CHECK:STDOUT: %Class.MakeClass.specific_fn.loc22_19.2: = specific_function %Class.MakeClass, @Class.MakeClass(%T) [symbolic = %Class.MakeClass.specific_fn.loc22_19.2 (constants.%Class.MakeClass.specific_fn)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Class.loc21_19.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Class.loc21_19.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)] -// CHECK:STDOUT: %.loc22_5.2: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc22_5.2 (constants.%.acb)] -// CHECK:STDOUT: %impl.elem0.loc22_5.2: @Class.F.%.loc22_5.2 (%.acb) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_5.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc22_5.2: = specific_impl_function %impl.elem0.loc22_5.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc22_5.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.609)] +// CHECK:STDOUT: %.loc22_5.2: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc22_5.2 (constants.%.2f5)] +// CHECK:STDOUT: %impl.elem0.loc22_5.2: @Class.F.%.loc22_5.2 (%.2f5) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_5.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc22_5.2: = specific_impl_function %impl.elem0.loc22_5.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc22_5.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -219,16 +220,16 @@ class Class(T:! type) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc22_12.2 [symbolic = %Class.loc21_19.2 (constants.%Class)] // CHECK:STDOUT: } // CHECK:STDOUT: %s: ref @Class.F.%Class.loc21_19.2 (%Class) = ref_binding s, %s.var -// CHECK:STDOUT: %impl.elem0.loc22_5.1: @Class.F.%.loc22_5.2 (%.acb) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_5.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc22_5.1: @Class.F.%.loc22_5.2 (%.2f5) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_5.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc22_5.1: = bound_method %s.var, %impl.elem0.loc22_5.1 -// CHECK:STDOUT: %specific_impl_fn.loc22_5.1: = specific_impl_function %impl.elem0.loc22_5.1, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc22_5.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc22_5.1: = specific_impl_function %impl.elem0.loc22_5.1, @Destroy.WithSelf.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc22_5.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc22_5.2: = bound_method %s.var, %specific_impl_fn.loc22_5.1 -// CHECK:STDOUT: %Destroy.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22_5.2(%s.var) -// CHECK:STDOUT: %impl.elem0.loc21: @Class.F.%.loc22_5.2 (%.acb) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_5.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.call.loc22: init %empty_tuple.type = call %bound_method.loc22_5.2(%s.var) +// CHECK:STDOUT: %impl.elem0.loc21: @Class.F.%.loc22_5.2 (%.2f5) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_5.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc21_5.1: = bound_method %c.var, %impl.elem0.loc21 -// CHECK:STDOUT: %specific_impl_fn.loc21: = specific_impl_function %impl.elem0.loc21, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc22_5.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc21: = specific_impl_function %impl.elem0.loc21, @Destroy.WithSelf.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc22_5.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc21_5.2: = bound_method %c.var, %specific_impl_fn.loc21 -// CHECK:STDOUT: %Destroy.Op.call.loc21: init %empty_tuple.type = call %bound_method.loc21_5.2(%c.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call.loc21: init %empty_tuple.type = call %bound_method.loc21_5.2(%c.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/stringify.carbon b/toolchain/check/testdata/class/generic/stringify.carbon index 366c236db1fb..0535dcee4002 100644 --- a/toolchain/check/testdata/class/generic/stringify.carbon +++ b/toolchain/check/testdata/class/generic/stringify.carbon @@ -352,7 +352,6 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -360,7 +359,8 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -408,7 +408,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc13_13.1: type = splice_block %C [concrete = constants.%C.9a3] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, %C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_13.1: = bound_method %int_123, %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_13.2: = bound_method %int_123, %specific_fn [concrete = constants.%bound_method] @@ -479,7 +479,6 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -487,7 +486,8 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -550,7 +550,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc25_25.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct.4aa] -// CHECK:STDOUT: %impl.elem0.loc25_25.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc25_25.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc25_25.1: = bound_method %int_1, %impl.elem0.loc25_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc25_25.1: = specific_function %impl.elem0.loc25_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_25.2: = bound_method %int_1, %specific_fn.loc25_25.1 [concrete = constants.%bound_method.38b] @@ -559,7 +559,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc25_25.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc25_25.4: ref %i32 = class_element_access %.loc25_25.3, element0 // CHECK:STDOUT: %.loc25_25.5: init %i32 to %.loc25_25.4 = in_place_init %.loc25_25.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc25_25.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc25_25.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc25_25.3: = bound_method %int_2, %impl.elem0.loc25_25.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc25_25.2: = specific_function %impl.elem0.loc25_25.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_25.4: = bound_method %int_2, %specific_fn.loc25_25.2 [concrete = constants.%bound_method.646] @@ -613,7 +613,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc25_53.1: %struct_type.a.b.cfd = struct_literal (%int_3, %int_4) [concrete = constants.%struct.cb7] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [concrete = constants.%D] -// CHECK:STDOUT: %impl.elem0.loc25_53.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc25_53.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc25_53.1: = bound_method %int_3, %impl.elem0.loc25_53.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc25_53.1: = specific_function %impl.elem0.loc25_53.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_53.2: = bound_method %int_3, %specific_fn.loc25_53.1 [concrete = constants.%bound_method.fa7] @@ -622,7 +622,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc25_53.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc25_53.4: ref %i32 = class_element_access %.loc25_53.3, element0 // CHECK:STDOUT: %.loc25_53.5: init %i32 to %.loc25_53.4 = in_place_init %.loc25_53.2 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc25_53.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc25_53.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc25_53.3: = bound_method %int_4, %impl.elem0.loc25_53.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc25_53.2: = specific_function %impl.elem0.loc25_53.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc25_53.4: = bound_method %int_4, %specific_fn.loc25_53.2 [concrete = constants.%bound_method.6d7] diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index 35aa1cc97306..58515fdad794 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -177,7 +177,6 @@ fn Run() { // 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.cf3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6da: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.004: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.255: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.004 = struct_value () [symbolic] @@ -185,7 +184,8 @@ fn Run() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.199: 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.5f4: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.199 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.cf3 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.58d) [concrete] -// CHECK:STDOUT: %.952: type = fn_type_with_self_type %ImplicitAs.Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.979: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.7c3: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.979, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f07: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.307: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -206,7 +206,6 @@ fn Run() { // CHECK:STDOUT: %ptr.006: type = ptr_type %ForwardDeclared.20f323.1 [concrete] // CHECK:STDOUT: %pattern_type.77e: type = pattern_type %ptr.006 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -214,7 +213,8 @@ fn Run() { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.5ba: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%ForwardDeclared.20f323.1) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.d3c: %ptr.as.Copy.impl.Op.type.5ba = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.006, (%Copy.impl_witness.bef) [concrete] -// CHECK:STDOUT: %.db0: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.4e2: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.89b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.4e2, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.d3c, @ptr.as.Copy.impl.Op(%ForwardDeclared.20f323.1) [concrete] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [concrete] // CHECK:STDOUT: %ptr.8c3: type = ptr_type %Incomplete [concrete] @@ -336,7 +336,7 @@ fn Run() { // CHECK:STDOUT: %b.var: ref %Field = var %b.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc9_25.1: %struct_type.x.c96 = struct_literal (%int_1) [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0.loc9: %.952 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] +// CHECK:STDOUT: %impl.elem0.loc9: %.7c3 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] // CHECK:STDOUT: %bound_method.loc9_25.1: = bound_method %int_1, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f07] // CHECK:STDOUT: %specific_fn.loc9: = 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_25.2: = bound_method %int_1, %specific_fn.loc9 [concrete = constants.%bound_method.307] @@ -353,7 +353,7 @@ fn Run() { // CHECK:STDOUT: %x.ref: %Field.elem = name_ref x, imports.%Main.import_ref.df7 [concrete = imports.%.afd] // CHECK:STDOUT: %.loc10_4: ref %i32 = class_element_access %b.ref, element0 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc10: %.952 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] +// CHECK:STDOUT: %impl.elem0.loc10: %.7c3 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] // CHECK:STDOUT: %bound_method.loc10_7.1: = bound_method %int_2, %impl.elem0.loc10 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.1eb] // CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_7.2: = bound_method %int_2, %specific_fn.loc10 [concrete = constants.%bound_method.ef3] @@ -387,7 +387,7 @@ fn Run() { // CHECK:STDOUT: %d.var: ref %ptr.006 = var %d.var_patt // CHECK:STDOUT: %c.ref.loc16: ref %ForwardDeclared.20f323.1 = name_ref c, %c // CHECK:STDOUT: %addr: %ptr.006 = addr_of %c.ref.loc16 -// CHECK:STDOUT: %impl.elem0.loc16: %.db0 = impl_witness_access constants.%Copy.impl_witness.bef, element0 [concrete = constants.%ptr.as.Copy.impl.Op.d3c] +// CHECK:STDOUT: %impl.elem0.loc16: %.89b = impl_witness_access constants.%Copy.impl_witness.bef, element0 [concrete = constants.%ptr.as.Copy.impl.Op.d3c] // CHECK:STDOUT: %bound_method.loc16_29.1: = bound_method %addr, %impl.elem0.loc16 // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @ptr.as.Copy.impl.Op(constants.%ForwardDeclared.20f323.1) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_29.2: = bound_method %addr, %specific_fn.loc16 diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index 5706d465d86a..2ce2211934c4 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -157,7 +157,6 @@ fn Run() { // 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.cf3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6da: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.004: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.255: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.004 = struct_value () [symbolic] @@ -165,7 +164,8 @@ fn Run() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.199: 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.5f4: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.199 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.cf3 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.58d) [concrete] -// CHECK:STDOUT: %.952: type = fn_type_with_self_type %ImplicitAs.Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.979: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.7c3: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.979, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.386: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9f1: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -258,7 +258,7 @@ fn Run() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc7_49.1: %struct_type.x.unused_y.76a = struct_literal (%int_0, %int_1) [concrete = constants.%struct.0bf] // CHECK:STDOUT: %.loc7_50.1: %struct_type.base.503 = struct_literal (%.loc7_49.1) [concrete = constants.%struct.cb5] -// CHECK:STDOUT: %impl.elem0.loc7_49.1: %.952 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] +// CHECK:STDOUT: %impl.elem0.loc7_49.1: %.7c3 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] // CHECK:STDOUT: %bound_method.loc7_49.1: = bound_method %int_0, %impl.elem0.loc7_49.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.386] // CHECK:STDOUT: %specific_fn.loc7_49.1: = specific_function %impl.elem0.loc7_49.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_49.2: = bound_method %int_0, %specific_fn.loc7_49.1 [concrete = constants.%bound_method.9f1] @@ -267,7 +267,7 @@ fn Run() { // CHECK:STDOUT: %.loc7_50.2: ref %Base = class_element_access %a.var, element0 // CHECK:STDOUT: %.loc7_49.3: ref %i32 = class_element_access %.loc7_50.2, element0 // CHECK:STDOUT: %.loc7_49.4: init %i32 to %.loc7_49.3 = in_place_init %.loc7_49.2 [concrete = constants.%int_0.263] -// CHECK:STDOUT: %impl.elem0.loc7_49.2: %.952 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] +// CHECK:STDOUT: %impl.elem0.loc7_49.2: %.7c3 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] // CHECK:STDOUT: %bound_method.loc7_49.3: = bound_method %int_1, %impl.elem0.loc7_49.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f07] // CHECK:STDOUT: %specific_fn.loc7_49.2: = specific_function %impl.elem0.loc7_49.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_49.4: = bound_method %int_1, %specific_fn.loc7_49.2 [concrete = constants.%bound_method.307] @@ -288,7 +288,7 @@ fn Run() { // CHECK:STDOUT: %.loc8_4.2: ref %Base = converted %a.ref.loc8, %.loc8_4.1 // CHECK:STDOUT: %.loc8_4.3: ref %i32 = class_element_access %.loc8_4.2, element0 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc8: %.952 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] +// CHECK:STDOUT: %impl.elem0.loc8: %.7c3 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] // CHECK:STDOUT: %bound_method.loc8_7.1: = bound_method %int_2, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.1eb] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_7.2: = bound_method %int_2, %specific_fn.loc8 [concrete = constants.%bound_method.ef3] diff --git a/toolchain/check/testdata/class/import_indirect.carbon b/toolchain/check/testdata/class/import_indirect.carbon index 02f8a5b1d21d..ef2c32c56aab 100644 --- a/toolchain/check/testdata/class/import_indirect.carbon +++ b/toolchain/check/testdata/class/import_indirect.carbon @@ -149,7 +149,6 @@ var ptr: E* = &value; // CHECK:STDOUT: %pattern_type.506: type = pattern_type %ptr.31e [concrete] // CHECK:STDOUT: %addr: %ptr.31e = addr_of file.%b_val.var [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -157,7 +156,8 @@ var ptr: E* = &value; // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.411: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%C) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.ed9: %ptr.as.Copy.impl.Op.type.411 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.31e, (%Copy.impl_witness.2c7) [concrete] -// CHECK:STDOUT: %.cda: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.259: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.64b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.259, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: = bound_method %addr, %ptr.as.Copy.impl.Op.ed9 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.ed9, @ptr.as.Copy.impl.Op(%C) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %addr, %ptr.as.Copy.impl.Op.specific_fn [concrete] @@ -223,7 +223,7 @@ var ptr: E* = &value; // CHECK:STDOUT: assign file.%b_val.var, %.loc8_1 // CHECK:STDOUT: %b_val.ref: ref %C = name_ref b_val, file.%b_val [concrete = file.%b_val.var] // CHECK:STDOUT: %addr: %ptr.31e = addr_of %b_val.ref [concrete = constants.%addr] -// CHECK:STDOUT: %impl.elem0: %.cda = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] +// CHECK:STDOUT: %impl.elem0: %.64b = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] // CHECK:STDOUT: %bound_method.loc9_17.1: = bound_method %addr, %impl.elem0 [concrete = constants.%ptr.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%C) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_17.2: = bound_method %addr, %specific_fn [concrete = constants.%bound_method] @@ -245,7 +245,6 @@ var ptr: E* = &value; // CHECK:STDOUT: %pattern_type.506: type = pattern_type %ptr.31e [concrete] // CHECK:STDOUT: %addr: %ptr.31e = addr_of file.%c_val.var [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -253,7 +252,8 @@ var ptr: E* = &value; // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.411: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%C) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.ed9: %ptr.as.Copy.impl.Op.type.411 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.31e, (%Copy.impl_witness.2c7) [concrete] -// CHECK:STDOUT: %.cda: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.259: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.64b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.259, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: = bound_method %addr, %ptr.as.Copy.impl.Op.ed9 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.ed9, @ptr.as.Copy.impl.Op(%C) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %addr, %ptr.as.Copy.impl.Op.specific_fn [concrete] @@ -319,7 +319,7 @@ var ptr: E* = &value; // CHECK:STDOUT: assign file.%c_val.var, %.loc8_1 // CHECK:STDOUT: %c_val.ref: ref %C = name_ref c_val, file.%c_val [concrete = file.%c_val.var] // CHECK:STDOUT: %addr: %ptr.31e = addr_of %c_val.ref [concrete = constants.%addr] -// CHECK:STDOUT: %impl.elem0: %.cda = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] +// CHECK:STDOUT: %impl.elem0: %.64b = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] // CHECK:STDOUT: %bound_method.loc9_17.1: = bound_method %addr, %impl.elem0 [concrete = constants.%ptr.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%C) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_17.2: = bound_method %addr, %specific_fn [concrete = constants.%bound_method] @@ -341,7 +341,6 @@ var ptr: E* = &value; // CHECK:STDOUT: %pattern_type.506: type = pattern_type %ptr.31e [concrete] // CHECK:STDOUT: %addr: %ptr.31e = addr_of file.%value.var [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -349,7 +348,8 @@ var ptr: E* = &value; // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.411: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%C) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.ed9: %ptr.as.Copy.impl.Op.type.411 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.31e, (%Copy.impl_witness.2c7) [concrete] -// CHECK:STDOUT: %.cda: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.259: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.64b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.259, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: = bound_method %addr, %ptr.as.Copy.impl.Op.ed9 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.ed9, @ptr.as.Copy.impl.Op(%C) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %addr, %ptr.as.Copy.impl.Op.specific_fn [concrete] @@ -418,7 +418,7 @@ var ptr: E* = &value; // CHECK:STDOUT: assign file.%value.var, %.loc7_1 // CHECK:STDOUT: %value.ref: ref %C = name_ref value, file.%value [concrete = file.%value.var] // CHECK:STDOUT: %addr: %ptr.31e = addr_of %value.ref [concrete = constants.%addr] -// CHECK:STDOUT: %impl.elem0: %.cda = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] +// CHECK:STDOUT: %impl.elem0: %.64b = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] // CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %addr, %impl.elem0 [concrete = constants.%ptr.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%C) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %addr, %specific_fn [concrete = constants.%bound_method] @@ -440,7 +440,6 @@ var ptr: E* = &value; // CHECK:STDOUT: %pattern_type.506: type = pattern_type %ptr.31e [concrete] // CHECK:STDOUT: %addr: %ptr.31e = addr_of file.%value.var [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -448,7 +447,8 @@ var ptr: E* = &value; // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.411: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%C) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.ed9: %ptr.as.Copy.impl.Op.type.411 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.31e, (%Copy.impl_witness.2c7) [concrete] -// CHECK:STDOUT: %.cda: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.259: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.64b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.259, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: = bound_method %addr, %ptr.as.Copy.impl.Op.ed9 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.ed9, @ptr.as.Copy.impl.Op(%C) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %addr, %ptr.as.Copy.impl.Op.specific_fn [concrete] @@ -517,7 +517,7 @@ var ptr: E* = &value; // CHECK:STDOUT: assign file.%value.var, %.loc7_1 // CHECK:STDOUT: %value.ref: ref %C = name_ref value, file.%value [concrete = file.%value.var] // CHECK:STDOUT: %addr: %ptr.31e = addr_of %value.ref [concrete = constants.%addr] -// CHECK:STDOUT: %impl.elem0: %.cda = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] +// CHECK:STDOUT: %impl.elem0: %.64b = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] // CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %addr, %impl.elem0 [concrete = constants.%ptr.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%C) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %addr, %specific_fn [concrete = constants.%bound_method] @@ -539,7 +539,6 @@ var ptr: E* = &value; // CHECK:STDOUT: %pattern_type.506: type = pattern_type %ptr.31e [concrete] // CHECK:STDOUT: %addr: %ptr.31e = addr_of file.%value.var [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -547,7 +546,8 @@ var ptr: E* = &value; // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.411: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%C) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.ed9: %ptr.as.Copy.impl.Op.type.411 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.31e, (%Copy.impl_witness.2c7) [concrete] -// CHECK:STDOUT: %.cda: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.259: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.64b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.259, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: = bound_method %addr, %ptr.as.Copy.impl.Op.ed9 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.ed9, @ptr.as.Copy.impl.Op(%C) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %addr, %ptr.as.Copy.impl.Op.specific_fn [concrete] @@ -620,7 +620,7 @@ var ptr: E* = &value; // CHECK:STDOUT: assign file.%value.var, %.loc7_1 // CHECK:STDOUT: %value.ref: ref %C = name_ref value, file.%value [concrete = file.%value.var] // CHECK:STDOUT: %addr: %ptr.31e = addr_of %value.ref [concrete = constants.%addr] -// CHECK:STDOUT: %impl.elem0: %.cda = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] +// CHECK:STDOUT: %impl.elem0: %.64b = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] // CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %addr, %impl.elem0 [concrete = constants.%ptr.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%C) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %addr, %specific_fn [concrete = constants.%bound_method] @@ -642,7 +642,6 @@ var ptr: E* = &value; // CHECK:STDOUT: %pattern_type.506: type = pattern_type %ptr.31e [concrete] // CHECK:STDOUT: %addr: %ptr.31e = addr_of file.%value.var [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -650,7 +649,8 @@ var ptr: E* = &value; // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.411: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%C) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.ed9: %ptr.as.Copy.impl.Op.type.411 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.31e, (%Copy.impl_witness.2c7) [concrete] -// CHECK:STDOUT: %.cda: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.259: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.64b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.259, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: = bound_method %addr, %ptr.as.Copy.impl.Op.ed9 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.ed9, @ptr.as.Copy.impl.Op(%C) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %addr, %ptr.as.Copy.impl.Op.specific_fn [concrete] @@ -723,7 +723,7 @@ var ptr: E* = &value; // CHECK:STDOUT: assign file.%value.var, %.loc7_1 // CHECK:STDOUT: %value.ref: ref %C = name_ref value, file.%value [concrete = file.%value.var] // CHECK:STDOUT: %addr: %ptr.31e = addr_of %value.ref [concrete = constants.%addr] -// CHECK:STDOUT: %impl.elem0: %.cda = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] +// CHECK:STDOUT: %impl.elem0: %.64b = impl_witness_access constants.%Copy.impl_witness.2c7, element0 [concrete = constants.%ptr.as.Copy.impl.Op.ed9] // CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %addr, %impl.elem0 [concrete = constants.%ptr.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%C) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %addr, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/import_struct_cyle.carbon b/toolchain/check/testdata/class/import_struct_cyle.carbon index dc9521f167e7..088d68d0697f 100644 --- a/toolchain/check/testdata/class/import_struct_cyle.carbon +++ b/toolchain/check/testdata/class/import_struct_cyle.carbon @@ -104,7 +104,6 @@ fn Run() { // CHECK:STDOUT: %.c65: ref %ptr.e6c = struct_access imports.%a.var, element0 [concrete] // CHECK:STDOUT: %Cycle.elem: type = unbound_element_type %Cycle, %struct_type.b [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -112,7 +111,8 @@ fn Run() { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.6f4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Cycle) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.7c8: %ptr.as.Copy.impl.Op.type.6f4 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e6c, (%Copy.impl_witness.b7e) [concrete] -// CHECK:STDOUT: %.54e: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.706: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.e5b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.706, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.7c8, @ptr.as.Copy.impl.Op(%Cycle) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -168,7 +168,7 @@ fn Run() { // CHECK:STDOUT: %.loc7_15: ref %struct_type.b = class_element_access %.loc7_10, element0 // CHECK:STDOUT: %.loc7_17.1: ref %ptr.e6c = struct_access %.loc7_15, element0 // CHECK:STDOUT: %.loc7_17.2: %ptr.e6c = acquire_value %.loc7_17.1 -// CHECK:STDOUT: %impl.elem0: %.54e = impl_witness_access constants.%Copy.impl_witness.b7e, element0 [concrete = constants.%ptr.as.Copy.impl.Op.7c8] +// CHECK:STDOUT: %impl.elem0: %.e5b = impl_witness_access constants.%Copy.impl_witness.b7e, element0 [concrete = constants.%ptr.as.Copy.impl.Op.7c8] // CHECK:STDOUT: %bound_method.loc7_17.1: = bound_method %.loc7_17.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%Cycle) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_17.2: = bound_method %.loc7_17.2, %specific_fn diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index bc5da541ef56..be834668867d 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -308,14 +308,14 @@ class B { // CHECK:STDOUT: %struct_type.base.490: type = struct_type {.base: %Shape} [concrete] // CHECK:STDOUT: %complete_type.560: = complete_type_witness %struct_type.base.490 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -408,7 +408,7 @@ class B { // CHECK:STDOUT: %.loc13_25.3: ref %i32 = class_element_access %.loc13_25.2, element1 // CHECK:STDOUT: %.loc13_27.1: %tuple.type.d07 = tuple_literal (%.loc13_17.3, %.loc13_25.3) // CHECK:STDOUT: %.loc13_17.4: %i32 = acquire_value %.loc13_17.3 -// CHECK:STDOUT: %impl.elem0.loc13_17: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc13_17: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc13_17.1: = bound_method %.loc13_17.4, %impl.elem0.loc13_17 // CHECK:STDOUT: %specific_fn.loc13_17: = specific_function %impl.elem0.loc13_17, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc13_17.2: = bound_method %.loc13_17.4, %specific_fn.loc13_17 @@ -416,7 +416,7 @@ class B { // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return.param, element0 // CHECK:STDOUT: %.loc13_27.2: init %i32 to %tuple.elem0 = in_place_init %Int.as.Copy.impl.Op.call.loc13_17 // CHECK:STDOUT: %.loc13_25.4: %i32 = acquire_value %.loc13_25.3 -// CHECK:STDOUT: %impl.elem0.loc13_25: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc13_25: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc13_25.1: = bound_method %.loc13_25.4, %impl.elem0.loc13_25 // CHECK:STDOUT: %specific_fn.loc13_25: = specific_function %impl.elem0.loc13_25, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc13_25.2: = bound_method %.loc13_25.4, %specific_fn.loc13_25 @@ -573,7 +573,6 @@ class B { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -581,7 +580,8 @@ class B { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -600,14 +600,14 @@ class B { // CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %A} [concrete] // CHECK:STDOUT: %complete_type.0d1: = complete_type_witness %struct_type.base [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -648,7 +648,7 @@ class B { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc5_38.1: = bound_method %int_5, %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.loc5_38.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] @@ -714,7 +714,7 @@ class B { // CHECK:STDOUT: fn @A.SomeProtectedFunction() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_5, %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.loc7_13.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] @@ -727,7 +727,7 @@ class B { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A] // CHECK:STDOUT: %SOME_CONSTANT.ref: %i32 = name_ref SOME_CONSTANT, @A.%SOME_CONSTANT -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc15_13.1: = bound_method %SOME_CONSTANT.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_13.2: = bound_method %SOME_CONSTANT.ref, %specific_fn @@ -1037,7 +1037,6 @@ class B { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1045,7 +1044,8 @@ class B { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_86.bd3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_86.bd3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1116,7 +1116,7 @@ class B { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc11_44.1: = bound_method %int_86, %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.loc11_44.2: = bound_method %int_86, %specific_fn [concrete = constants.%bound_method] @@ -1284,7 +1284,6 @@ class B { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1292,7 +1291,8 @@ class B { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %.e54: Core.Form = init_form %i32, call_param1 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -1348,7 +1348,7 @@ class B { // CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc5: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc5: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc5_48.1: = bound_method %int_5.loc5, %impl.elem0.loc5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_48.2: = bound_method %int_5.loc5, %specific_fn.loc5 [concrete = constants.%bound_method] @@ -1364,7 +1364,7 @@ class B { // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc6: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_44.1: = bound_method %int_5.loc6, %impl.elem0.loc6 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_44.2: = bound_method %int_5.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] @@ -1390,7 +1390,7 @@ class B { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_42.1: = bound_method %int_5, %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.loc10_42.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/init.carbon b/toolchain/check/testdata/class/init.carbon index 4c3f92f431d3..d1adf67a4f97 100644 --- a/toolchain/check/testdata/class/init.carbon +++ b/toolchain/check/testdata/class/init.carbon @@ -46,7 +46,6 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %Make.type: type = fn_type @Make [concrete] // CHECK:STDOUT: %Make: %Make.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] @@ -56,13 +55,15 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.de4: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Copy.impl_witness.9d3: = impl_witness imports.%Copy.impl_witness_table.c3a, @ptr.as.Copy.impl(%Class) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.02e: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Class) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.120: %ptr.as.Copy.impl.Op.type.02e = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.734: %Copy.type = facet_value %ptr.8e5, (%Copy.impl_witness.9d3) [concrete] -// CHECK:STDOUT: %.105: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.734 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.130: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.734) [concrete] +// CHECK:STDOUT: %.370: type = fn_type_with_self_type %Copy.WithSelf.Op.type.130, %Copy.facet.734 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.120, @ptr.as.Copy.impl.Op(%Class) [concrete] // CHECK:STDOUT: %MakeReorder.type: type = fn_type @MakeReorder [concrete] // CHECK:STDOUT: %MakeReorder: %MakeReorder.type = struct_value () [concrete] @@ -167,14 +168,14 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %next.ref: %ptr.8e5 = name_ref next, %next // CHECK:STDOUT: %.loc21_31.1: %struct_type.n.next = struct_literal (%n.ref, %next.ref) -// CHECK:STDOUT: %impl.elem0.loc21_16: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc21_16: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc21_16.1: = bound_method %n.ref, %impl.elem0.loc21_16 // CHECK:STDOUT: %specific_fn.loc21_16: = specific_function %impl.elem0.loc21_16, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc21_16.2: = bound_method %n.ref, %specific_fn.loc21_16 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc21_16.2(%n.ref) // CHECK:STDOUT: %.loc21_31.2: ref %i32 = class_element_access %return.param, element0 // CHECK:STDOUT: %.loc21_31.3: init %i32 to %.loc21_31.2 = in_place_init %Int.as.Copy.impl.Op.call -// CHECK:STDOUT: %impl.elem0.loc21_27: %.105 = impl_witness_access constants.%Copy.impl_witness.9d3, element0 [concrete = constants.%ptr.as.Copy.impl.Op.120] +// CHECK:STDOUT: %impl.elem0.loc21_27: %.370 = impl_witness_access constants.%Copy.impl_witness.9d3, element0 [concrete = constants.%ptr.as.Copy.impl.Op.120] // CHECK:STDOUT: %bound_method.loc21_27.1: = bound_method %next.ref, %impl.elem0.loc21_27 // CHECK:STDOUT: %specific_fn.loc21_27: = specific_function %impl.elem0.loc21_27, @ptr.as.Copy.impl.Op(constants.%Class) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc21_27.2: = bound_method %next.ref, %specific_fn.loc21_27 @@ -191,14 +192,14 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %next.ref: %ptr.8e5 = name_ref next, %next // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %.loc25_31.1: %struct_type.next.n = struct_literal (%next.ref, %n.ref) -// CHECK:STDOUT: %impl.elem0.loc25_30: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc25_30: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc25_30.1: = bound_method %n.ref, %impl.elem0.loc25_30 // CHECK:STDOUT: %specific_fn.loc25_30: = specific_function %impl.elem0.loc25_30, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc25_30.2: = bound_method %n.ref, %specific_fn.loc25_30 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc25_30.2(%n.ref) // CHECK:STDOUT: %.loc25_31.2: ref %i32 = class_element_access %return.param, element1 // CHECK:STDOUT: %.loc25_31.3: init %i32 to %.loc25_31.2 = in_place_init %Int.as.Copy.impl.Op.call -// CHECK:STDOUT: %impl.elem0.loc25_19: %.105 = impl_witness_access constants.%Copy.impl_witness.9d3, element0 [concrete = constants.%ptr.as.Copy.impl.Op.120] +// CHECK:STDOUT: %impl.elem0.loc25_19: %.370 = impl_witness_access constants.%Copy.impl_witness.9d3, element0 [concrete = constants.%ptr.as.Copy.impl.Op.120] // CHECK:STDOUT: %bound_method.loc25_19.1: = bound_method %next.ref, %impl.elem0.loc25_19 // CHECK:STDOUT: %specific_fn.loc25_19: = specific_function %impl.elem0.loc25_19, @ptr.as.Copy.impl.Op(constants.%Class) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc25_19.2: = bound_method %next.ref, %specific_fn.loc25_19 diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index 8c89e40d7bc3..81153652535e 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -45,7 +45,6 @@ fn F() -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -53,7 +52,8 @@ fn F() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -63,14 +63,14 @@ fn F() -> i32 { // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] // CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.5d2, %int_2.ef8) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -138,7 +138,7 @@ fn F() -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc21_26.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct] // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] -// CHECK:STDOUT: %impl.elem0.loc21_26.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc21_26.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc21_26.1: = bound_method %int_1, %impl.elem0.loc21_26.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc21_26.1: = specific_function %impl.elem0.loc21_26.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_26.2: = bound_method %int_1, %specific_fn.loc21_26.1 [concrete = constants.%bound_method.38b] @@ -147,7 +147,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc21_26.3: ref %Class = temporary_storage // CHECK:STDOUT: %.loc21_26.4: ref %i32 = class_element_access %.loc21_26.3, element0 // CHECK:STDOUT: %.loc21_26.5: init %i32 to %.loc21_26.4 = in_place_init %.loc21_26.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc21_26.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc21_26.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc21_26.3: = bound_method %int_2, %impl.elem0.loc21_26.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc21_26.2: = specific_function %impl.elem0.loc21_26.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_26.4: = bound_method %int_2, %specific_fn.loc21_26.2 [concrete = constants.%bound_method.646] @@ -161,7 +161,7 @@ fn F() -> i32 { // CHECK:STDOUT: %a.ref: %Class.elem = name_ref a, @Class.%.loc16 [concrete = @Class.%.loc16] // CHECK:STDOUT: %.loc21_37.1: ref %i32 = class_element_access %.loc21_28, element0 // CHECK:STDOUT: %.loc21_37.2: %i32 = acquire_value %.loc21_37.1 -// CHECK:STDOUT: %impl.elem0.loc21_37: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc21_37: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc21_37.1: = bound_method %.loc21_37.2, %impl.elem0.loc21_37 // CHECK:STDOUT: %specific_fn.loc21_37: = specific_function %impl.elem0.loc21_37, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc21_37.2: = bound_method %.loc21_37.2, %specific_fn.loc21_37 diff --git a/toolchain/check/testdata/class/local.carbon b/toolchain/check/testdata/class/local.carbon index 61d658379f63..6983ea02d64f 100644 --- a/toolchain/check/testdata/class/local.carbon +++ b/toolchain/check/testdata/class/local.carbon @@ -57,7 +57,6 @@ class A { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -65,21 +64,22 @@ class A { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %B.val: %B = struct_value (%int_1.5d2) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -166,7 +166,7 @@ class A { // CHECK:STDOUT: %n.ref: %B.elem = name_ref n, @B.%.loc23 [concrete = @B.%.loc23] // CHECK:STDOUT: %.loc26_20.1: ref %i32 = class_element_access %.loc26_19.2, element0 // CHECK:STDOUT: %.loc26_20.2: %i32 = acquire_value %.loc26_20.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc26_20.1: = bound_method %.loc26_20.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc26_20.2: = bound_method %.loc26_20.2, %specific_fn @@ -184,7 +184,7 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc19_39.1: %struct_type.n.44a = struct_literal (%int_1) [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc19_39.1: = bound_method %int_1, %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.loc19_39.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index 667c7dc4d457..44fd6d722feb 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -83,14 +83,14 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %struct_type.k.0bf: type = struct_type {.k: %i32} [concrete] // CHECK:STDOUT: %complete_type.954: = complete_type_witness %struct_type.k.0bf [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete] // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete] @@ -105,7 +105,6 @@ fn CallGOnInitializingExpr() -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -113,7 +112,8 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -359,7 +359,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %k.ref: %Class.elem = name_ref k, @Class.%.loc21 [concrete = @Class.%.loc21] // CHECK:STDOUT: %.loc25_14.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc25_14.2: %i32 = acquire_value %.loc25_14.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc25_14.1: = bound_method %.loc25_14.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc25_14.2: = bound_method %.loc25_14.2, %specific_fn @@ -392,7 +392,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc39_18.1: %struct_type.k.240 = struct_literal (%int_1) [concrete = constants.%struct] // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [concrete = constants.%Class] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc39_18.1: = bound_method %int_1, %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.loc39_18.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/nested.carbon b/toolchain/check/testdata/class/nested.carbon index f6916da3503a..a96e26ad0536 100644 --- a/toolchain/check/testdata/class/nested.carbon +++ b/toolchain/check/testdata/class/nested.carbon @@ -87,7 +87,6 @@ fn F(a: Outer*) { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.565: type = pattern_type %ptr.78a [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -95,13 +94,15 @@ fn F(a: Outer*) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.561: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Outer) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.dc1: %ptr.as.Copy.impl.Op.type.561 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.e2d: %Copy.type = facet_value %ptr.56b, (%Copy.impl_witness.3e0) [concrete] -// CHECK:STDOUT: %.111: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.e2d [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.ed5: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.e2d) [concrete] +// CHECK:STDOUT: %.be6: type = fn_type_with_self_type %Copy.WithSelf.Op.type.ed5, %Copy.facet.e2d [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn.904: = specific_function %ptr.as.Copy.impl.Op.dc1, @ptr.as.Copy.impl.Op(%Outer) [concrete] // CHECK:STDOUT: %Copy.impl_witness.044: = impl_witness imports.%Copy.impl_witness_table.c3a, @ptr.as.Copy.impl(%Inner) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.72d: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Inner) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.8ab: %ptr.as.Copy.impl.Op.type.72d = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.ea8: %Copy.type = facet_value %ptr.78a, (%Copy.impl_witness.044) [concrete] -// CHECK:STDOUT: %.817: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.ea8 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.4b9: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.ea8) [concrete] +// CHECK:STDOUT: %.b9c: type = fn_type_with_self_type %Copy.WithSelf.Op.type.4b9, %Copy.facet.ea8 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn.f24: = specific_function %ptr.as.Copy.impl.Op.8ab, @ptr.as.Copy.impl.Op(%Inner) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -284,7 +285,7 @@ fn F(a: Outer*) { // CHECK:STDOUT: %po.ref.loc48: %Outer.elem.1e5 = name_ref po, @Outer.%.loc40 [concrete = @Outer.%.loc40] // CHECK:STDOUT: %.loc48_4.2: ref %ptr.56b = class_element_access %.loc48_4.1, element0 // CHECK:STDOUT: %a.ref.loc48_11: %ptr.56b = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc48: %.111 = impl_witness_access constants.%Copy.impl_witness.3e0, element0 [concrete = constants.%ptr.as.Copy.impl.Op.dc1] +// CHECK:STDOUT: %impl.elem0.loc48: %.be6 = impl_witness_access constants.%Copy.impl_witness.3e0, element0 [concrete = constants.%ptr.as.Copy.impl.Op.dc1] // CHECK:STDOUT: %bound_method.loc48_11.1: = bound_method %a.ref.loc48_11, %impl.elem0.loc48 // CHECK:STDOUT: %specific_fn.loc48: = specific_function %impl.elem0.loc48, @ptr.as.Copy.impl.Op(constants.%Outer) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.904] // CHECK:STDOUT: %bound_method.loc48_11.2: = bound_method %a.ref.loc48_11, %specific_fn.loc48 @@ -295,7 +296,7 @@ fn F(a: Outer*) { // CHECK:STDOUT: %qo.ref: %Outer.elem.1e5 = name_ref qo, @Outer.%.loc41 [concrete = @Outer.%.loc41] // CHECK:STDOUT: %.loc49_4.2: ref %ptr.56b = class_element_access %.loc49_4.1, element1 // CHECK:STDOUT: %a.ref.loc49_11: %ptr.56b = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc49: %.111 = impl_witness_access constants.%Copy.impl_witness.3e0, element0 [concrete = constants.%ptr.as.Copy.impl.Op.dc1] +// CHECK:STDOUT: %impl.elem0.loc49: %.be6 = impl_witness_access constants.%Copy.impl_witness.3e0, element0 [concrete = constants.%ptr.as.Copy.impl.Op.dc1] // CHECK:STDOUT: %bound_method.loc49_11.1: = bound_method %a.ref.loc49_11, %impl.elem0.loc49 // CHECK:STDOUT: %specific_fn.loc49: = specific_function %impl.elem0.loc49, @ptr.as.Copy.impl.Op(constants.%Outer) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.904] // CHECK:STDOUT: %bound_method.loc49_11.2: = bound_method %a.ref.loc49_11, %specific_fn.loc49 @@ -310,7 +311,7 @@ fn F(a: Outer*) { // CHECK:STDOUT: %pi.ref.loc50_12: %Outer.elem.6db = name_ref pi, @Outer.%.loc42 [concrete = @Outer.%.loc42] // CHECK:STDOUT: %.loc50_12.2: ref %ptr.78a = class_element_access %.loc50_12.1, element2 // CHECK:STDOUT: %.loc50_12.3: %ptr.78a = acquire_value %.loc50_12.2 -// CHECK:STDOUT: %impl.elem0.loc50: %.817 = impl_witness_access constants.%Copy.impl_witness.044, element0 [concrete = constants.%ptr.as.Copy.impl.Op.8ab] +// CHECK:STDOUT: %impl.elem0.loc50: %.b9c = impl_witness_access constants.%Copy.impl_witness.044, element0 [concrete = constants.%ptr.as.Copy.impl.Op.8ab] // CHECK:STDOUT: %bound_method.loc50_12.1: = bound_method %.loc50_12.3, %impl.elem0.loc50 // CHECK:STDOUT: %specific_fn.loc50: = specific_function %impl.elem0.loc50, @ptr.as.Copy.impl.Op(constants.%Inner) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.f24] // CHECK:STDOUT: %bound_method.loc50_12.2: = bound_method %.loc50_12.3, %specific_fn.loc50 @@ -321,7 +322,7 @@ fn F(a: Outer*) { // CHECK:STDOUT: %po.ref.loc51: %Inner.elem.9e0 = name_ref po, @Inner.%.loc24 [concrete = @Inner.%.loc24] // CHECK:STDOUT: %.loc51_4.2: ref %ptr.56b = class_element_access %.loc51_4.1, element1 // CHECK:STDOUT: %a.ref.loc51: %ptr.56b = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc51: %.111 = impl_witness_access constants.%Copy.impl_witness.3e0, element0 [concrete = constants.%ptr.as.Copy.impl.Op.dc1] +// CHECK:STDOUT: %impl.elem0.loc51: %.be6 = impl_witness_access constants.%Copy.impl_witness.3e0, element0 [concrete = constants.%ptr.as.Copy.impl.Op.dc1] // CHECK:STDOUT: %bound_method.loc51_11.1: = bound_method %a.ref.loc51, %impl.elem0.loc51 // CHECK:STDOUT: %specific_fn.loc51: = specific_function %impl.elem0.loc51, @ptr.as.Copy.impl.Op(constants.%Outer) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.904] // CHECK:STDOUT: %bound_method.loc51_11.2: = bound_method %a.ref.loc51, %specific_fn.loc51 @@ -336,7 +337,7 @@ fn F(a: Outer*) { // CHECK:STDOUT: %pi.ref.loc52_12: %Outer.elem.6db = name_ref pi, @Outer.%.loc42 [concrete = @Outer.%.loc42] // CHECK:STDOUT: %.loc52_12.2: ref %ptr.78a = class_element_access %.loc52_12.1, element2 // CHECK:STDOUT: %.loc52_12.3: %ptr.78a = acquire_value %.loc52_12.2 -// CHECK:STDOUT: %impl.elem0.loc52: %.817 = impl_witness_access constants.%Copy.impl_witness.044, element0 [concrete = constants.%ptr.as.Copy.impl.Op.8ab] +// CHECK:STDOUT: %impl.elem0.loc52: %.b9c = impl_witness_access constants.%Copy.impl_witness.044, element0 [concrete = constants.%ptr.as.Copy.impl.Op.8ab] // CHECK:STDOUT: %bound_method.loc52_12.1: = bound_method %.loc52_12.3, %impl.elem0.loc52 // CHECK:STDOUT: %specific_fn.loc52: = specific_function %impl.elem0.loc52, @ptr.as.Copy.impl.Op(constants.%Inner) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.f24] // CHECK:STDOUT: %bound_method.loc52_12.2: = bound_method %.loc52_12.3, %specific_fn.loc52 @@ -351,7 +352,7 @@ fn F(a: Outer*) { // CHECK:STDOUT: %pi.ref.loc53: %Outer.elem.6db = name_ref pi, @Outer.%.loc42 [concrete = @Outer.%.loc42] // CHECK:STDOUT: %.loc53_12.2: ref %ptr.78a = class_element_access %.loc53_12.1, element2 // CHECK:STDOUT: %.loc53_12.3: %ptr.78a = acquire_value %.loc53_12.2 -// CHECK:STDOUT: %impl.elem0.loc53: %.817 = impl_witness_access constants.%Copy.impl_witness.044, element0 [concrete = constants.%ptr.as.Copy.impl.Op.8ab] +// CHECK:STDOUT: %impl.elem0.loc53: %.b9c = impl_witness_access constants.%Copy.impl_witness.044, element0 [concrete = constants.%ptr.as.Copy.impl.Op.8ab] // CHECK:STDOUT: %bound_method.loc53_12.1: = bound_method %.loc53_12.3, %impl.elem0.loc53 // CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @ptr.as.Copy.impl.Op(constants.%Inner) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.f24] // CHECK:STDOUT: %bound_method.loc53_12.2: = bound_method %.loc53_12.3, %specific_fn.loc53 diff --git a/toolchain/check/testdata/class/nested_name.carbon b/toolchain/check/testdata/class/nested_name.carbon index a8e43bd01159..5e02fd90a8bd 100644 --- a/toolchain/check/testdata/class/nested_name.carbon +++ b/toolchain/check/testdata/class/nested_name.carbon @@ -48,14 +48,14 @@ fn G(o: Outer) { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.9ae: type = pattern_type %Outer [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] @@ -145,7 +145,7 @@ fn G(o: Outer) { // CHECK:STDOUT: %n.ref: %Inner.elem = name_ref n, @Inner.%.loc17 [concrete = @Inner.%.loc17] // CHECK:STDOUT: %.loc22_12.1: ref %i32 = class_element_access %oi.ref, element0 // CHECK:STDOUT: %.loc22_12.2: %i32 = acquire_value %.loc22_12.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc22_12.1: = bound_method %.loc22_12.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc22_12.2: = bound_method %.loc22_12.2, %specific_fn diff --git a/toolchain/check/testdata/class/raw_self.carbon b/toolchain/check/testdata/class/raw_self.carbon index 8502b9cc1ea8..a6d1f8b9208a 100644 --- a/toolchain/check/testdata/class/raw_self.carbon +++ b/toolchain/check/testdata/class/raw_self.carbon @@ -50,14 +50,14 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [concrete] // CHECK:STDOUT: %complete_type.54b: = complete_type_witness %struct_type.n [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -189,7 +189,7 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc18 [concrete = @Class.%.loc18] // CHECK:STDOUT: %.loc22: ref %i32 = class_element_access %self.ref.loc22_3, element0 // CHECK:STDOUT: %self.ref.loc22_12: %i32 = name_ref r#self, %self.loc21_28 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc22_12.1: = bound_method %self.ref.loc22_12, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc22_12.2: = bound_method %self.ref.loc22_12, %specific_fn @@ -206,14 +206,14 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %.loc26_15.2: %i32 = acquire_value %.loc26_15.1 // CHECK:STDOUT: %self.ref.loc26_19: %i32 = name_ref r#self, %self.loc25_24 // CHECK:STDOUT: %.loc26_25.1: %tuple.type.d07 = tuple_literal (%.loc26_15.2, %self.ref.loc26_19) -// CHECK:STDOUT: %impl.elem0.loc26_15: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc26_15: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc26_15.1: = bound_method %.loc26_15.2, %impl.elem0.loc26_15 // CHECK:STDOUT: %specific_fn.loc26_15: = specific_function %impl.elem0.loc26_15, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc26_15.2: = bound_method %.loc26_15.2, %specific_fn.loc26_15 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc26_15: init %i32 = call %bound_method.loc26_15.2(%.loc26_15.2) // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return.param.loc25, element0 // CHECK:STDOUT: %.loc26_25.2: init %i32 to %tuple.elem0 = in_place_init %Int.as.Copy.impl.Op.call.loc26_15 -// CHECK:STDOUT: %impl.elem0.loc26_19: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc26_19: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc26_19.1: = bound_method %self.ref.loc26_19, %impl.elem0.loc26_19 // CHECK:STDOUT: %specific_fn.loc26_19: = specific_function %impl.elem0.loc26_19, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc26_19.2: = bound_method %self.ref.loc26_19, %specific_fn.loc26_19 diff --git a/toolchain/check/testdata/class/raw_self_type.carbon b/toolchain/check/testdata/class/raw_self_type.carbon index 263be23c22cf..567952154fc6 100644 --- a/toolchain/check/testdata/class/raw_self_type.carbon +++ b/toolchain/check/testdata/class/raw_self_type.carbon @@ -39,7 +39,6 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %ptr.8e5: type = ptr_type %Class [concrete] // CHECK:STDOUT: %pattern_type.018: type = pattern_type %ptr.8e5 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -47,7 +46,8 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.02e: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Class) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.120: %ptr.as.Copy.impl.Op.type.02e = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.8e5, (%Copy.impl_witness.9d3) [concrete] -// CHECK:STDOUT: %.105: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.130: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.370: type = fn_type_with_self_type %Copy.WithSelf.Op.type.130, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.120, @ptr.as.Copy.impl.Op(%Class) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -158,7 +158,7 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %p.var: ref %ptr.8e5 = var %p.var_patt // CHECK:STDOUT: %Self.ref.loc18_20: ref %ptr.8e5 = name_ref r#Self, %Self // CHECK:STDOUT: %.loc18_20: %ptr.8e5 = acquire_value %Self.ref.loc18_20 -// CHECK:STDOUT: %impl.elem0: %.105 = impl_witness_access constants.%Copy.impl_witness.9d3, element0 [concrete = constants.%ptr.as.Copy.impl.Op.120] +// CHECK:STDOUT: %impl.elem0: %.370 = impl_witness_access constants.%Copy.impl_witness.9d3, element0 [concrete = constants.%ptr.as.Copy.impl.Op.120] // CHECK:STDOUT: %bound_method.loc18_20.1: = bound_method %.loc18_20, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%Class) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc18_20.2: = bound_method %.loc18_20, %specific_fn diff --git a/toolchain/check/testdata/class/reorder.carbon b/toolchain/check/testdata/class/reorder.carbon index d277cc56008f..0b2c2ff69ce7 100644 --- a/toolchain/check/testdata/class/reorder.carbon +++ b/toolchain/check/testdata/class/reorder.carbon @@ -42,7 +42,6 @@ class Class { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -50,7 +49,8 @@ class Class { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -121,7 +121,7 @@ class Class { // CHECK:STDOUT: fn @Class.F() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc21_13.1: = bound_method %int_1, %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.loc21_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index 0207c49f8d8c..6bdd3c30eab7 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -91,7 +91,6 @@ class A { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -99,7 +98,8 @@ class A { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -259,7 +259,7 @@ class A { // CHECK:STDOUT: %a.var: ref %A = var %a.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc33_25.1: %struct_type.a.a6c = struct_literal (%int_1) [concrete = constants.%struct.48c] -// CHECK:STDOUT: %impl.elem0.loc33: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc33: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc33_25.1: = bound_method %int_1, %impl.elem0.loc33 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc33: = specific_function %impl.elem0.loc33, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc33_25.2: = bound_method %int_1, %specific_fn.loc33 [concrete = constants.%bound_method.38b] @@ -279,7 +279,7 @@ class A { // CHECK:STDOUT: %b.var: ref %B = var %b.var_patt // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc34_25.1: %struct_type.b.a15 = struct_literal (%int_2) [concrete = constants.%struct.26f] -// CHECK:STDOUT: %impl.elem0.loc34: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc34_25.1: = bound_method %int_2, %impl.elem0.loc34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc34: = specific_function %impl.elem0.loc34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc34_25.2: = bound_method %int_2, %specific_fn.loc34 [concrete = constants.%bound_method.646] @@ -299,7 +299,7 @@ class A { // CHECK:STDOUT: %c.var: ref %C = var %c.var_patt // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc35_25.1: %struct_type.c.5b8 = struct_literal (%int_3) [concrete = constants.%struct.d98] -// CHECK:STDOUT: %impl.elem0.loc35: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc35: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc35_25.1: = bound_method %int_3, %impl.elem0.loc35 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc35: = specific_function %impl.elem0.loc35, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc35_25.2: = bound_method %int_3, %specific_fn.loc35 [concrete = constants.%bound_method.fa7] @@ -319,7 +319,7 @@ class A { // CHECK:STDOUT: %d.var: ref %D = var %d.var_patt // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc36_25.1: %struct_type.d.3ea = struct_literal (%int_4) [concrete = constants.%struct.5a9] -// CHECK:STDOUT: %impl.elem0.loc36: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc36: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc36_25.1: = bound_method %int_4, %impl.elem0.loc36 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc36: = specific_function %impl.elem0.loc36, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc36_25.2: = bound_method %int_4, %specific_fn.loc36 [concrete = constants.%bound_method.6d7] diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index 9119b388363a..f71d1ec843df 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -52,7 +52,6 @@ fn Run() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -60,7 +59,8 @@ fn Run() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -148,7 +148,7 @@ fn Run() { // CHECK:STDOUT: fn @Class.F() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc17_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // 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.loc17_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.38b] @@ -167,7 +167,7 @@ fn Run() { // CHECK:STDOUT: fn @F() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc26_11.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // 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.loc26_11.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/class/self.carbon b/toolchain/check/testdata/class/self.carbon index 5a0886790679..a33dcbcf4e73 100644 --- a/toolchain/check/testdata/class/self.carbon +++ b/toolchain/check/testdata/class/self.carbon @@ -66,14 +66,14 @@ class Class { // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [concrete] // CHECK:STDOUT: %complete_type.54b: = complete_type_witness %struct_type.n [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -179,7 +179,7 @@ class Class { // CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc8 [concrete = @Class.%.loc8] // CHECK:STDOUT: %.loc12_14.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc12_14.2: %i32 = acquire_value %.loc12_14.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc12_14.1: = bound_method %.loc12_14.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @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 %.loc12_14.2, %specific_fn @@ -193,7 +193,7 @@ class Class { // CHECK:STDOUT: %n.ref: %Class.elem = name_ref n, @Class.%.loc8 [concrete = @Class.%.loc8] // CHECK:STDOUT: %.loc16_14.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc16_14.2: %i32 = acquire_value %.loc16_14.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc16_14.1: = bound_method %.loc16_14.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_14.2: = bound_method %.loc16_14.2, %specific_fn diff --git a/toolchain/check/testdata/class/self_conversion.carbon b/toolchain/check/testdata/class/self_conversion.carbon index 80770c49f8bf..592210e3ee1b 100644 --- a/toolchain/check/testdata/class/self_conversion.carbon +++ b/toolchain/check/testdata/class/self_conversion.carbon @@ -61,20 +61,19 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %struct_type.base.27a: type = struct_type {.base: %Base} [concrete] // CHECK:STDOUT: %complete_type.5a1: = complete_type_witness %struct_type.base.27a [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -82,7 +81,8 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -220,7 +220,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc16 [concrete = @Base.%.loc16] // CHECK:STDOUT: %.loc27_14.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc27_14.2: %i32 = acquire_value %.loc27_14.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc27_14.1: = bound_method %.loc27_14.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc27_14.2: = bound_method %.loc27_14.2, %specific_fn @@ -234,7 +234,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc16 [concrete = @Base.%.loc16] // CHECK:STDOUT: %.loc31_7: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc31_10.1: = bound_method %int_1, %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.loc31_10.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/self_type.carbon b/toolchain/check/testdata/class/self_type.carbon index 0b6bee9a1d91..d82073d79b4c 100644 --- a/toolchain/check/testdata/class/self_type.carbon +++ b/toolchain/check/testdata/class/self_type.carbon @@ -47,7 +47,6 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %struct_type.p: type = struct_type {.p: %ptr.8e5} [concrete] // CHECK:STDOUT: %complete_type.141: = complete_type_witness %struct_type.p [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -55,7 +54,8 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.02e: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Class) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.120: %ptr.as.Copy.impl.Op.type.02e = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.8e5, (%Copy.impl_witness.9d3) [concrete] -// CHECK:STDOUT: %.105: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.130: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.370: type = fn_type_with_self_type %Copy.WithSelf.Op.type.130, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.120, @ptr.as.Copy.impl.Op(%Class) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -160,7 +160,7 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %s.ref.loc19_16: ref %Class = name_ref s, %s // CHECK:STDOUT: %addr: %ptr.8e5 = addr_of %s.ref.loc19_16 // CHECK:STDOUT: %.loc19_17.1: %struct_type.p = struct_literal (%addr) -// CHECK:STDOUT: %impl.elem0: %.105 = impl_witness_access constants.%Copy.impl_witness.9d3, element0 [concrete = constants.%ptr.as.Copy.impl.Op.120] +// CHECK:STDOUT: %impl.elem0: %.370 = impl_witness_access constants.%Copy.impl_witness.9d3, element0 [concrete = constants.%ptr.as.Copy.impl.Op.120] // CHECK:STDOUT: %bound_method.loc19_15.1: = bound_method %addr, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%Class) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc19_15.2: = bound_method %addr, %specific_fn diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index c3abeddf2c63..8d45de200227 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -55,7 +55,6 @@ class D(b:! C(1_000)) {} // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -63,7 +62,8 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1000.ff9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1000.ff9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -113,7 +113,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %C.ref.loc5: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000.loc5: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] -// CHECK:STDOUT: %impl.elem0.loc5: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc5: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc5_20.1: = bound_method %int_1000.loc5, %impl.elem0.loc5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_20.2: = bound_method %int_1000.loc5, %specific_fn.loc5 [concrete = constants.%bound_method] @@ -131,7 +131,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %C.ref.loc6: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000.loc6: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] -// CHECK:STDOUT: %impl.elem0.loc6: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_20.1: = bound_method %int_1000.loc6, %impl.elem0.loc6 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_20.2: = bound_method %int_1000.loc6, %specific_fn.loc6 [concrete = constants.%bound_method] @@ -204,7 +204,6 @@ class D(b:! C(1_000)) {} // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -212,7 +211,8 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1000.ff9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1000.ff9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -264,7 +264,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc5_19.1: = bound_method %int_1000, %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.loc5_19.2: = bound_method %int_1000, %specific_fn [concrete = constants.%bound_method] @@ -282,7 +282,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [concrete = constants.%int_1000.ff9] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_20.1: = bound_method %int_1000, %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_20.2: = bound_method %int_1000, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index 5223884053b1..b0eb287e6934 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -1339,7 +1339,6 @@ class T2(G2:! type) { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1347,7 +1346,8 @@ class T2(G2:! type) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.fa7: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1355,14 +1355,14 @@ class T2(G2:! type) { // CHECK:STDOUT: %struct_type.m2.m1.68c: type = struct_type {.m2: %i32, .m1: %i32} [concrete] // CHECK:STDOUT: %Base.vtable_ptr: ref %ptr.454 = vtable_ptr @Base.vtable [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %struct_type.m2.m1.5f2: type = struct_type {.m2: Core.IntLiteral, .m1: Core.IntLiteral} [concrete] @@ -1453,7 +1453,7 @@ class T2(G2:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %i.var: ref %i32 = var %i.var_patt // CHECK:STDOUT: %int_3.loc12: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc12: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc12: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_3.1: = bound_method %int_3.loc12, %impl.elem0.loc12 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_3.2: = bound_method %int_3.loc12, %specific_fn.loc12 [concrete = constants.%bound_method.fa7] @@ -1477,7 +1477,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %Base.vtable_ptr.loc13: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr] // CHECK:STDOUT: %.loc13_35.3: init %ptr.454 to %.loc13_35.2 = in_place_init %Base.vtable_ptr.loc13 [concrete = constants.%Base.vtable_ptr] // CHECK:STDOUT: %.loc13_34: %i32 = acquire_value %i.ref.loc13_34 -// CHECK:STDOUT: %impl.elem0.loc13_34: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc13_34: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc13_34.1: = bound_method %.loc13_34, %impl.elem0.loc13_34 // CHECK:STDOUT: %specific_fn.loc13_34: = specific_function %impl.elem0.loc13_34, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc13_34.2: = bound_method %.loc13_34, %specific_fn.loc13_34 @@ -1485,7 +1485,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %.loc13_35.4: ref %i32 = class_element_access %b1.var, element2 // CHECK:STDOUT: %.loc13_35.5: init %i32 to %.loc13_35.4 = in_place_init %Int.as.Copy.impl.Op.call.loc13_34 // CHECK:STDOUT: %.loc13_25: %i32 = acquire_value %i.ref.loc13_25 -// CHECK:STDOUT: %impl.elem0.loc13_25: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc13_25: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc13_25.1: = bound_method %.loc13_25, %impl.elem0.loc13_25 // CHECK:STDOUT: %specific_fn.loc13_25: = specific_function %impl.elem0.loc13_25, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc13_25.2: = bound_method %.loc13_25, %specific_fn.loc13_25 @@ -1508,7 +1508,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %.loc14_35.2: ref %ptr.454 = class_element_access %b2.var, element0 // CHECK:STDOUT: %Base.vtable_ptr.loc14: ref %ptr.454 = vtable_ptr @Base.vtable [concrete = constants.%Base.vtable_ptr] // CHECK:STDOUT: %.loc14_35.3: init %ptr.454 to %.loc14_35.2 = in_place_init %Base.vtable_ptr.loc14 [concrete = constants.%Base.vtable_ptr] -// CHECK:STDOUT: %impl.elem0.loc14_35.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc14_35.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc14_35.1: = bound_method %int_5, %impl.elem0.loc14_35.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005] // CHECK:STDOUT: %specific_fn.loc14_35.1: = specific_function %impl.elem0.loc14_35.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_35.2: = bound_method %int_5, %specific_fn.loc14_35.1 [concrete = constants.%bound_method.e9d] @@ -1516,7 +1516,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %.loc14_35.4: init %i32 = converted %int_5, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14_35.1 [concrete = constants.%int_5.0f6] // CHECK:STDOUT: %.loc14_35.5: ref %i32 = class_element_access %b2.var, element2 // CHECK:STDOUT: %.loc14_35.6: init %i32 to %.loc14_35.5 = in_place_init %.loc14_35.4 [concrete = constants.%int_5.0f6] -// CHECK:STDOUT: %impl.elem0.loc14_35.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc14_35.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc14_35.3: = bound_method %int_3.loc14, %impl.elem0.loc14_35.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc14_35.2: = specific_function %impl.elem0.loc14_35.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_35.4: = bound_method %int_3.loc14, %specific_fn.loc14_35.2 [concrete = constants.%bound_method.fa7] @@ -1533,7 +1533,7 @@ class T2(G2:! type) { // CHECK:STDOUT: %m2.ref: %Base.elem = name_ref m2, @Base.%.loc6 [concrete = @Base.%.loc6] // CHECK:STDOUT: %.loc16_5: ref %i32 = class_element_access %b1.ref, element2 // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_9.1: = bound_method %int_4, %impl.elem0.loc16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_9.2: = bound_method %int_4, %specific_fn.loc16 [concrete = constants.%bound_method.6d7] diff --git a/toolchain/check/testdata/const/basics.carbon b/toolchain/check/testdata/const/basics.carbon index c0a6d5c1c5c3..dd387153d6c3 100644 --- a/toolchain/check/testdata/const/basics.carbon +++ b/toolchain/check/testdata/const/basics.carbon @@ -168,7 +168,6 @@ fn PassConstReferenceToReference(p: const X*) { // CHECK:STDOUT: %A.type: type = fn_type @A [concrete] // CHECK:STDOUT: %A: %A.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.035: %Copy.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %const.as.Copy.impl.Op.type.5eb: type = fn_type @const.as.Copy.impl.Op, @const.as.Copy.impl(%T.035) [symbolic] // CHECK:STDOUT: %const.as.Copy.impl.Op.cc6: %const.as.Copy.impl.Op.type.5eb = struct_value () [symbolic] @@ -179,7 +178,8 @@ fn PassConstReferenceToReference(p: const X*) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.f8c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%ptr.c45) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.f64: %ptr.as.Copy.impl.Op.type.f8c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.d1d: %Copy.type = facet_value %ptr.728, (%Copy.impl_witness.795) [concrete] -// CHECK:STDOUT: %.de7: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.d1d [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.b3a: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.d1d) [concrete] +// CHECK:STDOUT: %.53f: type = fn_type_with_self_type %Copy.WithSelf.Op.type.b3a, %Copy.facet.d1d [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn.6a7: = specific_function %ptr.as.Copy.impl.Op.f64, @ptr.as.Copy.impl.Op(%ptr.c45) [concrete] // CHECK:STDOUT: %ptr.31e: type = ptr_type %C [concrete] // CHECK:STDOUT: %const.8ce: type = const_type %ptr.31e [concrete] @@ -193,7 +193,8 @@ fn PassConstReferenceToReference(p: const X*) { // CHECK:STDOUT: %const.as.Copy.impl.Op.type.368: type = fn_type @const.as.Copy.impl.Op, @const.as.Copy.impl(%Copy.facet.a7f) [concrete] // CHECK:STDOUT: %const.as.Copy.impl.Op.c19: %const.as.Copy.impl.Op.type.368 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.5cc: %Copy.type = facet_value %const.8ce, (%Copy.impl_witness.e93) [concrete] -// CHECK:STDOUT: %.62c: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.5cc [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.b95: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.5cc) [concrete] +// CHECK:STDOUT: %.21b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.b95, %Copy.facet.5cc [concrete] // CHECK:STDOUT: %const.as.Copy.impl.Op.specific_fn: = specific_function %const.as.Copy.impl.Op.c19, @const.as.Copy.impl.Op(%Copy.facet.a7f) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -252,7 +253,7 @@ fn PassConstReferenceToReference(p: const X*) { // CHECK:STDOUT: fn @A(%p.param: %ptr.728) -> out %return.param: %ptr.728 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.728 = name_ref p, %p -// CHECK:STDOUT: %impl.elem0: %.de7 = impl_witness_access constants.%Copy.impl_witness.795, element0 [concrete = constants.%ptr.as.Copy.impl.Op.f64] +// CHECK:STDOUT: %impl.elem0: %.53f = impl_witness_access constants.%Copy.impl_witness.795, element0 [concrete = constants.%ptr.as.Copy.impl.Op.f64] // CHECK:STDOUT: %bound_method.loc7_10.1: = bound_method %p.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%ptr.c45) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.6a7] // CHECK:STDOUT: %bound_method.loc7_10.2: = bound_method %p.ref, %specific_fn @@ -263,7 +264,7 @@ fn PassConstReferenceToReference(p: const X*) { // CHECK:STDOUT: fn @B(%p.param: %const.8ce) -> out %return.param: %const.8ce { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %const.8ce = name_ref p, %p -// CHECK:STDOUT: %impl.elem0: %.62c = impl_witness_access constants.%Copy.impl_witness.e93, element0 [concrete = constants.%const.as.Copy.impl.Op.c19] +// CHECK:STDOUT: %impl.elem0: %.21b = impl_witness_access constants.%Copy.impl_witness.e93, element0 [concrete = constants.%const.as.Copy.impl.Op.c19] // CHECK:STDOUT: %bound_method.loc11_10.1: = bound_method %p.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @const.as.Copy.impl.Op(constants.%Copy.facet.a7f) [concrete = constants.%const.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc11_10.2: = bound_method %p.ref, %specific_fn @@ -283,7 +284,6 @@ fn PassConstReferenceToReference(p: const X*) { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -291,7 +291,8 @@ fn PassConstReferenceToReference(p: const X*) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.f8c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%ptr.c45) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.f64: %ptr.as.Copy.impl.Op.type.f8c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.728, (%Copy.impl_witness.795) [concrete] -// CHECK:STDOUT: %.de7: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.b3a: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.53f: type = fn_type_with_self_type %Copy.WithSelf.Op.type.b3a, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.f64, @ptr.as.Copy.impl.Op(%ptr.c45) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -329,7 +330,7 @@ fn PassConstReferenceToReference(p: const X*) { // CHECK:STDOUT: fn @F(%p.param: %ptr.728) -> out %return.param: %ptr.728 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.728 = name_ref p, %p -// CHECK:STDOUT: %impl.elem0: %.de7 = impl_witness_access constants.%Copy.impl_witness.795, element0 [concrete = constants.%ptr.as.Copy.impl.Op.f64] +// CHECK:STDOUT: %impl.elem0: %.53f = impl_witness_access constants.%Copy.impl_witness.795, element0 [concrete = constants.%ptr.as.Copy.impl.Op.f64] // CHECK:STDOUT: %bound_method.loc12_10.1: = bound_method %p.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%ptr.c45) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc12_10.2: = bound_method %p.ref, %specific_fn diff --git a/toolchain/check/testdata/const/import.carbon b/toolchain/check/testdata/const/import.carbon index 7ef91f3b6713..88c844383bc1 100644 --- a/toolchain/check/testdata/const/import.carbon +++ b/toolchain/check/testdata/const/import.carbon @@ -34,7 +34,6 @@ var a_ptr: const C* = a_ptr_ref; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.48f: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.970: %ptr.as.Copy.impl.Op.type.48f = struct_value () [symbolic] @@ -48,7 +47,8 @@ var a_ptr: const C* = a_ptr_ref; // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.8d3: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%const.0e5) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.09c: %ptr.as.Copy.impl.Op.type.8d3 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.c45, (%Copy.impl_witness.b9c) [concrete] -// CHECK:STDOUT: %.d01: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.6aa: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.090: type = fn_type_with_self_type %Copy.WithSelf.Op.type.6aa, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: = bound_method %addr, %ptr.as.Copy.impl.Op.09c [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.09c, @ptr.as.Copy.impl.Op(%const.0e5) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %addr, %ptr.as.Copy.impl.Op.specific_fn [concrete] @@ -97,7 +97,7 @@ var a_ptr: const C* = a_ptr_ref; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a_ref.ref: ref %const.0e5 = name_ref a_ref, imports.%Main.a_ref [concrete = imports.%a_ref.var] // CHECK:STDOUT: %addr: %ptr.c45 = addr_of %a_ref.ref [concrete = constants.%addr] -// CHECK:STDOUT: %impl.elem0.loc6: %.d01 = impl_witness_access constants.%Copy.impl_witness.b9c, element0 [concrete = constants.%ptr.as.Copy.impl.Op.09c] +// CHECK:STDOUT: %impl.elem0.loc6: %.090 = impl_witness_access constants.%Copy.impl_witness.b9c, element0 [concrete = constants.%ptr.as.Copy.impl.Op.09c] // CHECK:STDOUT: %bound_method.loc6_19.1: = bound_method %addr, %impl.elem0.loc6 [concrete = constants.%ptr.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @ptr.as.Copy.impl.Op(constants.%const.0e5) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_19.2: = bound_method %addr, %specific_fn.loc6 [concrete = constants.%bound_method] @@ -105,7 +105,7 @@ var a_ptr: const C* = a_ptr_ref; // CHECK:STDOUT: assign file.%a.var, %ptr.as.Copy.impl.Op.call.loc6 // CHECK:STDOUT: %a_ptr_ref.ref: ref %ptr.c45 = name_ref a_ptr_ref, imports.%Main.a_ptr_ref [concrete = imports.%a_ptr_ref.var] // CHECK:STDOUT: %.loc7: %ptr.c45 = acquire_value %a_ptr_ref.ref -// CHECK:STDOUT: %impl.elem0.loc7: %.d01 = impl_witness_access constants.%Copy.impl_witness.b9c, element0 [concrete = constants.%ptr.as.Copy.impl.Op.09c] +// CHECK:STDOUT: %impl.elem0.loc7: %.090 = impl_witness_access constants.%Copy.impl_witness.b9c, element0 [concrete = constants.%ptr.as.Copy.impl.Op.09c] // CHECK:STDOUT: %bound_method.loc7_23.1: = bound_method %.loc7, %impl.elem0.loc7 // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @ptr.as.Copy.impl.Op(constants.%const.0e5) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_23.2: = bound_method %.loc7, %specific_fn.loc7 diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index 42fea8d668dc..05d2d855e5cc 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -367,7 +367,6 @@ fn G() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -375,7 +374,8 @@ fn G() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.d6e: = bound_method %N, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.7fa: = bound_method %N, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic] @@ -493,7 +493,7 @@ fn G() { // CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_42.1 (%array_type.c79)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc6_61: Core.IntLiteral = name_ref N, %N.loc6_6.2 [symbolic = %N.loc6_6.1 (constants.%N)] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_62.1: = bound_method %N.ref.loc6_61, %impl.elem0 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.d6e)] // 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.loc6_62.2: = bound_method %N.ref.loc6_61, %specific_fn [symbolic = %bound_method.loc6_62.3 (constants.%bound_method.7fa)] @@ -966,7 +966,6 @@ fn G() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -974,7 +973,8 @@ fn G() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.d6e: = bound_method %N, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.7fa: = bound_method %N, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic] @@ -1104,7 +1104,7 @@ fn G() { // CHECK:STDOUT: fn(%a.param: @F.%array_type.loc7_42.1 (%array_type.c79)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc7_61: Core.IntLiteral = name_ref N, %N.loc7_6.2 [symbolic = %N.loc7_6.1 (constants.%N)] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc7_62.1: = bound_method %N.ref.loc7_61, %impl.elem0 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.d6e)] // 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.loc7_62.2: = bound_method %N.ref.loc7_61, %specific_fn [symbolic = %bound_method.loc7_62.3 (constants.%bound_method.7fa)] @@ -1195,7 +1195,6 @@ fn G() { // 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: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic] @@ -1203,7 +1202,8 @@ fn G() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete] -// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.5de, %Int.as.ImplicitAs.impl.Convert.dd4 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d76: = bound_method %N.5de, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic] @@ -1215,14 +1215,14 @@ fn G() { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.a24: = require_complete_type %array_type.8c3 [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %N.5de, %Int.as.Copy.impl.Op.664 [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %bound_method.207: = bound_method %N.5de, %Int.as.Copy.impl.Op.specific_fn [symbolic] @@ -1293,7 +1293,7 @@ fn G() { // CHECK:STDOUT: %.loc6_28: type = splice_block %array_type.loc6_28.2 [symbolic = %array_type.loc6_28.1 (constants.%array_type.8c3)] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %N.ref.loc6_27: %i32 = name_ref N, %N.loc6_6.2 [symbolic = %N.loc6_6.1 (constants.%N.5de)] -// CHECK:STDOUT: %impl.elem0.loc6_27: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %impl.elem0.loc6_27: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] // CHECK:STDOUT: %bound_method.loc6_27.2: = bound_method %N.ref.loc6_27, %impl.elem0.loc6_27 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %specific_fn.loc6_27: = specific_function %impl.elem0.loc6_27, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_27.3: = bound_method %N.ref.loc6_27, %specific_fn.loc6_27 [symbolic = %bound_method.loc6_27.1 (constants.%bound_method.d76)] @@ -1342,7 +1342,7 @@ fn G() { // CHECK:STDOUT: fn(%a.param: @F.%array_type.loc6_28.1 (%array_type.8c3)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc6_47: %i32 = name_ref N, %N.loc6_6.2 [symbolic = %N.loc6_6.1 (constants.%N.5de)] -// CHECK:STDOUT: %impl.elem0.loc6_47: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc6_47: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_47.1: = bound_method %N.ref.loc6_47, %impl.elem0.loc6_47 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound)] // CHECK:STDOUT: %specific_fn.loc6_47: = specific_function %impl.elem0.loc6_47, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_47.2: = bound_method %N.ref.loc6_47, %specific_fn.loc6_47 [symbolic = %bound_method.loc6_47.3 (constants.%bound_method.207)] @@ -1418,7 +1418,6 @@ fn G() { // 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: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic] @@ -1426,7 +1425,8 @@ fn G() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete] -// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.5de, %Int.as.ImplicitAs.impl.Convert.dd4 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %N.5de, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic] @@ -1480,7 +1480,7 @@ fn G() { // CHECK:STDOUT: %.loc5_28: type = splice_block %array_type.loc5_28.2 [symbolic = %array_type.loc5_28.1 (constants.%array_type)] { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc5_6.2 [symbolic = %N.loc5_6.1 (constants.%N.5de)] -// CHECK:STDOUT: %impl.elem0: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %impl.elem0: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] // CHECK:STDOUT: %bound_method.loc5_27.2: = bound_method %N.ref, %impl.elem0 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc5_27.3: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc5_27.1 (constants.%bound_method)] diff --git a/toolchain/check/testdata/deduce/binding_pattern.carbon b/toolchain/check/testdata/deduce/binding_pattern.carbon index f9e8b01ea973..797d2d697370 100644 --- a/toolchain/check/testdata/deduce/binding_pattern.carbon +++ b/toolchain/check/testdata/deduce/binding_pattern.carbon @@ -89,14 +89,16 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.031: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] +// CHECK:STDOUT: %Self.738: %ImplicitAs.type.031 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.ff3: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6d3: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.50f: %ImplicitAs.Convert.type.6d3 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b3a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Dest, %Self.738) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.1de: %ImplicitAs.WithSelf.Convert.type.b3a = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.1e5: type = facet_type <@ImplicitAs, @ImplicitAs(%V)> [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.d88: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%V) [symbolic] -// CHECK:STDOUT: %assoc0.2aa: %ImplicitAs.assoc_type.d88 = assoc_entity element0, imports.%Core.import_ref.218 [symbolic] +// CHECK:STDOUT: %assoc0.3d8: %ImplicitAs.assoc_type.d88 = assoc_entity element0, imports.%Core.import_ref.201 [symbolic] // CHECK:STDOUT: %require_complete.cc6: = require_complete_type %ImplicitAs.type.1e5 [symbolic] -// CHECK:STDOUT: %assoc0.0bc: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.fa2 [symbolic] +// CHECK:STDOUT: %assoc0.843: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.cc1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -106,9 +108,9 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // 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: %Core.import_ref.a80: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.0bc)] -// CHECK:STDOUT: %Core.import_ref.218: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.6d3) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.50f)] -// CHECK:STDOUT: %Core.import_ref.fa2 = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.178: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.843)] +// CHECK:STDOUT: %Core.import_ref.201: @ImplicitAs.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type.b3a) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert.1de)] +// CHECK:STDOUT: %Core.import_ref.cc1 = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -188,7 +190,7 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // CHECK:STDOUT: %ImplicitAs.type.loc19_16.2: type = facet_type <@ImplicitAs, @ImplicitAs(%V.loc8_16.1)> [symbolic = %ImplicitAs.type.loc19_16.2 (constants.%ImplicitAs.type.1e5)] // CHECK:STDOUT: %require_complete.loc19_16.2: = require_complete_type %ImplicitAs.type.loc19_16.2 [symbolic = %require_complete.loc19_16.2 (constants.%require_complete.cc6)] // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%V.loc8_16.1) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.d88)] -// CHECK:STDOUT: %assoc0: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.d88) = assoc_entity element0, imports.%Core.import_ref.218 [symbolic = %assoc0 (constants.%assoc0.2aa)] +// CHECK:STDOUT: %assoc0: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.d88) = assoc_entity element0, imports.%Core.import_ref.201 [symbolic = %assoc0 (constants.%assoc0.3d8)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -200,8 +202,8 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // CHECK:STDOUT: %.loc19_16.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %C.Create.specific_fn.loc19_7.1: = specific_function %Create.ref, @C.Create(constants.%V) [symbolic = %C.Create.specific_fn.loc19_7.2 (constants.%C.Create.specific_fn)] // CHECK:STDOUT: %ImplicitAs.type.loc19_16.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%V)> [symbolic = %ImplicitAs.type.loc19_16.2 (constants.%ImplicitAs.type.1e5)] -// CHECK:STDOUT: %.loc19_16.2: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.d88) = specific_constant imports.%Core.import_ref.a80, @ImplicitAs(constants.%V) [symbolic = %assoc0 (constants.%assoc0.2aa)] -// CHECK:STDOUT: %Convert.ref: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.d88) = name_ref Convert, %.loc19_16.2 [symbolic = %assoc0 (constants.%assoc0.2aa)] +// CHECK:STDOUT: %.loc19_16.2: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.d88) = specific_constant imports.%Core.import_ref.178, @ImplicitAs(constants.%V, constants.%Self.738) [symbolic = %assoc0 (constants.%assoc0.3d8)] +// CHECK:STDOUT: %Convert.ref: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.d88) = name_ref Convert, %.loc19_16.2 [symbolic = %assoc0 (constants.%assoc0.3d8)] // CHECK:STDOUT: %.loc19_16.3: @F.%V.loc8_16.1 (%V) = converted %.loc19_16.1, [concrete = ] // CHECK:STDOUT: %C.Create.call: init %empty_tuple.type = call %C.Create.specific_fn.loc19_7.1() // CHECK:STDOUT: return @@ -265,9 +267,11 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.031: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] +// CHECK:STDOUT: %Self.738: %ImplicitAs.type.031 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.ff3: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6d3: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.50f: %ImplicitAs.Convert.type.6d3 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b3a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Dest, %Self.738) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.1de: %ImplicitAs.WithSelf.Convert.type.b3a = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.f60: type = facet_type <@ImplicitAs, @ImplicitAs(%.Self.16f)> [symbolic_self] // CHECK:STDOUT: %type_where: type = facet_type [concrete] // CHECK:STDOUT: %V: %type_where = symbolic_binding V, 1 [symbolic] @@ -284,9 +288,9 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // CHECK:STDOUT: %require_complete.94b: = require_complete_type %V.binding.as_type [symbolic] // CHECK:STDOUT: %ImplicitAs.type.ee4: type = facet_type <@ImplicitAs, @ImplicitAs(%V.binding.as_type)> [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.f30: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%V.binding.as_type) [symbolic] -// CHECK:STDOUT: %assoc0.c7c: %ImplicitAs.assoc_type.f30 = assoc_entity element0, imports.%Core.import_ref.218 [symbolic] +// CHECK:STDOUT: %assoc0.a1c: %ImplicitAs.assoc_type.f30 = assoc_entity element0, imports.%Core.import_ref.201 [symbolic] // CHECK:STDOUT: %require_complete.24c: = require_complete_type %ImplicitAs.type.ee4 [symbolic] -// CHECK:STDOUT: %assoc0.0bc: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.fa2 [symbolic] +// CHECK:STDOUT: %assoc0.843: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.cc1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -296,9 +300,9 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // 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: %Core.import_ref.a80: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.0bc)] -// CHECK:STDOUT: %Core.import_ref.218: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.6d3) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.50f)] -// CHECK:STDOUT: %Core.import_ref.fa2 = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.178: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.843)] +// CHECK:STDOUT: %Core.import_ref.201: @ImplicitAs.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type.b3a) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert.1de)] +// CHECK:STDOUT: %Core.import_ref.cc1 = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -392,7 +396,7 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // CHECK:STDOUT: %ImplicitAs.type.loc20_16.2: type = facet_type <@ImplicitAs, @ImplicitAs(%V.binding.as_type)> [symbolic = %ImplicitAs.type.loc20_16.2 (constants.%ImplicitAs.type.ee4)] // CHECK:STDOUT: %require_complete.loc20_16.2: = require_complete_type %ImplicitAs.type.loc20_16.2 [symbolic = %require_complete.loc20_16.2 (constants.%require_complete.24c)] // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%V.binding.as_type) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.f30)] -// CHECK:STDOUT: %assoc0: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.f30) = assoc_entity element0, imports.%Core.import_ref.218 [symbolic = %assoc0 (constants.%assoc0.c7c)] +// CHECK:STDOUT: %assoc0: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.f30) = assoc_entity element0, imports.%Core.import_ref.201 [symbolic = %assoc0 (constants.%assoc0.a1c)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -406,8 +410,8 @@ fn F(U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) { // CHECK:STDOUT: %.loc20_16.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %C.Create.specific_fn.loc20_7.1: = specific_function %Create.ref, @C.Create(constants.%V.binding.as_type) [symbolic = %C.Create.specific_fn.loc20_7.2 (constants.%C.Create.specific_fn)] // CHECK:STDOUT: %ImplicitAs.type.loc20_16.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%V.binding.as_type)> [symbolic = %ImplicitAs.type.loc20_16.2 (constants.%ImplicitAs.type.ee4)] -// CHECK:STDOUT: %.loc20_16.2: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.f30) = specific_constant imports.%Core.import_ref.a80, @ImplicitAs(constants.%V.binding.as_type) [symbolic = %assoc0 (constants.%assoc0.c7c)] -// CHECK:STDOUT: %Convert.ref: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.f30) = name_ref Convert, %.loc20_16.2 [symbolic = %assoc0 (constants.%assoc0.c7c)] +// CHECK:STDOUT: %.loc20_16.2: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.f30) = specific_constant imports.%Core.import_ref.178, @ImplicitAs(constants.%V.binding.as_type, constants.%Self.738) [symbolic = %assoc0 (constants.%assoc0.a1c)] +// CHECK:STDOUT: %Convert.ref: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.f30) = name_ref Convert, %.loc20_16.2 [symbolic = %assoc0 (constants.%assoc0.a1c)] // CHECK:STDOUT: %.loc20_16.3: @F.%V.binding.as_type (%V.binding.as_type) = converted %.loc20_16.1, [concrete = ] // CHECK:STDOUT: %C.Create.call: init %empty_tuple.type = call %C.Create.specific_fn.loc20_7.1() // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index aa5c35b2a143..a3209ed40b81 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -744,14 +744,14 @@ fn G() -> i32 { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.643: = require_complete_type %WithNontype.205 [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N.fe9) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.e78: = bound_method %N.5de, %Int.as.Copy.impl.Op.664 [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %bound_method.207: = bound_method %N.5de, %Int.as.Copy.impl.Op.specific_fn [symbolic] @@ -763,7 +763,6 @@ fn G() -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -771,7 +770,8 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -889,7 +889,7 @@ fn G() -> i32 { // CHECK:STDOUT: fn(%x.param: @F.%WithNontype.loc6_31.1 (%WithNontype.205)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc6_50: %i32 = name_ref N, %N.loc6_6.2 [symbolic = %N.loc6_6.1 (constants.%N.5de)] -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_50.1: = bound_method %N.ref.loc6_50, %impl.elem0 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound.e78)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_50.2: = bound_method %N.ref.loc6_50, %specific_fn [symbolic = %bound_method.loc6_50.3 (constants.%bound_method.207)] @@ -904,7 +904,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc9_13.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [concrete = constants.%WithNontype.generic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_31.1: = bound_method %int_0, %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.loc9_31.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.d2e] diff --git a/toolchain/check/testdata/deduce/int_float.carbon b/toolchain/check/testdata/deduce/int_float.carbon index 6576273b8439..527eceb64d23 100644 --- a/toolchain/check/testdata/deduce/int_float.carbon +++ b/toolchain/check/testdata/deduce/int_float.carbon @@ -54,10 +54,10 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.901: = require_complete_type %Int [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.98e: = impl_witness imports.%Copy.impl_witness_table.d8f [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value Core.IntLiteral, (%Copy.impl_witness.98e) [concrete] -// CHECK:STDOUT: %.6b5: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.42e: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.5e6: type = fn_type_with_self_type %Copy.WithSelf.Op.type.42e, %Copy.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.type: type = fn_type @Core.IntLiteral.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op: %Core.IntLiteral.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.bound.555: = bound_method %N, %Core.IntLiteral.as.Copy.impl.Op [symbolic] @@ -162,7 +162,7 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: fn(%n.param: @F.%Int.loc4_42.1 (%Int)) -> out %return.param: Core.IntLiteral { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc5: Core.IntLiteral = name_ref N, %N.loc4_6.2 [symbolic = %N.loc4_6.1 (constants.%N)] -// CHECK:STDOUT: %impl.elem0: %.6b5 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.5e6 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %N.ref.loc5, %impl.elem0 [symbolic = %Core.IntLiteral.as.Copy.impl.Op.bound (constants.%Core.IntLiteral.as.Copy.impl.Op.bound.555)] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.call: init Core.IntLiteral = call %bound_method(%N.ref.loc5) [symbolic = %N.loc4_6.1 (constants.%N)] // CHECK:STDOUT: return %Core.IntLiteral.as.Copy.impl.Op.call @@ -212,10 +212,10 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.dc0: = require_complete_type %Float [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.98e: = impl_witness imports.%Copy.impl_witness_table.d8f [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value Core.IntLiteral, (%Copy.impl_witness.98e) [concrete] -// CHECK:STDOUT: %.6b5: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.42e: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.5e6: type = fn_type_with_self_type %Copy.WithSelf.Op.type.42e, %Copy.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.type: type = fn_type @Core.IntLiteral.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op: %Core.IntLiteral.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.bound.555: = bound_method %N, %Core.IntLiteral.as.Copy.impl.Op [symbolic] @@ -320,7 +320,7 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: fn(%n.param: @F.%Float.loc4_44.1 (%Float)) -> out %return.param: Core.IntLiteral { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc5: Core.IntLiteral = name_ref N, %N.loc4_6.2 [symbolic = %N.loc4_6.1 (constants.%N)] -// CHECK:STDOUT: %impl.elem0: %.6b5 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.5e6 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %N.ref.loc5, %impl.elem0 [symbolic = %Core.IntLiteral.as.Copy.impl.Op.bound (constants.%Core.IntLiteral.as.Copy.impl.Op.bound.555)] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.call: init Core.IntLiteral = call %bound_method(%N.ref.loc5) [symbolic = %N.loc4_6.1 (constants.%N)] // CHECK:STDOUT: return %Core.IntLiteral.as.Copy.impl.Op.call diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index 54f9ad978c7d..6128944dc2ee 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -267,14 +267,14 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.76f: = require_complete_type %HasPair.2e7 [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.5f8: = bound_method %B, %Int.as.Copy.impl.Op.664 [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %bound_method.dfb: = bound_method %B, %Int.as.Copy.impl.Op.specific_fn [symbolic] @@ -285,7 +285,6 @@ fn G(pair: (C, D)) -> D { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -293,7 +292,8 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -402,14 +402,14 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc8_22.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2) [concrete = constants.%tuple.ad8] -// CHECK:STDOUT: %impl.elem0.loc8_22.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_22.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_22.1: = bound_method %int_1, %impl.elem0.loc8_22.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc8_22.1: = specific_function %impl.elem0.loc8_22.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_22.2: = bound_method %int_1, %specific_fn.loc8_22.1 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_22.1: init %i32 = call %bound_method.loc8_22.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_22.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_22.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_22.3: %i32 = converted %int_1, %.loc8_22.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc8_22.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_22.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_22.3: = bound_method %int_2, %impl.elem0.loc8_22.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc8_22.2: = specific_function %impl.elem0.loc8_22.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_22.4: = bound_method %int_2, %specific_fn.loc8_22.2 [concrete = constants.%bound_method.646] @@ -455,7 +455,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: fn(%h.param: @F.%HasPair.loc6_41.1 (%HasPair.2e7)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %B.ref.loc6_60: %i32 = name_ref B, %B.loc6_15.2 [symbolic = %B.loc6_15.1 (constants.%B)] -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_60.1: = bound_method %B.ref.loc6_60, %impl.elem0 [symbolic = %Int.as.Copy.impl.Op.bound (constants.%Int.as.Copy.impl.Op.bound.5f8)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_60.2: = bound_method %B.ref.loc6_60, %specific_fn [symbolic = %bound_method.loc6_60.3 (constants.%bound_method.dfb)] diff --git a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon index 8af83e6e7515..46df39b2a81a 100644 --- a/toolchain/check/testdata/deduce/value_with_type_through_access.carbon +++ b/toolchain/check/testdata/deduce/value_with_type_through_access.carbon @@ -550,20 +550,20 @@ fn G() { // CHECK:STDOUT: %require_complete.9b8c71.2: = require_complete_type %HoldsType.47b504.2 [symbolic] // CHECK:STDOUT: %HoldsType.val: %HoldsType.47b504.2 = struct_value () [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %HoldsType.47b504.2, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.278: %Destroy.type = facet_value %HoldsType.47b504.2, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.5d9: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.278 [symbolic] -// CHECK:STDOUT: %impl.elem0.5a6: %.5d9 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.525: = specific_impl_function %impl.elem0.5a6, @Destroy.Op(%Destroy.facet.278) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.055: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.278) [symbolic] +// CHECK:STDOUT: %.b9b: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.055, %Destroy.facet.278 [symbolic] +// CHECK:STDOUT: %impl.elem0.909: %.b9b = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.2d3: = specific_impl_function %impl.elem0.909, @Destroy.WithSelf.Op(%Destroy.facet.278) [symbolic] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] // CHECK:STDOUT: %struct: %struct_type.t = struct_value (%C) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.b47: = impl_witness imports.%Copy.impl_witness_table.b1c [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value type, (%Copy.impl_witness.b47) [concrete] -// CHECK:STDOUT: %.436: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.a4f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.070: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a4f, %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: = bound_method %C, %type.as.Copy.impl.Op [concrete] @@ -703,9 +703,10 @@ fn G() { // CHECK:STDOUT: %HoldsType.val: @G.%HoldsType.loc26_22.2 (%HoldsType.47b504.2) = struct_value () [symbolic = %HoldsType.val (constants.%HoldsType.val)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %HoldsType.loc26_22.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %HoldsType.loc26_22.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.278)] -// CHECK:STDOUT: %.loc26_6.5: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc26_6.5 (constants.%.5d9)] -// CHECK:STDOUT: %impl.elem0.loc26_6.2: @G.%.loc26_6.5 (%.5d9) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_6.2 (constants.%impl.elem0.5a6)] -// CHECK:STDOUT: %specific_impl_fn.loc26_6.2: = specific_impl_function %impl.elem0.loc26_6.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc26_6.2 (constants.%specific_impl_fn.525)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.055)] +// CHECK:STDOUT: %.loc26_6.5: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc26_6.5 (constants.%.b9b)] +// CHECK:STDOUT: %impl.elem0.loc26_6.2: @G.%.loc26_6.5 (%.b9b) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_6.2 (constants.%impl.elem0.909)] +// CHECK:STDOUT: %specific_impl_fn.loc26_6.2: = specific_impl_function %impl.elem0.loc26_6.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc26_6.2 (constants.%specific_impl_fn.2d3)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -719,11 +720,11 @@ fn G() { // CHECK:STDOUT: %.loc26_6.4: ref @G.%HoldsType.loc26_22.2 (%HoldsType.47b504.2) = temporary %.loc26_6.2, %.loc26_6.3 // CHECK:STDOUT: %.loc26_8: ref @G.%HoldsType.loc26_22.2 (%HoldsType.47b504.2) = converted %.loc26_6.1, %.loc26_6.4 // CHECK:STDOUT: %.loc26_26: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %impl.elem0.loc26_6.1: @G.%.loc26_6.5 (%.5d9) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_6.2 (constants.%impl.elem0.5a6)] +// CHECK:STDOUT: %impl.elem0.loc26_6.1: @G.%.loc26_6.5 (%.b9b) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_6.2 (constants.%impl.elem0.909)] // CHECK:STDOUT: %bound_method.loc26_6.1: = bound_method %.loc26_6.4, %impl.elem0.loc26_6.1 -// CHECK:STDOUT: %specific_impl_fn.loc26_6.1: = specific_impl_function %impl.elem0.loc26_6.1, @Destroy.Op(constants.%Destroy.facet.278) [symbolic = %specific_impl_fn.loc26_6.2 (constants.%specific_impl_fn.525)] +// CHECK:STDOUT: %specific_impl_fn.loc26_6.1: = specific_impl_function %impl.elem0.loc26_6.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.278) [symbolic = %specific_impl_fn.loc26_6.2 (constants.%specific_impl_fn.2d3)] // CHECK:STDOUT: %bound_method.loc26_6.2: = bound_method %.loc26_6.4, %specific_impl_fn.loc26_6.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc26_6.2(%.loc26_6.4) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc26_6.2(%.loc26_6.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -733,7 +734,7 @@ fn G() { // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [concrete = constants.%G] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %.loc37_12.1: %struct_type.t = struct_literal (%C.ref) [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0: %.436 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.070 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %C.ref, %impl.elem0 [concrete = constants.%type.as.Copy.impl.Op.bound] // CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method(%C.ref) [concrete = constants.%C] // CHECK:STDOUT: %.loc37_12.2: ref %Class = temporary_storage @@ -797,7 +798,6 @@ fn G() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -805,7 +805,8 @@ fn G() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -820,10 +821,10 @@ fn G() { // CHECK:STDOUT: %tuple.type.85c: type = tuple_type (type) [concrete] // CHECK:STDOUT: %tuple.1f1: %tuple.type.85c = tuple_value (%C) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.b47: = impl_witness imports.%Copy.impl_witness_table.b1c [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value type, (%Copy.impl_witness.b47) [concrete] -// CHECK:STDOUT: %.436: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.a4f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.070: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a4f, %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: = bound_method %C, %type.as.Copy.impl.Op [concrete] @@ -897,7 +898,7 @@ fn G() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_48.1: = bound_method %int_0, %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.loc12_48.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -959,7 +960,7 @@ fn G() { // CHECK:STDOUT: %.loc24_25.1: %tuple.type.85c = tuple_literal (%C.ref) [concrete = constants.%tuple.1f1] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] // CHECK:STDOUT: %array_type: type = array_type %int_1, type [concrete = constants.%array_type] -// CHECK:STDOUT: %impl.elem0: %.436 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.070 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %C.ref, %impl.elem0 [concrete = constants.%type.as.Copy.impl.Op.bound] // CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method(%C.ref) [concrete = constants.%C] // CHECK:STDOUT: %.loc24_25.2: ref %array_type = temporary_storage diff --git a/toolchain/check/testdata/eval/aggregates.carbon b/toolchain/check/testdata/eval/aggregates.carbon index 2be13f19b720..f490be1f4f0a 100644 --- a/toolchain/check/testdata/eval/aggregates.carbon +++ b/toolchain/check/testdata/eval/aggregates.carbon @@ -68,7 +68,6 @@ fn G(N:! i32) { // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple.ad8: %tuple.type.f94 = tuple_value (%int_1.5b8, %int_2.ecc) [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -76,7 +75,8 @@ fn G(N:! i32) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -87,14 +87,14 @@ fn G(N:! i32) { // CHECK:STDOUT: %tuple.21c: %tuple.type.d07 = tuple_value (%int_1.5d2, %int_2.ef8) [concrete] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%tuple_copy.var, element0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.ee3: = bound_method %int_1.5d2, %Int.as.Copy.impl.Op.664 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %bound_method.4d7: = bound_method %int_1.5d2, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -209,14 +209,14 @@ fn G(N:! i32) { // CHECK:STDOUT: %i32.loc4_46: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc4_49.1: %tuple.type.24b = tuple_literal (%i32.loc4_41, %i32.loc4_46) [concrete = constants.%tuple.95a] // CHECK:STDOUT: %.loc4_49.2: type = converted %.loc4_49.1, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07] -// CHECK:STDOUT: %impl.elem0.loc4_35.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc4_35.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc4_35.1: = bound_method %int_1.loc4, %impl.elem0.loc4_35.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc4_35.1: = specific_function %impl.elem0.loc4_35.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_35.2: = bound_method %int_1.loc4, %specific_fn.loc4_35.1 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_35.1: init %i32 = call %bound_method.loc4_35.2(%int_1.loc4) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc4_35.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_35.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc4_35.3: %i32 = converted %int_1.loc4, %.loc4_35.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc4_35.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc4_35.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc4_35.3: = bound_method %int_2.loc4, %impl.elem0.loc4_35.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc4_35.2: = specific_function %impl.elem0.loc4_35.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_35.4: = bound_method %int_2.loc4, %specific_fn.loc4_35.2 [concrete = constants.%bound_method.646] @@ -226,7 +226,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %tuple.loc4: %tuple.type.d07 = tuple_value (%.loc4_35.3, %.loc4_35.5) [concrete = constants.%tuple.21c] // CHECK:STDOUT: %.loc4_37.1: %tuple.type.d07 = converted %.loc4_35.1, %tuple.loc4 [concrete = constants.%tuple.21c] // CHECK:STDOUT: %tuple.elem0.loc4_37.1: %i32 = tuple_access %.loc4_37.1, element0 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc4_37.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc4_37.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc4_37.1: = bound_method %tuple.elem0.loc4_37.1, %impl.elem0.loc4_37.1 [concrete = constants.%Int.as.Copy.impl.Op.bound.ee3] // CHECK:STDOUT: %specific_fn.loc4_37.1: = specific_function %impl.elem0.loc4_37.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc4_37.2: = bound_method %tuple.elem0.loc4_37.1, %specific_fn.loc4_37.1 [concrete = constants.%bound_method.4d7] @@ -234,7 +234,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %tuple.elem0.loc4_37.2: ref %i32 = tuple_access file.%tuple_copy.var, element0 [concrete = constants.%tuple.elem0] // CHECK:STDOUT: %.loc4_37.2: init %i32 to %tuple.elem0.loc4_37.2 = in_place_init %Int.as.Copy.impl.Op.call.loc4_37.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %tuple.elem1.loc4_37.1: %i32 = tuple_access %.loc4_37.1, element1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc4_37.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc4_37.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc4_37.3: = bound_method %tuple.elem1.loc4_37.1, %impl.elem0.loc4_37.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.5e8] // CHECK:STDOUT: %specific_fn.loc4_37.2: = specific_function %impl.elem0.loc4_37.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc4_37.4: = bound_method %tuple.elem1.loc4_37.1, %specific_fn.loc4_37.2 [concrete = constants.%bound_method.f15] @@ -255,21 +255,21 @@ fn G(N:! i32) { // CHECK:STDOUT: %int_32.loc6_99: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6_99: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [concrete = constants.%struct_type.b.a.c] -// CHECK:STDOUT: %impl.elem0.loc6_71.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6_71.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_71.1: = bound_method %int_2.loc6, %impl.elem0.loc6_71.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc6_71.1: = specific_function %impl.elem0.loc6_71.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_71.2: = bound_method %int_2.loc6, %specific_fn.loc6_71.1 [concrete = constants.%bound_method.646] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_71.1: init %i32 = call %bound_method.loc6_71.2(%int_2.loc6) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc6_71.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_71.1 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc6_71.3: %i32 = converted %int_2.loc6, %.loc6_71.2 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc6_71.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6_71.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_71.3: = bound_method %int_1.loc6, %impl.elem0.loc6_71.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc6_71.2: = specific_function %impl.elem0.loc6_71.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_71.4: = bound_method %int_1.loc6, %specific_fn.loc6_71.2 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_71.2: init %i32 = call %bound_method.loc6_71.4(%int_1.loc6) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_71.4: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_71.2 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_71.5: %i32 = converted %int_1.loc6, %.loc6_71.4 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc6_71.3: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6_71.3: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_71.5: = bound_method %int_3.loc6, %impl.elem0.loc6_71.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc6_71.3: = specific_function %impl.elem0.loc6_71.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_71.6: = bound_method %int_3.loc6, %specific_fn.loc6_71.3 [concrete = constants.%bound_method.fa7] @@ -279,7 +279,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %struct.loc6: %struct_type.b.a.c = struct_value (%.loc6_71.3, %.loc6_71.5, %.loc6_71.7) [concrete = constants.%struct.21d] // CHECK:STDOUT: %.loc6_73.1: %struct_type.b.a.c = converted %.loc6_71.1, %struct.loc6 [concrete = constants.%struct.21d] // CHECK:STDOUT: %.loc6_73.2: %i32 = struct_access %.loc6_73.1, element1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc6_73.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc6_73.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_73.1: = bound_method %.loc6_73.2, %impl.elem0.loc6_73.1 [concrete = constants.%Int.as.Copy.impl.Op.bound.ee3] // CHECK:STDOUT: %specific_fn.loc6_73.1: = specific_function %impl.elem0.loc6_73.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_73.2: = bound_method %.loc6_73.2, %specific_fn.loc6_73.1 [concrete = constants.%bound_method.4d7] @@ -287,7 +287,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %.loc6_73.3: ref %i32 = struct_access file.%struct_copy.var, element1 [concrete = constants.%.460] // CHECK:STDOUT: %.loc6_73.4: init %i32 to %.loc6_73.3 = in_place_init %Int.as.Copy.impl.Op.call.loc6_73.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_73.5: %i32 = struct_access %.loc6_73.1, element0 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc6_73.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc6_73.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_73.3: = bound_method %.loc6_73.5, %impl.elem0.loc6_73.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.5e8] // CHECK:STDOUT: %specific_fn.loc6_73.2: = specific_function %impl.elem0.loc6_73.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_73.4: = bound_method %.loc6_73.5, %specific_fn.loc6_73.2 [concrete = constants.%bound_method.f15] @@ -295,7 +295,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %.loc6_73.6: ref %i32 = struct_access file.%struct_copy.var, element0 [concrete = constants.%.61f] // CHECK:STDOUT: %.loc6_73.7: init %i32 to %.loc6_73.6 = in_place_init %Int.as.Copy.impl.Op.call.loc6_73.2 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc6_73.8: %i32 = struct_access %.loc6_73.1, element2 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc6_73.3: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc6_73.3: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_73.5: = bound_method %.loc6_73.8, %impl.elem0.loc6_73.3 [concrete = constants.%Int.as.Copy.impl.Op.bound.ecc] // CHECK:STDOUT: %specific_fn.loc6_73.3: = specific_function %impl.elem0.loc6_73.3, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_73.6: = bound_method %.loc6_73.8, %specific_fn.loc6_73.3 [concrete = constants.%bound_method.4f5] @@ -319,7 +319,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %.loc8_64.2: %tuple.type.d46 = converted %.loc8_64.1, %tuple.loc8 [concrete = constants.%tuple.869] // CHECK:STDOUT: %tuple.elem2: Core.IntLiteral = tuple_access %.loc8_64.2, element2 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %array_type.loc8: type = array_type %tuple.elem2, %i32.loc8 [concrete = constants.%array_type] -// CHECK:STDOUT: %impl.elem0.loc8: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_37.1: = bound_method %int_0.loc8_35, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_37.2: = bound_method %int_0.loc8_35, %specific_fn.loc8 [concrete = constants.%bound_method.d2e] @@ -343,7 +343,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %.loc10_70.2: %struct_type.a.b = converted %.loc10_70.1, %struct.loc10 [concrete = constants.%struct.a81] // CHECK:STDOUT: %.loc10_71: Core.IntLiteral = struct_access %.loc10_70.2, element1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %array_type.loc10: type = array_type %.loc10_71, %i32.loc10 [concrete = constants.%array_type] -// CHECK:STDOUT: %impl.elem0.loc10: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_39.1: = bound_method %int_0.loc10_37, %impl.elem0.loc10 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_39.2: = bound_method %int_0.loc10_37, %specific_fn.loc10 [concrete = constants.%bound_method.d2e] @@ -378,7 +378,6 @@ fn G(N:! i32) { // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete] // CHECK:STDOUT: %array_type.f32: type = array_type %int_4, %i32 [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -386,7 +385,8 @@ fn G(N:! i32) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.e9d: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -443,7 +443,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %i32.loc9_76: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %array_type: type = array_type %int_4, %i32.loc9_76 [concrete = constants.%array_type.f32] -// CHECK:STDOUT: %impl.elem0.loc9_65.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_65.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_65.1: = bound_method %int_5, %impl.elem0.loc9_65.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005] // CHECK:STDOUT: %specific_fn.loc9_65.1: = specific_function %impl.elem0.loc9_65.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_65.2: = bound_method %int_5, %specific_fn.loc9_65.1 [concrete = constants.%bound_method.e9d] @@ -453,7 +453,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %int_0.loc9_65: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc9_65.4: ref %i32 = array_index %.loc9_65.3, %int_0.loc9_65 // CHECK:STDOUT: %.loc9_65.5: init %i32 to %.loc9_65.4 = in_place_init %.loc9_65.2 [concrete = constants.%int_5.0f6] -// CHECK:STDOUT: %impl.elem0.loc9_65.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_65.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_65.3: = bound_method %int_7, %impl.elem0.loc9_65.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.1e0] // CHECK:STDOUT: %specific_fn.loc9_65.2: = specific_function %impl.elem0.loc9_65.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_65.4: = bound_method %int_7, %specific_fn.loc9_65.2 [concrete = constants.%bound_method.bf2] @@ -462,7 +462,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %int_1.loc9_65: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc9_65.7: ref %i32 = array_index %.loc9_65.3, %int_1.loc9_65 // CHECK:STDOUT: %.loc9_65.8: init %i32 to %.loc9_65.7 = in_place_init %.loc9_65.6 [concrete = constants.%int_7.0b1] -// CHECK:STDOUT: %impl.elem0.loc9_65.3: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_65.3: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_65.5: = bound_method %int_1.loc9_61, %impl.elem0.loc9_65.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc9_65.3: = specific_function %impl.elem0.loc9_65.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_65.6: = bound_method %int_1.loc9_61, %specific_fn.loc9_65.3 [concrete = constants.%bound_method.38b] @@ -471,7 +471,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %int_2.loc9_65: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc9_65.10: ref %i32 = array_index %.loc9_65.3, %int_2.loc9_65 // CHECK:STDOUT: %.loc9_65.11: init %i32 to %.loc9_65.10 = in_place_init %.loc9_65.9 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc9_65.4: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_65.4: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_65.7: = bound_method %int_9, %impl.elem0.loc9_65.4 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.87d] // CHECK:STDOUT: %specific_fn.loc9_65.4: = specific_function %impl.elem0.loc9_65.4, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_65.8: = bound_method %int_9, %specific_fn.loc9_65.4 [concrete = constants.%bound_method.661] @@ -486,7 +486,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %.loc9_67.2: ref %array_type.f32 = temporary %.loc9_65.3, %.loc9_67.1 // CHECK:STDOUT: %int_32.loc9_86: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc9_86: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc9_85: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_85: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_85.1: = bound_method %int_2.loc9_85, %impl.elem0.loc9_85 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc9_85: = specific_function %impl.elem0.loc9_85, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_85.2: = bound_method %int_2.loc9_85, %specific_fn.loc9_85 [concrete = constants.%bound_method.646] @@ -519,27 +519,28 @@ fn G(N:! i32) { // CHECK:STDOUT: %require_complete.345: = require_complete_type %array_type.742 [symbolic] // CHECK:STDOUT: %pattern_type.d52: type = pattern_type %array_type.742 [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness.b29: = lookup_impl_witness %array_type.742, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.ddc: %Destroy.type = facet_value %array_type.742, (%Destroy.lookup_impl_witness.b29) [symbolic] -// CHECK:STDOUT: %.efc: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.ddc [symbolic] -// CHECK:STDOUT: %impl.elem0.5d5: %.efc = impl_witness_access %Destroy.lookup_impl_witness.b29, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.7a6: = specific_impl_function %impl.elem0.5d5, @Destroy.Op(%Destroy.facet.ddc) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.3c6: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.ddc) [symbolic] +// CHECK:STDOUT: %.950: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.3c6, %Destroy.facet.ddc [symbolic] +// CHECK:STDOUT: %impl.elem0.fa5: %.950 = impl_witness_access %Destroy.lookup_impl_witness.b29, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.ede: = specific_impl_function %impl.elem0.fa5, @Destroy.WithSelf.Op(%Destroy.facet.ddc) [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness.bed: = lookup_impl_witness %struct_type.a, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.d21: %Destroy.type = facet_value %struct_type.a, (%Destroy.lookup_impl_witness.bed) [symbolic] -// CHECK:STDOUT: %.862: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.d21 [symbolic] -// CHECK:STDOUT: %impl.elem0.466: %.862 = impl_witness_access %Destroy.lookup_impl_witness.bed, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.6c5: = specific_impl_function %impl.elem0.466, @Destroy.Op(%Destroy.facet.d21) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.873: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.d21) [symbolic] +// CHECK:STDOUT: %.511: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.873, %Destroy.facet.d21 [symbolic] +// CHECK:STDOUT: %impl.elem0.12c: %.511 = impl_witness_access %Destroy.lookup_impl_witness.bed, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.c3a: = specific_impl_function %impl.elem0.12c, @Destroy.WithSelf.Op(%Destroy.facet.d21) [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness.7eb: = lookup_impl_witness %tuple.type.3c8, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.66d: %Destroy.type = facet_value %tuple.type.3c8, (%Destroy.lookup_impl_witness.7eb) [symbolic] -// CHECK:STDOUT: %.dfd: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.66d [symbolic] -// CHECK:STDOUT: %impl.elem0.097: %.dfd = impl_witness_access %Destroy.lookup_impl_witness.7eb, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.581: = specific_impl_function %impl.elem0.097, @Destroy.Op(%Destroy.facet.66d) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.f23: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.66d) [symbolic] +// CHECK:STDOUT: %.f20: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.f23, %Destroy.facet.66d [symbolic] +// CHECK:STDOUT: %impl.elem0.f5f: %.f20 = impl_witness_access %Destroy.lookup_impl_witness.7eb, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.87c: = specific_impl_function %impl.elem0.f5f, @Destroy.WithSelf.Op(%Destroy.facet.66d) [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %N.5de: %i32 = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic] @@ -547,7 +548,8 @@ fn G(N:! i32) { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete] -// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.5de, %Int.as.ImplicitAs.impl.Convert.dd4 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %N.5de, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic] @@ -557,9 +559,10 @@ fn G(N:! i32) { // CHECK:STDOUT: %pattern_type.99c: type = pattern_type %array_type.2ec [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness.f5c: = lookup_impl_witness %array_type.2ec, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.d1e: %Destroy.type = facet_value %array_type.2ec, (%Destroy.lookup_impl_witness.f5c) [symbolic] -// CHECK:STDOUT: %.bed: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.d1e [symbolic] -// CHECK:STDOUT: %impl.elem0.49a: %.bed = impl_witness_access %Destroy.lookup_impl_witness.f5c, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.253: = specific_impl_function %impl.elem0.49a, @Destroy.Op(%Destroy.facet.d1e) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.ff9: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.d1e) [symbolic] +// CHECK:STDOUT: %.63e: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.ff9, %Destroy.facet.d1e [symbolic] +// CHECK:STDOUT: %impl.elem0.2bf: %.63e = impl_witness_access %Destroy.lookup_impl_witness.f5c, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.0a5: = specific_impl_function %impl.elem0.2bf, @Destroy.WithSelf.Op(%Destroy.facet.d1e) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -585,19 +588,22 @@ fn G(N:! i32) { // CHECK:STDOUT: %pattern_type.loc8: type = pattern_type %array_type.loc8_20.2 [symbolic = %pattern_type.loc8 (constants.%pattern_type.d52)] // CHECK:STDOUT: %Destroy.lookup_impl_witness.loc8: = lookup_impl_witness %array_type.loc8_20.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc8 (constants.%Destroy.lookup_impl_witness.b29)] // CHECK:STDOUT: %Destroy.facet.loc8: %Destroy.type = facet_value %array_type.loc8_20.2, (%Destroy.lookup_impl_witness.loc8) [symbolic = %Destroy.facet.loc8 (constants.%Destroy.facet.ddc)] -// CHECK:STDOUT: %.loc8_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc8 [symbolic = %.loc8_3 (constants.%.efc)] -// CHECK:STDOUT: %impl.elem0.loc8_3.2: @F.%.loc8_3 (%.efc) = impl_witness_access %Destroy.lookup_impl_witness.loc8, element0 [symbolic = %impl.elem0.loc8_3.2 (constants.%impl.elem0.5d5)] -// CHECK:STDOUT: %specific_impl_fn.loc8_3.2: = specific_impl_function %impl.elem0.loc8_3.2, @Destroy.Op(%Destroy.facet.loc8) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.7a6)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.loc8: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.loc8) [symbolic = %Destroy.WithSelf.Op.type.loc8 (constants.%Destroy.WithSelf.Op.type.3c6)] +// CHECK:STDOUT: %.loc8_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.loc8, %Destroy.facet.loc8 [symbolic = %.loc8_3 (constants.%.950)] +// CHECK:STDOUT: %impl.elem0.loc8_3.2: @F.%.loc8_3 (%.950) = impl_witness_access %Destroy.lookup_impl_witness.loc8, element0 [symbolic = %impl.elem0.loc8_3.2 (constants.%impl.elem0.fa5)] +// CHECK:STDOUT: %specific_impl_fn.loc8_3.2: = specific_impl_function %impl.elem0.loc8_3.2, @Destroy.WithSelf.Op(%Destroy.facet.loc8) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.ede)] // CHECK:STDOUT: %Destroy.lookup_impl_witness.loc7: = lookup_impl_witness %struct_type.a.loc7_16.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc7 (constants.%Destroy.lookup_impl_witness.bed)] // CHECK:STDOUT: %Destroy.facet.loc7: %Destroy.type = facet_value %struct_type.a.loc7_16.2, (%Destroy.lookup_impl_witness.loc7) [symbolic = %Destroy.facet.loc7 (constants.%Destroy.facet.d21)] -// CHECK:STDOUT: %.loc7_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc7 [symbolic = %.loc7_3 (constants.%.862)] -// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3 (%.862) = impl_witness_access %Destroy.lookup_impl_witness.loc7, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.466)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.Op(%Destroy.facet.loc7) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.6c5)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.loc7: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.loc7) [symbolic = %Destroy.WithSelf.Op.type.loc7 (constants.%Destroy.WithSelf.Op.type.873)] +// CHECK:STDOUT: %.loc7_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.loc7, %Destroy.facet.loc7 [symbolic = %.loc7_3 (constants.%.511)] +// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3 (%.511) = impl_witness_access %Destroy.lookup_impl_witness.loc7, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.12c)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.WithSelf.Op(%Destroy.facet.loc7) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.c3a)] // CHECK:STDOUT: %Destroy.lookup_impl_witness.loc6: = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc6 (constants.%Destroy.lookup_impl_witness.7eb)] // CHECK:STDOUT: %Destroy.facet.loc6: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness.loc6) [symbolic = %Destroy.facet.loc6 (constants.%Destroy.facet.66d)] -// CHECK:STDOUT: %.loc6_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc6 [symbolic = %.loc6_3 (constants.%.dfd)] -// CHECK:STDOUT: %impl.elem0.loc6_3.2: @F.%.loc6_3 (%.dfd) = impl_witness_access %Destroy.lookup_impl_witness.loc6, element0 [symbolic = %impl.elem0.loc6_3.2 (constants.%impl.elem0.097)] -// CHECK:STDOUT: %specific_impl_fn.loc6_3.2: = specific_impl_function %impl.elem0.loc6_3.2, @Destroy.Op(%Destroy.facet.loc6) [symbolic = %specific_impl_fn.loc6_3.2 (constants.%specific_impl_fn.581)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.loc6: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.loc6) [symbolic = %Destroy.WithSelf.Op.type.loc6 (constants.%Destroy.WithSelf.Op.type.f23)] +// CHECK:STDOUT: %.loc6_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.loc6, %Destroy.facet.loc6 [symbolic = %.loc6_3 (constants.%.f20)] +// CHECK:STDOUT: %impl.elem0.loc6_3.2: @F.%.loc6_3 (%.f20) = impl_witness_access %Destroy.lookup_impl_witness.loc6, element0 [symbolic = %impl.elem0.loc6_3.2 (constants.%impl.elem0.f5f)] +// CHECK:STDOUT: %specific_impl_fn.loc6_3.2: = specific_impl_function %impl.elem0.loc6_3.2, @Destroy.WithSelf.Op(%Destroy.facet.loc6) [symbolic = %specific_impl_fn.loc6_3.2 (constants.%specific_impl_fn.87c)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -636,21 +642,21 @@ fn G(N:! i32) { // CHECK:STDOUT: %array_type.loc8_20.1: type = array_type %int_5, %T.ref.loc8 [symbolic = %array_type.loc8_20.2 (constants.%array_type.742)] // CHECK:STDOUT: } // CHECK:STDOUT: %w: ref @F.%array_type.loc8_20.2 (%array_type.742) = ref_binding w, %w.var -// CHECK:STDOUT: %impl.elem0.loc8_3.1: @F.%.loc8_3 (%.efc) = impl_witness_access constants.%Destroy.lookup_impl_witness.b29, element0 [symbolic = %impl.elem0.loc8_3.2 (constants.%impl.elem0.5d5)] +// CHECK:STDOUT: %impl.elem0.loc8_3.1: @F.%.loc8_3 (%.950) = impl_witness_access constants.%Destroy.lookup_impl_witness.b29, element0 [symbolic = %impl.elem0.loc8_3.2 (constants.%impl.elem0.fa5)] // CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %w.var, %impl.elem0.loc8_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc8_3.1: = specific_impl_function %impl.elem0.loc8_3.1, @Destroy.Op(constants.%Destroy.facet.ddc) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.7a6)] +// CHECK:STDOUT: %specific_impl_fn.loc8_3.1: = specific_impl_function %impl.elem0.loc8_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.ddc) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.ede)] // CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %w.var, %specific_impl_fn.loc8_3.1 -// CHECK:STDOUT: %Destroy.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8_3.2(%w.var) -// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3 (%.862) = impl_witness_access constants.%Destroy.lookup_impl_witness.bed, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.466)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.call.loc8: init %empty_tuple.type = call %bound_method.loc8_3.2(%w.var) +// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3 (%.511) = impl_witness_access constants.%Destroy.lookup_impl_witness.bed, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.12c)] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem0.loc7_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.Op(constants.%Destroy.facet.d21) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.6c5)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.d21) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.c3a)] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_impl_fn.loc7_3.1 -// CHECK:STDOUT: %Destroy.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7_3.2(%v.var) -// CHECK:STDOUT: %impl.elem0.loc6_3.1: @F.%.loc6_3 (%.dfd) = impl_witness_access constants.%Destroy.lookup_impl_witness.7eb, element0 [symbolic = %impl.elem0.loc6_3.2 (constants.%impl.elem0.097)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.call.loc7: init %empty_tuple.type = call %bound_method.loc7_3.2(%v.var) +// CHECK:STDOUT: %impl.elem0.loc6_3.1: @F.%.loc6_3 (%.f20) = impl_witness_access constants.%Destroy.lookup_impl_witness.7eb, element0 [symbolic = %impl.elem0.loc6_3.2 (constants.%impl.elem0.f5f)] // CHECK:STDOUT: %bound_method.loc6_3.1: = bound_method %u.var, %impl.elem0.loc6_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc6_3.1: = specific_impl_function %impl.elem0.loc6_3.1, @Destroy.Op(constants.%Destroy.facet.66d) [symbolic = %specific_impl_fn.loc6_3.2 (constants.%specific_impl_fn.581)] +// CHECK:STDOUT: %specific_impl_fn.loc6_3.1: = specific_impl_function %impl.elem0.loc6_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.66d) [symbolic = %specific_impl_fn.loc6_3.2 (constants.%specific_impl_fn.87c)] // CHECK:STDOUT: %bound_method.loc6_3.2: = bound_method %u.var, %specific_impl_fn.loc6_3.1 -// CHECK:STDOUT: %Destroy.Op.call.loc6: init %empty_tuple.type = call %bound_method.loc6_3.2(%u.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call.loc6: init %empty_tuple.type = call %bound_method.loc6_3.2(%u.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -667,9 +673,10 @@ fn G(N:! i32) { // CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc14_22.2 [symbolic = %pattern_type (constants.%pattern_type.99c)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %array_type.loc14_22.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.f5c)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type.loc14_22.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.d1e)] -// CHECK:STDOUT: %.loc14_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc14_3 (constants.%.bed)] -// CHECK:STDOUT: %impl.elem0.loc14_3.2: @G.%.loc14_3 (%.bed) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_3.2 (constants.%impl.elem0.49a)] -// CHECK:STDOUT: %specific_impl_fn.loc14_3.2: = specific_impl_function %impl.elem0.loc14_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.253)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.ff9)] +// CHECK:STDOUT: %.loc14_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc14_3 (constants.%.63e)] +// CHECK:STDOUT: %impl.elem0.loc14_3.2: @G.%.loc14_3 (%.63e) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_3.2 (constants.%impl.elem0.2bf)] +// CHECK:STDOUT: %specific_impl_fn.loc14_3.2: = specific_impl_function %impl.elem0.loc14_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.0a5)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -682,7 +689,7 @@ fn G(N:! i32) { // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc12_6.2 [symbolic = %N.loc12_6.1 (constants.%N.5de)] -// CHECK:STDOUT: %impl.elem0.loc14_21: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %impl.elem0.loc14_21: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] // CHECK:STDOUT: %bound_method.loc14_21.1: = bound_method %N.ref, %impl.elem0.loc14_21 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc14_21, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_21.2: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc14_21.3 (constants.%bound_method)] @@ -692,11 +699,11 @@ fn G(N:! i32) { // CHECK:STDOUT: %array_type.loc14_22.1: type = array_type %.loc14_21.2, %i32.loc14 [symbolic = %array_type.loc14_22.2 (constants.%array_type.2ec)] // CHECK:STDOUT: } // CHECK:STDOUT: %k: ref @G.%array_type.loc14_22.2 (%array_type.2ec) = ref_binding k, %k.var -// CHECK:STDOUT: %impl.elem0.loc14_3.1: @G.%.loc14_3 (%.bed) = impl_witness_access constants.%Destroy.lookup_impl_witness.f5c, element0 [symbolic = %impl.elem0.loc14_3.2 (constants.%impl.elem0.49a)] +// CHECK:STDOUT: %impl.elem0.loc14_3.1: @G.%.loc14_3 (%.63e) = impl_witness_access constants.%Destroy.lookup_impl_witness.f5c, element0 [symbolic = %impl.elem0.loc14_3.2 (constants.%impl.elem0.2bf)] // CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %k.var, %impl.elem0.loc14_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc14_3.1: = specific_impl_function %impl.elem0.loc14_3.1, @Destroy.Op(constants.%Destroy.facet.d1e) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.253)] +// CHECK:STDOUT: %specific_impl_fn.loc14_3.1: = specific_impl_function %impl.elem0.loc14_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.d1e) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.0a5)] // CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %k.var, %specific_impl_fn.loc14_3.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc14_3.2(%k.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc14_3.2(%k.var) // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/eval/binding.carbon b/toolchain/check/testdata/eval/binding.carbon index 2f68f9531792..a80fd8529971 100644 --- a/toolchain/check/testdata/eval/binding.carbon +++ b/toolchain/check/testdata/eval/binding.carbon @@ -75,12 +75,10 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic] @@ -88,7 +86,8 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.fa7: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -97,7 +96,8 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.290: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete] -// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.290 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.290) [concrete] +// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet.290 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %int_3.822, %Int.as.ImplicitAs.impl.Convert.dd4 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.17a: = bound_method %int_3.822, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -133,7 +133,7 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, %F.decl [concrete = constants.%F] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc11_21: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc11_21: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc11_21.1: = bound_method %int_3, %impl.elem0.loc11_21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc11_21: = specific_function %impl.elem0.loc11_21, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_21.2: = bound_method %int_3, %specific_fn.loc11_21 [concrete = constants.%bound_method.fa7] @@ -141,7 +141,7 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %.loc11_21.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_21 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc11_21.2: %i32 = converted %int_3, %.loc11_21.1 [concrete = constants.%int_3.822] // CHECK:STDOUT: %F.call: init %i32 = call %F.ref(%.loc11_21.2) [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc11_22: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %impl.elem0.loc11_22: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] // CHECK:STDOUT: %bound_method.loc11_22.1: = bound_method %F.call, %impl.elem0.loc11_22 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_22: = specific_function %impl.elem0.loc11_22, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_22.2: = bound_method %F.call, %specific_fn.loc11_22 [concrete = constants.%bound_method.17a] @@ -152,7 +152,7 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %.loc11_22.4: Core.IntLiteral = converted %F.call, %.loc11_22.3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %array_type: type = array_type %.loc11_22.4, %i32 [concrete = constants.%array_type] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc11_35.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc11_35.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc11_35.1: = bound_method @__global_init.%int_1, %impl.elem0.loc11_35.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc11_35.1: = specific_function %impl.elem0.loc11_35.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_35.2: = bound_method @__global_init.%int_1, %specific_fn.loc11_35.1 [concrete = constants.%bound_method.38b] @@ -162,7 +162,7 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc11_35.3: ref %i32 = array_index %.loc11_35.2, %int_0 // CHECK:STDOUT: %.loc11_35.4: init %i32 to %.loc11_35.3 = in_place_init %.loc11_35.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc11_35.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc11_35.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc11_35.3: = bound_method @__global_init.%int_2, %impl.elem0.loc11_35.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc11_35.2: = specific_function %impl.elem0.loc11_35.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_35.4: = bound_method @__global_init.%int_2, %specific_fn.loc11_35.2 [concrete = constants.%bound_method.646] @@ -171,7 +171,7 @@ let n: array(i32, G()) = (1, 2, 3); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc11_35.6: ref %i32 = array_index %.loc11_35.2, %int_1 // CHECK:STDOUT: %.loc11_35.7: init %i32 to %.loc11_35.6 = in_place_init %.loc11_35.5 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc11_35.3: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc11_35.3: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc11_35.5: = bound_method @__global_init.%int_3, %impl.elem0.loc11_35.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc11_35.3: = specific_function %impl.elem0.loc11_35.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_35.6: = bound_method @__global_init.%int_3, %specific_fn.loc11_35.3 [concrete = constants.%bound_method.fa7] diff --git a/toolchain/check/testdata/eval/call.carbon b/toolchain/check/testdata/eval/call.carbon index 7443883e5629..c8b90436dd13 100644 --- a/toolchain/check/testdata/eval/call.carbon +++ b/toolchain/check/testdata/eval/call.carbon @@ -99,7 +99,7 @@ fn UseFGenerically(X:! i32) { // CHECK:STDERR: var v: F(X) = {}; // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_todo_dependent_call_type.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Core.Destroy` in type `` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_todo_dependent_call_type.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Core.Destroy` in type `` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: var v: F(X) = {}; // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: diff --git a/toolchain/check/testdata/facet/access.carbon b/toolchain/check/testdata/facet/access.carbon index 7fdc809bdc9f..53aabea4c253 100644 --- a/toolchain/check/testdata/facet/access.carbon +++ b/toolchain/check/testdata/facet/access.carbon @@ -352,9 +352,9 @@ interface J { // --- access_constant_in_self_facet.carbon library "[[@TEST_NAME]]"; +//@dump-sem-ir-begin interface A { let X:! type; } -//@dump-sem-ir-begin fn F(AA:! A where .X = ()) -> AA.X { return (); } @@ -414,16 +414,16 @@ fn F2(U:! Z) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %I.DoIt.type: type = fn_type @I.DoIt [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.DoIt.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.DoIt.decl [concrete] // CHECK:STDOUT: %T: %I.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %I.WithSelf.DoIt.type.66b: type = fn_type @I.WithSelf.DoIt, @I(%T) [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] -// CHECK:STDOUT: %.55e: type = fn_type_with_self_type %I.DoIt.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem0: %.55e = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.DoIt(%T) [symbolic] +// CHECK:STDOUT: %.f37: type = fn_type_with_self_type %I.WithSelf.DoIt.type.66b, %T [symbolic] +// CHECK:STDOUT: %impl.elem0: %.f37 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.WithSelf.DoIt(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -435,9 +435,10 @@ fn F2(U:! Z) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc8_8.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_8.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %.loc10_4.2: type = fn_type_with_self_type constants.%I.DoIt.type, %T.loc8_8.1 [symbolic = %.loc10_4.2 (constants.%.55e)] -// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Use.%.loc10_4.2 (%.55e) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @I.DoIt(%T.loc8_8.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %I.WithSelf.DoIt.type: type = fn_type @I.WithSelf.DoIt, @I(%T.loc8_8.1) [symbolic = %I.WithSelf.DoIt.type (constants.%I.WithSelf.DoIt.type.66b)] +// CHECK:STDOUT: %.loc10_4.2: type = fn_type_with_self_type %I.WithSelf.DoIt.type, %T.loc8_8.1 [symbolic = %.loc10_4.2 (constants.%.f37)] +// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Use.%.loc10_4.2 (%.f37) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @I.WithSelf.DoIt(%T.loc8_8.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -445,9 +446,9 @@ fn F2(U:! Z) { // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc10_4.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %DoIt.ref: %I.assoc_type = name_ref DoIt, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Use.%.loc10_4.2 (%.55e) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = specific_impl_function %impl.elem0.loc10_4.1, @I.DoIt(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %I.DoIt.call: init %empty_tuple.type = call %specific_impl_fn.loc10_4.1() +// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Use.%.loc10_4.2 (%.f37) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = specific_impl_function %impl.elem0.loc10_4.1, @I.WithSelf.DoIt(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %I.WithSelf.DoIt.call: init %empty_tuple.type = call %specific_impl_fn.loc10_4.1() // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -460,17 +461,17 @@ fn F2(U:! Z) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %I.Make.type: type = fn_type @I.Make [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.Make.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.Make.decl [concrete] // CHECK:STDOUT: %T: %I.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] // CHECK:STDOUT: %.e9e: Core.Form = init_form %T.binding.as_type, call_param0 [symbolic] // CHECK:STDOUT: %pattern_type.422: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %I.WithSelf.Make.type.f20: type = fn_type @I.WithSelf.Make, @I(%T) [symbolic] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] -// CHECK:STDOUT: %.37d: type = fn_type_with_self_type %I.Make.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem0: %.37d = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.Make(%T) [symbolic] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %I.WithSelf.Make.type.f20, %T [symbolic] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.WithSelf.Make(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -482,9 +483,10 @@ fn F2(U:! Z) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_8.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %.loc10_11.2: type = fn_type_with_self_type constants.%I.Make.type, %T.loc8_8.1 [symbolic = %.loc10_11.2 (constants.%.37d)] -// CHECK:STDOUT: %impl.elem0.loc10_11.2: @Use.%.loc10_11.2 (%.37d) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc10_11.2: = specific_impl_function %impl.elem0.loc10_11.2, @I.Make(%T.loc8_8.1) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %I.WithSelf.Make.type: type = fn_type @I.WithSelf.Make, @I(%T.loc8_8.1) [symbolic = %I.WithSelf.Make.type (constants.%I.WithSelf.Make.type.f20)] +// CHECK:STDOUT: %.loc10_11.2: type = fn_type_with_self_type %I.WithSelf.Make.type, %T.loc8_8.1 [symbolic = %.loc10_11.2 (constants.%.8e2)] +// CHECK:STDOUT: %impl.elem0.loc10_11.2: @Use.%.loc10_11.2 (%.8e2) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc10_11.2: = specific_impl_function %impl.elem0.loc10_11.2, @I.WithSelf.Make(%T.loc8_8.1) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: @Use.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: @@ -492,11 +494,11 @@ fn F2(U:! Z) { // CHECK:STDOUT: %T.as_type.loc10: type = facet_access_type %T.ref.loc10 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc10_11.1: type = converted %T.ref.loc10, %T.as_type.loc10 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %Make.ref: %I.assoc_type = name_ref Make, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc10_11.1: @Use.%.loc10_11.2 (%.37d) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc10_11.1: = specific_impl_function %impl.elem0.loc10_11.1, @I.Make(constants.%T) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %impl.elem0.loc10_11.1: @Use.%.loc10_11.2 (%.8e2) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc10_11.1: = specific_impl_function %impl.elem0.loc10_11.1, @I.WithSelf.Make(constants.%T) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: %I.Make.call: init @Use.%T.binding.as_type (%T.binding.as_type) to %.loc8_18.1 = call %specific_impl_fn.loc10_11.1() -// CHECK:STDOUT: return %I.Make.call to %return.param +// CHECK:STDOUT: %I.WithSelf.Make.call: init @Use.%T.binding.as_type (%T.binding.as_type) to %.loc8_18.1 = call %specific_impl_fn.loc10_11.1() +// CHECK:STDOUT: return %I.WithSelf.Make.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -511,9 +513,8 @@ fn F2(U:! Z) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %I.Copy.type: type = fn_type @I.Copy [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.Copy.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.Copy.decl [concrete] // CHECK:STDOUT: %T: %I.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.9d9: type = pattern_type %I.type [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] @@ -522,10 +523,11 @@ fn F2(U:! Z) { // CHECK:STDOUT: %Use.type: type = fn_type @Use [concrete] // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %I.WithSelf.Copy.type.035: type = fn_type @I.WithSelf.Copy, @I(%T) [symbolic] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] -// CHECK:STDOUT: %.854: type = fn_type_with_self_type %I.Copy.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem0: %.854 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.Copy(%T) [symbolic] +// CHECK:STDOUT: %.fa6: type = fn_type_with_self_type %I.WithSelf.Copy.type.035, %T [symbolic] +// CHECK:STDOUT: %impl.elem0: %.fa6 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.WithSelf.Copy(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -569,21 +571,22 @@ fn F2(U:! Z) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc9_8.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %.loc10: type = fn_type_with_self_type constants.%I.Copy.type, %T.loc9_8.1 [symbolic = %.loc10 (constants.%.854)] -// CHECK:STDOUT: %impl.elem0.loc10_11.2: @Use.%.loc10 (%.854) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc10_11.2: = specific_impl_function %impl.elem0.loc10_11.2, @I.Copy(%T.loc9_8.1) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %I.WithSelf.Copy.type: type = fn_type @I.WithSelf.Copy, @I(%T.loc9_8.1) [symbolic = %I.WithSelf.Copy.type (constants.%I.WithSelf.Copy.type.035)] +// CHECK:STDOUT: %.loc10: type = fn_type_with_self_type %I.WithSelf.Copy.type, %T.loc9_8.1 [symbolic = %.loc10 (constants.%.fa6)] +// CHECK:STDOUT: %impl.elem0.loc10_11.2: @Use.%.loc10 (%.fa6) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc10_11.2: = specific_impl_function %impl.elem0.loc10_11.2, @I.WithSelf.Copy(%T.loc9_8.1) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Use.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @Use.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @Use.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x // CHECK:STDOUT: %Copy.ref: %I.assoc_type = name_ref Copy, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc10_11.1: @Use.%.loc10 (%.854) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc10_11.1: @Use.%.loc10 (%.fa6) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc10_11: = bound_method %x.ref, %impl.elem0.loc10_11.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_11.1: = specific_impl_function %impl.elem0.loc10_11.1, @I.Copy(constants.%T) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc10_11.1: = specific_impl_function %impl.elem0.loc10_11.1, @I.WithSelf.Copy(constants.%T) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc10_17: = bound_method %x.ref, %specific_impl_fn.loc10_11.1 // CHECK:STDOUT: %.loc9_24.1: ref @Use.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %I.Copy.call: init @Use.%T.binding.as_type (%T.binding.as_type) to %.loc9_24.1 = call %bound_method.loc10_17(%x.ref) -// CHECK:STDOUT: return %I.Copy.call to %return.param +// CHECK:STDOUT: %I.WithSelf.Copy.call: init @Use.%T.binding.as_type (%T.binding.as_type) to %.loc9_24.1 = call %bound_method.loc10_17(%x.ref) +// CHECK:STDOUT: return %I.WithSelf.Copy.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -598,17 +601,17 @@ fn F2(U:! Z) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %I.Hello.type: type = fn_type @I.Hello [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.Hello.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.Hello.decl [concrete] // CHECK:STDOUT: %T: %I.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] // CHECK:STDOUT: %pattern_type.422: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %I.WithSelf.Hello.type.3eb: type = fn_type @I.WithSelf.Hello, @I(%T) [symbolic] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] -// CHECK:STDOUT: %.6dd: type = fn_type_with_self_type %I.Hello.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem0: %.6dd = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.Hello(%T) [symbolic] +// CHECK:STDOUT: %.8de: type = fn_type_with_self_type %I.WithSelf.Hello.type.3eb, %T [symbolic] +// CHECK:STDOUT: %impl.elem0: %.8de = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.WithSelf.Hello(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -620,17 +623,18 @@ fn F2(U:! Z) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_8.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %.loc10: type = fn_type_with_self_type constants.%I.Hello.type, %T.loc8_8.1 [symbolic = %.loc10 (constants.%.6dd)] -// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Use.%.loc10 (%.6dd) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @I.Hello(%T.loc8_8.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %I.WithSelf.Hello.type: type = fn_type @I.WithSelf.Hello, @I(%T.loc8_8.1) [symbolic = %I.WithSelf.Hello.type (constants.%I.WithSelf.Hello.type.3eb)] +// CHECK:STDOUT: %.loc10: type = fn_type_with_self_type %I.WithSelf.Hello.type, %T.loc8_8.1 [symbolic = %.loc10 (constants.%.8de)] +// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Use.%.loc10 (%.8de) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @I.WithSelf.Hello(%T.loc8_8.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Use.%T.binding.as_type (%T.binding.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @Use.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x // CHECK:STDOUT: %Hello.ref: %I.assoc_type = name_ref Hello, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Use.%.loc10 (%.6dd) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = specific_impl_function %impl.elem0.loc10_4.1, @I.Hello(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %I.Hello.call: init %empty_tuple.type = call %specific_impl_fn.loc10_4.1() +// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Use.%.loc10 (%.8de) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = specific_impl_function %impl.elem0.loc10_4.1, @I.WithSelf.Hello(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %I.WithSelf.Hello.call: init %empty_tuple.type = call %specific_impl_fn.loc10_4.1() // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -645,17 +649,17 @@ fn F2(U:! Z) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] -// CHECK:STDOUT: %I.Copy.type: type = fn_type @I.Copy [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.Copy.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.Copy.decl [concrete] // CHECK:STDOUT: %T: %I.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] // CHECK:STDOUT: %pattern_type.422: type = pattern_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %.f4c: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] +// CHECK:STDOUT: %I.WithSelf.Copy.type.035: type = fn_type @I.WithSelf.Copy, @I(%T) [symbolic] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] -// CHECK:STDOUT: %.854: type = fn_type_with_self_type %I.Copy.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem0: %.854 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.Copy(%T) [symbolic] +// CHECK:STDOUT: %.fa6: type = fn_type_with_self_type %I.WithSelf.Copy.type.035, %T [symbolic] +// CHECK:STDOUT: %impl.elem0: %.fa6 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.WithSelf.Copy(%T) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -667,9 +671,10 @@ fn F2(U:! Z) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_16.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %.loc10_14.2: type = fn_type_with_self_type constants.%I.Copy.type, %T.loc8_16.1 [symbolic = %.loc10_14.2 (constants.%.854)] -// CHECK:STDOUT: %impl.elem0.loc10_14.2: @UseIndirect.%.loc10_14.2 (%.854) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_14.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc10_14.2: = specific_impl_function %impl.elem0.loc10_14.2, @I.Copy(%T.loc8_16.1) [symbolic = %specific_impl_fn.loc10_14.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %I.WithSelf.Copy.type: type = fn_type @I.WithSelf.Copy, @I(%T.loc8_16.1) [symbolic = %I.WithSelf.Copy.type (constants.%I.WithSelf.Copy.type.035)] +// CHECK:STDOUT: %.loc10_14.2: type = fn_type_with_self_type %I.WithSelf.Copy.type, %T.loc8_16.1 [symbolic = %.loc10_14.2 (constants.%.fa6)] +// CHECK:STDOUT: %impl.elem0.loc10_14.2: @UseIndirect.%.loc10_14.2 (%.fa6) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_14.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc10_14.2: = specific_impl_function %impl.elem0.loc10_14.2, @I.WithSelf.Copy(%T.loc8_16.1) [symbolic = %specific_impl_fn.loc10_14.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @UseIndirect.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @UseIndirect.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: @@ -678,13 +683,13 @@ fn F2(U:! Z) { // CHECK:STDOUT: %T.as_type.loc10: type = facet_access_type %T.ref.loc10 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc10_14.1: type = converted %T.ref.loc10, %T.as_type.loc10 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %Copy.ref: %I.assoc_type = name_ref Copy, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc10_14.1: @UseIndirect.%.loc10_14.2 (%.854) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_14.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc10_14.1: @UseIndirect.%.loc10_14.2 (%.fa6) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_14.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc10_11: = bound_method %x.ref, %impl.elem0.loc10_14.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_14.1: = specific_impl_function %impl.elem0.loc10_14.1, @I.Copy(constants.%T) [symbolic = %specific_impl_fn.loc10_14.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc10_14.1: = specific_impl_function %impl.elem0.loc10_14.1, @I.WithSelf.Copy(constants.%T) [symbolic = %specific_impl_fn.loc10_14.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc10_21: = bound_method %x.ref, %specific_impl_fn.loc10_14.1 // CHECK:STDOUT: -// CHECK:STDOUT: %I.Copy.call: init @UseIndirect.%T.binding.as_type (%T.binding.as_type) to %.loc8_32.1 = call %bound_method.loc10_21(%x.ref) -// CHECK:STDOUT: return %I.Copy.call to %return.param +// CHECK:STDOUT: %I.WithSelf.Copy.call: init @UseIndirect.%T.binding.as_type (%T.binding.as_type) to %.loc8_32.1 = call %bound_method.loc10_21(%x.ref) +// CHECK:STDOUT: return %I.WithSelf.Copy.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -699,6 +704,7 @@ fn F2(U:! Z) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] +// CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete] // CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, @A.%X [concrete] // CHECK:STDOUT: %.Self.091: %A.type = symbolic_binding .Self [symbolic_self] @@ -712,6 +718,7 @@ fn F2(U:! Z) { // CHECK:STDOUT: %pattern_type.dc8: type = pattern_type %A_where.type [concrete] // CHECK:STDOUT: %AA.binding.as_type: type = symbolic_binding_type AA, 0, %AA [symbolic] // CHECK:STDOUT: %A.lookup_impl_witness.6c3: = lookup_impl_witness %AA, @A [symbolic] +// CHECK:STDOUT: %A.facet: %A.type = facet_value %AA.binding.as_type, (%A.lookup_impl_witness.6c3) [symbolic] // CHECK:STDOUT: %.842: Core.Form = init_form %empty_tuple.type, call_param0 [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -722,6 +729,7 @@ fn F2(U:! Z) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { +// CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {} // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %AA.patt: %pattern_type.dc8 = symbolic_binding_pattern AA, 0 [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.cb1 = return_slot_pattern [concrete] @@ -755,6 +763,23 @@ fn F2(U:! Z) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: interface @A { +// CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %X: type = assoc_const_decl @X [concrete] { +// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, @A.%X [concrete = constants.%assoc0] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .X = @X.%assoc0 +// CHECK:STDOUT: witness = (%X) +// CHECK:STDOUT: +// CHECK:STDOUT: !requires: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%AA.loc6_6.2: %A_where.type) { // CHECK:STDOUT: %AA.loc6_6.1: %A_where.type = symbolic_binding AA, 0 [symbolic = %AA.loc6_6.1 (constants.%AA)] // CHECK:STDOUT: %AA.binding.as_type: type = symbolic_binding_type AA, 0, %AA.loc6_6.1 [symbolic = %AA.binding.as_type (constants.%AA.binding.as_type)] @@ -771,6 +796,22 @@ fn F2(U:! Z) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%.Self.091) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%AA) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%A.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%AA) { // CHECK:STDOUT: %AA.loc6_6.1 => constants.%AA // CHECK:STDOUT: %AA.binding.as_type => constants.%AA.binding.as_type @@ -782,16 +823,16 @@ fn F2(U:! Z) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete] -// CHECK:STDOUT: %assoc0.c5a: %A.assoc_type = assoc_entity element0, @A.%X [concrete] +// CHECK:STDOUT: %assoc0.df7: %A.assoc_type = assoc_entity element0, @A.%X [concrete] // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete] // CHECK:STDOUT: %B.assoc_type: type = assoc_entity_type @B [concrete] -// CHECK:STDOUT: %assoc0.a7f: %B.assoc_type = assoc_entity element0, @B.%Y [concrete] +// CHECK:STDOUT: %assoc0.6fa: %B.assoc_type = assoc_entity element0, @B.%Y [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %A.type, %type.as.BitAndWith.impl.Op [concrete] @@ -835,14 +876,14 @@ fn F2(U:! Z) { // CHECK:STDOUT: %AB.ref: %facet_type.82c = name_ref AB, %AB.loc14_6.2 [symbolic = %AB.loc14_6.1 (constants.%AB)] // CHECK:STDOUT: %AB.as_type: type = facet_access_type %AB.ref [symbolic = %AB.binding.as_type (constants.%AB.binding.as_type)] // CHECK:STDOUT: %.loc14_49.1: type = converted %AB.ref, %AB.as_type [symbolic = %AB.binding.as_type (constants.%AB.binding.as_type)] -// CHECK:STDOUT: %X.ref.loc14_49: %A.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.c5a] +// CHECK:STDOUT: %X.ref.loc14_49: %A.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.df7] // CHECK:STDOUT: %impl.elem0.loc14_49: type = impl_witness_access constants.%A.lookup_impl_witness.1b9, element0 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc14_49.2: Core.Form = init_form %impl.elem0.loc14_49, call_param0 [concrete = constants.%.842] // CHECK:STDOUT: %.loc14_17.1: type = splice_block %.loc14_17.2 [concrete = constants.%facet_type.82c] { // CHECK:STDOUT: // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %impl.elem0.loc14_13: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc14_13: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %A.ref, %impl.elem0.loc14_13 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%A.ref, %B.ref) [concrete = constants.%facet_type.9bb] // CHECK:STDOUT: %.loc14_13.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.9bb] @@ -851,14 +892,14 @@ fn F2(U:! Z) { // CHECK:STDOUT: %.Self.ref.loc14_23: %facet_type.9bb = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.e7e] // CHECK:STDOUT: %.Self.as_type.loc14_23: type = facet_access_type %.Self.ref.loc14_23 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc14_23: type = converted %.Self.ref.loc14_23, %.Self.as_type.loc14_23 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %X.ref.loc14_23: %A.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.c5a] +// CHECK:STDOUT: %X.ref.loc14_23: %A.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.df7] // CHECK:STDOUT: %impl.elem0.loc14_23: type = impl_witness_access constants.%A.lookup_impl_witness.6b3, element0 [symbolic_self = constants.%impl.elem0.eb8] // CHECK:STDOUT: %.loc14_29.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc14_29.2: type = converted %.loc14_29.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.Self.ref.loc14_35: %facet_type.9bb = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.e7e] // CHECK:STDOUT: %.Self.as_type.loc14_35: type = facet_access_type %.Self.ref.loc14_35 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc14_35: type = converted %.Self.ref.loc14_35, %.Self.as_type.loc14_35 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %Y.ref: %B.assoc_type = name_ref Y, @Y.%assoc0 [concrete = constants.%assoc0.a7f] +// CHECK:STDOUT: %Y.ref: %B.assoc_type = name_ref Y, @Y.%assoc0 [concrete = constants.%assoc0.6fa] // CHECK:STDOUT: %impl.elem0.loc14_35: type = impl_witness_access constants.%B.lookup_impl_witness.d4f, element0 [symbolic_self = constants.%impl.elem0.11d] // CHECK:STDOUT: %.loc14_41.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc14_41.2: type = converted %.loc14_41.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] @@ -880,14 +921,14 @@ fn F2(U:! Z) { // CHECK:STDOUT: %AB.ref: %facet_type.82c = name_ref AB, %AB.loc18_6.2 [symbolic = %AB.loc18_6.1 (constants.%AB)] // CHECK:STDOUT: %AB.as_type: type = facet_access_type %AB.ref [symbolic = %AB.binding.as_type (constants.%AB.binding.as_type)] // CHECK:STDOUT: %.loc18_49.1: type = converted %AB.ref, %AB.as_type [symbolic = %AB.binding.as_type (constants.%AB.binding.as_type)] -// CHECK:STDOUT: %Y.ref.loc18_49: %B.assoc_type = name_ref Y, @Y.%assoc0 [concrete = constants.%assoc0.a7f] +// CHECK:STDOUT: %Y.ref.loc18_49: %B.assoc_type = name_ref Y, @Y.%assoc0 [concrete = constants.%assoc0.6fa] // CHECK:STDOUT: %impl.elem0.loc18_49: type = impl_witness_access constants.%B.lookup_impl_witness.97b, element0 [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc18_49.2: Core.Form = init_form %impl.elem0.loc18_49, call_param0 [concrete = constants.%.dde] // CHECK:STDOUT: %.loc18_17.1: type = splice_block %.loc18_17.2 [concrete = constants.%facet_type.82c] { // CHECK:STDOUT: // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %impl.elem0.loc18_13: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc18_13: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %A.ref, %impl.elem0.loc18_13 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%A.ref, %B.ref) [concrete = constants.%facet_type.9bb] // CHECK:STDOUT: %.loc18_13.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.9bb] @@ -896,14 +937,14 @@ fn F2(U:! Z) { // CHECK:STDOUT: %.Self.ref.loc18_23: %facet_type.9bb = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.e7e] // CHECK:STDOUT: %.Self.as_type.loc18_23: type = facet_access_type %.Self.ref.loc18_23 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc18_23: type = converted %.Self.ref.loc18_23, %.Self.as_type.loc18_23 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %X.ref: %A.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.c5a] +// CHECK:STDOUT: %X.ref: %A.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.df7] // CHECK:STDOUT: %impl.elem0.loc18_23: type = impl_witness_access constants.%A.lookup_impl_witness.6b3, element0 [symbolic_self = constants.%impl.elem0.eb8] // CHECK:STDOUT: %.loc18_29.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc18_29.2: type = converted %.loc18_29.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.Self.ref.loc18_35: %facet_type.9bb = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.e7e] // CHECK:STDOUT: %.Self.as_type.loc18_35: type = facet_access_type %.Self.ref.loc18_35 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc18_35: type = converted %.Self.ref.loc18_35, %.Self.as_type.loc18_35 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %Y.ref.loc18_35: %B.assoc_type = name_ref Y, @Y.%assoc0 [concrete = constants.%assoc0.a7f] +// CHECK:STDOUT: %Y.ref.loc18_35: %B.assoc_type = name_ref Y, @Y.%assoc0 [concrete = constants.%assoc0.6fa] // CHECK:STDOUT: %impl.elem0.loc18_35: type = impl_witness_access constants.%B.lookup_impl_witness.d4f, element0 [symbolic_self = constants.%impl.elem0.11d] // CHECK:STDOUT: %.loc18_41.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc18_41.2: type = converted %.loc18_41.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] diff --git a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon index 435ed313714a..1060a208ca33 100644 --- a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon +++ b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon @@ -52,38 +52,43 @@ fn F() { // CHECK:STDOUT: %Self.61e: %Empty.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %Self.c51: %A.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %A.AA.type: type = fn_type @A.AA [concrete] +// CHECK:STDOUT: %A.WithSelf.AA.type.236: type = fn_type @A.WithSelf.AA, @A(%Self.c51) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %A.AA: %A.AA.type = struct_value () [concrete] +// CHECK:STDOUT: %A.WithSelf.AA.0c0: %A.WithSelf.AA.type.236 = struct_value () [symbolic] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete] -// CHECK:STDOUT: %assoc0.206: %A.assoc_type = assoc_entity element0, @A.%A.AA.decl [concrete] +// CHECK:STDOUT: %assoc0.a62: %A.assoc_type = assoc_entity element0, @A.%A.WithSelf.AA.decl [concrete] // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete] // CHECK:STDOUT: %Self.d0b: %B.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %B.BB.type: type = fn_type @B.BB [concrete] -// CHECK:STDOUT: %B.BB: %B.BB.type = struct_value () [concrete] +// CHECK:STDOUT: %B.WithSelf.BB.type.17c: type = fn_type @B.WithSelf.BB, @B(%Self.d0b) [symbolic] +// CHECK:STDOUT: %B.WithSelf.BB.f00: %B.WithSelf.BB.type.17c = struct_value () [symbolic] // CHECK:STDOUT: %B.assoc_type: type = assoc_entity_type @B [concrete] -// CHECK:STDOUT: %assoc0.296: %B.assoc_type = assoc_entity element0, @B.%B.BB.decl [concrete] +// CHECK:STDOUT: %assoc0.00a: %B.assoc_type = assoc_entity element0, @B.%B.WithSelf.BB.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Empty.impl_witness: = impl_witness @C.as.Empty.impl.%Empty.impl_witness_table [concrete] +// CHECK:STDOUT: %Empty.facet: %Empty.type = facet_value %C, (%Empty.impl_witness) [concrete] // CHECK:STDOUT: %A.impl_witness: = impl_witness @C.as.A.impl.%A.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.A.impl.AA.type: type = fn_type @C.as.A.impl.AA [concrete] // CHECK:STDOUT: %C.as.A.impl.AA: %C.as.A.impl.AA.type = struct_value () [concrete] // CHECK:STDOUT: %A.facet.34f: %A.type = facet_value %C, (%A.impl_witness) [concrete] +// CHECK:STDOUT: %A.WithSelf.AA.type.6ff: type = fn_type @A.WithSelf.AA, @A(%A.facet.34f) [concrete] +// CHECK:STDOUT: %A.WithSelf.AA.ff5: %A.WithSelf.AA.type.6ff = struct_value () [concrete] // CHECK:STDOUT: %B.impl_witness: = impl_witness @C.as.B.impl.%B.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.B.impl.BB.type: type = fn_type @C.as.B.impl.BB [concrete] // CHECK:STDOUT: %C.as.B.impl.BB: %C.as.B.impl.BB.type = struct_value () [concrete] // CHECK:STDOUT: %B.facet.e93: %B.type = facet_value %C, (%B.impl_witness) [concrete] +// CHECK:STDOUT: %B.WithSelf.BB.type.f5e: type = fn_type @B.WithSelf.BB, @B(%B.facet.e93) [concrete] +// CHECK:STDOUT: %B.WithSelf.BB.09b: %B.WithSelf.BB.type.f5e = struct_value () [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound.05b: = bound_method %A.type, %type.as.BitAndWith.impl.Op [concrete] @@ -97,16 +102,24 @@ fn F() { // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %A.WithSelf.AA.type.ce6: type = fn_type @A.WithSelf.AA, @A(%T) [symbolic] +// CHECK:STDOUT: %A.WithSelf.AA.020: %A.WithSelf.AA.type.ce6 = struct_value () [symbolic] +// CHECK:STDOUT: %B.WithSelf.BB.type.374: type = fn_type @B.WithSelf.BB, @B(%T) [symbolic] +// CHECK:STDOUT: %B.WithSelf.BB.1c2: %B.WithSelf.BB.type.374 = struct_value () [symbolic] // CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T, @A [symbolic] // CHECK:STDOUT: %A.facet.095: %A.type = facet_value %T.binding.as_type, (%A.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.b5f: type = fn_type_with_self_type %A.AA.type, %A.facet.095 [symbolic] -// CHECK:STDOUT: %impl.elem0.b2c: %.b5f = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.1dc: = specific_impl_function %impl.elem0.b2c, @A.AA(%A.facet.095) [symbolic] +// CHECK:STDOUT: %A.WithSelf.AA.type.7b2: type = fn_type @A.WithSelf.AA, @A(%A.facet.095) [symbolic] +// CHECK:STDOUT: %A.WithSelf.AA.11e: %A.WithSelf.AA.type.7b2 = struct_value () [symbolic] +// CHECK:STDOUT: %.84b: type = fn_type_with_self_type %A.WithSelf.AA.type.7b2, %A.facet.095 [symbolic] +// CHECK:STDOUT: %impl.elem0.26a: %.84b = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.567: = specific_impl_function %impl.elem0.26a, @A.WithSelf.AA(%A.facet.095) [symbolic] // CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T, @B [symbolic] // CHECK:STDOUT: %B.facet.0e7: %B.type = facet_value %T.binding.as_type, (%B.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.052: type = fn_type_with_self_type %B.BB.type, %B.facet.0e7 [symbolic] -// CHECK:STDOUT: %impl.elem0.ad8: %.052 = impl_witness_access %B.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.586: = specific_impl_function %impl.elem0.ad8, @B.BB(%B.facet.0e7) [symbolic] +// CHECK:STDOUT: %B.WithSelf.BB.type.5a2: type = fn_type @B.WithSelf.BB, @B(%B.facet.0e7) [symbolic] +// CHECK:STDOUT: %B.WithSelf.BB.b76: %B.WithSelf.BB.type.5a2 = struct_value () [symbolic] +// CHECK:STDOUT: %.dfd: type = fn_type_with_self_type %B.WithSelf.BB.type.5a2, %B.facet.0e7 [symbolic] +// CHECK:STDOUT: %impl.elem0.557: %.dfd = impl_witness_access %B.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.fc3: = specific_impl_function %impl.elem0.557, @B.WithSelf.BB(%B.facet.0e7) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -117,8 +130,8 @@ fn F() { // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] -// CHECK:STDOUT: %.f6a: type = fn_type_with_self_type %A.AA.type, %A.facet.34f [concrete] -// CHECK:STDOUT: %.d63: type = fn_type_with_self_type %B.BB.type, %B.facet.e93 [concrete] +// CHECK:STDOUT: %.171: type = fn_type_with_self_type %A.WithSelf.AA.type.6ff, %A.facet.34f [concrete] +// CHECK:STDOUT: %.e04: type = fn_type_with_self_type %B.WithSelf.BB.type.f5e, %B.facet.e93 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -170,11 +183,11 @@ fn F() { // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %A.ref.loc33: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [concrete = constants.%Empty.type] -// CHECK:STDOUT: %impl.elem0.loc33_12: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc33_12: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc33_12: = bound_method %A.ref.loc33, %impl.elem0.loc33_12 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.05b] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc33_12: init type = call %bound_method.loc33_12(%A.ref.loc33, %Empty.ref) [concrete = constants.%facet_type.902] // CHECK:STDOUT: %B.ref.loc33: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %impl.elem0.loc33_20: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc33_20: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc33_20: = bound_method %type.as.BitAndWith.impl.Op.call.loc33_12, %impl.elem0.loc33_20 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.ab2] // CHECK:STDOUT: %.loc33_12.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc33_12 [concrete = constants.%facet_type.902] // CHECK:STDOUT: %.loc33_12.2: type = converted %type.as.BitAndWith.impl.Op.call.loc33_12, %.loc33_12.1 [concrete = constants.%facet_type.902] @@ -196,6 +209,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { // CHECK:STDOUT: %Self: %Empty.type = symbolic_binding Self, 0 [symbolic = constants.%Self.61e] +// CHECK:STDOUT: interface_with_self_decl @Empty [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -207,29 +221,35 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { -// CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c51] -// CHECK:STDOUT: %A.AA.decl: %A.AA.type = fn_decl @A.AA [concrete = constants.%A.AA] {} {} -// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.AA.decl [concrete = constants.%assoc0.206] +// CHECK:STDOUT: %Self.loc17: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c51] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %A.WithSelf.AA.decl: @A.%A.WithSelf.AA.type (%A.WithSelf.AA.type.236) = fn_decl @A.WithSelf.AA [symbolic = @A.%A.WithSelf.AA (constants.%A.WithSelf.AA.0c0)] {} {} +// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.WithSelf.AA.decl [concrete = constants.%assoc0.a62] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc17 // CHECK:STDOUT: .AA = %assoc0 // CHECK:STDOUT: .BB = -// CHECK:STDOUT: witness = (%A.AA.decl) +// CHECK:STDOUT: witness = (%A.WithSelf.AA.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @B { -// CHECK:STDOUT: %Self: %B.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d0b] -// CHECK:STDOUT: %B.BB.decl: %B.BB.type = fn_decl @B.BB [concrete = constants.%B.BB] {} {} -// CHECK:STDOUT: %assoc0: %B.assoc_type = assoc_entity element0, %B.BB.decl [concrete = constants.%assoc0.296] +// CHECK:STDOUT: %Self.loc20: %B.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d0b] +// CHECK:STDOUT: interface_with_self_decl @B [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %B.WithSelf.BB.decl: @B.%B.WithSelf.BB.type (%B.WithSelf.BB.type.17c) = fn_decl @B.WithSelf.BB [symbolic = @B.%B.WithSelf.BB (constants.%B.WithSelf.BB.f00)] {} {} +// CHECK:STDOUT: %assoc0: %B.assoc_type = assoc_entity element0, %B.WithSelf.BB.decl [concrete = constants.%assoc0.00a] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc20 // CHECK:STDOUT: .BB = %assoc0 // CHECK:STDOUT: .AA = -// CHECK:STDOUT: witness = (%B.BB.decl) +// CHECK:STDOUT: witness = (%B.WithSelf.BB.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -270,11 +290,11 @@ fn F() { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @A.AA(@A.%Self: %A.type) { +// CHECK:STDOUT: generic fn @A.WithSelf.AA(@A.%Self.loc17: %A.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @B.BB(@B.%Self: %B.type) { +// CHECK:STDOUT: generic fn @B.WithSelf.BB(@B.%Self.loc20: %B.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -297,59 +317,61 @@ fn F() { // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc33_6.1, @A [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] // CHECK:STDOUT: %A.facet.loc34: %A.type = facet_value %T.binding.as_type, (%A.lookup_impl_witness) [symbolic = %A.facet.loc34 (constants.%A.facet.095)] -// CHECK:STDOUT: %.loc34: type = fn_type_with_self_type constants.%A.AA.type, %A.facet.loc34 [symbolic = %.loc34 (constants.%.b5f)] -// CHECK:STDOUT: %impl.elem0.loc34_4.2: @G.%.loc34 (%.b5f) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.b2c)] -// CHECK:STDOUT: %specific_impl_fn.loc34_4.2: = specific_impl_function %impl.elem0.loc34_4.2, @A.AA(%A.facet.loc34) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.1dc)] +// CHECK:STDOUT: %A.WithSelf.AA.type: type = fn_type @A.WithSelf.AA, @A(%A.facet.loc34) [symbolic = %A.WithSelf.AA.type (constants.%A.WithSelf.AA.type.7b2)] +// CHECK:STDOUT: %.loc34: type = fn_type_with_self_type %A.WithSelf.AA.type, %A.facet.loc34 [symbolic = %.loc34 (constants.%.84b)] +// CHECK:STDOUT: %impl.elem0.loc34_4.2: @G.%.loc34 (%.84b) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.26a)] +// CHECK:STDOUT: %specific_impl_fn.loc34_4.2: = specific_impl_function %impl.elem0.loc34_4.2, @A.WithSelf.AA(%A.facet.loc34) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.567)] // CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T.loc33_6.1, @B [symbolic = %B.lookup_impl_witness (constants.%B.lookup_impl_witness)] // CHECK:STDOUT: %B.facet.loc35: %B.type = facet_value %T.binding.as_type, (%B.lookup_impl_witness) [symbolic = %B.facet.loc35 (constants.%B.facet.0e7)] -// CHECK:STDOUT: %.loc35: type = fn_type_with_self_type constants.%B.BB.type, %B.facet.loc35 [symbolic = %.loc35 (constants.%.052)] -// CHECK:STDOUT: %impl.elem0.loc35_4.2: @G.%.loc35 (%.052) = impl_witness_access %B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.ad8)] -// CHECK:STDOUT: %specific_impl_fn.loc35_4.2: = specific_impl_function %impl.elem0.loc35_4.2, @B.BB(%B.facet.loc35) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.586)] +// CHECK:STDOUT: %B.WithSelf.BB.type: type = fn_type @B.WithSelf.BB, @B(%B.facet.loc35) [symbolic = %B.WithSelf.BB.type (constants.%B.WithSelf.BB.type.5a2)] +// CHECK:STDOUT: %.loc35: type = fn_type_with_self_type %B.WithSelf.BB.type, %B.facet.loc35 [symbolic = %.loc35 (constants.%.dfd)] +// CHECK:STDOUT: %impl.elem0.loc35_4.2: @G.%.loc35 (%.dfd) = impl_witness_access %B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.557)] +// CHECK:STDOUT: %specific_impl_fn.loc35_4.2: = specific_impl_function %impl.elem0.loc35_4.2, @B.WithSelf.BB(%B.facet.loc35) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.fc3)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @G.%T.binding.as_type (%T.binding.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref.loc34: @G.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t -// CHECK:STDOUT: %AA.ref.loc34: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.206] -// CHECK:STDOUT: %impl.elem0.loc34_4.1: @G.%.loc34 (%.b5f) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.b2c)] -// CHECK:STDOUT: %specific_impl_fn.loc34_4.1: = specific_impl_function %impl.elem0.loc34_4.1, @A.AA(constants.%A.facet.095) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.1dc)] -// CHECK:STDOUT: %A.AA.call.loc34: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1() +// CHECK:STDOUT: %AA.ref.loc34: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.a62] +// CHECK:STDOUT: %impl.elem0.loc34_4.1: @G.%.loc34 (%.84b) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.26a)] +// CHECK:STDOUT: %specific_impl_fn.loc34_4.1: = specific_impl_function %impl.elem0.loc34_4.1, @A.WithSelf.AA(constants.%A.facet.095) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.567)] +// CHECK:STDOUT: %A.WithSelf.AA.call.loc34: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1() // CHECK:STDOUT: %t.ref.loc35: @G.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t -// CHECK:STDOUT: %BB.ref.loc35: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.296] -// CHECK:STDOUT: %impl.elem0.loc35_4.1: @G.%.loc35 (%.052) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.ad8)] -// CHECK:STDOUT: %specific_impl_fn.loc35_4.1: = specific_impl_function %impl.elem0.loc35_4.1, @B.BB(constants.%B.facet.0e7) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.586)] -// CHECK:STDOUT: %B.BB.call.loc35: init %empty_tuple.type = call %specific_impl_fn.loc35_4.1() +// CHECK:STDOUT: %BB.ref.loc35: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.00a] +// CHECK:STDOUT: %impl.elem0.loc35_4.1: @G.%.loc35 (%.dfd) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.557)] +// CHECK:STDOUT: %specific_impl_fn.loc35_4.1: = specific_impl_function %impl.elem0.loc35_4.1, @B.WithSelf.BB(constants.%B.facet.0e7) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.fc3)] +// CHECK:STDOUT: %B.WithSelf.BB.call.loc35: init %empty_tuple.type = call %specific_impl_fn.loc35_4.1() // CHECK:STDOUT: %T.ref.loc37: %facet_type.dc7 = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc37: type = facet_access_type %T.ref.loc37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc37: type = converted %T.ref.loc37, %T.as_type.loc37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %AA.ref.loc37: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.206] -// CHECK:STDOUT: %impl.elem0.loc37: @G.%.loc34 (%.b5f) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.b2c)] -// CHECK:STDOUT: %specific_impl_fn.loc37: = specific_impl_function %impl.elem0.loc37, @A.AA(constants.%A.facet.095) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.1dc)] -// CHECK:STDOUT: %A.AA.call.loc37: init %empty_tuple.type = call %specific_impl_fn.loc37() +// CHECK:STDOUT: %AA.ref.loc37: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.a62] +// CHECK:STDOUT: %impl.elem0.loc37: @G.%.loc34 (%.84b) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.26a)] +// CHECK:STDOUT: %specific_impl_fn.loc37: = specific_impl_function %impl.elem0.loc37, @A.WithSelf.AA(constants.%A.facet.095) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.567)] +// CHECK:STDOUT: %A.WithSelf.AA.call.loc37: init %empty_tuple.type = call %specific_impl_fn.loc37() // CHECK:STDOUT: %T.ref.loc38: %facet_type.dc7 = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc38: type = facet_access_type %T.ref.loc38 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc38: type = converted %T.ref.loc38, %T.as_type.loc38 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %BB.ref.loc38: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.296] -// CHECK:STDOUT: %impl.elem0.loc38: @G.%.loc35 (%.052) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.ad8)] -// CHECK:STDOUT: %specific_impl_fn.loc38: = specific_impl_function %impl.elem0.loc38, @B.BB(constants.%B.facet.0e7) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.586)] -// CHECK:STDOUT: %B.BB.call.loc38: init %empty_tuple.type = call %specific_impl_fn.loc38() +// CHECK:STDOUT: %BB.ref.loc38: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.00a] +// CHECK:STDOUT: %impl.elem0.loc38: @G.%.loc35 (%.dfd) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.557)] +// CHECK:STDOUT: %specific_impl_fn.loc38: = specific_impl_function %impl.elem0.loc38, @B.WithSelf.BB(constants.%B.facet.0e7) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.fc3)] +// CHECK:STDOUT: %B.WithSelf.BB.call.loc38: init %empty_tuple.type = call %specific_impl_fn.loc38() // CHECK:STDOUT: %T.ref.loc40: %facet_type.dc7 = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %A.ref.loc40: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %AA.ref.loc40: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.206] +// CHECK:STDOUT: %AA.ref.loc40: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.a62] // CHECK:STDOUT: %T.as_type.loc40: type = facet_access_type %T.ref.loc40 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %A.facet.loc40: %A.type = facet_value %T.as_type.loc40, (constants.%A.lookup_impl_witness) [symbolic = %A.facet.loc34 (constants.%A.facet.095)] // CHECK:STDOUT: %.loc40: %A.type = converted %T.ref.loc40, %A.facet.loc40 [symbolic = %A.facet.loc34 (constants.%A.facet.095)] -// CHECK:STDOUT: %impl.elem0.loc40: @G.%.loc34 (%.b5f) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.b2c)] -// CHECK:STDOUT: %specific_impl_fn.loc40: = specific_impl_function %impl.elem0.loc40, @A.AA(constants.%A.facet.095) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.1dc)] -// CHECK:STDOUT: %A.AA.call.loc40: init %empty_tuple.type = call %specific_impl_fn.loc40() +// CHECK:STDOUT: %impl.elem0.loc40: @G.%.loc34 (%.84b) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.26a)] +// CHECK:STDOUT: %specific_impl_fn.loc40: = specific_impl_function %impl.elem0.loc40, @A.WithSelf.AA(constants.%A.facet.095) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.567)] +// CHECK:STDOUT: %A.WithSelf.AA.call.loc40: init %empty_tuple.type = call %specific_impl_fn.loc40() // CHECK:STDOUT: %T.ref.loc41: %facet_type.dc7 = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %B.ref.loc41: type = name_ref B, file.%B.decl [concrete = constants.%B.type] -// CHECK:STDOUT: %BB.ref.loc41: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.296] +// CHECK:STDOUT: %BB.ref.loc41: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.00a] // CHECK:STDOUT: %T.as_type.loc41: type = facet_access_type %T.ref.loc41 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %B.facet.loc41: %B.type = facet_value %T.as_type.loc41, (constants.%B.lookup_impl_witness) [symbolic = %B.facet.loc35 (constants.%B.facet.0e7)] // CHECK:STDOUT: %.loc41: %B.type = converted %T.ref.loc41, %B.facet.loc41 [symbolic = %B.facet.loc35 (constants.%B.facet.0e7)] -// CHECK:STDOUT: %impl.elem0.loc41: @G.%.loc35 (%.052) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.ad8)] -// CHECK:STDOUT: %specific_impl_fn.loc41: = specific_impl_function %impl.elem0.loc41, @B.BB(constants.%B.facet.0e7) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.586)] -// CHECK:STDOUT: %B.BB.call.loc41: init %empty_tuple.type = call %specific_impl_fn.loc41() +// CHECK:STDOUT: %impl.elem0.loc41: @G.%.loc35 (%.dfd) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.557)] +// CHECK:STDOUT: %specific_impl_fn.loc41: = specific_impl_function %impl.elem0.loc41, @B.WithSelf.BB(constants.%B.facet.0e7) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.fc3)] +// CHECK:STDOUT: %B.WithSelf.BB.call.loc41: init %empty_tuple.type = call %specific_impl_fn.loc41() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -377,13 +399,49 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.AA(constants.%Self.c51) {} +// CHECK:STDOUT: specific @Empty(constants.%Self.61e) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @B.BB(constants.%Self.d0b) {} +// CHECK:STDOUT: specific @A(constants.%Self.c51) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc18 => constants.%Self.c51 +// CHECK:STDOUT: %A.WithSelf.AA.type => constants.%A.WithSelf.AA.type.236 +// CHECK:STDOUT: %A.WithSelf.AA => constants.%A.WithSelf.AA.0c0 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.AA(constants.%A.facet.34f) {} +// CHECK:STDOUT: specific @A.WithSelf.AA(constants.%Self.c51) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @B.BB(constants.%B.facet.e93) {} +// CHECK:STDOUT: specific @B(constants.%Self.d0b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc21 => constants.%Self.d0b +// CHECK:STDOUT: %B.WithSelf.BB.type => constants.%B.WithSelf.BB.type.17c +// CHECK:STDOUT: %B.WithSelf.BB => constants.%B.WithSelf.BB.f00 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @B.WithSelf.BB(constants.%Self.d0b) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%Empty.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%A.facet.34f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc18 => constants.%A.facet.34f +// CHECK:STDOUT: %A.WithSelf.AA.type => constants.%A.WithSelf.AA.type.6ff +// CHECK:STDOUT: %A.WithSelf.AA => constants.%A.WithSelf.AA.ff5 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.AA(constants.%A.facet.34f) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @B(constants.%B.facet.e93) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc21 => constants.%B.facet.e93 +// CHECK:STDOUT: %B.WithSelf.BB.type => constants.%B.WithSelf.BB.type.f5e +// CHECK:STDOUT: %B.WithSelf.BB => constants.%B.WithSelf.BB.09b +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @B.WithSelf.BB(constants.%B.facet.e93) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%T) { // CHECK:STDOUT: %T.loc33_6.1 => constants.%T @@ -391,9 +449,41 @@ fn F() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2ee // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.AA(constants.%A.facet.095) {} +// CHECK:STDOUT: specific @Empty(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @B.BB(constants.%B.facet.0e7) {} +// CHECK:STDOUT: specific @A(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc18 => constants.%T +// CHECK:STDOUT: %A.WithSelf.AA.type => constants.%A.WithSelf.AA.type.ce6 +// CHECK:STDOUT: %A.WithSelf.AA => constants.%A.WithSelf.AA.020 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @B(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc21 => constants.%T +// CHECK:STDOUT: %B.WithSelf.BB.type => constants.%B.WithSelf.BB.type.374 +// CHECK:STDOUT: %B.WithSelf.BB => constants.%B.WithSelf.BB.1c2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%A.facet.095) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc18 => constants.%A.facet.095 +// CHECK:STDOUT: %A.WithSelf.AA.type => constants.%A.WithSelf.AA.type.7b2 +// CHECK:STDOUT: %A.WithSelf.AA => constants.%A.WithSelf.AA.11e +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.AA(constants.%A.facet.095) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @B(constants.%B.facet.0e7) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc21 => constants.%B.facet.0e7 +// CHECK:STDOUT: %B.WithSelf.BB.type => constants.%B.WithSelf.BB.type.5a2 +// CHECK:STDOUT: %B.WithSelf.BB => constants.%B.WithSelf.BB.b76 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @B.WithSelf.BB(constants.%B.facet.0e7) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%facet_value) { // CHECK:STDOUT: %T.loc33_6.1 => constants.%facet_value @@ -404,12 +494,14 @@ fn F() { // CHECK:STDOUT: %require_complete => constants.%complete_type // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness // CHECK:STDOUT: %A.facet.loc34 => constants.%A.facet.34f -// CHECK:STDOUT: %.loc34 => constants.%.f6a +// CHECK:STDOUT: %A.WithSelf.AA.type => constants.%A.WithSelf.AA.type.6ff +// CHECK:STDOUT: %.loc34 => constants.%.171 // CHECK:STDOUT: %impl.elem0.loc34_4.2 => constants.%C.as.A.impl.AA // CHECK:STDOUT: %specific_impl_fn.loc34_4.2 => constants.%C.as.A.impl.AA // CHECK:STDOUT: %B.lookup_impl_witness => constants.%B.impl_witness // CHECK:STDOUT: %B.facet.loc35 => constants.%B.facet.e93 -// CHECK:STDOUT: %.loc35 => constants.%.d63 +// CHECK:STDOUT: %B.WithSelf.BB.type => constants.%B.WithSelf.BB.type.f5e +// CHECK:STDOUT: %.loc35 => constants.%.e04 // CHECK:STDOUT: %impl.elem0.loc35_4.2 => constants.%C.as.B.impl.BB // CHECK:STDOUT: %specific_impl_fn.loc35_4.2 => constants.%C.as.B.impl.BB // 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 90a778110709..c1d22a3cf8c3 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 @@ -32,6 +32,7 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Animal.impl_witness: = impl_witness @Goat.as.Animal.impl.%Animal.impl_witness_table [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %A: %Animal.type = symbolic_binding A, 0 [symbolic] @@ -41,7 +42,6 @@ fn F() { // CHECK:STDOUT: %WalkAnimal: %WalkAnimal.type = struct_value () [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %WalkAnimal.specific_fn: = specific_function %WalkAnimal, @WalkAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -81,6 +81,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Animal { // CHECK:STDOUT: %Self: %Animal.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Animal [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -127,6 +128,14 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Animal.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @WalkAnimal(constants.%A) { // CHECK:STDOUT: %A.loc20_15.1 => constants.%A // 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 25ff53f7615a..14de5b550f0c 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 @@ -74,10 +74,10 @@ fn G() { // CHECK:STDOUT: %Generic.generic: %Generic.type.835 = struct_value () [concrete] // CHECK:STDOUT: %Generic.type.03dff7.1: type = facet_type <@Generic, @Generic(%Scalar)> [symbolic] // CHECK:STDOUT: %Self.15d2d5.1: %Generic.type.03dff7.1 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.8aacdf.1: type = fn_type @Generic.F, @Generic(%Scalar) [symbolic] -// CHECK:STDOUT: %Generic.F.673760.1: %Generic.F.type.8aacdf.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.type.74390a.1: type = fn_type @Generic.WithSelf.F, @Generic(%Scalar, %Self.15d2d5.1) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.baf95a.1: %Generic.WithSelf.F.type.74390a.1 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.22afda.1: type = assoc_entity_type @Generic, @Generic(%Scalar) [symbolic] -// CHECK:STDOUT: %assoc0.6ba576.1: %Generic.assoc_type.22afda.1 = assoc_entity element0, @Generic.%Generic.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.e0dc00.1: %Generic.assoc_type.22afda.1 = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %GenericParam: type = class_type @GenericParam [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -85,13 +85,15 @@ fn G() { // CHECK:STDOUT: %Generic.type.498: type = facet_type <@Generic, @Generic(%GenericParam)> [concrete] // CHECK:STDOUT: %Generic.impl_witness: = impl_witness @ImplsGeneric.as.Generic.impl.%Generic.impl_witness_table [concrete] // CHECK:STDOUT: %Self.1f5: %Generic.type.498 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.0a1: type = fn_type @Generic.F, @Generic(%GenericParam) [concrete] -// CHECK:STDOUT: %Generic.F.edf: %Generic.F.type.0a1 = struct_value () [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.type.a23: type = fn_type @Generic.WithSelf.F, @Generic(%GenericParam, %Self.15d2d5.1) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.fe0: %Generic.WithSelf.F.type.a23 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.6dc: type = assoc_entity_type @Generic, @Generic(%GenericParam) [concrete] -// CHECK:STDOUT: %assoc0.d01: %Generic.assoc_type.6dc = assoc_entity element0, @Generic.%Generic.F.decl [concrete] +// CHECK:STDOUT: %assoc0.717: %Generic.assoc_type.6dc = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [concrete] // CHECK:STDOUT: %ImplsGeneric.as.Generic.impl.F.type: type = fn_type @ImplsGeneric.as.Generic.impl.F [concrete] // CHECK:STDOUT: %ImplsGeneric.as.Generic.impl.F: %ImplsGeneric.as.Generic.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %Generic.facet: %Generic.type.498 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.type.c86: type = fn_type @Generic.WithSelf.F, @Generic(%GenericParam, %Generic.facet) [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.1fd: %Generic.WithSelf.F.type.c86 = struct_value () [concrete] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Generic.type.03dff7.2: type = facet_type <@Generic, @Generic(%T)> [symbolic] // CHECK:STDOUT: %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic] @@ -105,10 +107,10 @@ fn G() { // CHECK:STDOUT: %PassThroughToGenericMethod.type: type = fn_type @PassThroughToGenericMethod [concrete] // CHECK:STDOUT: %PassThroughToGenericMethod: %PassThroughToGenericMethod.type = struct_value () [concrete] // CHECK:STDOUT: %Self.15d2d5.2: %Generic.type.03dff7.2 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.8aacdf.2: type = fn_type @Generic.F, @Generic(%T) [symbolic] -// CHECK:STDOUT: %Generic.F.673760.2: %Generic.F.type.8aacdf.2 = struct_value () [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.type.74390a.2: type = fn_type @Generic.WithSelf.F, @Generic(%T, %Self.15d2d5.1) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.baf95a.2: %Generic.WithSelf.F.type.74390a.2 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.22afda.2: type = assoc_entity_type @Generic, @Generic(%T) [symbolic] -// CHECK:STDOUT: %assoc0.6ba576.2: %Generic.assoc_type.22afda.2 = assoc_entity element0, @Generic.%Generic.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.e0dc00.2: %Generic.assoc_type.22afda.2 = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %CallGenericMethod.specific_fn.6c1: = specific_function %CallGenericMethod, @CallGenericMethod(%T, %U) [symbolic] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] @@ -184,22 +186,21 @@ fn G() { // CHECK:STDOUT: %Scalar.loc4_19.1: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc4_19.1 (constants.%Scalar)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc4_19.1)> [symbolic = %Generic.type (constants.%Generic.type.03dff7.1)] -// CHECK:STDOUT: %Self.loc4_34.2: @Generic.%Generic.type (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.15d2d5.1)] -// CHECK:STDOUT: %Generic.F.type: type = fn_type @Generic.F, @Generic(%Scalar.loc4_19.1) [symbolic = %Generic.F.type (constants.%Generic.F.type.8aacdf.1)] -// CHECK:STDOUT: %Generic.F: @Generic.%Generic.F.type (%Generic.F.type.8aacdf.1) = struct_value () [symbolic = %Generic.F (constants.%Generic.F.673760.1)] -// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%Scalar.loc4_19.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.22afda.1)] -// CHECK:STDOUT: %assoc0.loc5_9.2: @Generic.%Generic.assoc_type (%Generic.assoc_type.22afda.1) = assoc_entity element0, %Generic.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.6ba576.1)] +// CHECK:STDOUT: %Generic.type.loc4: type = facet_type <@Generic, @Generic(%Scalar.loc4_19.1)> [symbolic = %Generic.type.loc4 (constants.%Generic.type.03dff7.1)] +// CHECK:STDOUT: %Self.loc4_34.2: @Generic.%Generic.type.loc4 (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.15d2d5.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_34.1: @Generic.%Generic.type (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.15d2d5.1)] -// CHECK:STDOUT: %Generic.F.decl: @Generic.%Generic.F.type (%Generic.F.type.8aacdf.1) = fn_decl @Generic.F [symbolic = @Generic.%Generic.F (constants.%Generic.F.673760.1)] {} {} -// CHECK:STDOUT: %assoc0.loc5_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.22afda.1) = assoc_entity element0, %Generic.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.6ba576.1)] +// CHECK:STDOUT: %Self.loc4_34.1: @Generic.%Generic.type.loc4 (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.15d2d5.1)] +// CHECK:STDOUT: interface_with_self_decl @Generic [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Generic.WithSelf.F.decl: @Generic.%Generic.WithSelf.F.type (%Generic.WithSelf.F.type.74390a.1) = fn_decl @Generic.WithSelf.F [symbolic = @Generic.%Generic.WithSelf.F (constants.%Generic.WithSelf.F.baf95a.1)] {} {} +// CHECK:STDOUT: %assoc0.loc5_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.22afda.1) = assoc_entity element0, %Generic.WithSelf.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.e0dc00.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_34.1 // CHECK:STDOUT: .F = %assoc0.loc5_9.1 -// CHECK:STDOUT: witness = (%Generic.F.decl) +// CHECK:STDOUT: witness = (%Generic.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -231,7 +232,7 @@ fn G() { // CHECK:STDOUT: .Self = constants.%ImplsGeneric // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Generic.F(@Generic.%Scalar.loc4_19.2: type, @Generic.%Self.loc4_34.1: @Generic.%Generic.type (%Generic.type.03dff7.1)) { +// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc4_19.2: type, @Generic.%Self.loc4_34.1: @Generic.%Generic.type.loc4 (%Generic.type.03dff7.1)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -302,32 +303,48 @@ fn G() { // CHECK:STDOUT: %Scalar.loc4_19.1 => constants.%Scalar // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.F(constants.%Scalar, constants.%Self.15d2d5.1) {} +// CHECK:STDOUT: specific @Generic(constants.%Scalar, constants.%Self.15d2d5.1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%Scalar, constants.%Self.15d2d5.1) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%GenericParam) { // CHECK:STDOUT: %Scalar.loc4_19.1 => constants.%GenericParam // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type => constants.%Generic.type.498 +// CHECK:STDOUT: %Generic.type.loc4 => constants.%Generic.type.498 // CHECK:STDOUT: %Self.loc4_34.2 => constants.%Self.1f5 -// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.0a1 -// CHECK:STDOUT: %Generic.F => constants.%Generic.F.edf -// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc -// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.d01 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.F(constants.%GenericParam, constants.%Generic.facet) {} +// CHECK:STDOUT: specific @Generic(constants.%GenericParam, constants.%Self.15d2d5.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc5 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc5 => constants.%Generic.type.498 +// CHECK:STDOUT: %Self.loc5 => constants.%Self.15d2d5.1 +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.a23 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.fe0 +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.717 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic(constants.%GenericParam, constants.%Generic.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc5 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc5 => constants.%Generic.type.498 +// CHECK:STDOUT: %Self.loc5 => constants.%Generic.facet +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.c86 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.1fd +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.717 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%GenericParam, constants.%Generic.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%T) { // CHECK:STDOUT: %Scalar.loc4_19.1 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type => constants.%Generic.type.03dff7.2 +// CHECK:STDOUT: %Generic.type.loc4 => constants.%Generic.type.03dff7.2 // CHECK:STDOUT: %Self.loc4_34.2 => constants.%Self.15d2d5.2 -// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.8aacdf.2 -// CHECK:STDOUT: %Generic.F => constants.%Generic.F.673760.2 -// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.22afda.2 -// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.6ba576.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U) { @@ -355,6 +372,17 @@ fn G() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c49 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic(constants.%T, constants.%Self.15d2d5.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc5 => constants.%T +// CHECK:STDOUT: %Generic.type.loc5 => constants.%Generic.type.03dff7.2 +// CHECK:STDOUT: %Self.loc5 => constants.%Self.15d2d5.1 +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.74390a.2 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.baf95a.2 +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.22afda.2 +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.e0dc00.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @PassThroughToGenericMethod(constants.%GenericParam, constants.%Generic.facet) { // CHECK:STDOUT: %T.loc21_31.1 => constants.%GenericParam // CHECK:STDOUT: %Generic.type.loc21_54.1 => constants.%Generic.type.498 @@ -377,10 +405,10 @@ fn G() { // CHECK:STDOUT: %Generic.generic: %Generic.type.835 = struct_value () [concrete] // CHECK:STDOUT: %Generic.type.03dff7.1: type = facet_type <@Generic, @Generic(%Scalar)> [symbolic] // CHECK:STDOUT: %Self.15d: %Generic.type.03dff7.1 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.8aa: type = fn_type @Generic.F, @Generic(%Scalar) [symbolic] -// CHECK:STDOUT: %Generic.F.673: %Generic.F.type.8aa = struct_value () [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.type.743: type = fn_type @Generic.WithSelf.F, @Generic(%Scalar, %Self.15d) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.baf: %Generic.WithSelf.F.type.743 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.22a: type = assoc_entity_type @Generic, @Generic(%Scalar) [symbolic] -// CHECK:STDOUT: %assoc0.6ba: %Generic.assoc_type.22a = assoc_entity element0, @Generic.%Generic.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.e0d: %Generic.assoc_type.22a = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %GenericParam: type = class_type @GenericParam [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -388,13 +416,15 @@ fn G() { // CHECK:STDOUT: %Generic.type.498: type = facet_type <@Generic, @Generic(%GenericParam)> [concrete] // CHECK:STDOUT: %Generic.impl_witness: = impl_witness @ImplsGeneric.as.Generic.impl.%Generic.impl_witness_table [concrete] // CHECK:STDOUT: %Self.1f5: %Generic.type.498 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.0a1: type = fn_type @Generic.F, @Generic(%GenericParam) [concrete] -// CHECK:STDOUT: %Generic.F.edf: %Generic.F.type.0a1 = struct_value () [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.type.a23: type = fn_type @Generic.WithSelf.F, @Generic(%GenericParam, %Self.15d) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.fe0: %Generic.WithSelf.F.type.a23 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.6dc: type = assoc_entity_type @Generic, @Generic(%GenericParam) [concrete] -// CHECK:STDOUT: %assoc0.d01: %Generic.assoc_type.6dc = assoc_entity element0, @Generic.%Generic.F.decl [concrete] +// CHECK:STDOUT: %assoc0.717: %Generic.assoc_type.6dc = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [concrete] // CHECK:STDOUT: %ImplsGeneric.as.Generic.impl.F.type: type = fn_type @ImplsGeneric.as.Generic.impl.F [concrete] // CHECK:STDOUT: %ImplsGeneric.as.Generic.impl.F: %ImplsGeneric.as.Generic.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %Generic.facet: %Generic.type.498 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.type.c86: type = fn_type @Generic.WithSelf.F, @Generic(%GenericParam, %Generic.facet) [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.1fd: %Generic.WithSelf.F.type.c86 = struct_value () [concrete] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Generic.type.03dff7.2: type = facet_type <@Generic, @Generic(%T)> [symbolic] // CHECK:STDOUT: %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic] @@ -474,22 +504,21 @@ fn G() { // CHECK:STDOUT: %Scalar.loc4_19.1: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc4_19.1 (constants.%Scalar)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc4_19.1)> [symbolic = %Generic.type (constants.%Generic.type.03dff7.1)] -// CHECK:STDOUT: %Self.loc4_34.2: @Generic.%Generic.type (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.15d)] -// CHECK:STDOUT: %Generic.F.type: type = fn_type @Generic.F, @Generic(%Scalar.loc4_19.1) [symbolic = %Generic.F.type (constants.%Generic.F.type.8aa)] -// CHECK:STDOUT: %Generic.F: @Generic.%Generic.F.type (%Generic.F.type.8aa) = struct_value () [symbolic = %Generic.F (constants.%Generic.F.673)] -// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%Scalar.loc4_19.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.22a)] -// CHECK:STDOUT: %assoc0.loc5_9.2: @Generic.%Generic.assoc_type (%Generic.assoc_type.22a) = assoc_entity element0, %Generic.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.6ba)] +// CHECK:STDOUT: %Generic.type.loc4: type = facet_type <@Generic, @Generic(%Scalar.loc4_19.1)> [symbolic = %Generic.type.loc4 (constants.%Generic.type.03dff7.1)] +// CHECK:STDOUT: %Self.loc4_34.2: @Generic.%Generic.type.loc4 (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.15d)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_34.1: @Generic.%Generic.type (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.15d)] -// CHECK:STDOUT: %Generic.F.decl: @Generic.%Generic.F.type (%Generic.F.type.8aa) = fn_decl @Generic.F [symbolic = @Generic.%Generic.F (constants.%Generic.F.673)] {} {} -// CHECK:STDOUT: %assoc0.loc5_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.22a) = assoc_entity element0, %Generic.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.6ba)] +// CHECK:STDOUT: %Self.loc4_34.1: @Generic.%Generic.type.loc4 (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.15d)] +// CHECK:STDOUT: interface_with_self_decl @Generic [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Generic.WithSelf.F.decl: @Generic.%Generic.WithSelf.F.type (%Generic.WithSelf.F.type.743) = fn_decl @Generic.WithSelf.F [symbolic = @Generic.%Generic.WithSelf.F (constants.%Generic.WithSelf.F.baf)] {} {} +// CHECK:STDOUT: %assoc0.loc5_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.22a) = assoc_entity element0, %Generic.WithSelf.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.e0d)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_34.1 // CHECK:STDOUT: .F = %assoc0.loc5_9.1 -// CHECK:STDOUT: witness = (%Generic.F.decl) +// CHECK:STDOUT: witness = (%Generic.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -521,7 +550,7 @@ fn G() { // CHECK:STDOUT: .Self = constants.%ImplsGeneric // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Generic.F(@Generic.%Scalar.loc4_19.2: type, @Generic.%Self.loc4_34.1: @Generic.%Generic.type (%Generic.type.03dff7.1)) { +// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc4_19.2: type, @Generic.%Self.loc4_34.1: @Generic.%Generic.type.loc4 (%Generic.type.03dff7.1)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -572,21 +601,41 @@ fn G() { // CHECK:STDOUT: %Scalar.loc4_19.1 => constants.%Scalar // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.F(constants.%Scalar, constants.%Self.15d) {} +// CHECK:STDOUT: specific @Generic(constants.%Scalar, constants.%Self.15d) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%Scalar, constants.%Self.15d) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%GenericParam) { // CHECK:STDOUT: %Scalar.loc4_19.1 => constants.%GenericParam // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type => constants.%Generic.type.498 +// CHECK:STDOUT: %Generic.type.loc4 => constants.%Generic.type.498 // CHECK:STDOUT: %Self.loc4_34.2 => constants.%Self.1f5 -// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.0a1 -// CHECK:STDOUT: %Generic.F => constants.%Generic.F.edf -// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc -// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.d01 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.F(constants.%GenericParam, constants.%Generic.facet) {} +// CHECK:STDOUT: specific @Generic(constants.%GenericParam, constants.%Self.15d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc5 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc5 => constants.%Generic.type.498 +// CHECK:STDOUT: %Self.loc5 => constants.%Self.15d +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.a23 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.fe0 +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.717 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic(constants.%GenericParam, constants.%Generic.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc5 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc5 => constants.%Generic.type.498 +// CHECK:STDOUT: %Self.loc5 => constants.%Generic.facet +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.c86 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.1fd +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.717 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%GenericParam, constants.%Generic.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%T) { // CHECK:STDOUT: %Scalar.loc4_19.1 => constants.%T 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 b29ee835a964..030977ad8b02 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 @@ -42,11 +42,11 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Animal.impl_witness: = impl_witness @Goat.as.Animal.impl.%Animal.impl_witness_table [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %Goat.val: %Goat = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %pattern_type.234: type = pattern_type %Goat [concrete] // CHECK:STDOUT: %WalkAnimal.specific_fn: = specific_function %WalkAnimal, @WalkAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] @@ -101,6 +101,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Animal { // CHECK:STDOUT: %Self: %Animal.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c49] +// CHECK:STDOUT: interface_with_self_decl @Animal [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -162,12 +163,20 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Self.c49) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @WalkAnimal(constants.%T) { // CHECK:STDOUT: %T.loc17_15.1 => constants.%T // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.892 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Animal.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @WalkAnimal(constants.%Animal.facet) { // CHECK:STDOUT: %T.loc17_15.1 => constants.%Animal.facet // CHECK:STDOUT: %T.binding.as_type => constants.%Goat 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 912515a8385a..14df347fdc0b 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 @@ -106,10 +106,10 @@ fn B() { // CHECK:STDOUT: %Generic.generic: %Generic.type.835 = struct_value () [concrete] // CHECK:STDOUT: %Generic.type.03dff7.1: type = facet_type <@Generic, @Generic(%Scalar)> [symbolic] // CHECK:STDOUT: %Self.15d2d5.1: %Generic.type.03dff7.1 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.8aacdf.1: type = fn_type @Generic.F, @Generic(%Scalar) [symbolic] -// CHECK:STDOUT: %Generic.F.673760.1: %Generic.F.type.8aacdf.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.type.74390a.1: type = fn_type @Generic.WithSelf.F, @Generic(%Scalar, %Self.15d2d5.1) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.baf95a.1: %Generic.WithSelf.F.type.74390a.1 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.22afda.1: type = assoc_entity_type @Generic, @Generic(%Scalar) [symbolic] -// CHECK:STDOUT: %assoc0.6ba576.1: %Generic.assoc_type.22afda.1 = assoc_entity element0, @Generic.%Generic.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.e0dc00.1: %Generic.assoc_type.22afda.1 = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %GenericParam: type = class_type @GenericParam [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] @@ -117,22 +117,24 @@ fn B() { // CHECK:STDOUT: %Generic.type.498: type = facet_type <@Generic, @Generic(%GenericParam)> [concrete] // CHECK:STDOUT: %Generic.impl_witness: = impl_witness @ImplsGeneric.as.Generic.impl.%Generic.impl_witness_table [concrete] // CHECK:STDOUT: %Self.1f5: %Generic.type.498 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.0a1: type = fn_type @Generic.F, @Generic(%GenericParam) [concrete] -// CHECK:STDOUT: %Generic.F.edf: %Generic.F.type.0a1 = struct_value () [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.type.a23: type = fn_type @Generic.WithSelf.F, @Generic(%GenericParam, %Self.15d2d5.1) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.fe0: %Generic.WithSelf.F.type.a23 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.6dc: type = assoc_entity_type @Generic, @Generic(%GenericParam) [concrete] -// CHECK:STDOUT: %assoc0.d01: %Generic.assoc_type.6dc = assoc_entity element0, @Generic.%Generic.F.decl [concrete] +// CHECK:STDOUT: %assoc0.717: %Generic.assoc_type.6dc = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [concrete] // CHECK:STDOUT: %ImplsGeneric.as.Generic.impl.F.type: type = fn_type @ImplsGeneric.as.Generic.impl.F [concrete] // CHECK:STDOUT: %ImplsGeneric.as.Generic.impl.F: %ImplsGeneric.as.Generic.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %Generic.facet: %Generic.type.498 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.type.c86: type = fn_type @Generic.WithSelf.F, @Generic(%GenericParam, %Generic.facet) [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.1fd: %Generic.WithSelf.F.type.c86 = struct_value () [concrete] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Generic.type.03dff7.2: type = facet_type <@Generic, @Generic(%T)> [symbolic] // CHECK:STDOUT: %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %pattern_type.c49: type = pattern_type %Generic.type.03dff7.2 [symbolic] // CHECK:STDOUT: %Self.15d2d5.2: %Generic.type.03dff7.2 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.8aacdf.2: type = fn_type @Generic.F, @Generic(%T) [symbolic] -// CHECK:STDOUT: %Generic.F.673760.2: %Generic.F.type.8aacdf.2 = struct_value () [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.type.74390a.2: type = fn_type @Generic.WithSelf.F, @Generic(%T, %Self.15d2d5.1) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.baf95a.2: %Generic.WithSelf.F.type.74390a.2 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.22afda.2: type = assoc_entity_type @Generic, @Generic(%T) [symbolic] -// CHECK:STDOUT: %assoc0.6ba576.2: %Generic.assoc_type.22afda.2 = assoc_entity element0, @Generic.%Generic.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.e0dc00.2: %Generic.assoc_type.22afda.2 = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %U.binding.as_type: type = symbolic_binding_type U, 1, %U [symbolic] // CHECK:STDOUT: %pattern_type.46f: type = pattern_type %U.binding.as_type [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] @@ -141,10 +143,12 @@ fn B() { // CHECK:STDOUT: %require_complete.186: = require_complete_type %U.binding.as_type [symbolic] // CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] // CHECK:STDOUT: %require_complete.7da: = require_complete_type %Generic.type.03dff7.2 [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.type.56e: type = fn_type @Generic.WithSelf.F, @Generic(%T, %U) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.a99: %Generic.WithSelf.F.type.56e = struct_value () [symbolic] // CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U, @Generic, @Generic(%T) [symbolic] -// CHECK:STDOUT: %.c48: type = fn_type_with_self_type %Generic.F.type.8aacdf.2, %U [symbolic] -// CHECK:STDOUT: %impl.elem0: %.c48 = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Generic.F(%T, %U) [symbolic] +// CHECK:STDOUT: %.ab3: type = fn_type_with_self_type %Generic.WithSelf.F.type.56e, %U [symbolic] +// CHECK:STDOUT: %impl.elem0: %.ab3 = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Generic.WithSelf.F(%T, %U) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -160,7 +164,7 @@ fn B() { // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc20_22 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.2: %DestroyOp.type.3e79c2.2 = struct_value () [concrete] // CHECK:STDOUT: %complete_type.57a: = complete_type_witness %Generic.type.498 [concrete] -// CHECK:STDOUT: %.b07: type = fn_type_with_self_type %Generic.F.type.0a1, %Generic.facet [concrete] +// CHECK:STDOUT: %.fcf: type = fn_type_with_self_type %Generic.WithSelf.F.type.c86, %Generic.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -231,22 +235,21 @@ fn B() { // CHECK:STDOUT: %Scalar.loc4_19.1: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc4_19.1 (constants.%Scalar)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc4_19.1)> [symbolic = %Generic.type (constants.%Generic.type.03dff7.1)] -// CHECK:STDOUT: %Self.loc4_34.2: @Generic.%Generic.type (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.15d2d5.1)] -// CHECK:STDOUT: %Generic.F.type: type = fn_type @Generic.F, @Generic(%Scalar.loc4_19.1) [symbolic = %Generic.F.type (constants.%Generic.F.type.8aacdf.1)] -// CHECK:STDOUT: %Generic.F: @Generic.%Generic.F.type (%Generic.F.type.8aacdf.1) = struct_value () [symbolic = %Generic.F (constants.%Generic.F.673760.1)] -// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%Scalar.loc4_19.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.22afda.1)] -// CHECK:STDOUT: %assoc0.loc5_9.2: @Generic.%Generic.assoc_type (%Generic.assoc_type.22afda.1) = assoc_entity element0, %Generic.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.6ba576.1)] +// CHECK:STDOUT: %Generic.type.loc4: type = facet_type <@Generic, @Generic(%Scalar.loc4_19.1)> [symbolic = %Generic.type.loc4 (constants.%Generic.type.03dff7.1)] +// CHECK:STDOUT: %Self.loc4_34.2: @Generic.%Generic.type.loc4 (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.15d2d5.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_34.1: @Generic.%Generic.type (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.15d2d5.1)] -// CHECK:STDOUT: %Generic.F.decl: @Generic.%Generic.F.type (%Generic.F.type.8aacdf.1) = fn_decl @Generic.F [symbolic = @Generic.%Generic.F (constants.%Generic.F.673760.1)] {} {} -// CHECK:STDOUT: %assoc0.loc5_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.22afda.1) = assoc_entity element0, %Generic.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.6ba576.1)] +// CHECK:STDOUT: %Self.loc4_34.1: @Generic.%Generic.type.loc4 (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.15d2d5.1)] +// CHECK:STDOUT: interface_with_self_decl @Generic [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Generic.WithSelf.F.decl: @Generic.%Generic.WithSelf.F.type (%Generic.WithSelf.F.type.74390a.1) = fn_decl @Generic.WithSelf.F [symbolic = @Generic.%Generic.WithSelf.F (constants.%Generic.WithSelf.F.baf95a.1)] {} {} +// CHECK:STDOUT: %assoc0.loc5_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.22afda.1) = assoc_entity element0, %Generic.WithSelf.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0.e0dc00.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_34.1 // CHECK:STDOUT: .F = %assoc0.loc5_9.1 -// CHECK:STDOUT: witness = (%Generic.F.decl) +// CHECK:STDOUT: witness = (%Generic.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -278,7 +281,7 @@ fn B() { // CHECK:STDOUT: .Self = constants.%ImplsGeneric // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Generic.F(@Generic.%Scalar.loc4_19.2: type, @Generic.%Self.loc4_34.1: @Generic.%Generic.type (%Generic.type.03dff7.1)) { +// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc4_19.2: type, @Generic.%Self.loc4_34.1: @Generic.%Generic.type.loc4 (%Generic.type.03dff7.1)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -301,23 +304,23 @@ fn B() { // CHECK:STDOUT: %require_complete.loc15_55: = require_complete_type %T.loc15_22.1 [symbolic = %require_complete.loc15_55 (constants.%require_complete.944)] // CHECK:STDOUT: %require_complete.loc16: = require_complete_type %Generic.type.loc15_45.1 [symbolic = %require_complete.loc16 (constants.%require_complete.7da)] // CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%T.loc15_22.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.22afda.2)] -// CHECK:STDOUT: %assoc0: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = assoc_entity element0, @Generic.%Generic.F.decl [symbolic = %assoc0 (constants.%assoc0.6ba576.2)] +// CHECK:STDOUT: %assoc0: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic = %assoc0 (constants.%assoc0.e0dc00.2)] // CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U.loc15_32.1, @Generic, @Generic(%T.loc15_22.1) [symbolic = %Generic.lookup_impl_witness (constants.%Generic.lookup_impl_witness)] -// CHECK:STDOUT: %Generic.F.type: type = fn_type @Generic.F, @Generic(%T.loc15_22.1) [symbolic = %Generic.F.type (constants.%Generic.F.type.8aacdf.2)] -// CHECK:STDOUT: %.loc16_4.3: type = fn_type_with_self_type %Generic.F.type, %U.loc15_32.1 [symbolic = %.loc16_4.3 (constants.%.c48)] -// CHECK:STDOUT: %impl.elem0.loc16_4.2: @CallGenericMethod.%.loc16_4.3 (%.c48) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc16_4.2: = specific_impl_function %impl.elem0.loc16_4.2, @Generic.F(%T.loc15_22.1, %U.loc15_32.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Generic.WithSelf.F.type: type = fn_type @Generic.WithSelf.F, @Generic(%T.loc15_22.1, %U.loc15_32.1) [symbolic = %Generic.WithSelf.F.type (constants.%Generic.WithSelf.F.type.56e)] +// CHECK:STDOUT: %.loc16_4.3: type = fn_type_with_self_type %Generic.WithSelf.F.type, %U.loc15_32.1 [symbolic = %.loc16_4.3 (constants.%.ab3)] +// CHECK:STDOUT: %impl.elem0.loc16_4.2: @CallGenericMethod.%.loc16_4.3 (%.ab3) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc16_4.2: = specific_impl_function %impl.elem0.loc16_4.2, @Generic.WithSelf.F(%T.loc15_22.1, %U.loc15_32.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%a.param: @CallGenericMethod.%U.binding.as_type (%U.binding.as_type), %s.param: @CallGenericMethod.%T.loc15_22.1 (%T)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %U.ref.loc16: @CallGenericMethod.%Generic.type.loc15_45.1 (%Generic.type.03dff7.2) = name_ref U, %U.loc15_32.2 [symbolic = %U.loc15_32.1 (constants.%U)] // CHECK:STDOUT: %U.as_type.loc16: type = facet_access_type %U.ref.loc16 [symbolic = %U.binding.as_type (constants.%U.binding.as_type)] // CHECK:STDOUT: %.loc16_4.1: type = converted %U.ref.loc16, %U.as_type.loc16 [symbolic = %U.binding.as_type (constants.%U.binding.as_type)] -// CHECK:STDOUT: %.loc16_4.2: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = specific_constant @Generic.%assoc0.loc5_9.1, @Generic(constants.%T) [symbolic = %assoc0 (constants.%assoc0.6ba576.2)] -// CHECK:STDOUT: %F.ref: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = name_ref F, %.loc16_4.2 [symbolic = %assoc0 (constants.%assoc0.6ba576.2)] -// CHECK:STDOUT: %impl.elem0.loc16_4.1: @CallGenericMethod.%.loc16_4.3 (%.c48) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = specific_impl_function %impl.elem0.loc16_4.1, @Generic.F(constants.%T, constants.%U) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %Generic.F.call: init %empty_tuple.type = call %specific_impl_fn.loc16_4.1() +// CHECK:STDOUT: %.loc16_4.2: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = specific_constant @Generic.%assoc0.loc5_9.1, @Generic(constants.%T, constants.%U) [symbolic = %assoc0 (constants.%assoc0.e0dc00.2)] +// CHECK:STDOUT: %F.ref: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = name_ref F, %.loc16_4.2 [symbolic = %assoc0 (constants.%assoc0.e0dc00.2)] +// CHECK:STDOUT: %impl.elem0.loc16_4.1: @CallGenericMethod.%.loc16_4.3 (%.ab3) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = specific_impl_function %impl.elem0.loc16_4.1, @Generic.WithSelf.F(constants.%T, constants.%U) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Generic.WithSelf.F.call: init %empty_tuple.type = call %specific_impl_fn.loc16_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -358,32 +361,59 @@ fn B() { // CHECK:STDOUT: %Scalar.loc4_19.1 => constants.%Scalar // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.F(constants.%Scalar, constants.%Self.15d2d5.1) {} +// CHECK:STDOUT: specific @Generic(constants.%Scalar, constants.%Self.15d2d5.1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%Scalar, constants.%Self.15d2d5.1) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%GenericParam) { // CHECK:STDOUT: %Scalar.loc4_19.1 => constants.%GenericParam // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type => constants.%Generic.type.498 +// CHECK:STDOUT: %Generic.type.loc4 => constants.%Generic.type.498 // CHECK:STDOUT: %Self.loc4_34.2 => constants.%Self.1f5 -// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.0a1 -// CHECK:STDOUT: %Generic.F => constants.%Generic.F.edf -// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc -// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.d01 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.F(constants.%GenericParam, constants.%Generic.facet) {} +// CHECK:STDOUT: specific @Generic(constants.%GenericParam, constants.%Self.15d2d5.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc5 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc5 => constants.%Generic.type.498 +// CHECK:STDOUT: %Self.loc5 => constants.%Self.15d2d5.1 +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.a23 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.fe0 +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.717 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic(constants.%GenericParam, constants.%Generic.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc5 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc5 => constants.%Generic.type.498 +// CHECK:STDOUT: %Self.loc5 => constants.%Generic.facet +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.c86 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.1fd +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.717 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%GenericParam, constants.%Generic.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%T) { // CHECK:STDOUT: %Scalar.loc4_19.1 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type => constants.%Generic.type.03dff7.2 +// CHECK:STDOUT: %Generic.type.loc4 => constants.%Generic.type.03dff7.2 // CHECK:STDOUT: %Self.loc4_34.2 => constants.%Self.15d2d5.2 -// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.8aacdf.2 -// CHECK:STDOUT: %Generic.F => constants.%Generic.F.673760.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic(constants.%T, constants.%Self.15d2d5.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc5 => constants.%T +// CHECK:STDOUT: %Generic.type.loc5 => constants.%Generic.type.03dff7.2 +// CHECK:STDOUT: %Self.loc5 => constants.%Self.15d2d5.1 +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.74390a.2 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.baf95a.2 // CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.22afda.2 -// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.6ba576.2 +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.e0dc00.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U) { @@ -396,7 +426,18 @@ fn B() { // CHECK:STDOUT: %pattern_type.loc15_54 => constants.%pattern_type.51d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.F(constants.%T, constants.%U) {} +// CHECK:STDOUT: specific @Generic(constants.%T, constants.%U) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc5 => constants.%T +// CHECK:STDOUT: %Generic.type.loc5 => constants.%Generic.type.03dff7.2 +// CHECK:STDOUT: %Self.loc5 => constants.%U +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.56e +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.a99 +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.22afda.2 +// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.e0dc00.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%T, constants.%U) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) { // CHECK:STDOUT: %T.loc15_22.1 => constants.%GenericParam @@ -412,10 +453,10 @@ fn B() { // CHECK:STDOUT: %require_complete.loc15_55 => constants.%complete_type.357 // CHECK:STDOUT: %require_complete.loc16 => constants.%complete_type.57a // CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc -// CHECK:STDOUT: %assoc0 => constants.%assoc0.d01 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.717 // CHECK:STDOUT: %Generic.lookup_impl_witness => constants.%Generic.impl_witness -// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.0a1 -// CHECK:STDOUT: %.loc16_4.3 => constants.%.b07 +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.c86 +// CHECK:STDOUT: %.loc16_4.3 => constants.%.fcf // CHECK:STDOUT: %impl.elem0.loc16_4.2 => constants.%ImplsGeneric.as.Generic.impl.F // CHECK:STDOUT: %specific_impl_fn.loc16_4.2 => constants.%ImplsGeneric.as.Generic.impl.F // CHECK:STDOUT: } @@ -442,6 +483,7 @@ fn B() { // CHECK:STDOUT: %I.impl_witness.1cb: = impl_witness @C.as.I.impl.%I.impl_witness_table, @C.as.I.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Self.061: %I.type.eb9 = symbolic_binding Self, 2 [symbolic] // CHECK:STDOUT: %require_complete.d0a: = require_complete_type %I.type.eb9 [symbolic] +// CHECK:STDOUT: %I.facet.a6e: %I.type.eb9 = facet_value %C, (%I.impl_witness.1cb) [symbolic] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %I.type.5f7: type = facet_type <@I, @I(%empty_struct_type, %empty_tuple.type)> [concrete] // CHECK:STDOUT: %T.bc3: %I.type.5f7 = symbolic_binding T, 0 [symbolic] @@ -457,9 +499,9 @@ fn B() { // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %I.impl_witness.1c4: = impl_witness @C.as.I.impl.%I.impl_witness_table, @C.as.I.impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %complete_type.1c0: = complete_type_witness %I.type.5f7 [concrete] -// CHECK:STDOUT: %I.facet: %I.type.5f7 = facet_value %C, (%I.impl_witness.1c4) [concrete] +// CHECK:STDOUT: %I.facet.0e1: %I.type.5f7 = facet_value %C, (%I.impl_witness.1c4) [concrete] // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] -// CHECK:STDOUT: %A.specific_fn: = specific_function %A, @A(%I.facet) [concrete] +// CHECK:STDOUT: %A.specific_fn: = specific_function %A, @A(%I.facet.0e1) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] @@ -541,6 +583,7 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc3_33.1: @I.%I.type (%I.type.54f) = symbolic_binding Self, 2 [symbolic = %Self.loc3_33.2 (constants.%Self.8fa)] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc3_33.1 @@ -598,11 +641,11 @@ fn B() { // CHECK:STDOUT: %.loc12_6.3: init %C to %.loc12_6.2 = class_init () [concrete = constants.%C.val] // CHECK:STDOUT: %.loc12_6.4: ref %C = temporary %.loc12_6.2, %.loc12_6.3 // CHECK:STDOUT: %.loc12_8.1: ref %C = converted %.loc12_6.1, %.loc12_6.4 -// CHECK:STDOUT: %I.facet.loc12_12.1: %I.type.5f7 = facet_value constants.%C, (constants.%I.impl_witness.1c4) [concrete = constants.%I.facet] -// CHECK:STDOUT: %.loc12_12.1: %I.type.5f7 = converted constants.%C, %I.facet.loc12_12.1 [concrete = constants.%I.facet] -// CHECK:STDOUT: %I.facet.loc12_12.2: %I.type.5f7 = facet_value constants.%C, (constants.%I.impl_witness.1c4) [concrete = constants.%I.facet] -// CHECK:STDOUT: %.loc12_12.2: %I.type.5f7 = converted constants.%C, %I.facet.loc12_12.2 [concrete = constants.%I.facet] -// CHECK:STDOUT: %A.specific_fn: = specific_function %A.ref, @A(constants.%I.facet) [concrete = constants.%A.specific_fn] +// CHECK:STDOUT: %I.facet.loc12_12.1: %I.type.5f7 = facet_value constants.%C, (constants.%I.impl_witness.1c4) [concrete = constants.%I.facet.0e1] +// CHECK:STDOUT: %.loc12_12.1: %I.type.5f7 = converted constants.%C, %I.facet.loc12_12.1 [concrete = constants.%I.facet.0e1] +// CHECK:STDOUT: %I.facet.loc12_12.2: %I.type.5f7 = facet_value constants.%C, (constants.%I.impl_witness.1c4) [concrete = constants.%I.facet.0e1] +// CHECK:STDOUT: %.loc12_12.2: %I.type.5f7 = converted constants.%C, %I.facet.loc12_12.2 [concrete = constants.%I.facet.0e1] +// CHECK:STDOUT: %A.specific_fn: = specific_function %A.ref, @A(constants.%I.facet.0e1) [concrete = constants.%A.specific_fn] // CHECK:STDOUT: %.loc12_8.2: %C = acquire_value %.loc12_8.1 // CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.specific_fn(%.loc12_8.2) // CHECK:STDOUT: %DestroyOp.bound: = bound_method %.loc12_6.4, constants.%DestroyOp @@ -617,6 +660,8 @@ fn B() { // CHECK:STDOUT: %W.loc3_23.1 => constants.%W // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%V, constants.%W, constants.%Self.8fa) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T.67d, constants.%empty_tuple.type) { // CHECK:STDOUT: %V.loc3_13.1 => constants.%T.67d // CHECK:STDOUT: %W.loc3_23.1 => constants.%empty_tuple.type @@ -632,6 +677,14 @@ fn B() { // CHECK:STDOUT: %I.impl_witness.loc7_38.2 => constants.%I.impl_witness.1cb // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T.67d, constants.%empty_tuple.type, constants.%Self.8fa) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T.67d, constants.%empty_tuple.type, constants.%I.facet.a6e) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%empty_tuple.type) { // CHECK:STDOUT: %V.loc3_13.1 => constants.%empty_struct_type // CHECK:STDOUT: %W.loc3_23.1 => constants.%empty_tuple.type @@ -641,6 +694,10 @@ fn B() { // CHECK:STDOUT: %Self.loc3_33.2 => constants.%Self.2a6 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%empty_tuple.type, constants.%Self.8fa) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%T.bc3) { // CHECK:STDOUT: %T.loc9_6.1 => constants.%T.bc3 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type @@ -656,8 +713,8 @@ fn B() { // CHECK:STDOUT: %require_complete => constants.%complete_type.1c0 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(constants.%I.facet) { -// CHECK:STDOUT: %T.loc9_6.1 => constants.%I.facet +// CHECK:STDOUT: specific @A(constants.%I.facet.0e1) { +// CHECK:STDOUT: %T.loc9_6.1 => constants.%I.facet.0e1 // CHECK:STDOUT: %T.binding.as_type => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7c7 // CHECK:STDOUT: @@ -687,6 +744,7 @@ fn B() { // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table, @C.as.I.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Self.061: %I.type.eb9 = symbolic_binding Self, 2 [symbolic] // CHECK:STDOUT: %require_complete.d0a: = require_complete_type %I.type.eb9 [symbolic] +// CHECK:STDOUT: %I.facet: %I.type.eb9 = facet_value %C, (%I.impl_witness) [symbolic] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %I.type.7b9: type = facet_type <@I, @I(%empty_struct_type, %empty_struct_type)> [concrete] // CHECK:STDOUT: %T.274: %I.type.7b9 = symbolic_binding T, 0 [symbolic] @@ -781,6 +839,7 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc3_33.1: @I.%I.type (%I.type.54f) = symbolic_binding Self, 2 [symbolic = %Self.loc3_33.2 (constants.%Self.8fa)] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc3_33.1 @@ -850,6 +909,8 @@ fn B() { // CHECK:STDOUT: %W.loc3_23.1 => constants.%W // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%V, constants.%W, constants.%Self.8fa) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T.67d, constants.%empty_tuple.type) { // CHECK:STDOUT: %V.loc3_13.1 => constants.%T.67d // CHECK:STDOUT: %W.loc3_23.1 => constants.%empty_tuple.type @@ -865,6 +926,14 @@ fn B() { // CHECK:STDOUT: %I.impl_witness.loc7_38.2 => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T.67d, constants.%empty_tuple.type, constants.%Self.8fa) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T.67d, constants.%empty_tuple.type, constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%empty_struct_type) { // CHECK:STDOUT: %V.loc3_13.1 => constants.%empty_struct_type // CHECK:STDOUT: %W.loc3_23.1 => constants.%empty_struct_type @@ -874,6 +943,10 @@ fn B() { // CHECK:STDOUT: %Self.loc3_33.2 => constants.%Self.c70 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%empty_struct_type, constants.%Self.8fa) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%T.274) { // CHECK:STDOUT: %T.loc9_6.1 => constants.%T.274 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type @@ -900,6 +973,7 @@ fn B() { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %C.13c: type = class_type @C, @C(%T.67d, %empty_tuple.type) [symbolic] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table, @C.as.I.impl(%T.67d) [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C.13c, (%I.impl_witness) [symbolic] // CHECK:STDOUT: %T.651: %I.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.9d9: type = pattern_type %I.type [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.651 [symbolic] @@ -980,6 +1054,7 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -1054,6 +1129,10 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %C.9f1) = "no_op"; // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%V, constants.%W) { // CHECK:STDOUT: %V.loc5_9.1 => constants.%V // CHECK:STDOUT: %W.loc5_19.1 => constants.%W @@ -1070,6 +1149,10 @@ fn B() { // CHECK:STDOUT: %I.impl_witness.loc7_38.2 => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%T.651) { // CHECK:STDOUT: %T.loc9_6.1 => constants.%T.651 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type diff --git a/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon b/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon index 358a61414086..68a5bc8eda7b 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon @@ -98,12 +98,12 @@ fn F[A:! J, B:! A](x: C(A, B)) { // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %Animal.impl_witness: = impl_witness @Goat.as.Animal.impl.%Animal.impl_witness_table [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %Eats.impl_witness: = impl_witness @Goat.as.Eats.impl.%Eats.impl_witness_table [concrete] +// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %Goat, (%Eats.impl_witness) [concrete] // CHECK:STDOUT: %Feed.type: type = fn_type @Feed [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Feed: %Feed.type = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] -// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %Goat, (%Eats.impl_witness) [concrete] // CHECK:STDOUT: %Feed.specific_fn: = specific_function %Feed, @Feed(%Eats.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -130,25 +130,25 @@ fn F[A:! J, B:! A](x: C(A, B)) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Eats.type: type = facet_type <@Eats> [concrete] -// CHECK:STDOUT: %Eats.Eat.type: type = fn_type @Eats.Eat [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Eats.assoc_type: type = assoc_entity_type @Eats [concrete] -// CHECK:STDOUT: %assoc0.ee5: %Eats.assoc_type = assoc_entity element0, @Eats.%Eats.Eat.decl [concrete] +// CHECK:STDOUT: %assoc0.083: %Eats.assoc_type = assoc_entity element0, @Eats.%Eats.WithSelf.Eat.decl [concrete] // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %Goat.Bleet.type: type = fn_type @Goat.Bleet [concrete] // CHECK:STDOUT: %Goat.Bleet: %Goat.Bleet.type = struct_value () [concrete] // CHECK:STDOUT: %Animal.impl_witness: = impl_witness @Goat.as.Animal.impl.%Animal.impl_witness_table [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %Eats.impl_witness: = impl_witness @Goat.as.Eats.impl.%Eats.impl_witness_table [concrete] // CHECK:STDOUT: %Goat.as.Eats.impl.Eat.type: type = fn_type @Goat.as.Eats.impl.Eat [concrete] // CHECK:STDOUT: %Goat.as.Eats.impl.Eat: %Goat.as.Eats.impl.Eat.type = struct_value () [concrete] // CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %Goat, (%Eats.impl_witness) [concrete] +// CHECK:STDOUT: %Eats.WithSelf.Eat.type.b4d: type = fn_type @Eats.WithSelf.Eat, @Eats(%Eats.facet) [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %pattern_type.234: type = pattern_type %Goat [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %Goat.val: %Goat = struct_value () [concrete] -// CHECK:STDOUT: %.732: type = fn_type_with_self_type %Eats.Eat.type, %Eats.facet [concrete] +// CHECK:STDOUT: %.35f: type = fn_type_with_self_type %Eats.WithSelf.Eat.type.b4d, %Eats.facet [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -181,8 +181,8 @@ fn F[A:! J, B:! A](x: C(A, B)) { // CHECK:STDOUT: %Bleet.ref.loc23: %Goat.Bleet.type = name_ref Bleet, @Goat.%Goat.Bleet.decl [concrete = constants.%Goat.Bleet] // CHECK:STDOUT: %Goat.Bleet.call.loc23: init %empty_tuple.type = call %Bleet.ref.loc23() // CHECK:STDOUT: %x.ref.loc24: %Goat = name_ref x, %x -// CHECK:STDOUT: %Eat.ref.loc24: %Eats.assoc_type = name_ref Eat, @Eats.%assoc0 [concrete = constants.%assoc0.ee5] -// CHECK:STDOUT: %impl.elem0.loc24: %.732 = impl_witness_access constants.%Eats.impl_witness, element0 [concrete = constants.%Goat.as.Eats.impl.Eat] +// CHECK:STDOUT: %Eat.ref.loc24: %Eats.assoc_type = name_ref Eat, @Eats.%assoc0 [concrete = constants.%assoc0.083] +// CHECK:STDOUT: %impl.elem0.loc24: %.35f = impl_witness_access constants.%Eats.impl_witness, element0 [concrete = constants.%Goat.as.Eats.impl.Eat] // CHECK:STDOUT: %Goat.as.Eats.impl.Eat.call.loc24: init %empty_tuple.type = call %impl.elem0.loc24() // CHECK:STDOUT: %.loc26_6.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %Goat.ref.loc26_11: type = name_ref Goat, file.%Goat.decl [concrete = constants.%Goat] @@ -210,8 +210,8 @@ fn F[A:! J, B:! A](x: C(A, B)) { // CHECK:STDOUT: %.loc27_26: %Animal.type = converted %Goat.ref.loc27_21, %Animal.facet.loc27 [concrete = constants.%Animal.facet] // CHECK:STDOUT: %as_type.loc27: type = facet_access_type %.loc27_26 [concrete = constants.%Goat] // CHECK:STDOUT: %.loc27_35: type = converted %.loc27_26, %as_type.loc27 [concrete = constants.%Goat] -// CHECK:STDOUT: %Eat.ref.loc27: %Eats.assoc_type = name_ref Eat, @Eats.%assoc0 [concrete = constants.%assoc0.ee5] -// CHECK:STDOUT: %impl.elem0.loc27: %.732 = impl_witness_access constants.%Eats.impl_witness, element0 [concrete = constants.%Goat.as.Eats.impl.Eat] +// CHECK:STDOUT: %Eat.ref.loc27: %Eats.assoc_type = name_ref Eat, @Eats.%assoc0 [concrete = constants.%assoc0.083] +// CHECK:STDOUT: %impl.elem0.loc27: %.35f = impl_witness_access constants.%Eats.impl_witness, element0 [concrete = constants.%Goat.as.Eats.impl.Eat] // CHECK:STDOUT: %Goat.as.Eats.impl.Eat.call.loc27: init %empty_tuple.type = call %impl.elem0.loc27() // CHECK:STDOUT: %DestroyOp.bound.loc27: = bound_method %.loc27_6.4, constants.%DestroyOp // CHECK:STDOUT: %DestroyOp.call.loc27: init %empty_tuple.type = call %DestroyOp.bound.loc27(%.loc27_6.4) 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 ed4774eb740c..132fa50635b5 100644 --- a/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon +++ b/toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon @@ -44,9 +44,9 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Animal.impl_witness: = impl_witness @Goat.as.Animal.impl.%Animal.impl_witness_table [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal, @HandleAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: %FeedAnimal.specific_fn.cc5: = specific_function %FeedAnimal, @FeedAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: } @@ -97,6 +97,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Animal { // CHECK:STDOUT: %Self: %Animal.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Animal [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -159,6 +160,10 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @FeedAnimal(constants.%T) { // CHECK:STDOUT: %T.loc17_15.1 => constants.%T // CHECK:STDOUT: @@ -169,6 +174,10 @@ fn F() { // CHECK:STDOUT: %T.loc19_17.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Animal.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%Animal.facet) { // CHECK:STDOUT: %T.loc19_17.1 => constants.%Animal.facet // 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 e3df72d1823f..812bc138fa0d 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 @@ -109,10 +109,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %Animal.type, %type.as.BitAndWith.impl.Op [concrete] @@ -178,7 +178,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %impl.elem0: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %Animal.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%Animal.ref, %Eats.ref) [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc8_28.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] @@ -197,6 +197,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Eats { // CHECK:STDOUT: %Self: %Eats.type = symbolic_binding Self, 0 [symbolic = constants.%Self.247] +// CHECK:STDOUT: interface_with_self_decl @Eats [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -207,6 +208,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Animal { // CHECK:STDOUT: %Self: %Animal.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c49] +// CHECK:STDOUT: interface_with_self_decl @Animal [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -254,6 +256,14 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%Self.247) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Self.c49) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Feed(constants.%T) { // CHECK:STDOUT: %T.loc6_9.1 => constants.%T // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type @@ -290,10 +300,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound.a5f: = bound_method %Tame.type, %type.as.BitAndWith.impl.Op [concrete] @@ -355,7 +365,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %impl.elem0: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %Tame.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.a5f] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%Tame.ref, %Eats.ref) [concrete = constants.%facet_type.2db] // CHECK:STDOUT: %.loc7_22.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.2db] @@ -379,11 +389,11 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] -// CHECK:STDOUT: %impl.elem0.loc9_30: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc9_30: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc9_30: = bound_method %Eats.ref, %impl.elem0.loc9_30 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.10c] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc9_30: init type = call %bound_method.loc9_30(%Eats.ref, %Animal.ref) [concrete = constants.%facet_type.a63] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] -// CHECK:STDOUT: %impl.elem0.loc9_39: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc9_39: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc9_39: = bound_method %type.as.BitAndWith.impl.Op.call.loc9_30, %impl.elem0.loc9_39 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.986] // CHECK:STDOUT: %.loc9_30.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc9_30 [concrete = constants.%facet_type.a63] // CHECK:STDOUT: %.loc9_30.2: type = converted %type.as.BitAndWith.impl.Op.call.loc9_30, %.loc9_30.1 [concrete = constants.%facet_type.a63] @@ -404,6 +414,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Eats { // CHECK:STDOUT: %Self: %Eats.type = symbolic_binding Self, 0 [symbolic = constants.%Self.247] +// CHECK:STDOUT: interface_with_self_decl @Eats [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -414,6 +425,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Animal { // CHECK:STDOUT: %Self: %Animal.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c49] +// CHECK:STDOUT: interface_with_self_decl @Animal [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -424,6 +436,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Tame { // CHECK:STDOUT: %Self: %Tame.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab8] +// CHECK:STDOUT: interface_with_self_decl @Tame [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -472,6 +485,18 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%Self.247) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Self.c49) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Tame(constants.%Self.ab8) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @FeedTame(constants.%V) { // CHECK:STDOUT: %V.loc7_13.1 => constants.%V // CHECK:STDOUT: %V.binding.as_type => constants.%V.binding.as_type @@ -508,14 +533,15 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %pattern_type.e10: type = pattern_type %Animal.type [concrete] // CHECK:STDOUT: %A.binding.as_type: type = symbolic_binding_type A, 0, %A [symbolic] // CHECK:STDOUT: %Eats.impl_witness.760: = impl_witness @A.binding.as_type.as.Eats.impl.%Eats.impl_witness_table, @A.binding.as_type.as.Eats.impl(%A) [symbolic] +// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %A.binding.as_type, (%Eats.impl_witness.760) [symbolic] // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound.a5f: = bound_method %Tame.type, %type.as.BitAndWith.impl.Op [concrete] @@ -592,7 +618,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] // CHECK:STDOUT: %Eats.ref: type = name_ref Eats, file.%Eats.decl [concrete = constants.%Eats.type] -// CHECK:STDOUT: %impl.elem0: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %Tame.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.a5f] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%Tame.ref, %Eats.ref) [concrete = constants.%facet_type.2db] // CHECK:STDOUT: %.loc9_23.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.2db] @@ -616,7 +642,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Animal.ref: type = name_ref Animal, file.%Animal.decl [concrete = constants.%Animal.type] // CHECK:STDOUT: %Tame.ref: type = name_ref Tame, file.%Tame.decl [concrete = constants.%Tame.type] -// CHECK:STDOUT: %impl.elem0: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %Animal.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound.92c] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%Animal.ref, %Tame.ref) [concrete = constants.%facet_type.afc] // CHECK:STDOUT: %.loc11_33.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type.afc] @@ -635,6 +661,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Eats { // CHECK:STDOUT: %Self: %Eats.type = symbolic_binding Self, 0 [symbolic = constants.%Self.247] +// CHECK:STDOUT: interface_with_self_decl @Eats [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -645,6 +672,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Animal { // CHECK:STDOUT: %Self: %Animal.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c49] +// CHECK:STDOUT: interface_with_self_decl @Animal [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -655,6 +683,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Tame { // CHECK:STDOUT: %Self: %Tame.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab8] +// CHECK:STDOUT: interface_with_self_decl @Tame [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -722,12 +751,28 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%Self.247) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Self.c49) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Tame(constants.%Self.ab8) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @A.binding.as_type.as.Eats.impl(constants.%A) { // CHECK:STDOUT: %A.loc7_14.2 => constants.%A // CHECK:STDOUT: %A.binding.as_type => constants.%A.binding.as_type // CHECK:STDOUT: %Eats.impl_witness.loc7_36.2 => constants.%Eats.impl_witness.760 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%Eats.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @FeedTame2(constants.%V) { // CHECK:STDOUT: %V.loc9_14.1 => constants.%V // CHECK:STDOUT: %V.binding.as_type => constants.%V.binding.as_type @@ -847,6 +892,7 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @A { // CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -890,6 +936,10 @@ fn CallsWithTypeExplicit(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @TakesA(constants.%T) { // CHECK:STDOUT: %T.loc7_11.1 => constants.%T // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type 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 32d7e559e436..fbcfad081b34 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 @@ -34,6 +34,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %pattern_type.e10: type = pattern_type %Animal.type [concrete] // CHECK:STDOUT: %A.binding.as_type: type = symbolic_binding_type A, 0, %A [symbolic] // CHECK:STDOUT: %Eats.impl_witness.760d13.1: = impl_witness @A.binding.as_type.as.Eats.impl.%Eats.impl_witness_table, @A.binding.as_type.as.Eats.impl(%A) [symbolic] +// CHECK:STDOUT: %Eats.facet.6e5: %Eats.type = facet_value %A.binding.as_type, (%Eats.impl_witness.760d13.1) [symbolic] // CHECK:STDOUT: %T.f11: %Eats.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.0dc: type = pattern_type %Eats.type [concrete] // CHECK:STDOUT: %T.binding.as_type.265: type = symbolic_binding_type T, 0, %T.f11 [symbolic] @@ -51,8 +52,8 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %Eats.impl_witness.760d13.2: = impl_witness @A.binding.as_type.as.Eats.impl.%Eats.impl_witness_table, @A.binding.as_type.as.Eats.impl(%T.998) [symbolic] // CHECK:STDOUT: %.860: require_specific_def_type = require_specific_def @A.binding.as_type.as.Eats.impl(%T.998) [symbolic] // CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %T.998, @Eats [symbolic] -// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %T.binding.as_type.e4f, (%Eats.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %Feed.specific_fn: = specific_function %Feed, @Feed(%Eats.facet) [symbolic] +// CHECK:STDOUT: %Eats.facet.a05: %Eats.type = facet_value %T.binding.as_type.e4f, (%Eats.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %Feed.specific_fn: = specific_function %Feed, @Feed(%Eats.facet.a05) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -126,6 +127,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: // CHECK:STDOUT: interface @Eats { // CHECK:STDOUT: %Self: %Eats.type = symbolic_binding Self, 0 [symbolic = constants.%Self.247] +// CHECK:STDOUT: interface_with_self_decl @Eats [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -136,6 +138,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: // CHECK:STDOUT: interface @Animal { // CHECK:STDOUT: %Self: %Animal.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c49] +// CHECK:STDOUT: interface_with_self_decl @Animal [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -183,29 +186,41 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.72f)] // CHECK:STDOUT: %.loc22_43.3: require_specific_def_type = require_specific_def @A.binding.as_type.as.Eats.impl(%T.loc22_17.1) [symbolic = %.loc22_43.3 (constants.%.860)] // CHECK:STDOUT: %Eats.lookup_impl_witness: = lookup_impl_witness %T.loc22_17.1, @Eats [symbolic = %Eats.lookup_impl_witness (constants.%Eats.lookup_impl_witness)] -// CHECK:STDOUT: %Eats.facet.loc22_43.3: %Eats.type = facet_value %T.binding.as_type, (%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet)] +// CHECK:STDOUT: %Eats.facet.loc22_43.3: %Eats.type = facet_value %T.binding.as_type, (%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet.a05)] // CHECK:STDOUT: %Feed.specific_fn.loc22_37.2: = specific_function constants.%Feed, @Feed(%Eats.facet.loc22_43.3) [symbolic = %Feed.specific_fn.loc22_37.2 (constants.%Feed.specific_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%a.param: @HandleAnimal.%T.binding.as_type (%T.binding.as_type.e4f)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Feed.ref: %Feed.type = name_ref Feed, file.%Feed.decl [concrete = constants.%Feed] // CHECK:STDOUT: %a.ref: @HandleAnimal.%T.binding.as_type (%T.binding.as_type.e4f) = name_ref a, %a -// CHECK:STDOUT: %Eats.facet.loc22_43.1: %Eats.type = facet_value constants.%T.binding.as_type.e4f, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet)] -// CHECK:STDOUT: %.loc22_43.1: %Eats.type = converted constants.%T.binding.as_type.e4f, %Eats.facet.loc22_43.1 [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet)] -// CHECK:STDOUT: %Eats.facet.loc22_43.2: %Eats.type = facet_value constants.%T.binding.as_type.e4f, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet)] -// CHECK:STDOUT: %.loc22_43.2: %Eats.type = converted constants.%T.binding.as_type.e4f, %Eats.facet.loc22_43.2 [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet)] -// CHECK:STDOUT: %Feed.specific_fn.loc22_37.1: = specific_function %Feed.ref, @Feed(constants.%Eats.facet) [symbolic = %Feed.specific_fn.loc22_37.2 (constants.%Feed.specific_fn)] +// CHECK:STDOUT: %Eats.facet.loc22_43.1: %Eats.type = facet_value constants.%T.binding.as_type.e4f, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet.a05)] +// CHECK:STDOUT: %.loc22_43.1: %Eats.type = converted constants.%T.binding.as_type.e4f, %Eats.facet.loc22_43.1 [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet.a05)] +// CHECK:STDOUT: %Eats.facet.loc22_43.2: %Eats.type = facet_value constants.%T.binding.as_type.e4f, (constants.%Eats.lookup_impl_witness) [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet.a05)] +// CHECK:STDOUT: %.loc22_43.2: %Eats.type = converted constants.%T.binding.as_type.e4f, %Eats.facet.loc22_43.2 [symbolic = %Eats.facet.loc22_43.3 (constants.%Eats.facet.a05)] +// CHECK:STDOUT: %Feed.specific_fn.loc22_37.1: = specific_function %Feed.ref, @Feed(constants.%Eats.facet.a05) [symbolic = %Feed.specific_fn.loc22_37.2 (constants.%Feed.specific_fn)] // CHECK:STDOUT: %Feed.call: init %empty_tuple.type = call %Feed.specific_fn.loc22_37.1(%a.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%Self.247) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Self.c49) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @A.binding.as_type.as.Eats.impl(constants.%A) { // CHECK:STDOUT: %A.loc18_14.2 => constants.%A // CHECK:STDOUT: %A.binding.as_type => constants.%A.binding.as_type // CHECK:STDOUT: %Eats.impl_witness.loc18_36.2 => constants.%Eats.impl_witness.760d13.1 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%Eats.facet.6e5) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Feed(constants.%T.f11) { // CHECK:STDOUT: %T.loc20_9.1 => constants.%T.f11 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type.265 @@ -226,8 +241,8 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Feed(constants.%Eats.facet) { -// CHECK:STDOUT: %T.loc20_9.1 => constants.%Eats.facet +// CHECK:STDOUT: specific @Feed(constants.%Eats.facet.a05) { +// CHECK:STDOUT: %T.loc20_9.1 => constants.%Eats.facet.a05 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type.e4f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.892 // 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 9a19a895611a..b0c248a012c2 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 @@ -44,6 +44,7 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Edible.impl_witness: = impl_witness @Grass.as.Edible.impl.%Edible.impl_witness_table [concrete] +// CHECK:STDOUT: %Edible.facet: %Edible.type = facet_value %Grass, (%Edible.impl_witness) [concrete] // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Self.c49: %Animal.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %type: type = facet_type [concrete] @@ -65,8 +66,10 @@ fn F() { // CHECK:STDOUT: %Eats.impl_witness.0150b7.1: = impl_witness @T.binding.as_type.as.Eats.impl.%Eats.impl_witness_table, @T.binding.as_type.as.Eats.impl(%T.998, %U) [symbolic] // CHECK:STDOUT: %Self.027: %Eats.type.bb4cf6.1 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %require_complete.a2722e.1: = require_complete_type %Eats.type.bb4cf6.1 [symbolic] +// CHECK:STDOUT: %Eats.facet.31f: %Eats.type.bb4cf6.1 = facet_value %T.binding.as_type.e4f, (%Eats.impl_witness.0150b7.1) [symbolic] // CHECK:STDOUT: %Goat: type = class_type @Goat [concrete] // CHECK:STDOUT: %Animal.impl_witness: = impl_witness @Goat.as.Animal.impl.%Animal.impl_witness_table [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %Food.d1c: %Edible.type = symbolic_binding Food, 0 [symbolic] // CHECK:STDOUT: %Food.binding.as_type.8cc: type = symbolic_binding_type Food, 0, %Food.d1c [symbolic] // CHECK:STDOUT: %Eats.type.570: type = facet_type <@Eats, @Eats(%Food.binding.as_type.8cc)> [symbolic] @@ -103,8 +106,6 @@ fn F() { // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %Goat.val: %Goat = struct_value () [concrete] // CHECK:STDOUT: %Grass.val: %Grass = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] -// CHECK:STDOUT: %Edible.facet: %Edible.type = facet_value %Grass, (%Edible.impl_witness) [concrete] // CHECK:STDOUT: %pattern_type.234: type = pattern_type %Goat [concrete] // CHECK:STDOUT: %pattern_type.df6: type = pattern_type %Grass [concrete] // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal, @HandleAnimal(%Animal.facet, %Edible.facet) [concrete] @@ -261,6 +262,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Edible { // CHECK:STDOUT: %Self: %Edible.type = symbolic_binding Self, 0 [symbolic = constants.%Self.461] +// CHECK:STDOUT: interface_with_self_decl @Edible [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -271,6 +273,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Animal { // CHECK:STDOUT: %Self: %Animal.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c49] +// CHECK:STDOUT: interface_with_self_decl @Animal [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -288,6 +291,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc21_29.1: @Eats.%Eats.type (%Eats.type.394) = symbolic_binding Self, 1 [symbolic = %Self.loc21_29.2 (constants.%Self.857)] +// CHECK:STDOUT: interface_with_self_decl @Eats [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc21_29.1 @@ -439,10 +443,24 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp.loc35_17(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: +// CHECK:STDOUT: specific @Edible(constants.%Self.461) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Edible(constants.%Edible.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Self.c49) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Eats(constants.%Food.67d) { // CHECK:STDOUT: %Food.loc21_16.1 => constants.%Food.67d // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%Food.67d, constants.%Self.857) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @Eats(constants.%U.binding.as_type) { // CHECK:STDOUT: %Food.loc21_16.1 => constants.%U.binding.as_type // CHECK:STDOUT: @@ -460,6 +478,18 @@ fn F() { // CHECK:STDOUT: %Eats.impl_witness.loc26_51.2 => constants.%Eats.impl_witness.0150b7.1 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%U.binding.as_type, constants.%Self.857) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%U.binding.as_type, constants.%Eats.facet.31f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Animal.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Eats(constants.%Food.binding.as_type.8cc) { // CHECK:STDOUT: %Food.loc21_16.1 => constants.%Food.binding.as_type.8cc // CHECK:STDOUT: @@ -468,6 +498,10 @@ fn F() { // CHECK:STDOUT: %Self.loc21_29.2 => constants.%Self.a66 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%Food.binding.as_type.8cc, constants.%Self.857) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Feed(constants.%Food.d1c, constants.%T.2b9) { // CHECK:STDOUT: %Food.loc31_9.1 => constants.%Food.d1c // CHECK:STDOUT: %Food.binding.as_type => constants.%Food.binding.as_type.8cc @@ -557,6 +591,10 @@ fn F() { // CHECK:STDOUT: %Self.loc21_29.2 => constants.%Self.ebd // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%Grass, constants.%Self.857) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Feed(constants.%Edible.facet, constants.%Eats.facet.a4e) { // CHECK:STDOUT: %Food.loc31_9.1 => constants.%Edible.facet // CHECK:STDOUT: %Food.binding.as_type => constants.%Grass 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 80b5cf048ac9..9a23a200ba8c 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 @@ -47,11 +47,11 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Animal.impl_witness: = impl_witness @Goat.as.Animal.impl.%Animal.impl_witness_table [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %Goat.val: %Goat = struct_value () [concrete] -// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %pattern_type.234: type = pattern_type %Goat [concrete] // CHECK:STDOUT: %HandleAnimal.specific_fn: = specific_function %HandleAnimal, @HandleAnimal(%Animal.facet) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] @@ -126,6 +126,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Animal { // CHECK:STDOUT: %Self: %Animal.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c49] +// CHECK:STDOUT: interface_with_self_decl @Animal [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -208,6 +209,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %Goat) = "no_op"; // CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Self.c49) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @FeedAnimal(constants.%T) { // CHECK:STDOUT: %T.loc17_15.1 => constants.%T // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type @@ -223,6 +228,10 @@ fn F() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.892 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Animal.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @HandleAnimal(constants.%Animal.facet) { // CHECK:STDOUT: %T.loc19_17.1 => constants.%Animal.facet // CHECK:STDOUT: %T.binding.as_type => constants.%Goat diff --git a/toolchain/check/testdata/facet/convert_interface.carbon b/toolchain/check/testdata/facet/convert_interface.carbon index 2f444522c3a9..52a65cfe598d 100644 --- a/toolchain/check/testdata/facet/convert_interface.carbon +++ b/toolchain/check/testdata/facet/convert_interface.carbon @@ -30,13 +30,13 @@ fn G() { F(Animal); } // CHECK:STDOUT: %Animal.type: type = facet_type <@Animal> [concrete] // CHECK:STDOUT: %Self.c49: %Animal.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Eats.impl_witness: = impl_witness @Animal.type.as.Eats.impl.%Eats.impl_witness_table [concrete] +// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %Animal.type, (%Eats.impl_witness) [concrete] // CHECK:STDOUT: %pattern_type: type = pattern_type %Eats.type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %Eats.facet: %Eats.type = facet_value %Animal.type, (%Eats.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -74,6 +74,7 @@ fn G() { F(Animal); } // CHECK:STDOUT: // CHECK:STDOUT: interface @Eats { // CHECK:STDOUT: %Self: %Eats.type = symbolic_binding Self, 0 [symbolic = constants.%Self.247] +// CHECK:STDOUT: interface_with_self_decl @Eats [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -84,6 +85,7 @@ fn G() { F(Animal); } // CHECK:STDOUT: // CHECK:STDOUT: interface @Animal { // CHECK:STDOUT: %Self: %Animal.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c49] +// CHECK:STDOUT: interface_with_self_decl @Animal [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -115,3 +117,13 @@ fn G() { F(Animal); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%Self.247) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Self.c49) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%Eats.facet) { +// CHECK:STDOUT: !definition: +// 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 32ef78f96e55..78df36437257 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 @@ -48,10 +48,10 @@ fn G() { // CHECK:STDOUT: %Generic.generic: %Generic.type.835 = struct_value () [concrete] // CHECK:STDOUT: %Generic.type.03dff7.1: type = facet_type <@Generic, @Generic(%Scalar)> [symbolic] // CHECK:STDOUT: %Self.15d: %Generic.type.03dff7.1 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.8aa: type = fn_type @Generic.F, @Generic(%Scalar) [symbolic] -// CHECK:STDOUT: %Generic.F.673: %Generic.F.type.8aa = struct_value () [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.type.743: type = fn_type @Generic.WithSelf.F, @Generic(%Scalar, %Self.15d) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.baf: %Generic.WithSelf.F.type.743 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.22a: type = assoc_entity_type @Generic, @Generic(%Scalar) [symbolic] -// CHECK:STDOUT: %assoc0.6ba: %Generic.assoc_type.22a = assoc_entity element0, @Generic.%Generic.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.e0d: %Generic.assoc_type.22a = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %GenericParam: type = class_type @GenericParam [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -60,13 +60,15 @@ fn G() { // CHECK:STDOUT: %Generic.type.498: type = facet_type <@Generic, @Generic(%GenericParam)> [concrete] // CHECK:STDOUT: %Generic.impl_witness: = impl_witness @ImplsGeneric.as.Generic.impl.%Generic.impl_witness_table [concrete] // CHECK:STDOUT: %Self.1f5: %Generic.type.498 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.0a1: type = fn_type @Generic.F, @Generic(%GenericParam) [concrete] -// CHECK:STDOUT: %Generic.F.edf: %Generic.F.type.0a1 = struct_value () [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.type.a23: type = fn_type @Generic.WithSelf.F, @Generic(%GenericParam, %Self.15d) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.fe0: %Generic.WithSelf.F.type.a23 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.6dc: type = assoc_entity_type @Generic, @Generic(%GenericParam) [concrete] -// CHECK:STDOUT: %assoc0.d01: %Generic.assoc_type.6dc = assoc_entity element0, @Generic.%Generic.F.decl [concrete] +// CHECK:STDOUT: %assoc0.717: %Generic.assoc_type.6dc = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [concrete] // CHECK:STDOUT: %ImplsGeneric.as.Generic.impl.F.type: type = fn_type @ImplsGeneric.as.Generic.impl.F [concrete] // CHECK:STDOUT: %ImplsGeneric.as.Generic.impl.F: %ImplsGeneric.as.Generic.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %Generic.facet: %Generic.type.498 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.type.c86: type = fn_type @Generic.WithSelf.F, @Generic(%GenericParam, %Generic.facet) [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.1fd: %Generic.WithSelf.F.type.c86 = struct_value () [concrete] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Generic.type.03dff7.2: type = facet_type <@Generic, @Generic(%T)> [symbolic] // CHECK:STDOUT: %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic] @@ -131,22 +133,21 @@ fn G() { // CHECK:STDOUT: %Scalar.loc15_19.1: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc15_19.1 (constants.%Scalar)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc15_19.1)> [symbolic = %Generic.type (constants.%Generic.type.03dff7.1)] -// CHECK:STDOUT: %Self.loc15_34.2: @Generic.%Generic.type (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.15d)] -// CHECK:STDOUT: %Generic.F.type: type = fn_type @Generic.F, @Generic(%Scalar.loc15_19.1) [symbolic = %Generic.F.type (constants.%Generic.F.type.8aa)] -// CHECK:STDOUT: %Generic.F: @Generic.%Generic.F.type (%Generic.F.type.8aa) = struct_value () [symbolic = %Generic.F (constants.%Generic.F.673)] -// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%Scalar.loc15_19.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.22a)] -// CHECK:STDOUT: %assoc0.loc16_9.2: @Generic.%Generic.assoc_type (%Generic.assoc_type.22a) = assoc_entity element0, %Generic.F.decl [symbolic = %assoc0.loc16_9.2 (constants.%assoc0.6ba)] +// CHECK:STDOUT: %Generic.type.loc15: type = facet_type <@Generic, @Generic(%Scalar.loc15_19.1)> [symbolic = %Generic.type.loc15 (constants.%Generic.type.03dff7.1)] +// CHECK:STDOUT: %Self.loc15_34.2: @Generic.%Generic.type.loc15 (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.15d)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc15_34.1: @Generic.%Generic.type (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.15d)] -// CHECK:STDOUT: %Generic.F.decl: @Generic.%Generic.F.type (%Generic.F.type.8aa) = fn_decl @Generic.F [symbolic = @Generic.%Generic.F (constants.%Generic.F.673)] {} {} -// CHECK:STDOUT: %assoc0.loc16_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.22a) = assoc_entity element0, %Generic.F.decl [symbolic = %assoc0.loc16_9.2 (constants.%assoc0.6ba)] +// CHECK:STDOUT: %Self.loc15_34.1: @Generic.%Generic.type.loc15 (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.15d)] +// CHECK:STDOUT: interface_with_self_decl @Generic [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Generic.WithSelf.F.decl: @Generic.%Generic.WithSelf.F.type (%Generic.WithSelf.F.type.743) = fn_decl @Generic.WithSelf.F [symbolic = @Generic.%Generic.WithSelf.F (constants.%Generic.WithSelf.F.baf)] {} {} +// CHECK:STDOUT: %assoc0.loc16_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.22a) = assoc_entity element0, %Generic.WithSelf.F.decl [symbolic = %assoc0.loc16_9.2 (constants.%assoc0.e0d)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc15_34.1 // CHECK:STDOUT: .F = %assoc0.loc16_9.1 -// CHECK:STDOUT: witness = (%Generic.F.decl) +// CHECK:STDOUT: witness = (%Generic.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -186,7 +187,7 @@ fn G() { // CHECK:STDOUT: .Self = constants.%ImplsGeneric // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Generic.F(@Generic.%Scalar.loc15_19.2: type, @Generic.%Self.loc15_34.1: @Generic.%Generic.type (%Generic.type.03dff7.1)) { +// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc15_19.2: type, @Generic.%Self.loc15_34.1: @Generic.%Generic.type.loc15 (%Generic.type.03dff7.1)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -221,21 +222,41 @@ fn G() { // CHECK:STDOUT: %Scalar.loc15_19.1 => constants.%Scalar // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.F(constants.%Scalar, constants.%Self.15d) {} +// CHECK:STDOUT: specific @Generic(constants.%Scalar, constants.%Self.15d) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%Scalar, constants.%Self.15d) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%GenericParam) { // CHECK:STDOUT: %Scalar.loc15_19.1 => constants.%GenericParam // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type => constants.%Generic.type.498 +// CHECK:STDOUT: %Generic.type.loc15 => constants.%Generic.type.498 // CHECK:STDOUT: %Self.loc15_34.2 => constants.%Self.1f5 -// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.0a1 -// CHECK:STDOUT: %Generic.F => constants.%Generic.F.edf -// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc -// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.d01 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.F(constants.%GenericParam, constants.%Generic.facet) {} +// CHECK:STDOUT: specific @Generic(constants.%GenericParam, constants.%Self.15d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc16 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc16 => constants.%Generic.type.498 +// CHECK:STDOUT: %Self.loc16 => constants.%Self.15d +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.a23 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.fe0 +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc +// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.717 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic(constants.%GenericParam, constants.%Generic.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc16 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc16 => constants.%Generic.type.498 +// CHECK:STDOUT: %Self.loc16 => constants.%Generic.facet +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.c86 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.1fd +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc +// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.717 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%GenericParam, constants.%Generic.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%T) { // CHECK:STDOUT: %Scalar.loc15_19.1 => constants.%T diff --git a/toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon b/toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon index f96740702574..e493f493cf10 100644 --- a/toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon +++ b/toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon @@ -109,6 +109,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: // CHECK:STDOUT: interface @Eats { // CHECK:STDOUT: %Self: %Eats.type = symbolic_binding Self, 0 [symbolic = constants.%Self.247] +// CHECK:STDOUT: interface_with_self_decl @Eats [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -119,6 +120,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: // CHECK:STDOUT: interface @Animal { // CHECK:STDOUT: %Self: %Animal.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c49] +// CHECK:STDOUT: interface_with_self_decl @Animal [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -157,6 +159,14 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Eats(constants.%Self.247) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Self.c49) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Feed(constants.%T.f11) { // CHECK:STDOUT: %T.loc18_9.1 => constants.%T.f11 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type.265 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 192cc2f91414..61eb29676b8a 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 @@ -37,11 +37,13 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Animal.impl_witness: = impl_witness .inst{{[0-9A-F]+}}.loc18_21 [concrete] +// CHECK:STDOUT: %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete] // CHECK:STDOUT: %a: %Animal.type = symbolic_binding a, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Animal { // CHECK:STDOUT: %Self: %Animal.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Animal [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -79,6 +81,14 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(); // CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Animal(constants.%Animal.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @WalkAnimal(constants.%a) { // CHECK:STDOUT: %a => constants.%a // 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 ec4a8bd7ec17..6c038b70cb7c 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 @@ -61,13 +61,13 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.5cd: type = facet_type <@ImplicitAs, @ImplicitAs(%RuntimeConvertTo)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness @RuntimeConvertFrom.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.559: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%RuntimeConvertTo) [concrete] // CHECK:STDOUT: %pattern_type.6bd: type = pattern_type %RuntimeConvertFrom [concrete] // CHECK:STDOUT: %.382: Core.Form = init_form %RuntimeConvertTo, call_param1 [concrete] // CHECK:STDOUT: %pattern_type.c89: type = pattern_type %RuntimeConvertTo [concrete] // CHECK:STDOUT: %RuntimeConvertFrom.as.ImplicitAs.impl.Convert.type: type = fn_type @RuntimeConvertFrom.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %RuntimeConvertFrom.as.ImplicitAs.impl.Convert: %RuntimeConvertFrom.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.5cd = facet_value %RuntimeConvertFrom, (%ImplicitAs.impl_witness) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.3a2: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%RuntimeConvertTo, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %RuntimeConvertTo.val: %RuntimeConvertTo = struct_value () [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] @@ -84,7 +84,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) { // CHECK:STDOUT: %from: %RuntimeConvertFrom = symbolic_binding from, 0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %.224: type = fn_type_with_self_type %ImplicitAs.Convert.type.559, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %.8ab: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.3a2, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %RuntimeConvertFrom.as.ImplicitAs.impl.Convert.bound: = bound_method %from, %RuntimeConvertFrom.as.ImplicitAs.impl.Convert [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -271,7 +271,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %from.ref: %RuntimeConvertFrom = name_ref from, %from.loc29_49.2 [symbolic = %from.loc29_49.1 (constants.%from)] // CHECK:STDOUT: %holds_to.ref: %HoldsType.0ca = name_ref holds_to, %holds_to -// CHECK:STDOUT: %impl.elem0: %.224 = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%RuntimeConvertFrom.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0: %.8ab = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%RuntimeConvertFrom.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method: = bound_method constants.%from, %impl.elem0 [symbolic = %RuntimeConvertFrom.as.ImplicitAs.impl.Convert.bound (constants.%RuntimeConvertFrom.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %.loc40_19.1: ref %RuntimeConvertTo = temporary_storage // CHECK:STDOUT: %RuntimeConvertFrom.as.ImplicitAs.impl.Convert.call: init %RuntimeConvertTo to %.loc40_19.1 = call %bound_method(constants.%from) diff --git a/toolchain/check/testdata/facet/period_self.carbon b/toolchain/check/testdata/facet/period_self.carbon index a9f933fa90f5..8e2b8fc0f833 100644 --- a/toolchain/check/testdata/facet/period_self.carbon +++ b/toolchain/check/testdata/facet/period_self.carbon @@ -362,13 +362,13 @@ fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) { // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T.67d)> [symbolic] // CHECK:STDOUT: %Self.fdb: %I.type.1ab = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %I.assoc_type.76c: type = assoc_entity_type @I, @I(%T.67d) [symbolic] -// CHECK:STDOUT: %assoc0.963: %I.assoc_type.76c = assoc_entity element0, @I.%I1 [symbolic] +// CHECK:STDOUT: %assoc0.99e: %I.assoc_type.76c = assoc_entity element0, @I.%I1 [symbolic] // CHECK:STDOUT: %.Self.binding.as_type.8db: type = symbolic_binding_type .Self, %.Self.c39 [symbolic_self] // CHECK:STDOUT: %I.type.bee: type = facet_type <@I, @I(%.Self.binding.as_type.8db)> [symbolic_self] // CHECK:STDOUT: %.Self.dad: %I.type.bee = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Self.fa8: %I.type.bee = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %I.assoc_type.c03: type = assoc_entity_type @I, @I(%.Self.binding.as_type.8db) [symbolic_self] -// CHECK:STDOUT: %assoc0.2f7: %I.assoc_type.c03 = assoc_entity element0, @I.%I1 [symbolic_self] +// CHECK:STDOUT: %assoc0.fe4: %I.assoc_type.c03 = assoc_entity element0, @I.%I1 [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type.b0b: type = symbolic_binding_type .Self, %.Self.dad [symbolic_self] // CHECK:STDOUT: %I.lookup_impl_witness.3fc: = lookup_impl_witness %.Self.dad, @I, @I(%.Self.binding.as_type.8db) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness.3fc, element0 [symbolic_self] @@ -405,8 +405,8 @@ fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) { // CHECK:STDOUT: %T.ref: %I_where.type = name_ref T, %T.loc8_6.2 [symbolic = %T.loc8_6.1 (constants.%T.706)] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc8_39.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc8_39.2: %I.assoc_type.c03 = specific_constant @I1.%assoc0, @I(constants.%.Self.binding.as_type.8db) [symbolic_self = constants.%assoc0.2f7] -// CHECK:STDOUT: %I1.ref.loc8_39: %I.assoc_type.c03 = name_ref I1, %.loc8_39.2 [symbolic_self = constants.%assoc0.2f7] +// CHECK:STDOUT: %.loc8_39.2: %I.assoc_type.c03 = specific_constant @I1.%assoc0, @I(constants.%.Self.binding.as_type.8db, constants.%T.706) [symbolic_self = constants.%assoc0.fe4] +// CHECK:STDOUT: %I1.ref.loc8_39: %I.assoc_type.c03 = name_ref I1, %.loc8_39.2 [symbolic_self = constants.%assoc0.fe4] // CHECK:STDOUT: %impl.elem0.loc8_39: type = impl_witness_access constants.%I.lookup_impl_witness.94d, element0 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc8_39.3: Core.Form = init_form %impl.elem0.loc8_39, call_param0 [concrete = constants.%.842] // CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.2 [symbolic_self = constants.%I_where.type] { @@ -420,8 +420,8 @@ fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) { // CHECK:STDOUT: %.Self.ref.loc8_25: %I.type.bee = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.dad] // CHECK:STDOUT: %.Self.as_type.loc8_25: type = facet_access_type %.Self.ref.loc8_25 [symbolic_self = constants.%.Self.binding.as_type.b0b] // CHECK:STDOUT: %.loc8_25.1: type = converted %.Self.ref.loc8_25, %.Self.as_type.loc8_25 [symbolic_self = constants.%.Self.binding.as_type.b0b] -// CHECK:STDOUT: %.loc8_25.2: %I.assoc_type.c03 = specific_constant @I1.%assoc0, @I(constants.%.Self.binding.as_type.8db) [symbolic_self = constants.%assoc0.2f7] -// CHECK:STDOUT: %I1.ref.loc8_25: %I.assoc_type.c03 = name_ref I1, %.loc8_25.2 [symbolic_self = constants.%assoc0.2f7] +// CHECK:STDOUT: %.loc8_25.2: %I.assoc_type.c03 = specific_constant @I1.%assoc0, @I(constants.%.Self.binding.as_type.8db, constants.%.Self.dad) [symbolic_self = constants.%assoc0.fe4] +// CHECK:STDOUT: %I1.ref.loc8_25: %I.assoc_type.c03 = name_ref I1, %.loc8_25.2 [symbolic_self = constants.%assoc0.fe4] // CHECK:STDOUT: %impl.elem0.loc8_25: type = impl_witness_access constants.%I.lookup_impl_witness.3fc, 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] @@ -442,8 +442,8 @@ fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) { // CHECK:STDOUT: %T.ref: %I_where.type = name_ref T, %T.loc12_6.2 [symbolic = %T.loc12_6.1 (constants.%T.706)] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc12_47.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc12_47.2: %I.assoc_type.c03 = specific_constant @I1.%assoc0, @I(constants.%.Self.binding.as_type.8db) [symbolic_self = constants.%assoc0.2f7] -// CHECK:STDOUT: %I1.ref.loc12_47: %I.assoc_type.c03 = name_ref I1, %.loc12_47.2 [symbolic_self = constants.%assoc0.2f7] +// CHECK:STDOUT: %.loc12_47.2: %I.assoc_type.c03 = specific_constant @I1.%assoc0, @I(constants.%.Self.binding.as_type.8db, constants.%T.706) [symbolic_self = constants.%assoc0.fe4] +// CHECK:STDOUT: %I1.ref.loc12_47: %I.assoc_type.c03 = name_ref I1, %.loc12_47.2 [symbolic_self = constants.%assoc0.fe4] // CHECK:STDOUT: %impl.elem0.loc12_47: type = impl_witness_access constants.%I.lookup_impl_witness.94d, element0 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc12_47.3: Core.Form = init_form %impl.elem0.loc12_47, call_param0 [concrete = constants.%.842] // CHECK:STDOUT: %.loc12_27.1: type = splice_block %.loc12_27.2 [symbolic_self = constants.%I_where.type] { @@ -457,8 +457,8 @@ fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) { // CHECK:STDOUT: %.Self.ref.loc12_33: %I.type.bee = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.dad] // CHECK:STDOUT: %.Self.as_type.loc12_33: type = facet_access_type %.Self.ref.loc12_33 [symbolic_self = constants.%.Self.binding.as_type.b0b] // CHECK:STDOUT: %.loc12_33.1: type = converted %.Self.ref.loc12_33, %.Self.as_type.loc12_33 [symbolic_self = constants.%.Self.binding.as_type.b0b] -// CHECK:STDOUT: %.loc12_33.2: %I.assoc_type.c03 = specific_constant @I1.%assoc0, @I(constants.%.Self.binding.as_type.8db) [symbolic_self = constants.%assoc0.2f7] -// CHECK:STDOUT: %I1.ref.loc12_33: %I.assoc_type.c03 = name_ref I1, %.loc12_33.2 [symbolic_self = constants.%assoc0.2f7] +// CHECK:STDOUT: %.loc12_33.2: %I.assoc_type.c03 = specific_constant @I1.%assoc0, @I(constants.%.Self.binding.as_type.8db, constants.%.Self.dad) [symbolic_self = constants.%assoc0.fe4] +// CHECK:STDOUT: %I1.ref.loc12_33: %I.assoc_type.c03 = name_ref I1, %.loc12_33.2 [symbolic_self = constants.%assoc0.fe4] // CHECK:STDOUT: %impl.elem0.loc12_33: type = impl_witness_access constants.%I.lookup_impl_witness.3fc, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc12_40.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc12_40.2: type = converted %.loc12_40.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -479,13 +479,14 @@ fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc4_13.1)> [symbolic = %I.type (constants.%I.type.1ab)] // CHECK:STDOUT: %Self.loc4_23.2: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.fdb)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc4_13.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.76c)] -// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, %I1 [symbolic = %assoc0 (constants.%assoc0.963)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc4_23.1: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.fdb)] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %I1: type = assoc_const_decl @I1 [concrete] { -// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, @I.%I1 [symbolic = @I.%assoc0 (constants.%assoc0.963)] +// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, @I.%I1 [symbolic = @I.%assoc0 (constants.%assoc0.99e)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -497,10 +498,6 @@ fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @I1(@I.%T.loc4_13.2: type, @I.%Self.loc4_23.1: @I.%I.type (%I.type.1ab)) { -// CHECK:STDOUT: assoc_const I1:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc8_6.2: %I_where.type) { // CHECK:STDOUT: %T.loc8_6.1: %I_where.type = symbolic_binding T, 0 [symbolic = %T.loc8_6.1 (constants.%T.706)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc8_6.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] @@ -537,7 +534,7 @@ fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) { // CHECK:STDOUT: %T.loc4_13.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I1(constants.%T.67d, constants.%Self.fdb) {} +// CHECK:STDOUT: specific @I(constants.%T.67d, constants.%Self.fdb) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%.Self.binding.as_type.8db) { // CHECK:STDOUT: %T.loc4_13.1 => constants.%.Self.binding.as_type.8db @@ -545,13 +542,35 @@ fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.bee // CHECK:STDOUT: %Self.loc4_23.2 => constants.%Self.fa8 -// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.c03 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.2f7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I1(constants.%.Self.binding.as_type.8db, constants.%.Self.dad) {} +// CHECK:STDOUT: specific @I(constants.%.Self.binding.as_type.8db, constants.%Self.fdb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%.Self.binding.as_type.8db +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.c03 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.fe4 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I1(constants.%.Self.binding.as_type.8db, constants.%I.facet) {} +// CHECK:STDOUT: specific @I(constants.%.Self.binding.as_type.8db, constants.%.Self.dad) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%.Self.binding.as_type.8db +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.c03 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.fe4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%.Self.binding.as_type.8db, constants.%T.706) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%.Self.binding.as_type.8db +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.c03 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.fe4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%.Self.binding.as_type.8db, constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%.Self.binding.as_type.8db +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.c03 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.fe4 +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.706) { // CHECK:STDOUT: %T.loc8_6.1 => constants.%T.706 diff --git a/toolchain/check/testdata/facet/require_import.carbon b/toolchain/check/testdata/facet/require_import.carbon index c6a0f8437982..7c3249ba3875 100644 --- a/toolchain/check/testdata/facet/require_import.carbon +++ b/toolchain/check/testdata/facet/require_import.carbon @@ -63,25 +63,17 @@ fn F(B:! Y) { // CHECK:STDOUT: %Z.type.0ed: type = facet_type <@Z, @Z(%T)> [symbolic] // CHECK:STDOUT: %Self.984: %Z.type.0ed = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Z.assoc_type.0bf: type = assoc_entity_type @Z, @Z(%T) [symbolic] -// CHECK:STDOUT: %assoc0.f88: %Z.assoc_type.0bf = assoc_entity element0, imports.%Main.import_ref.f14 [symbolic] -// CHECK:STDOUT: %Z.F.type.6cb: type = fn_type @Z.F, @Z(%T) [symbolic] -// CHECK:STDOUT: %Z.F.6cc: %Z.F.type.6cb = struct_value () [symbolic] +// CHECK:STDOUT: %Z.WithSelf.F.type.091: type = fn_type @Z.WithSelf.F, @Z(%T, %Self.984) [symbolic] +// CHECK:STDOUT: %Z.WithSelf.F.073: %Z.WithSelf.F.type.091 = struct_value () [symbolic] // CHECK:STDOUT: %Z.type.9f3244.1: type = facet_type <@Z, @Z(%Self.binding.as_type.f60)> [symbolic] -// CHECK:STDOUT: %Z.assoc_type.449133.1: type = assoc_entity_type @Z, @Z(%Self.binding.as_type.f60) [symbolic] -// CHECK:STDOUT: %assoc0.179: %Z.assoc_type.449133.1 = assoc_entity element0, imports.%Main.import_ref.5847cb.1 [symbolic] -// CHECK:STDOUT: %Z.F.type.0ab8e8.1: type = fn_type @Z.F, @Z(%Self.binding.as_type.f60) [symbolic] -// CHECK:STDOUT: %Z.F.d97fe5.1: %Z.F.type.0ab8e8.1 = struct_value () [symbolic] // CHECK:STDOUT: %Self.fcd60c.1: %Z.type.9f3244.1 = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %require_complete.18ce0f.1: = require_complete_type %Z.type.9f3244.1 [symbolic] // CHECK:STDOUT: %A: %X.type = symbolic_binding A, 0 [symbolic] // CHECK:STDOUT: %pattern_type.9a5: type = pattern_type %X.type [concrete] // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete] // CHECK:STDOUT: %Self.d4d: %Y.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type.63e: type = symbolic_binding_type Self, 0, %Self.d4d [symbolic] // CHECK:STDOUT: %Z.type.d16: type = facet_type <@Z, @Z(%Self.binding.as_type.63e)> [symbolic] -// CHECK:STDOUT: %Z.assoc_type.df3: type = assoc_entity_type @Z, @Z(%Self.binding.as_type.63e) [symbolic] -// CHECK:STDOUT: %assoc0.e61: %Z.assoc_type.df3 = assoc_entity element0, imports.%Main.import_ref.5847cb.2 [symbolic] -// CHECK:STDOUT: %Z.F.type.388: type = fn_type @Z.F, @Z(%Self.binding.as_type.63e) [symbolic] -// CHECK:STDOUT: %Z.F.791: %Z.F.type.388 = struct_value () [symbolic] // CHECK:STDOUT: %Self.890: %Z.type.d16 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %B: %Y.type = symbolic_binding B, 1 [symbolic] // CHECK:STDOUT: %pattern_type.95b: type = pattern_type %Y.type [concrete] @@ -89,44 +81,46 @@ fn F(B:! Y) { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %A.binding.as_type: type = symbolic_binding_type A, 0, %A [symbolic] // CHECK:STDOUT: %Z.type.9f3244.2: type = facet_type <@Z, @Z(%A.binding.as_type)> [symbolic] +// CHECK:STDOUT: %require_complete.18ce0f.2: = require_complete_type %Z.type.9f3244.2 [symbolic] // CHECK:STDOUT: %Self.fcd60c.2: %Z.type.9f3244.2 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Z.F.type.0ab8e8.2: type = fn_type @Z.F, @Z(%A.binding.as_type) [symbolic] -// CHECK:STDOUT: %Z.F.d97fe5.2: %Z.F.type.0ab8e8.2 = struct_value () [symbolic] -// CHECK:STDOUT: %Z.assoc_type.449133.2: type = assoc_entity_type @Z, @Z(%A.binding.as_type) [symbolic] -// CHECK:STDOUT: %assoc0.f48: %Z.assoc_type.449133.2 = assoc_entity element0, imports.%Main.import_ref.f14 [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %Z.type.9f3244.2 [symbolic] -// CHECK:STDOUT: %assoc0.d5a: %Z.assoc_type.0bf = assoc_entity element0, imports.%Main.import_ref.5847cb.3 [symbolic] +// CHECK:STDOUT: %Z.WithSelf.F.type.6cc: type = fn_type @Z.WithSelf.F, @Z(%A.binding.as_type, %Self.984) [symbolic] +// CHECK:STDOUT: %Z.WithSelf.F.926: %Z.WithSelf.F.type.6cc = struct_value () [symbolic] +// CHECK:STDOUT: %Z.assoc_type.449: type = assoc_entity_type @Z, @Z(%A.binding.as_type) [symbolic] +// CHECK:STDOUT: %assoc0.9a4: %Z.assoc_type.449 = assoc_entity element0, imports.%Main.import_ref.7b4 [symbolic] +// CHECK:STDOUT: %Z.WithSelf.F.type.048: type = fn_type @Z.WithSelf.F, @Z(%A.binding.as_type, %A) [symbolic] +// CHECK:STDOUT: %Z.WithSelf.F.aaa: %Z.WithSelf.F.type.048 = struct_value () [symbolic] +// CHECK:STDOUT: %assoc0.20d: %Z.assoc_type.0bf = assoc_entity element0, imports.%Main.import_ref.47b [symbolic] // CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %A, @Z, @Z(%A.binding.as_type) [symbolic] // CHECK:STDOUT: %Z.facet: %Z.type.9f3244.2 = facet_value %A.binding.as_type, (%Z.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.168: type = fn_type_with_self_type %Z.F.type.0ab8e8.2, %Z.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.168 = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Z.F(%A.binding.as_type, %Z.facet) [symbolic] +// CHECK:STDOUT: %Z.WithSelf.F.type.501: type = fn_type @Z.WithSelf.F, @Z(%A.binding.as_type, %Z.facet) [symbolic] +// CHECK:STDOUT: %Z.WithSelf.F.cf6: %Z.WithSelf.F.type.501 = struct_value () [symbolic] +// CHECK:STDOUT: %.d31: type = fn_type_with_self_type %Z.WithSelf.F.type.501, %Z.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.d31 = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Z.WithSelf.F(%A.binding.as_type, %Z.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.Z = import_ref Main//a, Z, unloaded // CHECK:STDOUT: %Main.Y: type = import_ref Main//a, Y, loaded [concrete = constants.%Y.type] // CHECK:STDOUT: %Main.X: type = import_ref Main//a, X, loaded [concrete = constants.%X.type] -// CHECK:STDOUT: %Main.import_ref.145 = import_ref Main//a, loc3_23, unloaded -// CHECK:STDOUT: %Main.import_ref.f4a: @Z.%Z.assoc_type (%Z.assoc_type.0bf) = import_ref Main//a, loc4_9, loaded [symbolic = @Z.%assoc0 (constants.%assoc0.d5a)] +// CHECK:STDOUT: %Main.import_ref.13d: type = import_ref Main//a, loc12_31, loaded [symbolic = @X.%Z.type (constants.%Z.type.9f3244.1)] +// CHECK:STDOUT: %Main.import_ref.f56: @Z.%Z.assoc_type (%Z.assoc_type.0bf) = import_ref Main//a, loc4_9, loaded [symbolic = @Z.%assoc0 (constants.%assoc0.20d)] // CHECK:STDOUT: %Main.F = import_ref Main//a, F, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//a, loc3_13, loaded [symbolic = @Z.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.f14: @Z.%Z.F.type (%Z.F.type.6cb) = import_ref Main//a, loc4_9, loaded [symbolic = @Z.%Z.F (constants.%Z.F.6cc)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//a, loc3_13, loaded [symbolic = @Z.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.1dc: @Z.%Z.type (%Z.type.0ed) = import_ref Main//a, loc3_23, loaded [symbolic = @Z.%Self (constants.%Self.984)] -// CHECK:STDOUT: %Main.import_ref.5847cb.1 = import_ref Main//a, loc4_9, unloaded -// CHECK:STDOUT: %Main.import_ref.67f: type = import_ref Main//a, loc12_18, loaded [symbolic = @X.Self.binding.as_type.impls.Z.type.require.%Self.binding.as_type (constants.%Self.binding.as_type.f60)] -// CHECK:STDOUT: %Main.import_ref.8d6: type = import_ref Main//a, loc12_30, loaded [symbolic = @X.Self.binding.as_type.impls.Z.type.require.%Z.type (constants.%Z.type.9f3244.1)] -// CHECK:STDOUT: %Main.import_ref.e33cd1.1: %X.type = import_ref Main//a, loc11_14, loaded [symbolic = constants.%Self.f45] +// CHECK:STDOUT: %Main.import_ref.7b4: @Z.%Z.WithSelf.F.type (%Z.WithSelf.F.type.091) = import_ref Main//a, loc4_9, loaded [symbolic = @Z.%Z.WithSelf.F (constants.%Z.WithSelf.F.073)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//a, loc3_13, loaded [symbolic = @Z.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.1dc578.2: @Z.%Z.type.1 (%Z.type.0ed) = import_ref Main//a, loc3_23, loaded [symbolic = @Z.%Self.1 (constants.%Self.984)] +// CHECK:STDOUT: %Main.import_ref.145 = import_ref Main//a, loc3_23, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//a, loc3_13, loaded [symbolic = @Z.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.67f: type = import_ref Main//a, loc12_18, loaded [symbolic = @X.WithSelf.Self.binding.as_type.impls.Z.type.require.%Self.binding.as_type (constants.%Self.binding.as_type.f60)] +// CHECK:STDOUT: %Main.import_ref.8d6: type = import_ref Main//a, loc12_30, loaded [symbolic = @X.WithSelf.Self.binding.as_type.impls.Z.type.require.%Z.type (constants.%Z.type.9f3244.1)] +// CHECK:STDOUT: %Main.import_ref.e33cd1.2: %X.type = import_ref Main//a, loc11_14, loaded [symbolic = constants.%Self.f45] // CHECK:STDOUT: %Main.import_ref.65b = import_ref Main//a, loc11_14, unloaded -// CHECK:STDOUT: %Main.import_ref.f88: type = import_ref Main//a, loc12_31, loaded [symbolic = constants.%Z.type.9f3244.1] -// CHECK:STDOUT: %Main.import_ref.5847cb.2 = import_ref Main//a, loc4_9, unloaded -// CHECK:STDOUT: %Main.import_ref.7bb: type = import_ref Main//a, loc8_18, loaded [symbolic = @Y.Self.binding.as_type.impls.Z.type.require.%Self.binding.as_type (constants.%Self.binding.as_type.63e)] -// CHECK:STDOUT: %Main.import_ref.5ab: type = import_ref Main//a, loc8_30, loaded [symbolic = @Y.Self.binding.as_type.impls.Z.type.require.%Z.type (constants.%Z.type.d16)] -// CHECK:STDOUT: %Main.import_ref.8c7: %Y.type = import_ref Main//a, loc7_13, loaded [symbolic = constants.%Self.d4d] -// CHECK:STDOUT: %Main.import_ref.3e2c97.1 = import_ref Main//a, loc7_13, unloaded -// CHECK:STDOUT: %Main.import_ref.80a = import_ref Main//a, loc8_31, unloaded -// CHECK:STDOUT: %Main.import_ref.5847cb.3 = import_ref Main//a, loc4_9, unloaded +// CHECK:STDOUT: %Main.import_ref.b51 = import_ref Main//a, loc8_31, unloaded +// CHECK:STDOUT: %Main.import_ref.7bb: type = import_ref Main//a, loc8_18, loaded [symbolic = @Y.WithSelf.Self.binding.as_type.impls.Z.type.require.%Self.binding.as_type (constants.%Self.binding.as_type.63e)] +// CHECK:STDOUT: %Main.import_ref.5ab: type = import_ref Main//a, loc8_30, loaded [symbolic = @Y.WithSelf.Self.binding.as_type.impls.Z.type.require.%Z.type (constants.%Z.type.d16)] +// CHECK:STDOUT: %Main.import_ref.8c73c0.2: %Y.type = import_ref Main//a, loc7_13, loaded [symbolic = constants.%Self.d4d] +// CHECK:STDOUT: %Main.import_ref.3e2 = import_ref Main//a, loc7_13, unloaded +// CHECK:STDOUT: %Main.import_ref.47b = import_ref Main//a, loc4_9, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -155,21 +149,17 @@ fn F(B:! Y) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @Z(imports.%Main.import_ref.b3bc94.1: type) [from "a.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @Z(imports.%Main.import_ref.b3bc94.3: type) [from "a.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T)> [symbolic = %Z.type (constants.%Z.type.0ed)] -// CHECK:STDOUT: %Self: @Z.%Z.type (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.984)] -// CHECK:STDOUT: %Z.F.type: type = fn_type @Z.F, @Z(%T) [symbolic = %Z.F.type (constants.%Z.F.type.6cb)] -// CHECK:STDOUT: %Z.F: @Z.%Z.F.type (%Z.F.type.6cb) = struct_value () [symbolic = %Z.F (constants.%Z.F.6cc)] -// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%T) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.0bf)] -// CHECK:STDOUT: %assoc0: @Z.%Z.assoc_type (%Z.assoc_type.0bf) = assoc_entity element0, imports.%Main.import_ref.f14 [symbolic = %assoc0 (constants.%assoc0.f88)] +// CHECK:STDOUT: %Z.type.1: type = facet_type <@Z, @Z(%T.1)> [symbolic = %Z.type.1 (constants.%Z.type.0ed)] +// CHECK:STDOUT: %Self.1: @Z.%Z.type.1 (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.984)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.145 -// CHECK:STDOUT: .F = imports.%Main.import_ref.f4a +// CHECK:STDOUT: .F = imports.%Main.import_ref.f56 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -178,12 +168,12 @@ fn F(B:! Y) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Y [from "a.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Main.import_ref.3e2c97.1 -// CHECK:STDOUT: extend imports.%Main.import_ref.80a +// CHECK:STDOUT: .Self = imports.%Main.import_ref.3e2 +// CHECK:STDOUT: extend imports.%Main.import_ref.b51 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Y.Self.binding.as_type.impls.Z.type.require { +// CHECK:STDOUT: @Y.WithSelf.Self.binding.as_type.impls.Z.type.require { // CHECK:STDOUT: require imports.%Main.import_ref.7bb impls imports.%Main.import_ref.5ab // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -192,27 +182,27 @@ fn F(B:! Y) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.65b // CHECK:STDOUT: .F = -// CHECK:STDOUT: extend imports.%Main.import_ref.f88 +// CHECK:STDOUT: extend imports.%Main.import_ref.13d // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @X.Self.binding.as_type.impls.Z.type.require { +// CHECK:STDOUT: @X.WithSelf.Self.binding.as_type.impls.Z.type.require { // CHECK:STDOUT: require imports.%Main.import_ref.67f impls imports.%Main.import_ref.8d6 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @X.Self.binding.as_type.impls.Z.type.require(imports.%Main.import_ref.e33cd1.1: %X.type) [from "a.carbon"] { +// CHECK:STDOUT: generic require @X.WithSelf.Self.binding.as_type.impls.Z.type.require(imports.%Main.import_ref.e33cd1.2: %X.type) [from "a.carbon"] { // CHECK:STDOUT: %Self: %X.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.f45)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.f60)] // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%Self.binding.as_type)> [symbolic = %Z.type (constants.%Z.type.9f3244.1)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Y.Self.binding.as_type.impls.Z.type.require(imports.%Main.import_ref.8c7: %Y.type) [from "a.carbon"] { +// CHECK:STDOUT: generic require @Y.WithSelf.Self.binding.as_type.impls.Z.type.require(imports.%Main.import_ref.8c73c0.2: %Y.type) [from "a.carbon"] { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.d4d)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.63e)] // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%Self.binding.as_type)> [symbolic = %Z.type (constants.%Z.type.d16)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Z.F(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.1dc: @Z.%Z.type (%Z.type.0ed)) [from "a.carbon"] { +// CHECK:STDOUT: generic fn @Z.WithSelf.F(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.1dc578.2: @Z.%Z.type.1 (%Z.type.0ed)) [from "a.carbon"] { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: @@ -223,67 +213,71 @@ fn F(B:! Y) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A.binding.as_type: type = symbolic_binding_type A, 0, %A.loc4_6.1 [symbolic = %A.binding.as_type (constants.%A.binding.as_type)] // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%A.binding.as_type)> [symbolic = %Z.type (constants.%Z.type.9f3244.2)] -// CHECK:STDOUT: %require_complete: = require_complete_type %Z.type [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%A.binding.as_type) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.449133.2)] -// CHECK:STDOUT: %assoc0: @F.%Z.assoc_type (%Z.assoc_type.449133.2) = assoc_entity element0, imports.%Main.import_ref.f14 [symbolic = %assoc0 (constants.%assoc0.f48)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Z.type [symbolic = %require_complete (constants.%require_complete.18ce0f.2)] +// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%A.binding.as_type) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.449)] +// CHECK:STDOUT: %assoc0: @F.%Z.assoc_type (%Z.assoc_type.449) = assoc_entity element0, imports.%Main.import_ref.7b4 [symbolic = %assoc0 (constants.%assoc0.9a4)] // CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %A.loc4_6.1, @Z, @Z(%A.binding.as_type) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] -// CHECK:STDOUT: %Z.F.type: type = fn_type @Z.F, @Z(%A.binding.as_type) [symbolic = %Z.F.type (constants.%Z.F.type.0ab8e8.2)] // CHECK:STDOUT: %Z.facet: @F.%Z.type (%Z.type.9f3244.2) = facet_value %A.binding.as_type, (%Z.lookup_impl_witness) [symbolic = %Z.facet (constants.%Z.facet)] -// CHECK:STDOUT: %.loc5_4.3: type = fn_type_with_self_type %Z.F.type, %Z.facet [symbolic = %.loc5_4.3 (constants.%.168)] -// CHECK:STDOUT: %impl.elem0.loc5_4.2: @F.%.loc5_4.3 (%.168) = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc5_4.2: = specific_impl_function %impl.elem0.loc5_4.2, @Z.F(%A.binding.as_type, %Z.facet) [symbolic = %specific_impl_fn.loc5_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Z.WithSelf.F.type: type = fn_type @Z.WithSelf.F, @Z(%A.binding.as_type, %Z.facet) [symbolic = %Z.WithSelf.F.type (constants.%Z.WithSelf.F.type.501)] +// CHECK:STDOUT: %.loc5_4.3: type = fn_type_with_self_type %Z.WithSelf.F.type, %Z.facet [symbolic = %.loc5_4.3 (constants.%.d31)] +// CHECK:STDOUT: %impl.elem0.loc5_4.2: @F.%.loc5_4.3 (%.d31) = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc5_4.2: = specific_impl_function %impl.elem0.loc5_4.2, @Z.WithSelf.F(%A.binding.as_type, %Z.facet) [symbolic = %specific_impl_fn.loc5_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %A.ref: %X.type = name_ref A, %A.loc4_6.2 [symbolic = %A.loc4_6.1 (constants.%A)] // CHECK:STDOUT: %A.as_type: type = facet_access_type %A.ref [symbolic = %A.binding.as_type (constants.%A.binding.as_type)] // CHECK:STDOUT: %.loc5_4.1: type = converted %A.ref, %A.as_type [symbolic = %A.binding.as_type (constants.%A.binding.as_type)] -// CHECK:STDOUT: %.loc5_4.2: @F.%Z.assoc_type (%Z.assoc_type.449133.2) = specific_constant imports.%Main.import_ref.f4a, @Z(constants.%A.binding.as_type) [symbolic = %assoc0 (constants.%assoc0.f48)] -// CHECK:STDOUT: %F.ref: @F.%Z.assoc_type (%Z.assoc_type.449133.2) = name_ref F, %.loc5_4.2 [symbolic = %assoc0 (constants.%assoc0.f48)] -// CHECK:STDOUT: %impl.elem0.loc5_4.1: @F.%.loc5_4.3 (%.168) = impl_witness_access constants.%Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc5_4.1: = specific_impl_function %impl.elem0.loc5_4.1, @Z.F(constants.%A.binding.as_type, constants.%Z.facet) [symbolic = %specific_impl_fn.loc5_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %Z.F.call: init %empty_tuple.type = call %specific_impl_fn.loc5_4.1() +// CHECK:STDOUT: %.loc5_4.2: @F.%Z.assoc_type (%Z.assoc_type.449) = specific_constant imports.%Main.import_ref.f56, @Z(constants.%A.binding.as_type, constants.%A) [symbolic = %assoc0 (constants.%assoc0.9a4)] +// CHECK:STDOUT: %F.ref: @F.%Z.assoc_type (%Z.assoc_type.449) = name_ref F, %.loc5_4.2 [symbolic = %assoc0 (constants.%assoc0.9a4)] +// CHECK:STDOUT: %impl.elem0.loc5_4.1: @F.%.loc5_4.3 (%.d31) = impl_witness_access constants.%Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc5_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc5_4.1: = specific_impl_function %impl.elem0.loc5_4.1, @Z.WithSelf.F(constants.%A.binding.as_type, constants.%Z.facet) [symbolic = %specific_impl_fn.loc5_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Z.WithSelf.F.call: init %empty_tuple.type = call %specific_impl_fn.loc5_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.F(constants.%T, constants.%Self.984) {} +// CHECK:STDOUT: specific @Z(constants.%T, constants.%Self.984) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.F(constants.%T, constants.%Self.984) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%Self.binding.as_type.f60) { -// CHECK:STDOUT: %T => constants.%Self.binding.as_type.f60 +// CHECK:STDOUT: %T.1 => constants.%Self.binding.as_type.f60 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Z.type => constants.%Z.type.9f3244.1 -// CHECK:STDOUT: %Self => constants.%Self.fcd60c.1 -// CHECK:STDOUT: %Z.F.type => constants.%Z.F.type.0ab8e8.1 -// CHECK:STDOUT: %Z.F => constants.%Z.F.d97fe5.1 -// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.449133.1 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.179 +// CHECK:STDOUT: %Z.type.1 => constants.%Z.type.9f3244.1 +// CHECK:STDOUT: %Self.1 => constants.%Self.fcd60c.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X.Self.binding.as_type.impls.Z.type.require(constants.%Self.f45) { +// CHECK:STDOUT: specific @X(constants.%Self.f45) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.f45 +// CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.f60 +// CHECK:STDOUT: %Z.type => constants.%Z.type.9f3244.1 +// CHECK:STDOUT: %require_complete => constants.%require_complete.18ce0f.1 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @X.WithSelf.Self.binding.as_type.impls.Z.type.require(constants.%Self.f45) { // CHECK:STDOUT: %Self => constants.%Self.f45 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.f60 // CHECK:STDOUT: %Z.type => constants.%Z.type.9f3244.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%Self.binding.as_type.63e) { -// CHECK:STDOUT: %T => constants.%Self.binding.as_type.63e +// CHECK:STDOUT: %T.1 => constants.%Self.binding.as_type.63e // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Z.type => constants.%Z.type.d16 -// CHECK:STDOUT: %Self => constants.%Self.890 -// CHECK:STDOUT: %Z.F.type => constants.%Z.F.type.388 -// CHECK:STDOUT: %Z.F => constants.%Z.F.791 -// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.df3 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.e61 +// CHECK:STDOUT: %Z.type.1 => constants.%Z.type.d16 +// CHECK:STDOUT: %Self.1 => constants.%Self.890 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Y.Self.binding.as_type.impls.Z.type.require(constants.%Self.d4d) { +// CHECK:STDOUT: specific @Y(constants.%Self.d4d) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y.WithSelf.Self.binding.as_type.impls.Z.type.require(constants.%Self.d4d) { // CHECK:STDOUT: %Self => constants.%Self.d4d // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.63e // CHECK:STDOUT: %Z.type => constants.%Z.type.d16 @@ -294,23 +288,60 @@ fn F(B:! Y) { // CHECK:STDOUT: %B.loc4_13.1 => constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%A.binding.as_type) { -// CHECK:STDOUT: %T => constants.%A.binding.as_type -// CHECK:STDOUT: +// CHECK:STDOUT: specific @X(constants.%A) { // CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%A +// CHECK:STDOUT: %Self.binding.as_type => constants.%A.binding.as_type // CHECK:STDOUT: %Z.type => constants.%Z.type.9f3244.2 -// CHECK:STDOUT: %Self => constants.%Self.fcd60c.2 -// CHECK:STDOUT: %Z.F.type => constants.%Z.F.type.0ab8e8.2 -// CHECK:STDOUT: %Z.F => constants.%Z.F.d97fe5.2 -// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.449133.2 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.f48 +// CHECK:STDOUT: %require_complete => constants.%require_complete.18ce0f.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X.Self.binding.as_type.impls.Z.type.require(constants.%A) { +// CHECK:STDOUT: specific @Z(constants.%A.binding.as_type) { +// CHECK:STDOUT: %T.1 => constants.%A.binding.as_type +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Z.type.1 => constants.%Z.type.9f3244.2 +// CHECK:STDOUT: %Self.1 => constants.%Self.fcd60c.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%A.binding.as_type, constants.%Self.984) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%A.binding.as_type +// CHECK:STDOUT: %Z.type.2 => constants.%Z.type.9f3244.2 +// CHECK:STDOUT: %Self.2 => constants.%Self.984 +// CHECK:STDOUT: %Z.WithSelf.F.type => constants.%Z.WithSelf.F.type.6cc +// CHECK:STDOUT: %Z.WithSelf.F => constants.%Z.WithSelf.F.926 +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.449 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.9a4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%A.binding.as_type, constants.%A) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%A.binding.as_type +// CHECK:STDOUT: %Z.type.2 => constants.%Z.type.9f3244.2 +// CHECK:STDOUT: %Self.2 => constants.%A +// CHECK:STDOUT: %Z.WithSelf.F.type => constants.%Z.WithSelf.F.type.048 +// CHECK:STDOUT: %Z.WithSelf.F => constants.%Z.WithSelf.F.aaa +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.449 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.9a4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @X.WithSelf.Self.binding.as_type.impls.Z.type.require(constants.%A) { // CHECK:STDOUT: %Self => constants.%A // CHECK:STDOUT: %Self.binding.as_type => constants.%A.binding.as_type // CHECK:STDOUT: %Z.type => constants.%Z.type.9f3244.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.F(constants.%A.binding.as_type, constants.%Z.facet) {} +// CHECK:STDOUT: specific @Z(constants.%A.binding.as_type, constants.%Z.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%A.binding.as_type +// CHECK:STDOUT: %Z.type.2 => constants.%Z.type.9f3244.2 +// CHECK:STDOUT: %Self.2 => constants.%Z.facet +// CHECK:STDOUT: %Z.WithSelf.F.type => constants.%Z.WithSelf.F.type.501 +// CHECK:STDOUT: %Z.WithSelf.F => constants.%Z.WithSelf.F.cf6 +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.449 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.9a4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.F(constants.%A.binding.as_type, constants.%Z.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/require_invalid.carbon b/toolchain/check/testdata/facet/require_invalid.carbon index 87b093130144..28dedb4235ad 100644 --- a/toolchain/check/testdata/facet/require_invalid.carbon +++ b/toolchain/check/testdata/facet/require_invalid.carbon @@ -145,7 +145,7 @@ interface Z { fn F() { // The name lookup error still happens, since the `require` is not `extend`. - // CHECK:STDERR: fail_require_with_nonexistent_type.carbon:[[@LINE+4]]:5: error: member name `A` not found in `Z` [MemberNameNotFoundInInstScope] + // CHECK:STDERR: fail_require_with_nonexistent_type.carbon:[[@LINE+4]]:5: error: member name `A` not found in `Z` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: Self.A; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: diff --git a/toolchain/check/testdata/facet/self_in_interface_param.carbon b/toolchain/check/testdata/facet/self_in_interface_param.carbon index 02969f5bc58e..4e132432f9ba 100644 --- a/toolchain/check/testdata/facet/self_in_interface_param.carbon +++ b/toolchain/check/testdata/facet/self_in_interface_param.carbon @@ -34,7 +34,7 @@ fn G(_:! I(.Self) where .I1 = ()) {} // CHECK:STDOUT: %I.type.bee: type = facet_type <@I, @I(%.Self.binding.as_type.8db)> [symbolic_self] // CHECK:STDOUT: %.Self.dad: %I.type.bee = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type.c03: type = assoc_entity_type @I, @I(%.Self.binding.as_type.8db) [symbolic_self] -// CHECK:STDOUT: %assoc0.2f7: %I.assoc_type.c03 = assoc_entity element0, @I.%I1 [symbolic_self] +// CHECK:STDOUT: %assoc0.fe4: %I.assoc_type.c03 = assoc_entity element0, @I.%I1 [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type.b0b: type = symbolic_binding_type .Self, %.Self.dad [symbolic_self] // CHECK:STDOUT: %I.lookup_impl_witness.3fc: = lookup_impl_witness %.Self.dad, @I, @I(%.Self.binding.as_type.8db) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness.3fc, element0 [symbolic_self] @@ -59,8 +59,8 @@ fn G(_:! I(.Self) where .I1 = ()) {} // CHECK:STDOUT: %T.ref: %I_where.type = name_ref T, %T.loc18_6.2 [symbolic = %T.loc18_6.1 (constants.%T.706)] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc18_39.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc18_39.2: %I.assoc_type.c03 = specific_constant @I1.%assoc0, @I(constants.%.Self.binding.as_type.8db) [symbolic_self = constants.%assoc0.2f7] -// CHECK:STDOUT: %I1.ref.loc18_39: %I.assoc_type.c03 = name_ref I1, %.loc18_39.2 [symbolic_self = constants.%assoc0.2f7] +// CHECK:STDOUT: %.loc18_39.2: %I.assoc_type.c03 = specific_constant @I1.%assoc0, @I(constants.%.Self.binding.as_type.8db, constants.%T.706) [symbolic_self = constants.%assoc0.fe4] +// CHECK:STDOUT: %I1.ref.loc18_39: %I.assoc_type.c03 = name_ref I1, %.loc18_39.2 [symbolic_self = constants.%assoc0.fe4] // CHECK:STDOUT: %impl.elem0.loc18_39: type = impl_witness_access constants.%I.lookup_impl_witness.94d, element0 [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc18_39.3: Core.Form = init_form %impl.elem0.loc18_39, call_param0 [concrete = constants.%.842] // CHECK:STDOUT: %.loc18_19.1: type = splice_block %.loc18_19.2 [symbolic_self = constants.%I_where.type] { @@ -74,8 +74,8 @@ fn G(_:! I(.Self) where .I1 = ()) {} // CHECK:STDOUT: %.Self.ref.loc18_25: %I.type.bee = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.dad] // CHECK:STDOUT: %.Self.as_type.loc18_25: type = facet_access_type %.Self.ref.loc18_25 [symbolic_self = constants.%.Self.binding.as_type.b0b] // CHECK:STDOUT: %.loc18_25.1: type = converted %.Self.ref.loc18_25, %.Self.as_type.loc18_25 [symbolic_self = constants.%.Self.binding.as_type.b0b] -// CHECK:STDOUT: %.loc18_25.2: %I.assoc_type.c03 = specific_constant @I1.%assoc0, @I(constants.%.Self.binding.as_type.8db) [symbolic_self = constants.%assoc0.2f7] -// CHECK:STDOUT: %I1.ref.loc18_25: %I.assoc_type.c03 = name_ref I1, %.loc18_25.2 [symbolic_self = constants.%assoc0.2f7] +// CHECK:STDOUT: %.loc18_25.2: %I.assoc_type.c03 = specific_constant @I1.%assoc0, @I(constants.%.Self.binding.as_type.8db, constants.%.Self.dad) [symbolic_self = constants.%assoc0.fe4] +// CHECK:STDOUT: %I1.ref.loc18_25: %I.assoc_type.c03 = name_ref I1, %.loc18_25.2 [symbolic_self = constants.%assoc0.fe4] // CHECK:STDOUT: %impl.elem0.loc18_25: type = impl_witness_access constants.%I.lookup_impl_witness.3fc, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc18_32.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc18_32.2: type = converted %.loc18_32.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] diff --git a/toolchain/check/testdata/for/actual.carbon b/toolchain/check/testdata/for/actual.carbon index 93a3d439ca7c..304173413fc7 100644 --- a/toolchain/check/testdata/for/actual.carbon +++ b/toolchain/check/testdata/for/actual.carbon @@ -71,28 +71,10 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %IntRange.Make.type.1df: type = fn_type @IntRange.Make, @IntRange(%N) [symbolic] // CHECK:STDOUT: %IntRange.Make.8a9: %IntRange.Make.type.1df = struct_value () [symbolic] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] -// CHECK:STDOUT: %.Self.2b2: %Iterate.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.2b2 [symbolic_self] -// CHECK:STDOUT: %Iterate.assoc_type: type = assoc_entity_type @Iterate [concrete] -// CHECK:STDOUT: %assoc1.5ce: %Iterate.assoc_type = assoc_entity element1, imports.%Core.import_ref.c9c [concrete] -// CHECK:STDOUT: %Iterate.lookup_impl_witness.53f: = lookup_impl_witness %.Self.2b2, @Iterate [symbolic_self] -// CHECK:STDOUT: %impl.elem1.49e: type = impl_witness_access %Iterate.lookup_impl_witness.53f, element1 [symbolic_self] -// CHECK:STDOUT: %assoc0.16e: %Iterate.assoc_type = assoc_entity element0, imports.%Core.import_ref.aa7 [concrete] +// CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %facet_type: type = facet_type <@Destroy & @Copy> [concrete] -// CHECK:STDOUT: %impl.elem0.3b1: %facet_type = impl_witness_access %Iterate.lookup_impl_witness.53f, element0 [symbolic_self] -// CHECK:STDOUT: %Destroy.lookup_impl_witness.93c: = lookup_impl_witness %Int.fc6021.1, @Destroy [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] -// CHECK:STDOUT: %require_complete.9019d7.1: = require_complete_type %Int.fc6021.1 [symbolic] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] -// CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] -// CHECK:STDOUT: %.fb84e1.1: Core.Form = init_form %Int.fc6021.1, call_param1 [symbolic] -// CHECK:STDOUT: %.4f8: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic] -// CHECK:STDOUT: %Copy.lookup_impl_witness.7a8: = lookup_impl_witness %Int.fc6021.1, @Copy [symbolic] -// CHECK:STDOUT: %facet_value: %facet_type = facet_value %Int.fc6021.1, (%Destroy.lookup_impl_witness.93c, %Copy.lookup_impl_witness.7a8) [symbolic] -// CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where %impl.elem1.49e = %Int.fc6021.1 and %impl.elem0.3b1 = %facet_value> [symbolic] -// CHECK:STDOUT: %OptionalStorage.type: type = facet_type <@OptionalStorage> [concrete] // CHECK:STDOUT: %Optional.type: type = generic_class_type @Optional [concrete] // CHECK:STDOUT: %Optional.generic: %Optional.type = struct_value () [concrete] // CHECK:STDOUT: %T.542: %OptionalStorage.type = symbolic_binding T, 0 [symbolic] @@ -100,13 +82,29 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %Optional.Some.6ca: %Optional.Some.type.eaa = struct_value () [symbolic] // CHECK:STDOUT: %Optional.None.type.fc5: type = fn_type @Optional.None, @Optional(%T.542) [symbolic] // CHECK:STDOUT: %Optional.None.fcb: %Optional.None.type.fc5 = struct_value () [symbolic] +// CHECK:STDOUT: %.Self.2b2: %Iterate.type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %Iterate.lookup_impl_witness.53f: = lookup_impl_witness %.Self.2b2, @Iterate [symbolic_self] +// CHECK:STDOUT: %impl.elem0.3b1: %facet_type = impl_witness_access %Iterate.lookup_impl_witness.53f, element0 [symbolic_self] +// CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.2b2 [symbolic_self] +// CHECK:STDOUT: %Iterate.assoc_type: type = assoc_entity_type @Iterate [concrete] +// CHECK:STDOUT: %assoc1.a27: %Iterate.assoc_type = assoc_entity element1, imports.%Core.import_ref.cd6 [concrete] +// CHECK:STDOUT: %impl.elem1.49e: type = impl_witness_access %Iterate.lookup_impl_witness.53f, element1 [symbolic_self] +// CHECK:STDOUT: %assoc0.4bd: %Iterate.assoc_type = assoc_entity element0, imports.%Core.import_ref.f74 [concrete] +// CHECK:STDOUT: %Destroy.lookup_impl_witness.93c: = lookup_impl_witness %Int.fc6021.1, @Destroy [symbolic] +// CHECK:STDOUT: %require_complete.9019d7.1: = require_complete_type %Int.fc6021.1 [symbolic] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] +// CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] +// CHECK:STDOUT: %.fb84e1.1: Core.Form = init_form %Int.fc6021.1, call_param1 [symbolic] +// CHECK:STDOUT: %.4f8: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic] +// CHECK:STDOUT: %Copy.lookup_impl_witness.7a8: = lookup_impl_witness %Int.fc6021.1, @Copy [symbolic] +// CHECK:STDOUT: %facet_value: %facet_type = facet_value %Int.fc6021.1, (%Destroy.lookup_impl_witness.93c, %Copy.lookup_impl_witness.7a8) [symbolic] +// CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where %impl.elem0.3b1 = %facet_value and %impl.elem1.49e = %Int.fc6021.1> [symbolic] // CHECK:STDOUT: %Iterate.impl_witness: = impl_witness @IntRange.as.Iterate.impl.%Iterate.impl_witness_table, @IntRange.as.Iterate.impl(%N) [symbolic] -// CHECK:STDOUT: %require_complete.63d: = require_complete_type %Iterate_where.type [symbolic] +// CHECK:STDOUT: %require_complete.234: = require_complete_type %Iterate_where.type [symbolic] // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.type: type = fn_type @IntRange.as.Iterate.impl.NewCursor, @IntRange.as.Iterate.impl(%N) [symbolic] // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor: %IntRange.as.Iterate.impl.NewCursor.type = struct_value () [symbolic] // CHECK:STDOUT: %ptr.c9c: type = ptr_type %Int.fc6021.1 [symbolic] // CHECK:STDOUT: %pattern_type.bda: type = pattern_type %ptr.c9c [symbolic] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %.63c: require_specific_def_type = require_specific_def @T.binding.as_type.as.OptionalStorage.impl(%facet_value) [symbolic] // CHECK:STDOUT: %OptionalStorage.lookup_impl_witness.b62: = lookup_impl_witness %Int.fc6021.1, @OptionalStorage [symbolic] // CHECK:STDOUT: %OptionalStorage.facet.01e: %OptionalStorage.type = facet_value %Int.fc6021.1, (%OptionalStorage.lookup_impl_witness.b62) [symbolic] @@ -120,9 +118,10 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %complete_type.427: = complete_type_witness %struct_type.start.end.ff1 [symbolic] // CHECK:STDOUT: %require_complete.8a1: = require_complete_type %IntRange.265 [symbolic] // CHECK:STDOUT: %Copy.facet.3b9: %Copy.type = facet_value %Int.fc6021.1, (%Copy.lookup_impl_witness.7a8) [symbolic] -// CHECK:STDOUT: %.3676: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.3b9 [symbolic] -// CHECK:STDOUT: %impl.elem0.053: %.3676 = impl_witness_access %Copy.lookup_impl_witness.7a8, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.62b: = specific_impl_function %impl.elem0.053, @Copy.Op(%Copy.facet.3b9) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e13: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.3b9) [symbolic] +// CHECK:STDOUT: %.e29: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e13, %Copy.facet.3b9 [symbolic] +// CHECK:STDOUT: %impl.elem0.694: %.e29 = impl_witness_access %Copy.lookup_impl_witness.7a8, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bd4: = specific_impl_function %impl.elem0.694, @Copy.WithSelf.Op(%Copy.facet.3b9) [symbolic] // CHECK:STDOUT: %require_complete.45c: = require_complete_type %ptr.c9c [symbolic] // CHECK:STDOUT: %Optional.None.type.d56: type = fn_type @Optional.None, @Optional(%OptionalStorage.facet.01e) [symbolic] // CHECK:STDOUT: %Optional.None.b26: %Optional.None.type.d56 = struct_value () [symbolic] @@ -132,15 +131,16 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %OrderedWith.type.270: type = generic_interface_type @OrderedWith [concrete] // CHECK:STDOUT: %OrderedWith.generic: %OrderedWith.type.270 = struct_value () [concrete] // CHECK:STDOUT: %Other: type = symbolic_binding Other, 0 [symbolic] +// CHECK:STDOUT: %OrderedWith.type.ca8: type = facet_type <@OrderedWith, @OrderedWith(%Other)> [symbolic] +// CHECK:STDOUT: %Self.adc: %OrderedWith.type.ca8 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %OrderedWith.assoc_type.2b3: type = assoc_entity_type @OrderedWith, @OrderedWith(%Other) [symbolic] -// CHECK:STDOUT: %OrderedWith.Less.type.ca0: type = fn_type @OrderedWith.Less, @OrderedWith(%Other) [symbolic] -// CHECK:STDOUT: %OrderedWith.Less.c6e: %OrderedWith.Less.type.ca0 = struct_value () [symbolic] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.df2: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(%Other, %Self.adc) [symbolic] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.1a4: %OrderedWith.WithSelf.Less.type.df2 = struct_value () [symbolic] // CHECK:STDOUT: %OrderedWith.type.e44: type = facet_type <@OrderedWith, @OrderedWith(%Int.fc6021.1)> [symbolic] -// CHECK:STDOUT: %OrderedWith.Less.type.566: type = fn_type @OrderedWith.Less, @OrderedWith(%Int.fc6021.1) [symbolic] // CHECK:STDOUT: %OrderedWith.assoc_type.215: type = assoc_entity_type @OrderedWith, @OrderedWith(%Int.fc6021.1) [symbolic] -// CHECK:STDOUT: %assoc0.aa8: %OrderedWith.assoc_type.215 = assoc_entity element0, imports.%Core.import_ref.aa1 [symbolic] +// CHECK:STDOUT: %assoc0.15c: %OrderedWith.assoc_type.215 = assoc_entity element0, imports.%Core.import_ref.255 [symbolic] // CHECK:STDOUT: %require_complete.dd3: = require_complete_type %OrderedWith.type.e44 [symbolic] -// CHECK:STDOUT: %assoc0.3e3: %OrderedWith.assoc_type.2b3 = assoc_entity element0, imports.%Core.import_ref.780a28.1 [symbolic] +// CHECK:STDOUT: %assoc0.666: %OrderedWith.assoc_type.2b3 = assoc_entity element0, imports.%Core.import_ref.e2b [symbolic] // CHECK:STDOUT: %M: Core.IntLiteral = symbolic_binding M, 1 [symbolic] // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type.5f1: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.2e6(%N, %M) [symbolic] // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.a9b: %Int.as.OrderedWith.impl.Less.type.5f1 = struct_value () [symbolic] @@ -151,21 +151,23 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.4cf: %Int.as.OrderedWith.impl.Less.type.3f1 = struct_value () [symbolic] // CHECK:STDOUT: %.4b5: require_specific_def_type = require_specific_def @Int.as.OrderedWith.impl.2e6(%N, %N) [symbolic] // CHECK:STDOUT: %OrderedWith.facet: %OrderedWith.type.e44 = facet_value %Int.fc6021.1, (%OrderedWith.impl_witness.ea9) [symbolic] -// CHECK:STDOUT: %.2ac: type = fn_type_with_self_type %OrderedWith.Less.type.566, %OrderedWith.facet [symbolic] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.3a2: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(%Int.fc6021.1, %OrderedWith.facet) [symbolic] +// CHECK:STDOUT: %.48d: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.3a2, %OrderedWith.facet [symbolic] // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.specific_fn.4c2: = specific_function %Int.as.OrderedWith.impl.Less.4cf, @Int.as.OrderedWith.impl.Less.1(%N, %N) [symbolic] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] -// CHECK:STDOUT: %Inc.Op.type: type = fn_type @Inc.Op [concrete] // CHECK:STDOUT: %.53b: require_specific_def_type = require_specific_def @Int.as.Inc.impl(%N) [symbolic] // CHECK:STDOUT: %Inc.lookup_impl_witness: = lookup_impl_witness %Int.fc6021.1, @Inc [symbolic] // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Int.fc6021.1, (%Inc.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.813: type = fn_type_with_self_type %Inc.Op.type, %Inc.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.1f5: %.813 = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b9e: = specific_impl_function %impl.elem0.1f5, @Inc.Op(%Inc.facet) [symbolic] +// CHECK:STDOUT: %Inc.WithSelf.Op.type.17b: type = fn_type @Inc.WithSelf.Op, @Inc(%Inc.facet) [symbolic] +// CHECK:STDOUT: %.9a6: type = fn_type_with_self_type %Inc.WithSelf.Op.type.17b, %Inc.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.10c: %.9a6 = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.ed3: = specific_impl_function %impl.elem0.10c, @Inc.WithSelf.Op(%Inc.facet) [symbolic] // CHECK:STDOUT: %Optional.Some.specific_fn: = specific_function %Optional.Some.076, @Optional.Some(%OptionalStorage.facet.01e) [symbolic] // CHECK:STDOUT: %Destroy.facet.1c0: %Destroy.type = facet_value %Int.fc6021.1, (%Destroy.lookup_impl_witness.93c) [symbolic] -// CHECK:STDOUT: %.3e7: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.1c0 [symbolic] -// CHECK:STDOUT: %impl.elem0.145: %.3e7 = impl_witness_access %Destroy.lookup_impl_witness.93c, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.c36: = specific_impl_function %impl.elem0.145, @Destroy.Op(%Destroy.facet.1c0) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.297: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.1c0) [symbolic] +// CHECK:STDOUT: %.e63: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.297, %Destroy.facet.1c0 [symbolic] +// CHECK:STDOUT: %impl.elem0.602: %.e63 = impl_witness_access %Destroy.lookup_impl_witness.93c, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.d65: = specific_impl_function %impl.elem0.602, @Destroy.WithSelf.Op(%Destroy.facet.1c0) [symbolic] // CHECK:STDOUT: %Optional.None.specific_fn: = specific_function %Optional.None.b26, @Optional.None(%OptionalStorage.facet.01e) [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] @@ -190,7 +192,6 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %.721: Core.Form = init_form %IntRange.a89, call_param2 [concrete] // CHECK:STDOUT: %IntRange.Make.specific_fn: = specific_function %IntRange.Make.3e9, @IntRange.Make(%int_32) [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -198,13 +199,15 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Copy.facet.de4: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -225,22 +228,22 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic] // CHECK:STDOUT: %Core.Iterate: type = import_ref Core//prelude/iterate, Iterate, loaded [concrete = constants.%Iterate.type] -// CHECK:STDOUT: %Core.import_ref.d2a: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc0.16e] -// CHECK:STDOUT: %Core.import_ref.66d: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc1.5ce] -// CHECK:STDOUT: %Core.import_ref.c9c: type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %CursorType] +// CHECK:STDOUT: %Core.import_ref.39b: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc0.4bd] +// CHECK:STDOUT: %Core.import_ref.0b0: %Iterate.assoc_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc1.a27] +// CHECK:STDOUT: %Core.import_ref.d20: @Optional.%Optional.None.type (%Optional.None.type.fc5) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.fcb)] +// CHECK:STDOUT: %Core.import_ref.aeb: @Optional.%Optional.Some.type (%Optional.Some.type.eaa) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.6ca)] +// CHECK:STDOUT: %Core.import_ref.cd6: type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %CursorType] // CHECK:STDOUT: %CursorType: type = assoc_const_decl @CursorType [concrete] {} -// CHECK:STDOUT: %Core.import_ref.aa7: %facet_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %ElementType] +// CHECK:STDOUT: %Core.import_ref.f74: %facet_type = import_ref Core//prelude/iterate, loc{{\d+_\d+}}, loaded [concrete = %ElementType] // CHECK:STDOUT: %ElementType: %facet_type = assoc_const_decl @ElementType [concrete] {} // CHECK:STDOUT: %Core.import_ref.18d: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.824) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.9b9)] // CHECK:STDOUT: %Copy.impl_witness_table.e76 = impl_witness_table (%Core.import_ref.18d), @Int.as.Copy.impl [concrete] -// CHECK:STDOUT: %Core.import_ref.d20: @Optional.%Optional.None.type (%Optional.None.type.fc5) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.None (constants.%Optional.None.fcb)] -// CHECK:STDOUT: %Core.import_ref.aeb: @Optional.%Optional.Some.type (%Optional.Some.type.eaa) = import_ref Core//prelude/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Some (constants.%Optional.Some.6ca)] // CHECK:STDOUT: %Core.Optional: %Optional.type = import_ref Core//prelude/types/optional, Optional, loaded [concrete = constants.%Optional.generic] // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/copy, Copy, loaded [concrete = constants.%Copy.type] // CHECK:STDOUT: %Core.OrderedWith: %OrderedWith.type.270 = import_ref Core//prelude/operators/comparison, OrderedWith, loaded [concrete = constants.%OrderedWith.generic] -// CHECK:STDOUT: %Core.import_ref.eeb: @OrderedWith.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b3) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.%assoc0 (constants.%assoc0.3e3)] -// CHECK:STDOUT: %Core.import_ref.aa1: @OrderedWith.%OrderedWith.Less.type (%OrderedWith.Less.type.ca0) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.%OrderedWith.Less (constants.%OrderedWith.Less.c6e)] -// CHECK:STDOUT: %Core.import_ref.780a28.1 = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.7e9: @OrderedWith.%OrderedWith.assoc_type (%OrderedWith.assoc_type.2b3) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.%assoc0 (constants.%assoc0.666)] +// CHECK:STDOUT: %Core.import_ref.255: @OrderedWith.%OrderedWith.WithSelf.Less.type (%OrderedWith.WithSelf.Less.type.df2) = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, loaded [symbolic = @OrderedWith.%OrderedWith.WithSelf.Less (constants.%OrderedWith.WithSelf.Less.1a4)] +// CHECK:STDOUT: %Core.import_ref.e2b = import_ref Core//prelude/operators/comparison, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.12b: @Int.as.OrderedWith.impl.2e6.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.5f1) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.OrderedWith.impl.2e6.%Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.a9b)] // CHECK:STDOUT: %Core.import_ref.d3d = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.5ef = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, unloaded @@ -302,11 +305,11 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %.loc9_85.1: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc9_85.1 (constants.%.4f8)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %Int.loc9_54.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.7a8)] // CHECK:STDOUT: %facet_value.loc9_85.1: %facet_type = facet_value %Int.loc9_54.1, (%Destroy.lookup_impl_witness, %Copy.lookup_impl_witness) [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)] -// CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where constants.%impl.elem1.49e = %Int.loc9_54.1 and constants.%impl.elem0.3b1 = %facet_value.loc9_85.1> [symbolic = %Iterate_where.type (constants.%Iterate_where.type)] +// CHECK:STDOUT: %Iterate_where.type: type = facet_type <@Iterate where constants.%impl.elem0.3b1 = %facet_value.loc9_85.1 and constants.%impl.elem1.49e = %Int.loc9_54.1> [symbolic = %Iterate_where.type (constants.%Iterate_where.type)] // CHECK:STDOUT: %Iterate.impl_witness.loc9_87.2: = impl_witness %Iterate.impl_witness_table, @IntRange.as.Iterate.impl(%N) [symbolic = %Iterate.impl_witness.loc9_87.2 (constants.%Iterate.impl_witness)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type %Iterate_where.type [symbolic = %require_complete (constants.%require_complete.63d)] +// CHECK:STDOUT: %require_complete: = require_complete_type %Iterate_where.type [symbolic = %require_complete (constants.%require_complete.234)] // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.type: type = fn_type @IntRange.as.Iterate.impl.NewCursor, @IntRange.as.Iterate.impl(%N) [symbolic = %IntRange.as.Iterate.impl.NewCursor.type (constants.%IntRange.as.Iterate.impl.NewCursor.type)] // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor: @IntRange.as.Iterate.impl.%IntRange.as.Iterate.impl.NewCursor.type (%IntRange.as.Iterate.impl.NewCursor.type) = struct_value () [symbolic = %IntRange.as.Iterate.impl.NewCursor (constants.%IntRange.as.Iterate.impl.NewCursor)] // CHECK:STDOUT: %.loc11: require_specific_def_type = require_specific_def @T.binding.as_type.as.OptionalStorage.impl(%facet_value.loc9_85.1) [symbolic = %.loc11 (constants.%.63c)] @@ -370,10 +373,10 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %return.param: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.e48) = out_param call_param2 // CHECK:STDOUT: %return: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.e48) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant.loc9_87.2, %impl_witness_assoc_constant.loc9_87.1, %IntRange.as.Iterate.impl.NewCursor.decl, %IntRange.as.Iterate.impl.Next.decl), @IntRange.as.Iterate.impl [concrete] +// CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant.loc9_87.1, %impl_witness_assoc_constant.loc9_87.2, %IntRange.as.Iterate.impl.NewCursor.decl, %IntRange.as.Iterate.impl.Next.decl), @IntRange.as.Iterate.impl [concrete] // CHECK:STDOUT: %Iterate.impl_witness.loc9_87.1: = impl_witness %Iterate.impl_witness_table, @IntRange.as.Iterate.impl(constants.%N) [symbolic = %Iterate.impl_witness.loc9_87.2 (constants.%Iterate.impl_witness)] -// CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.1: type = impl_witness_assoc_constant constants.%Int.fc6021.1 [symbolic = %Int.loc9_54.1 (constants.%Int.fc6021.1)] -// CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.2: %facet_type = impl_witness_assoc_constant constants.%facet_value [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)] +// CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.1: %facet_type = impl_witness_assoc_constant constants.%facet_value [symbolic = %facet_value.loc9_85.1 (constants.%facet_value)] +// CHECK:STDOUT: %impl_witness_assoc_constant.loc9_87.2: type = impl_witness_assoc_constant constants.%Int.fc6021.1 [symbolic = %Int.loc9_54.1 (constants.%Int.fc6021.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .N = @@ -436,7 +439,7 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %.Self.ref.loc9_30: %Iterate.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.2b2] // CHECK:STDOUT: %.Self.as_type.loc9_30: type = facet_access_type %.Self.ref.loc9_30 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc9_30: type = converted %.Self.ref.loc9_30, %.Self.as_type.loc9_30 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %CursorType.ref: %Iterate.assoc_type = name_ref CursorType, imports.%Core.import_ref.66d [concrete = constants.%assoc1.5ce] +// CHECK:STDOUT: %CursorType.ref: %Iterate.assoc_type = name_ref CursorType, imports.%Core.import_ref.0b0 [concrete = constants.%assoc1.a27] // CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%Iterate.lookup_impl_witness.53f, element1 [symbolic_self = constants.%impl.elem1.49e] // CHECK:STDOUT: %Core.ref.loc9_44: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Int.ref.loc9_48: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic] @@ -445,7 +448,7 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %.Self.ref.loc9_60: %Iterate.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.2b2] // CHECK:STDOUT: %.Self.as_type.loc9_60: type = facet_access_type %.Self.ref.loc9_60 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc9_60: type = converted %.Self.ref.loc9_60, %.Self.as_type.loc9_60 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %ElementType.ref: %Iterate.assoc_type = name_ref ElementType, imports.%Core.import_ref.d2a [concrete = constants.%assoc0.16e] +// CHECK:STDOUT: %ElementType.ref: %Iterate.assoc_type = name_ref ElementType, imports.%Core.import_ref.39b [concrete = constants.%assoc0.4bd] // CHECK:STDOUT: %impl.elem0: %facet_type = impl_witness_access constants.%Iterate.lookup_impl_witness.53f, element0 [symbolic_self = constants.%impl.elem0.3b1] // CHECK:STDOUT: %Core.ref.loc9_75: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Int.ref.loc9_79: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic] @@ -496,29 +499,30 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %.loc6_22.1: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc6_22.1 (constants.%.4f8)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %Int.loc5_28.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.7a8)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Int.loc5_28.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.3b9)] -// CHECK:STDOUT: %.loc6_22.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc6_22.2 (constants.%.3676)] -// CHECK:STDOUT: %impl.elem0.loc6_22.2: @IntRange.Make.%.loc6_22.2 (%.3676) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.053)] -// CHECK:STDOUT: %specific_impl_fn.loc6_22.2: = specific_impl_function %impl.elem0.loc6_22.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc6_22.2 (constants.%specific_impl_fn.62b)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.e13)] +// CHECK:STDOUT: %.loc6_22.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc6_22.2 (constants.%.e29)] +// CHECK:STDOUT: %impl.elem0.loc6_22.2: @IntRange.Make.%.loc6_22.2 (%.e29) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.694)] +// CHECK:STDOUT: %specific_impl_fn.loc6_22.2: = specific_impl_function %impl.elem0.loc6_22.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc6_22.2 (constants.%specific_impl_fn.bd4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%start.param: @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1), %end.param: @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1)) -> out %return.param: @IntRange.Make.%IntRange (%IntRange.265) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %start.ref: @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = name_ref start, %start // CHECK:STDOUT: %end.ref: @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = name_ref end, %end // CHECK:STDOUT: %.loc6_39.1: @IntRange.Make.%struct_type.start.end (%struct_type.start.end.ff1) = struct_literal (%start.ref, %end.ref) -// CHECK:STDOUT: %impl.elem0.loc6_22.1: @IntRange.Make.%.loc6_22.2 (%.3676) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.053)] +// CHECK:STDOUT: %impl.elem0.loc6_22.1: @IntRange.Make.%.loc6_22.2 (%.e29) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.694)] // CHECK:STDOUT: %bound_method.loc6_22.1: = bound_method %start.ref, %impl.elem0.loc6_22.1 -// CHECK:STDOUT: %specific_impl_fn.loc6_22.1: = specific_impl_function %impl.elem0.loc6_22.1, @Copy.Op(constants.%Copy.facet.3b9) [symbolic = %specific_impl_fn.loc6_22.2 (constants.%specific_impl_fn.62b)] +// CHECK:STDOUT: %specific_impl_fn.loc6_22.1: = specific_impl_function %impl.elem0.loc6_22.1, @Copy.WithSelf.Op(constants.%Copy.facet.3b9) [symbolic = %specific_impl_fn.loc6_22.2 (constants.%specific_impl_fn.bd4)] // CHECK:STDOUT: %bound_method.loc6_22.2: = bound_method %start.ref, %specific_impl_fn.loc6_22.1 -// CHECK:STDOUT: %Copy.Op.call.loc6_22: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = call %bound_method.loc6_22.2(%start.ref) +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc6_22: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = call %bound_method.loc6_22.2(%start.ref) // CHECK:STDOUT: %.loc6_39.2: ref @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = class_element_access %return.param, element0 -// CHECK:STDOUT: %.loc6_39.3: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) to %.loc6_39.2 = in_place_init %Copy.Op.call.loc6_22 -// CHECK:STDOUT: %impl.elem0.loc6_36: @IntRange.Make.%.loc6_22.2 (%.3676) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.053)] +// CHECK:STDOUT: %.loc6_39.3: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) to %.loc6_39.2 = in_place_init %Copy.WithSelf.Op.call.loc6_22 +// CHECK:STDOUT: %impl.elem0.loc6_36: @IntRange.Make.%.loc6_22.2 (%.e29) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.694)] // CHECK:STDOUT: %bound_method.loc6_36.1: = bound_method %end.ref, %impl.elem0.loc6_36 -// CHECK:STDOUT: %specific_impl_fn.loc6_36: = specific_impl_function %impl.elem0.loc6_36, @Copy.Op(constants.%Copy.facet.3b9) [symbolic = %specific_impl_fn.loc6_22.2 (constants.%specific_impl_fn.62b)] +// CHECK:STDOUT: %specific_impl_fn.loc6_36: = specific_impl_function %impl.elem0.loc6_36, @Copy.WithSelf.Op(constants.%Copy.facet.3b9) [symbolic = %specific_impl_fn.loc6_22.2 (constants.%specific_impl_fn.bd4)] // CHECK:STDOUT: %bound_method.loc6_36.2: = bound_method %end.ref, %specific_impl_fn.loc6_36 -// CHECK:STDOUT: %Copy.Op.call.loc6_36: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = call %bound_method.loc6_36.2(%end.ref) +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc6_36: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = call %bound_method.loc6_36.2(%end.ref) // CHECK:STDOUT: %.loc6_39.4: ref @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = class_element_access %return.param, element1 -// CHECK:STDOUT: %.loc6_39.5: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) to %.loc6_39.4 = in_place_init %Copy.Op.call.loc6_36 +// CHECK:STDOUT: %.loc6_39.5: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) to %.loc6_39.4 = in_place_init %Copy.WithSelf.Op.call.loc6_36 // CHECK:STDOUT: %.loc6_39.6: init @IntRange.Make.%IntRange (%IntRange.265) to %return.param = class_init (%.loc6_39.3, %.loc6_39.5) // CHECK:STDOUT: %.loc6_40: init @IntRange.Make.%IntRange (%IntRange.265) = converted %.loc6_39.1, %.loc6_39.6 // CHECK:STDOUT: return %.loc6_40 to %return.param @@ -540,9 +544,10 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %.loc10_60.3: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc10_60.3 (constants.%.4f8)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %Int.loc10_45.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.7a8)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Int.loc10_45.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.3b9)] -// CHECK:STDOUT: %.loc10_60.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_60.4 (constants.%.3676)] -// CHECK:STDOUT: %impl.elem0.loc10_60.2: @IntRange.as.Iterate.impl.NewCursor.%.loc10_60.4 (%.3676) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.053)] -// CHECK:STDOUT: %specific_impl_fn.loc10_60.2: = specific_impl_function %impl.elem0.loc10_60.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_60.2 (constants.%specific_impl_fn.62b)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.e13)] +// CHECK:STDOUT: %.loc10_60.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc10_60.4 (constants.%.e29)] +// CHECK:STDOUT: %impl.elem0.loc10_60.2: @IntRange.as.Iterate.impl.NewCursor.%.loc10_60.4 (%.e29) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.694)] +// CHECK:STDOUT: %specific_impl_fn.loc10_60.2: = specific_impl_function %impl.elem0.loc10_60.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_60.2 (constants.%specific_impl_fn.bd4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @IntRange.as.Iterate.impl.NewCursor.%IntRange (%IntRange.265)) -> out %return.param: @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.fc6021.1) { // CHECK:STDOUT: !entry: @@ -550,12 +555,12 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %start.ref: @IntRange.as.Iterate.impl.NewCursor.%IntRange.elem (%IntRange.elem.541) = name_ref start, @IntRange.%.loc22 [concrete = @IntRange.%.loc22] // CHECK:STDOUT: %.loc10_60.1: ref @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.fc6021.1) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc10_60.2: @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.fc6021.1) = acquire_value %.loc10_60.1 -// CHECK:STDOUT: %impl.elem0.loc10_60.1: @IntRange.as.Iterate.impl.NewCursor.%.loc10_60.4 (%.3676) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.053)] +// CHECK:STDOUT: %impl.elem0.loc10_60.1: @IntRange.as.Iterate.impl.NewCursor.%.loc10_60.4 (%.e29) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.694)] // CHECK:STDOUT: %bound_method.loc10_60.1: = bound_method %.loc10_60.2, %impl.elem0.loc10_60.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_60.1: = specific_impl_function %impl.elem0.loc10_60.1, @Copy.Op(constants.%Copy.facet.3b9) [symbolic = %specific_impl_fn.loc10_60.2 (constants.%specific_impl_fn.62b)] +// CHECK:STDOUT: %specific_impl_fn.loc10_60.1: = specific_impl_function %impl.elem0.loc10_60.1, @Copy.WithSelf.Op(constants.%Copy.facet.3b9) [symbolic = %specific_impl_fn.loc10_60.2 (constants.%specific_impl_fn.bd4)] // CHECK:STDOUT: %bound_method.loc10_60.2: = bound_method %.loc10_60.2, %specific_impl_fn.loc10_60.1 -// CHECK:STDOUT: %Copy.Op.call: init @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.fc6021.1) = call %bound_method.loc10_60.2(%.loc10_60.2) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.fc6021.1) = call %bound_method.loc10_60.2(%.loc10_60.2) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -584,35 +589,38 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %pattern_type.loc12: type = pattern_type %Int.loc11_43.1 [symbolic = %pattern_type.loc12 (constants.%pattern_type.764eab.1)] // CHECK:STDOUT: %.loc12_32.3: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc12_32.3 (constants.%.4f8)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Int.loc11_43.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.3b9)] -// CHECK:STDOUT: %.loc12_32.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc12_32.4 (constants.%.3676)] -// CHECK:STDOUT: %impl.elem0.loc12_32.2: @IntRange.as.Iterate.impl.Next.%.loc12_32.4 (%.3676) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_32.2 (constants.%impl.elem0.053)] -// CHECK:STDOUT: %specific_impl_fn.loc12_32.2: = specific_impl_function %impl.elem0.loc12_32.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc12_32.2 (constants.%specific_impl_fn.62b)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.e13)] +// CHECK:STDOUT: %.loc12_32.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc12_32.4 (constants.%.e29)] +// CHECK:STDOUT: %impl.elem0.loc12_32.2: @IntRange.as.Iterate.impl.Next.%.loc12_32.4 (%.e29) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_32.2 (constants.%impl.elem0.694)] +// CHECK:STDOUT: %specific_impl_fn.loc12_32.2: = specific_impl_function %impl.elem0.loc12_32.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc12_32.2 (constants.%specific_impl_fn.bd4)] // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int.loc11_43.1 [symbolic = %IntRange.elem (constants.%IntRange.elem.541)] // CHECK:STDOUT: %OrderedWith.type.loc13_17.2: type = facet_type <@OrderedWith, @OrderedWith(%Int.loc11_43.1)> [symbolic = %OrderedWith.type.loc13_17.2 (constants.%OrderedWith.type.e44)] // CHECK:STDOUT: %require_complete.loc13: = require_complete_type %OrderedWith.type.loc13_17.2 [symbolic = %require_complete.loc13 (constants.%require_complete.dd3)] // CHECK:STDOUT: %OrderedWith.assoc_type: type = assoc_entity_type @OrderedWith, @OrderedWith(%Int.loc11_43.1) [symbolic = %OrderedWith.assoc_type (constants.%OrderedWith.assoc_type.215)] -// CHECK:STDOUT: %assoc0: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.215) = assoc_entity element0, imports.%Core.import_ref.aa1 [symbolic = %assoc0 (constants.%assoc0.aa8)] +// CHECK:STDOUT: %assoc0: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.215) = assoc_entity element0, imports.%Core.import_ref.255 [symbolic = %assoc0 (constants.%assoc0.15c)] // CHECK:STDOUT: %.loc13_17.2: require_specific_def_type = require_specific_def @Int.as.OrderedWith.impl.2e6(%N, %N) [symbolic = %.loc13_17.2 (constants.%.4b5)] // CHECK:STDOUT: %OrderedWith.impl_witness: = impl_witness imports.%OrderedWith.impl_witness_table.b93, @Int.as.OrderedWith.impl.2e6(%N, %N) [symbolic = %OrderedWith.impl_witness (constants.%OrderedWith.impl_witness.ea9)] -// CHECK:STDOUT: %OrderedWith.Less.type: type = fn_type @OrderedWith.Less, @OrderedWith(%Int.loc11_43.1) [symbolic = %OrderedWith.Less.type (constants.%OrderedWith.Less.type.566)] // CHECK:STDOUT: %OrderedWith.facet: @IntRange.as.Iterate.impl.Next.%OrderedWith.type.loc13_17.2 (%OrderedWith.type.e44) = facet_value %Int.loc11_43.1, (%OrderedWith.impl_witness) [symbolic = %OrderedWith.facet (constants.%OrderedWith.facet)] -// CHECK:STDOUT: %.loc13_17.3: type = fn_type_with_self_type %OrderedWith.Less.type, %OrderedWith.facet [symbolic = %.loc13_17.3 (constants.%.2ac)] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(%Int.loc11_43.1, %OrderedWith.facet) [symbolic = %OrderedWith.WithSelf.Less.type (constants.%OrderedWith.WithSelf.Less.type.3a2)] +// CHECK:STDOUT: %.loc13_17.3: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type, %OrderedWith.facet [symbolic = %.loc13_17.3 (constants.%.48d)] // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.2e6(%N, %N) [symbolic = %Int.as.OrderedWith.impl.Less.type (constants.%Int.as.OrderedWith.impl.Less.type.3f1)] // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less: @IntRange.as.Iterate.impl.Next.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.3f1) = struct_value () [symbolic = %Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.4cf)] // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.specific_fn: = specific_function %Int.as.OrderedWith.impl.Less, @Int.as.OrderedWith.impl.Less.1(%N, %N) [symbolic = %Int.as.OrderedWith.impl.Less.specific_fn (constants.%Int.as.OrderedWith.impl.Less.specific_fn.4c2)] // CHECK:STDOUT: %.loc14_9.1: require_specific_def_type = require_specific_def @Int.as.Inc.impl(%N) [symbolic = %.loc14_9.1 (constants.%.53b)] // CHECK:STDOUT: %Inc.lookup_impl_witness: = lookup_impl_witness %Int.loc11_43.1, @Inc [symbolic = %Inc.lookup_impl_witness (constants.%Inc.lookup_impl_witness)] // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Int.loc11_43.1, (%Inc.lookup_impl_witness) [symbolic = %Inc.facet (constants.%Inc.facet)] -// CHECK:STDOUT: %.loc14_9.2: type = fn_type_with_self_type constants.%Inc.Op.type, %Inc.facet [symbolic = %.loc14_9.2 (constants.%.813)] -// CHECK:STDOUT: %impl.elem0.loc14_9.2: @IntRange.as.Iterate.impl.Next.%.loc14_9.2 (%.813) = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.1f5)] -// CHECK:STDOUT: %specific_impl_fn.loc14_9.2: = specific_impl_function %impl.elem0.loc14_9.2, @Inc.Op(%Inc.facet) [symbolic = %specific_impl_fn.loc14_9.2 (constants.%specific_impl_fn.b9e)] +// CHECK:STDOUT: %Inc.WithSelf.Op.type: type = fn_type @Inc.WithSelf.Op, @Inc(%Inc.facet) [symbolic = %Inc.WithSelf.Op.type (constants.%Inc.WithSelf.Op.type.17b)] +// CHECK:STDOUT: %.loc14_9.2: type = fn_type_with_self_type %Inc.WithSelf.Op.type, %Inc.facet [symbolic = %.loc14_9.2 (constants.%.9a6)] +// CHECK:STDOUT: %impl.elem0.loc14_9.2: @IntRange.as.Iterate.impl.Next.%.loc14_9.2 (%.9a6) = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.10c)] +// CHECK:STDOUT: %specific_impl_fn.loc14_9.2: = specific_impl_function %impl.elem0.loc14_9.2, @Inc.WithSelf.Op(%Inc.facet) [symbolic = %specific_impl_fn.loc14_9.2 (constants.%specific_impl_fn.ed3)] // CHECK:STDOUT: %Optional.Some.type: type = fn_type @Optional.Some, @Optional(%OptionalStorage.facet.loc11_75.1) [symbolic = %Optional.Some.type (constants.%Optional.Some.type.f74)] // CHECK:STDOUT: %Optional.Some: @IntRange.as.Iterate.impl.Next.%Optional.Some.type (%Optional.Some.type.f74) = struct_value () [symbolic = %Optional.Some (constants.%Optional.Some.076)] // CHECK:STDOUT: %Optional.Some.specific_fn.loc15_42.2: = specific_function %Optional.Some, @Optional.Some(%OptionalStorage.facet.loc11_75.1) [symbolic = %Optional.Some.specific_fn.loc15_42.2 (constants.%Optional.Some.specific_fn)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Int.loc11_43.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.1c0)] -// CHECK:STDOUT: %.loc12_7: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc12_7 (constants.%.3e7)] -// CHECK:STDOUT: %impl.elem0.loc12_7.3: @IntRange.as.Iterate.impl.Next.%.loc12_7 (%.3e7) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_7.3 (constants.%impl.elem0.145)] -// CHECK:STDOUT: %specific_impl_fn.loc12_7.3: = specific_impl_function %impl.elem0.loc12_7.3, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc12_7.3 (constants.%specific_impl_fn.c36)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.297)] +// CHECK:STDOUT: %.loc12_7: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc12_7 (constants.%.e63)] +// CHECK:STDOUT: %impl.elem0.loc12_7.3: @IntRange.as.Iterate.impl.Next.%.loc12_7 (%.e63) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_7.3 (constants.%impl.elem0.602)] +// CHECK:STDOUT: %specific_impl_fn.loc12_7.3: = specific_impl_function %impl.elem0.loc12_7.3, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc12_7.3 (constants.%specific_impl_fn.d65)] // CHECK:STDOUT: %Optional.None.type: type = fn_type @Optional.None, @Optional(%OptionalStorage.facet.loc11_75.1) [symbolic = %Optional.None.type (constants.%Optional.None.type.d56)] // CHECK:STDOUT: %Optional.None: @IntRange.as.Iterate.impl.Next.%Optional.None.type (%Optional.None.type.d56) = struct_value () [symbolic = %Optional.None (constants.%Optional.None.b26)] // CHECK:STDOUT: %Optional.None.specific_fn.loc17_42.2: = specific_function %Optional.None, @Optional.None(%OptionalStorage.facet.loc11_75.1) [symbolic = %Optional.None.specific_fn.loc17_42.2 (constants.%Optional.None.specific_fn)] @@ -627,12 +635,12 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %cursor.ref.loc12: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.c9c) = name_ref cursor, %cursor // CHECK:STDOUT: %.loc12_32.1: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = deref %cursor.ref.loc12 // CHECK:STDOUT: %.loc12_32.2: @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = acquire_value %.loc12_32.1 -// CHECK:STDOUT: %impl.elem0.loc12_32.1: @IntRange.as.Iterate.impl.Next.%.loc12_32.4 (%.3676) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc12_32.2 (constants.%impl.elem0.053)] +// CHECK:STDOUT: %impl.elem0.loc12_32.1: @IntRange.as.Iterate.impl.Next.%.loc12_32.4 (%.e29) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc12_32.2 (constants.%impl.elem0.694)] // CHECK:STDOUT: %bound_method.loc12_32.1: = bound_method %.loc12_32.2, %impl.elem0.loc12_32.1 -// CHECK:STDOUT: %specific_impl_fn.loc12_32.1: = specific_impl_function %impl.elem0.loc12_32.1, @Copy.Op(constants.%Copy.facet.3b9) [symbolic = %specific_impl_fn.loc12_32.2 (constants.%specific_impl_fn.62b)] +// CHECK:STDOUT: %specific_impl_fn.loc12_32.1: = specific_impl_function %impl.elem0.loc12_32.1, @Copy.WithSelf.Op(constants.%Copy.facet.3b9) [symbolic = %specific_impl_fn.loc12_32.2 (constants.%specific_impl_fn.bd4)] // CHECK:STDOUT: %bound_method.loc12_32.2: = bound_method %.loc12_32.2, %specific_impl_fn.loc12_32.1 -// CHECK:STDOUT: %Copy.Op.call: init @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = call %bound_method.loc12_32.2(%.loc12_32.2) -// CHECK:STDOUT: assign %value.var, %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = call %bound_method.loc12_32.2(%.loc12_32.2) +// CHECK:STDOUT: assign %value.var, %Copy.WithSelf.Op.call // CHECK:STDOUT: %.loc12_28: type = splice_block %Int.loc12 [symbolic = %Int.loc11_43.1 (constants.%Int.fc6021.1)] { // CHECK:STDOUT: %Core.ref.loc12: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Int.ref.loc12: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic] @@ -646,9 +654,9 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %.loc13_23.1: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = class_element_access %self.ref, element1 // CHECK:STDOUT: %.loc13_23.2: @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = acquire_value %.loc13_23.1 // CHECK:STDOUT: %OrderedWith.type.loc13_17.1: type = facet_type <@OrderedWith, @OrderedWith(constants.%Int.fc6021.1)> [symbolic = %OrderedWith.type.loc13_17.2 (constants.%OrderedWith.type.e44)] -// CHECK:STDOUT: %.loc13_17.1: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.215) = specific_constant imports.%Core.import_ref.eeb, @OrderedWith(constants.%Int.fc6021.1) [symbolic = %assoc0 (constants.%assoc0.aa8)] -// CHECK:STDOUT: %Less.ref: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.215) = name_ref Less, %.loc13_17.1 [symbolic = %assoc0 (constants.%assoc0.aa8)] -// CHECK:STDOUT: %impl.elem0.loc13: @IntRange.as.Iterate.impl.Next.%.loc13_17.3 (%.2ac) = impl_witness_access constants.%OrderedWith.impl_witness.ea9, element0 [symbolic = %Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.4cf)] +// CHECK:STDOUT: %.loc13_17.1: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.215) = specific_constant imports.%Core.import_ref.7e9, @OrderedWith(constants.%Int.fc6021.1, constants.%Self.adc) [symbolic = %assoc0 (constants.%assoc0.15c)] +// CHECK:STDOUT: %Less.ref: @IntRange.as.Iterate.impl.Next.%OrderedWith.assoc_type (%OrderedWith.assoc_type.215) = name_ref Less, %.loc13_17.1 [symbolic = %assoc0 (constants.%assoc0.15c)] +// CHECK:STDOUT: %impl.elem0.loc13: @IntRange.as.Iterate.impl.Next.%.loc13_17.3 (%.48d) = impl_witness_access constants.%OrderedWith.impl_witness.ea9, element0 [symbolic = %Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.4cf)] // CHECK:STDOUT: %bound_method.loc13_17.1: = bound_method %value.ref.loc13, %impl.elem0.loc13 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc13, @Int.as.OrderedWith.impl.Less.1(constants.%N, constants.%N) [symbolic = %Int.as.OrderedWith.impl.Less.specific_fn (constants.%Int.as.OrderedWith.impl.Less.specific_fn.4c2)] // CHECK:STDOUT: %bound_method.loc13_17.2: = bound_method %value.ref.loc13, %specific_fn @@ -661,11 +669,11 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %cursor.ref.loc14: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.c9c) = name_ref cursor, %cursor // CHECK:STDOUT: %.loc14_11: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = deref %cursor.ref.loc14 -// CHECK:STDOUT: %impl.elem0.loc14_9.1: @IntRange.as.Iterate.impl.Next.%.loc14_9.2 (%.813) = impl_witness_access constants.%Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.1f5)] +// CHECK:STDOUT: %impl.elem0.loc14_9.1: @IntRange.as.Iterate.impl.Next.%.loc14_9.2 (%.9a6) = impl_witness_access constants.%Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.10c)] // CHECK:STDOUT: %bound_method.loc14_9.1: = bound_method %.loc14_11, %impl.elem0.loc14_9.1 -// CHECK:STDOUT: %specific_impl_fn.loc14_9.1: = specific_impl_function %impl.elem0.loc14_9.1, @Inc.Op(constants.%Inc.facet) [symbolic = %specific_impl_fn.loc14_9.2 (constants.%specific_impl_fn.b9e)] +// CHECK:STDOUT: %specific_impl_fn.loc14_9.1: = specific_impl_function %impl.elem0.loc14_9.1, @Inc.WithSelf.Op(constants.%Inc.facet) [symbolic = %specific_impl_fn.loc14_9.2 (constants.%specific_impl_fn.ed3)] // CHECK:STDOUT: %bound_method.loc14_9.2: = bound_method %.loc14_11, %specific_impl_fn.loc14_9.1 -// CHECK:STDOUT: %Inc.Op.call: init %empty_tuple.type = call %bound_method.loc14_9.2(%.loc14_11) +// CHECK:STDOUT: %Inc.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc14_9.2(%.loc14_11) // CHECK:STDOUT: %Core.ref.loc15_16: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Optional.ref.loc15: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic] // CHECK:STDOUT: %Core.ref.loc15_30: = name_ref Core, imports.%Core [concrete = imports.%Core] @@ -686,11 +694,11 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %.loc11_75.1: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.e48) = splice_block %return.param {} // CHECK:STDOUT: %.loc15_48: @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = acquire_value %value.ref.loc15 // CHECK:STDOUT: %Optional.Some.call: init @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.e48) to %.loc11_75.1 = call %Optional.Some.specific_fn.loc15_42.1(%.loc15_48) -// CHECK:STDOUT: %impl.elem0.loc12_7.1: @IntRange.as.Iterate.impl.Next.%.loc12_7 (%.3e7) = impl_witness_access constants.%Destroy.lookup_impl_witness.93c, element0 [symbolic = %impl.elem0.loc12_7.3 (constants.%impl.elem0.145)] +// CHECK:STDOUT: %impl.elem0.loc12_7.1: @IntRange.as.Iterate.impl.Next.%.loc12_7 (%.e63) = impl_witness_access constants.%Destroy.lookup_impl_witness.93c, element0 [symbolic = %impl.elem0.loc12_7.3 (constants.%impl.elem0.602)] // CHECK:STDOUT: %bound_method.loc12_7.1: = bound_method %value.var, %impl.elem0.loc12_7.1 -// CHECK:STDOUT: %specific_impl_fn.loc12_7.1: = specific_impl_function %impl.elem0.loc12_7.1, @Destroy.Op(constants.%Destroy.facet.1c0) [symbolic = %specific_impl_fn.loc12_7.3 (constants.%specific_impl_fn.c36)] +// CHECK:STDOUT: %specific_impl_fn.loc12_7.1: = specific_impl_function %impl.elem0.loc12_7.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.1c0) [symbolic = %specific_impl_fn.loc12_7.3 (constants.%specific_impl_fn.d65)] // CHECK:STDOUT: %bound_method.loc12_7.2: = bound_method %value.var, %specific_impl_fn.loc12_7.1 -// CHECK:STDOUT: %Destroy.Op.call.loc12_7.1: init %empty_tuple.type = call %bound_method.loc12_7.2(%value.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call.loc12_7.1: init %empty_tuple.type = call %bound_method.loc12_7.2(%value.var) // CHECK:STDOUT: return %Optional.Some.call to %return.param // CHECK:STDOUT: // CHECK:STDOUT: !if.else: @@ -708,11 +716,11 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %Optional.None.specific_fn.loc17_42.1: = specific_function %None.ref, @Optional.None(constants.%OptionalStorage.facet.01e) [symbolic = %Optional.None.specific_fn.loc17_42.2 (constants.%Optional.None.specific_fn)] // CHECK:STDOUT: %.loc11_75.2: ref @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.e48) = splice_block %return.param {} // CHECK:STDOUT: %Optional.None.call: init @IntRange.as.Iterate.impl.Next.%Optional.loc11_75.1 (%Optional.e48) to %.loc11_75.2 = call %Optional.None.specific_fn.loc17_42.1() -// CHECK:STDOUT: %impl.elem0.loc12_7.2: @IntRange.as.Iterate.impl.Next.%.loc12_7 (%.3e7) = impl_witness_access constants.%Destroy.lookup_impl_witness.93c, element0 [symbolic = %impl.elem0.loc12_7.3 (constants.%impl.elem0.145)] +// CHECK:STDOUT: %impl.elem0.loc12_7.2: @IntRange.as.Iterate.impl.Next.%.loc12_7 (%.e63) = impl_witness_access constants.%Destroy.lookup_impl_witness.93c, element0 [symbolic = %impl.elem0.loc12_7.3 (constants.%impl.elem0.602)] // CHECK:STDOUT: %bound_method.loc12_7.3: = bound_method %value.var, %impl.elem0.loc12_7.2 -// CHECK:STDOUT: %specific_impl_fn.loc12_7.2: = specific_impl_function %impl.elem0.loc12_7.2, @Destroy.Op(constants.%Destroy.facet.1c0) [symbolic = %specific_impl_fn.loc12_7.3 (constants.%specific_impl_fn.c36)] +// CHECK:STDOUT: %specific_impl_fn.loc12_7.2: = specific_impl_function %impl.elem0.loc12_7.2, @Destroy.WithSelf.Op(constants.%Destroy.facet.1c0) [symbolic = %specific_impl_fn.loc12_7.3 (constants.%specific_impl_fn.d65)] // CHECK:STDOUT: %bound_method.loc12_7.4: = bound_method %value.var, %specific_impl_fn.loc12_7.2 -// CHECK:STDOUT: %Destroy.Op.call.loc12_7.2: init %empty_tuple.type = call %bound_method.loc12_7.4(%value.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call.loc12_7.2: init %empty_tuple.type = call %bound_method.loc12_7.4(%value.var) // CHECK:STDOUT: return %Optional.None.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -728,7 +736,7 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %end.ref: %i32 = name_ref end, %end // CHECK:STDOUT: %IntRange.Make.specific_fn: = specific_function %Make.ref, @IntRange.Make(constants.%int_32) [concrete = constants.%IntRange.Make.specific_fn] // CHECK:STDOUT: %.loc26_34.1: ref %IntRange.a89 = splice_block %return.param {} -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc27_28.1: = bound_method %int_0, %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.loc27_28.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -775,7 +783,7 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %Iterate.impl_witness.loc9_87.2 => constants.%Iterate.impl_witness // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete => constants.%require_complete.63d +// CHECK:STDOUT: %require_complete => constants.%require_complete.234 // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor.type => constants.%IntRange.as.Iterate.impl.NewCursor.type // CHECK:STDOUT: %IntRange.as.Iterate.impl.NewCursor => constants.%IntRange.as.Iterate.impl.NewCursor // CHECK:STDOUT: %.loc11 => constants.%.63c @@ -840,7 +848,8 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %.loc6_22.1 => constants.%.14e // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.f17 // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.de4 -// CHECK:STDOUT: %.loc6_22.2 => constants.%.f79 +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.081 +// CHECK:STDOUT: %.loc6_22.2 => constants.%.8e2 // CHECK:STDOUT: %impl.elem0.loc6_22.2 => constants.%Int.as.Copy.impl.Op.664 // CHECK:STDOUT: %specific_impl_fn.loc6_22.2 => constants.%Int.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } @@ -875,10 +884,10 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %.aa5: Core.Form = init_form %IntRange.265, call_param2 [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.4c7: = lookup_impl_witness %Int.b6d943.1, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Int.b6d943.1, (%Copy.lookup_impl_witness.4c7) [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] -// CHECK:STDOUT: %.72c: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.82f: %.72c = impl_witness_access %Copy.lookup_impl_witness.4c7, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.7d1: = specific_impl_function %impl.elem0.82f, @Copy.Op(%Copy.facet) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.2e7: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic] +// CHECK:STDOUT: %.cf8: type = fn_type_with_self_type %Copy.WithSelf.Op.type.2e7, %Copy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.84f: %.cf8 = impl_witness_access %Copy.lookup_impl_witness.4c7, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.508: = specific_impl_function %impl.elem0.84f, @Copy.WithSelf.Op(%Copy.facet) [symbolic] // CHECK:STDOUT: %require_complete.8a1: = require_complete_type %IntRange.265 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %IntRange.a89: type = class_type @IntRange, @IntRange(%int_32) [concrete] @@ -897,7 +906,6 @@ fn Read(y:! Core.IntLiteral()) { // 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.cf3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6da: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.004: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.255: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.004 = struct_value () [symbolic] @@ -905,7 +913,8 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.199: 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.5f4: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.199 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.cf3 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.58d) [concrete] -// CHECK:STDOUT: %.952: type = fn_type_with_self_type %ImplicitAs.Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.979: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.7c3: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.979, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %y, %Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %y, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [symbolic] @@ -1006,7 +1015,7 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %Range.ref: %Range.type = name_ref Range, imports.%Main.Range [concrete = constants.%Range] // CHECK:STDOUT: %y.ref: Core.IntLiteral = name_ref y, %y.loc4_9.2 [symbolic = %y.loc4_9.1 (constants.%y)] // CHECK:STDOUT: %.loc5_3: ref %IntRange.a89 = splice_block %x.var {} -// CHECK:STDOUT: %impl.elem0: %.952 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] +// CHECK:STDOUT: %impl.elem0: %.7c3 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] // CHECK:STDOUT: %bound_method.loc5_31.1: = bound_method %y.ref, %impl.elem0 [symbolic = %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound (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.loc5_31.2: = bound_method %y.ref, %specific_fn [symbolic = %bound_method.loc5_31.3 (constants.%bound_method)] @@ -1042,9 +1051,10 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %.2: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.2 (constants.%.b26)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %Int, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.4c7)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Int, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.3: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.3 (constants.%.72c)] -// CHECK:STDOUT: %impl.elem0: @IntRange.Make.%.3 (%.72c) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0 (constants.%impl.elem0.82f)] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn (constants.%specific_impl_fn.7d1)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.2e7)] +// CHECK:STDOUT: %.3: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.3 (constants.%.cf8)] +// CHECK:STDOUT: %impl.elem0: @IntRange.Make.%.3 (%.cf8) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0 (constants.%impl.elem0.84f)] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn (constants.%specific_impl_fn.508)] // CHECK:STDOUT: // CHECK:STDOUT: fn; // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/for/basic.carbon b/toolchain/check/testdata/for/basic.carbon index bfab474796bc..10c16516a67e 100644 --- a/toolchain/check/testdata/for/basic.carbon +++ b/toolchain/check/testdata/for/basic.carbon @@ -59,17 +59,15 @@ fn Run() { // CHECK:STDOUT: %TrivialRange: type = class_type @TrivialRange [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] -// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %T.035: %Copy.type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %Copy.impl_witness.927: = impl_witness imports.%Copy.impl_witness_table.951 [concrete] -// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %empty_tuple.type, (%Copy.impl_witness.927) [concrete] -// CHECK:STDOUT: %Iterate.NewCursor.type: type = fn_type @Iterate.NewCursor [concrete] -// CHECK:STDOUT: %Iterate.Next.type: type = fn_type @Iterate.Next [concrete] // CHECK:STDOUT: %Optional.Get.type.5bc: type = fn_type @Optional.Get, @Optional(%T.035) [symbolic] // CHECK:STDOUT: %Optional.Get.fa5: %Optional.Get.type.5bc = struct_value () [symbolic] // CHECK:STDOUT: %Optional.HasValue.type.958: type = fn_type @Optional.HasValue, @Optional(%T.035) [symbolic] // CHECK:STDOUT: %Optional.HasValue.d9c: %Optional.HasValue.type.958 = struct_value () [symbolic] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] +// CHECK:STDOUT: %Copy.impl_witness.927: = impl_witness imports.%Copy.impl_witness_table.951 [concrete] +// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %empty_tuple.type, (%Copy.impl_witness.927) [concrete] // CHECK:STDOUT: %Iterate.impl_witness: = impl_witness @TrivialRange.as.Iterate.impl.%Iterate.impl_witness_table [concrete] // CHECK:STDOUT: %TrivialRange.as.Iterate.impl.NewCursor.type.408fa8.1: type = fn_type @TrivialRange.as.Iterate.impl.NewCursor.loc6_32.1 [concrete] // CHECK:STDOUT: %TrivialRange.as.Iterate.impl.NewCursor.c71f42.1: %TrivialRange.as.Iterate.impl.NewCursor.type.408fa8.1 = struct_value () [concrete] @@ -78,6 +76,8 @@ fn Run() { // CHECK:STDOUT: %TrivialRange.as.Iterate.impl.Next.type: type = fn_type @TrivialRange.as.Iterate.impl.Next [concrete] // CHECK:STDOUT: %TrivialRange.as.Iterate.impl.Next: %TrivialRange.as.Iterate.impl.Next.type = struct_value () [concrete] // CHECK:STDOUT: %Iterate.facet: %Iterate.type = facet_value %TrivialRange, (%Iterate.impl_witness) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.a3c: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate(%Iterate.facet) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.9dc: type = fn_type @Iterate.WithSelf.Next, @Iterate(%Iterate.facet) [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %TrivialRange.as.Iterate.impl.NewCursor.type.408fa8.2: type = fn_type @TrivialRange.as.Iterate.impl.NewCursor.loc6_32.2 [concrete] // CHECK:STDOUT: %TrivialRange.as.Iterate.impl.NewCursor.c71f42.2: %TrivialRange.as.Iterate.impl.NewCursor.type.408fa8.2 = struct_value () [concrete] @@ -92,8 +92,8 @@ fn Run() { // CHECK:STDOUT: %AfterLoop: %AfterLoop.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %TrivialRange.val: %TrivialRange = struct_value () [concrete] -// CHECK:STDOUT: %.d38: type = fn_type_with_self_type %Iterate.NewCursor.type, %Iterate.facet [concrete] -// CHECK:STDOUT: %.661: type = fn_type_with_self_type %Iterate.Next.type, %Iterate.facet [concrete] +// CHECK:STDOUT: %.ccd: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.a3c, %Iterate.facet [concrete] +// CHECK:STDOUT: %.827: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.9dc, %Iterate.facet [concrete] // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.4fc, @Optional.HasValue(%Copy.facet) [concrete] // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.756, @Optional.Get(%Copy.facet) [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc18_35.1 [concrete] @@ -107,10 +107,10 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %Core.import_ref.903: %empty_tuple.type.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%empty_tuple.type.as.Copy.impl.Op] -// CHECK:STDOUT: %Copy.impl_witness_table.951 = impl_witness_table (%Core.import_ref.903), @empty_tuple.type.as.Copy.impl [concrete] // CHECK:STDOUT: %Core.import_ref.228: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.958) = import_ref Core//prelude/parts/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.d9c)] // CHECK:STDOUT: %Core.import_ref.f79: @Optional.%Optional.Get.type (%Optional.Get.type.5bc) = import_ref Core//prelude/parts/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.fa5)] +// CHECK:STDOUT: %Core.import_ref.903: %empty_tuple.type.as.Copy.impl.Op.type = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%empty_tuple.type.as.Copy.impl.Op] +// CHECK:STDOUT: %Copy.impl_witness_table.951 = impl_witness_table (%Core.import_ref.903), @empty_tuple.type.as.Copy.impl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -124,7 +124,7 @@ fn Run() { // CHECK:STDOUT: %.loc18_18.3: init %TrivialRange to %.loc18_18.2 = class_init () [concrete = constants.%TrivialRange.val] // CHECK:STDOUT: %.loc18_18.4: ref %TrivialRange = temporary %.loc18_18.2, %.loc18_18.3 // CHECK:STDOUT: %.loc18_20.1: ref %TrivialRange = converted %.loc18_18.1, %.loc18_18.4 -// CHECK:STDOUT: %impl.elem2: %.d38 = impl_witness_access constants.%Iterate.impl_witness, element2 [concrete = constants.%TrivialRange.as.Iterate.impl.NewCursor.c71f42.2] +// CHECK:STDOUT: %impl.elem2: %.ccd = impl_witness_access constants.%Iterate.impl_witness, element2 [concrete = constants.%TrivialRange.as.Iterate.impl.NewCursor.c71f42.2] // CHECK:STDOUT: %bound_method.loc18_35.1: = bound_method %.loc18_20.1, %impl.elem2 // CHECK:STDOUT: %.loc18_20.2: %TrivialRange = acquire_value %.loc18_20.1 // CHECK:STDOUT: %NewCursor.ref: %TrivialRange.as.Iterate.impl.NewCursor.type.408fa8.1 = name_ref NewCursor, @TrivialRange.as.Iterate.impl.%TrivialRange.as.Iterate.impl.NewCursor.decl.loc6_32.1 [concrete = constants.%TrivialRange.as.Iterate.impl.NewCursor.c71f42.1] @@ -136,7 +136,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !for.next: // CHECK:STDOUT: %addr: %ptr.843 = addr_of %var -// CHECK:STDOUT: %impl.elem3: %.661 = impl_witness_access constants.%Iterate.impl_witness, element3 [concrete = constants.%TrivialRange.as.Iterate.impl.Next] +// CHECK:STDOUT: %impl.elem3: %.827 = impl_witness_access constants.%Iterate.impl_witness, element3 [concrete = constants.%TrivialRange.as.Iterate.impl.Next] // CHECK:STDOUT: %bound_method.loc18_35.2: = bound_method %.loc18_20.1, %impl.elem3 // CHECK:STDOUT: %.loc18_35.1: ref %Optional.311 = temporary_storage // CHECK:STDOUT: %.loc18_20.3: %TrivialRange = acquire_value %.loc18_20.1 diff --git a/toolchain/check/testdata/for/pattern.carbon b/toolchain/check/testdata/for/pattern.carbon index 503327c64694..81ae14646ac1 100644 --- a/toolchain/check/testdata/for/pattern.carbon +++ b/toolchain/check/testdata/for/pattern.carbon @@ -140,13 +140,12 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.Make.f9f: %EmptyRange.Make.type.c0f = struct_value () [concrete] // CHECK:STDOUT: %EmptyRange.Make.specific_fn: = specific_function %EmptyRange.Make.f9f, @EmptyRange.Make(%Copy.facet) [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] -// CHECK:STDOUT: %Iterate.NewCursor.type: type = fn_type @Iterate.NewCursor [concrete] +// CHECK:STDOUT: %Optional.Get.type.1ac: type = fn_type @Optional.Get, @Optional(%T.56c) [symbolic] +// CHECK:STDOUT: %Optional.Get.748: %Optional.Get.type.1ac = struct_value () [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.051: type = fn_type @Optional.HasValue, @Optional(%T.56c) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.6ae: %Optional.HasValue.type.051 = struct_value () [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.type.b9d: type = fn_type @EmptyRange.as.Iterate.impl.Next, @EmptyRange.as.Iterate.impl(%T.56c) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.682: %EmptyRange.as.Iterate.impl.Next.type.b9d = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.Get.type.517: type = fn_type @Optional.Get, @Optional(%T.56c) [symbolic] -// CHECK:STDOUT: %Optional.Get.ece: %Optional.Get.type.517 = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.927: type = fn_type @Optional.HasValue, @Optional(%T.56c) [symbolic] -// CHECK:STDOUT: %Optional.HasValue.966: %Optional.HasValue.type.927 = struct_value () [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.type.16c: type = fn_type @EmptyRange.as.Iterate.impl.NewCursor, @EmptyRange.as.Iterate.impl(%T.56c) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.cbe: %EmptyRange.as.Iterate.impl.NewCursor.type.16c = struct_value () [symbolic] // CHECK:STDOUT: %Iterate.impl_witness.96d: = impl_witness imports.%Iterate.impl_witness_table, @EmptyRange.as.Iterate.impl(%Copy.facet) [concrete] @@ -155,18 +154,19 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.type.046: type = fn_type @EmptyRange.as.Iterate.impl.Next, @EmptyRange.as.Iterate.impl(%Copy.facet) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.d08: %EmptyRange.as.Iterate.impl.Next.type.046 = struct_value () [concrete] // CHECK:STDOUT: %Iterate.facet: %Iterate.type = facet_value %EmptyRange.77b, (%Iterate.impl_witness.96d) [concrete] -// CHECK:STDOUT: %.d58: type = fn_type_with_self_type %Iterate.NewCursor.type, %Iterate.facet [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.a35: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate(%Iterate.facet) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.7b4: type = fn_type @Iterate.WithSelf.Next, @Iterate(%Iterate.facet) [concrete] +// CHECK:STDOUT: %.e1f: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.a35, %Iterate.facet [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.NewCursor.da5, @EmptyRange.as.Iterate.impl.NewCursor(%Copy.facet) [concrete] -// CHECK:STDOUT: %Iterate.Next.type: type = fn_type @Iterate.Next [concrete] -// CHECK:STDOUT: %.23b: type = fn_type_with_self_type %Iterate.Next.type, %Iterate.facet [concrete] -// CHECK:STDOUT: %Optional.0f3: type = class_type @Optional, @Optional(%Copy.facet) [concrete] +// CHECK:STDOUT: %.527: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.7b4, %Iterate.facet [concrete] +// CHECK:STDOUT: %Optional.e59: type = class_type @Optional, @Optional(%Copy.facet) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.Next.d08, @EmptyRange.as.Iterate.impl.Next(%Copy.facet) [concrete] -// CHECK:STDOUT: %Optional.HasValue.type.a17: type = fn_type @Optional.HasValue, @Optional(%Copy.facet) [concrete] -// CHECK:STDOUT: %Optional.HasValue.858: %Optional.HasValue.type.a17 = struct_value () [concrete] -// CHECK:STDOUT: %Optional.Get.type.c50: type = fn_type @Optional.Get, @Optional(%Copy.facet) [concrete] -// CHECK:STDOUT: %Optional.Get.e0f: %Optional.Get.type.c50 = struct_value () [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.858, @Optional.HasValue(%Copy.facet) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.e0f, @Optional.Get(%Copy.facet) [concrete] +// CHECK:STDOUT: %Optional.HasValue.type.26b: type = fn_type @Optional.HasValue, @Optional(%Copy.facet) [concrete] +// CHECK:STDOUT: %Optional.HasValue.61c: %Optional.HasValue.type.26b = struct_value () [concrete] +// CHECK:STDOUT: %Optional.Get.type.7ce: type = fn_type @Optional.Get, @Optional(%Copy.facet) [concrete] +// CHECK:STDOUT: %Optional.Get.bce: %Optional.Get.type.7ce = struct_value () [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.61c, @Optional.HasValue(%Copy.facet) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.bce, @Optional.Get(%Copy.facet) [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc10_36.1 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc10_36.2 [concrete] @@ -185,13 +185,13 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.299: @EmptyRange.%EmptyRange.Make.type (%EmptyRange.Make.type.8d6) = import_ref Main//empty_range, loc5_21, loaded [symbolic = @EmptyRange.%EmptyRange.Make (constants.%EmptyRange.Make.0dc)] // CHECK:STDOUT: %Main.import_ref.cb5: %C.as.Copy.impl.Op.type = import_ref Main//empty_range, loc19_33, loaded [concrete = constants.%C.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.c52 = impl_witness_table (%Main.import_ref.cb5), @C.as.Copy.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.f5d: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.051) = import_ref Core//prelude/parts/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6ae)] +// CHECK:STDOUT: %Core.import_ref.ab7: @Optional.%Optional.Get.type (%Optional.Get.type.1ac) = import_ref Core//prelude/parts/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.748)] // CHECK:STDOUT: %Main.import_ref.888 = import_ref Main//empty_range, loc7_68, unloaded // CHECK:STDOUT: %Main.import_ref.999 = import_ref Main//empty_range, loc7_68, unloaded // CHECK:STDOUT: %Main.import_ref.868: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.16c) = import_ref Main//empty_range, loc8_38, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.cbe)] // CHECK:STDOUT: %Main.import_ref.574: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.b9d) = import_ref Main//empty_range, loc11_58, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.682)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.888, %Main.import_ref.999, %Main.import_ref.868, %Main.import_ref.574), @EmptyRange.as.Iterate.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.37b: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.927) = import_ref Main//empty_range, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.966)] -// CHECK:STDOUT: %Main.import_ref.97a: @Optional.%Optional.Get.type (%Optional.Get.type.517) = import_ref Main//empty_range, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.ece)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -210,7 +210,7 @@ fn Run() { // CHECK:STDOUT: %.loc10_35.1: ref %EmptyRange.77b = temporary_storage // CHECK:STDOUT: %EmptyRange.Make.call: init %EmptyRange.77b to %.loc10_35.1 = call %EmptyRange.Make.specific_fn() // CHECK:STDOUT: %.loc10_35.2: ref %EmptyRange.77b = temporary %.loc10_35.1, %EmptyRange.Make.call -// CHECK:STDOUT: %impl.elem2: %.d58 = impl_witness_access constants.%Iterate.impl_witness.96d, element2 [concrete = constants.%EmptyRange.as.Iterate.impl.NewCursor.da5] +// CHECK:STDOUT: %impl.elem2: %.e1f = impl_witness_access constants.%Iterate.impl_witness.96d, element2 [concrete = constants.%EmptyRange.as.Iterate.impl.NewCursor.da5] // CHECK:STDOUT: %bound_method.loc10_36.1: = bound_method %.loc10_35.2, %impl.elem2 // CHECK:STDOUT: %specific_fn.loc10_36.1: = specific_function %impl.elem2, @EmptyRange.as.Iterate.impl.NewCursor(constants.%Copy.facet) [concrete = constants.%EmptyRange.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc10_36.2: = bound_method %.loc10_35.2, %specific_fn.loc10_36.1 @@ -222,33 +222,33 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !for.next: // CHECK:STDOUT: %addr: %ptr.c28 = addr_of %var -// CHECK:STDOUT: %impl.elem3: %.23b = impl_witness_access constants.%Iterate.impl_witness.96d, element3 [concrete = constants.%EmptyRange.as.Iterate.impl.Next.d08] +// CHECK:STDOUT: %impl.elem3: %.527 = impl_witness_access constants.%Iterate.impl_witness.96d, element3 [concrete = constants.%EmptyRange.as.Iterate.impl.Next.d08] // CHECK:STDOUT: %bound_method.loc10_36.3: = bound_method %.loc10_35.2, %impl.elem3 // CHECK:STDOUT: %specific_fn.loc10_36.2: = specific_function %impl.elem3, @EmptyRange.as.Iterate.impl.Next(constants.%Copy.facet) [concrete = constants.%EmptyRange.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc10_36.4: = bound_method %.loc10_35.2, %specific_fn.loc10_36.2 -// CHECK:STDOUT: %.loc10_36.1: ref %Optional.0f3 = temporary_storage +// CHECK:STDOUT: %.loc10_36.1: ref %Optional.e59 = temporary_storage // CHECK:STDOUT: %.loc10_35.4: %EmptyRange.77b = acquire_value %.loc10_35.2 -// CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.call: init %Optional.0f3 to %.loc10_36.1 = call %bound_method.loc10_36.4(%.loc10_35.4, %addr) -// CHECK:STDOUT: %.loc10_36.2: ref %Optional.0f3 = temporary %.loc10_36.1, %EmptyRange.as.Iterate.impl.Next.call -// CHECK:STDOUT: %.loc10_36.3: %Optional.HasValue.type.a17 = specific_constant imports.%Main.import_ref.37b, @Optional(constants.%Copy.facet) [concrete = constants.%Optional.HasValue.858] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.a17 = name_ref HasValue, %.loc10_36.3 [concrete = constants.%Optional.HasValue.858] +// CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.call: init %Optional.e59 to %.loc10_36.1 = call %bound_method.loc10_36.4(%.loc10_35.4, %addr) +// CHECK:STDOUT: %.loc10_36.2: ref %Optional.e59 = temporary %.loc10_36.1, %EmptyRange.as.Iterate.impl.Next.call +// CHECK:STDOUT: %.loc10_36.3: %Optional.HasValue.type.26b = specific_constant imports.%Core.import_ref.f5d, @Optional(constants.%Copy.facet) [concrete = constants.%Optional.HasValue.61c] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.26b = name_ref HasValue, %.loc10_36.3 [concrete = constants.%Optional.HasValue.61c] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc10_36.2, %HasValue.ref // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%Copy.facet) [concrete = constants.%Optional.HasValue.specific_fn] // CHECK:STDOUT: %bound_method.loc10_36.5: = bound_method %.loc10_36.2, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc10_36.4: %Optional.0f3 = acquire_value %.loc10_36.2 +// CHECK:STDOUT: %.loc10_36.4: %Optional.e59 = acquire_value %.loc10_36.2 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc10_36.5(%.loc10_36.4) // CHECK:STDOUT: %.loc10_36.5: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc10_36.6: bool = converted %Optional.HasValue.call, %.loc10_36.5 // CHECK:STDOUT: if %.loc10_36.6 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc10_36.7: %Optional.Get.type.c50 = specific_constant imports.%Main.import_ref.97a, @Optional(constants.%Copy.facet) [concrete = constants.%Optional.Get.e0f] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.c50 = name_ref Get, %.loc10_36.7 [concrete = constants.%Optional.Get.e0f] +// CHECK:STDOUT: %.loc10_36.7: %Optional.Get.type.7ce = specific_constant imports.%Core.import_ref.ab7, @Optional(constants.%Copy.facet) [concrete = constants.%Optional.Get.bce] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.7ce = name_ref Get, %.loc10_36.7 [concrete = constants.%Optional.Get.bce] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc10_36.2, %Get.ref // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%Copy.facet) [concrete = constants.%Optional.Get.specific_fn] // CHECK:STDOUT: %bound_method.loc10_36.6: = bound_method %.loc10_36.2, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc10_36.8: ref %C = temporary_storage -// CHECK:STDOUT: %.loc10_36.9: %Optional.0f3 = acquire_value %.loc10_36.2 +// CHECK:STDOUT: %.loc10_36.9: %Optional.e59 = acquire_value %.loc10_36.2 // CHECK:STDOUT: %Optional.Get.call: init %C to %.loc10_36.8 = call %bound_method.loc10_36.6(%.loc10_36.9) // CHECK:STDOUT: %C.ref.loc10_11: type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %.loc10_36.10: ref %C = temporary %.loc10_36.8, %Optional.Get.call @@ -273,7 +273,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp.loc10_36.1(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @DestroyOp.loc10_36.2(%self.param: ref %Optional.0f3) = "no_op"; +// CHECK:STDOUT: fn @DestroyOp.loc10_36.2(%self.param: ref %Optional.e59) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp.loc10_36.3(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: @@ -303,13 +303,12 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.Make.f9f: %EmptyRange.Make.type.c0f = struct_value () [concrete] // CHECK:STDOUT: %EmptyRange.Make.specific_fn: = specific_function %EmptyRange.Make.f9f, @EmptyRange.Make(%Copy.facet) [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] -// CHECK:STDOUT: %Iterate.NewCursor.type: type = fn_type @Iterate.NewCursor [concrete] +// CHECK:STDOUT: %Optional.Get.type.1ac: type = fn_type @Optional.Get, @Optional(%T.56c) [symbolic] +// CHECK:STDOUT: %Optional.Get.748: %Optional.Get.type.1ac = struct_value () [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.051: type = fn_type @Optional.HasValue, @Optional(%T.56c) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.6ae: %Optional.HasValue.type.051 = struct_value () [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.type.b9d: type = fn_type @EmptyRange.as.Iterate.impl.Next, @EmptyRange.as.Iterate.impl(%T.56c) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.682: %EmptyRange.as.Iterate.impl.Next.type.b9d = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.Get.type.517: type = fn_type @Optional.Get, @Optional(%T.56c) [symbolic] -// CHECK:STDOUT: %Optional.Get.ece: %Optional.Get.type.517 = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.927: type = fn_type @Optional.HasValue, @Optional(%T.56c) [symbolic] -// CHECK:STDOUT: %Optional.HasValue.966: %Optional.HasValue.type.927 = struct_value () [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.type.16c: type = fn_type @EmptyRange.as.Iterate.impl.NewCursor, @EmptyRange.as.Iterate.impl(%T.56c) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.cbe: %EmptyRange.as.Iterate.impl.NewCursor.type.16c = struct_value () [symbolic] // CHECK:STDOUT: %Iterate.impl_witness.96d: = impl_witness imports.%Iterate.impl_witness_table, @EmptyRange.as.Iterate.impl(%Copy.facet) [concrete] @@ -318,18 +317,19 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.type.046: type = fn_type @EmptyRange.as.Iterate.impl.Next, @EmptyRange.as.Iterate.impl(%Copy.facet) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.d08: %EmptyRange.as.Iterate.impl.Next.type.046 = struct_value () [concrete] // CHECK:STDOUT: %Iterate.facet: %Iterate.type = facet_value %EmptyRange.77b, (%Iterate.impl_witness.96d) [concrete] -// CHECK:STDOUT: %.d58: type = fn_type_with_self_type %Iterate.NewCursor.type, %Iterate.facet [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.a35: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate(%Iterate.facet) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.7b4: type = fn_type @Iterate.WithSelf.Next, @Iterate(%Iterate.facet) [concrete] +// CHECK:STDOUT: %.e1f: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.a35, %Iterate.facet [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.NewCursor.da5, @EmptyRange.as.Iterate.impl.NewCursor(%Copy.facet) [concrete] -// CHECK:STDOUT: %Iterate.Next.type: type = fn_type @Iterate.Next [concrete] -// CHECK:STDOUT: %.23b: type = fn_type_with_self_type %Iterate.Next.type, %Iterate.facet [concrete] -// CHECK:STDOUT: %Optional.0f3: type = class_type @Optional, @Optional(%Copy.facet) [concrete] +// CHECK:STDOUT: %.527: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.7b4, %Iterate.facet [concrete] +// CHECK:STDOUT: %Optional.e59: type = class_type @Optional, @Optional(%Copy.facet) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.Next.d08, @EmptyRange.as.Iterate.impl.Next(%Copy.facet) [concrete] -// CHECK:STDOUT: %Optional.HasValue.type.a17: type = fn_type @Optional.HasValue, @Optional(%Copy.facet) [concrete] -// CHECK:STDOUT: %Optional.HasValue.858: %Optional.HasValue.type.a17 = struct_value () [concrete] -// CHECK:STDOUT: %Optional.Get.type.c50: type = fn_type @Optional.Get, @Optional(%Copy.facet) [concrete] -// CHECK:STDOUT: %Optional.Get.e0f: %Optional.Get.type.c50 = struct_value () [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.858, @Optional.HasValue(%Copy.facet) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.e0f, @Optional.Get(%Copy.facet) [concrete] +// CHECK:STDOUT: %Optional.HasValue.type.26b: type = fn_type @Optional.HasValue, @Optional(%Copy.facet) [concrete] +// CHECK:STDOUT: %Optional.HasValue.61c: %Optional.HasValue.type.26b = struct_value () [concrete] +// CHECK:STDOUT: %Optional.Get.type.7ce: type = fn_type @Optional.Get, @Optional(%Copy.facet) [concrete] +// CHECK:STDOUT: %Optional.Get.bce: %Optional.Get.type.7ce = struct_value () [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.61c, @Optional.HasValue(%Copy.facet) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.bce, @Optional.Get(%Copy.facet) [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc10_8 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc10_40.1 [concrete] @@ -348,13 +348,13 @@ fn Run() { // CHECK:STDOUT: %Main.import_ref.299: @EmptyRange.%EmptyRange.Make.type (%EmptyRange.Make.type.8d6) = import_ref Main//empty_range, loc5_21, loaded [symbolic = @EmptyRange.%EmptyRange.Make (constants.%EmptyRange.Make.0dc)] // CHECK:STDOUT: %Main.import_ref.cb5: %C.as.Copy.impl.Op.type = import_ref Main//empty_range, loc19_33, loaded [concrete = constants.%C.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.c52 = impl_witness_table (%Main.import_ref.cb5), @C.as.Copy.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.f5d: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.051) = import_ref Core//prelude/parts/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6ae)] +// CHECK:STDOUT: %Core.import_ref.ab7: @Optional.%Optional.Get.type (%Optional.Get.type.1ac) = import_ref Core//prelude/parts/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.748)] // CHECK:STDOUT: %Main.import_ref.888 = import_ref Main//empty_range, loc7_68, unloaded // CHECK:STDOUT: %Main.import_ref.999 = import_ref Main//empty_range, loc7_68, unloaded // CHECK:STDOUT: %Main.import_ref.868: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.16c) = import_ref Main//empty_range, loc8_38, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.cbe)] // CHECK:STDOUT: %Main.import_ref.574: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.b9d) = import_ref Main//empty_range, loc11_58, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.682)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.888, %Main.import_ref.999, %Main.import_ref.868, %Main.import_ref.574), @EmptyRange.as.Iterate.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.37b: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.927) = import_ref Main//empty_range, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.966)] -// CHECK:STDOUT: %Main.import_ref.97a: @Optional.%Optional.Get.type (%Optional.Get.type.517) = import_ref Main//empty_range, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.ece)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -374,7 +374,7 @@ fn Run() { // CHECK:STDOUT: %.loc10_39.1: ref %EmptyRange.77b = temporary_storage // CHECK:STDOUT: %EmptyRange.Make.call: init %EmptyRange.77b to %.loc10_39.1 = call %EmptyRange.Make.specific_fn() // CHECK:STDOUT: %.loc10_39.2: ref %EmptyRange.77b = temporary %.loc10_39.1, %EmptyRange.Make.call -// CHECK:STDOUT: %impl.elem2: %.d58 = impl_witness_access constants.%Iterate.impl_witness.96d, element2 [concrete = constants.%EmptyRange.as.Iterate.impl.NewCursor.da5] +// CHECK:STDOUT: %impl.elem2: %.e1f = impl_witness_access constants.%Iterate.impl_witness.96d, element2 [concrete = constants.%EmptyRange.as.Iterate.impl.NewCursor.da5] // CHECK:STDOUT: %bound_method.loc10_40.1: = bound_method %.loc10_39.2, %impl.elem2 // CHECK:STDOUT: %specific_fn.loc10_40.1: = specific_function %impl.elem2, @EmptyRange.as.Iterate.impl.NewCursor(constants.%Copy.facet) [concrete = constants.%EmptyRange.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc10_40.2: = bound_method %.loc10_39.2, %specific_fn.loc10_40.1 @@ -386,20 +386,20 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !for.next: // CHECK:STDOUT: %addr.loc10: %ptr.c28 = addr_of %var -// CHECK:STDOUT: %impl.elem3: %.23b = impl_witness_access constants.%Iterate.impl_witness.96d, element3 [concrete = constants.%EmptyRange.as.Iterate.impl.Next.d08] +// CHECK:STDOUT: %impl.elem3: %.527 = impl_witness_access constants.%Iterate.impl_witness.96d, element3 [concrete = constants.%EmptyRange.as.Iterate.impl.Next.d08] // CHECK:STDOUT: %bound_method.loc10_40.3: = bound_method %.loc10_39.2, %impl.elem3 // CHECK:STDOUT: %specific_fn.loc10_40.2: = specific_function %impl.elem3, @EmptyRange.as.Iterate.impl.Next(constants.%Copy.facet) [concrete = constants.%EmptyRange.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc10_40.4: = bound_method %.loc10_39.2, %specific_fn.loc10_40.2 -// CHECK:STDOUT: %.loc10_40.1: ref %Optional.0f3 = temporary_storage +// CHECK:STDOUT: %.loc10_40.1: ref %Optional.e59 = temporary_storage // CHECK:STDOUT: %.loc10_39.4: %EmptyRange.77b = acquire_value %.loc10_39.2 -// CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.call: init %Optional.0f3 to %.loc10_40.1 = call %bound_method.loc10_40.4(%.loc10_39.4, %addr.loc10) -// CHECK:STDOUT: %.loc10_40.2: ref %Optional.0f3 = temporary %.loc10_40.1, %EmptyRange.as.Iterate.impl.Next.call -// CHECK:STDOUT: %.loc10_40.3: %Optional.HasValue.type.a17 = specific_constant imports.%Main.import_ref.37b, @Optional(constants.%Copy.facet) [concrete = constants.%Optional.HasValue.858] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.a17 = name_ref HasValue, %.loc10_40.3 [concrete = constants.%Optional.HasValue.858] +// CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.call: init %Optional.e59 to %.loc10_40.1 = call %bound_method.loc10_40.4(%.loc10_39.4, %addr.loc10) +// CHECK:STDOUT: %.loc10_40.2: ref %Optional.e59 = temporary %.loc10_40.1, %EmptyRange.as.Iterate.impl.Next.call +// CHECK:STDOUT: %.loc10_40.3: %Optional.HasValue.type.26b = specific_constant imports.%Core.import_ref.f5d, @Optional(constants.%Copy.facet) [concrete = constants.%Optional.HasValue.61c] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.26b = name_ref HasValue, %.loc10_40.3 [concrete = constants.%Optional.HasValue.61c] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc10_40.2, %HasValue.ref // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%Copy.facet) [concrete = constants.%Optional.HasValue.specific_fn] // CHECK:STDOUT: %bound_method.loc10_40.5: = bound_method %.loc10_40.2, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc10_40.4: %Optional.0f3 = acquire_value %.loc10_40.2 +// CHECK:STDOUT: %.loc10_40.4: %Optional.e59 = acquire_value %.loc10_40.2 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc10_40.5(%.loc10_40.4) // CHECK:STDOUT: %.loc10_40.5: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc10_40.6: bool = converted %Optional.HasValue.call, %.loc10_40.5 @@ -407,13 +407,13 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !for.body: // CHECK:STDOUT: %c.var: ref %C = var %c.var_patt -// CHECK:STDOUT: %.loc10_40.7: %Optional.Get.type.c50 = specific_constant imports.%Main.import_ref.97a, @Optional(constants.%Copy.facet) [concrete = constants.%Optional.Get.e0f] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.c50 = name_ref Get, %.loc10_40.7 [concrete = constants.%Optional.Get.e0f] +// CHECK:STDOUT: %.loc10_40.7: %Optional.Get.type.7ce = specific_constant imports.%Core.import_ref.ab7, @Optional(constants.%Copy.facet) [concrete = constants.%Optional.Get.bce] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.7ce = name_ref Get, %.loc10_40.7 [concrete = constants.%Optional.Get.bce] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc10_40.2, %Get.ref // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%Copy.facet) [concrete = constants.%Optional.Get.specific_fn] // CHECK:STDOUT: %bound_method.loc10_40.6: = bound_method %.loc10_40.2, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc10_8: ref %C = splice_block %c.var {} -// CHECK:STDOUT: %.loc10_40.8: %Optional.0f3 = acquire_value %.loc10_40.2 +// CHECK:STDOUT: %.loc10_40.8: %Optional.e59 = acquire_value %.loc10_40.2 // CHECK:STDOUT: %Optional.Get.call: init %C to %.loc10_8 = call %bound_method.loc10_40.6(%.loc10_40.8) // CHECK:STDOUT: assign %c.var, %Optional.Get.call // CHECK:STDOUT: %C.ref.loc10_15: type = name_ref C, imports.%Main.C [concrete = constants.%C] @@ -438,7 +438,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp.loc10_8(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @DestroyOp.loc10_40.1(%self.param: ref %Optional.0f3) = "no_op"; +// CHECK:STDOUT: fn @DestroyOp.loc10_40.1(%self.param: ref %Optional.e59) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp.loc10_40.2(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: @@ -477,13 +477,12 @@ fn Run() { // CHECK:STDOUT: %ptr.c28: type = ptr_type %empty_struct_type [concrete] // CHECK:STDOUT: %EmptyRange.Make.specific_fn: = specific_function %EmptyRange.Make.d35, @EmptyRange.Make(%Copy.facet.3ce) [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] -// CHECK:STDOUT: %Iterate.NewCursor.type: type = fn_type @Iterate.NewCursor [concrete] +// CHECK:STDOUT: %Optional.Get.type.1ac: type = fn_type @Optional.Get, @Optional(%T.56c) [symbolic] +// CHECK:STDOUT: %Optional.Get.748: %Optional.Get.type.1ac = struct_value () [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.051: type = fn_type @Optional.HasValue, @Optional(%T.56c) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.6ae: %Optional.HasValue.type.051 = struct_value () [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.type.b9d: type = fn_type @EmptyRange.as.Iterate.impl.Next, @EmptyRange.as.Iterate.impl(%T.56c) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.682: %EmptyRange.as.Iterate.impl.Next.type.b9d = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.Get.type.517: type = fn_type @Optional.Get, @Optional(%T.56c) [symbolic] -// CHECK:STDOUT: %Optional.Get.ece: %Optional.Get.type.517 = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.927: type = fn_type @Optional.HasValue, @Optional(%T.56c) [symbolic] -// CHECK:STDOUT: %Optional.HasValue.966: %Optional.HasValue.type.927 = struct_value () [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.type.16c: type = fn_type @EmptyRange.as.Iterate.impl.NewCursor, @EmptyRange.as.Iterate.impl(%T.56c) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.cbe: %EmptyRange.as.Iterate.impl.NewCursor.type.16c = struct_value () [symbolic] // CHECK:STDOUT: %Iterate.impl_witness.04a: = impl_witness imports.%Iterate.impl_witness_table, @EmptyRange.as.Iterate.impl(%Copy.facet.3ce) [concrete] @@ -492,18 +491,19 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.type.f9b: type = fn_type @EmptyRange.as.Iterate.impl.Next, @EmptyRange.as.Iterate.impl(%Copy.facet.3ce) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.4a9: %EmptyRange.as.Iterate.impl.Next.type.f9b = struct_value () [concrete] // CHECK:STDOUT: %Iterate.facet: %Iterate.type = facet_value %EmptyRange.717, (%Iterate.impl_witness.04a) [concrete] -// CHECK:STDOUT: %.0cf: type = fn_type_with_self_type %Iterate.NewCursor.type, %Iterate.facet [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.fea: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate(%Iterate.facet) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.346: type = fn_type @Iterate.WithSelf.Next, @Iterate(%Iterate.facet) [concrete] +// CHECK:STDOUT: %.a72: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.fea, %Iterate.facet [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.NewCursor.90c, @EmptyRange.as.Iterate.impl.NewCursor(%Copy.facet.3ce) [concrete] -// CHECK:STDOUT: %Iterate.Next.type: type = fn_type @Iterate.Next [concrete] -// CHECK:STDOUT: %.165: type = fn_type_with_self_type %Iterate.Next.type, %Iterate.facet [concrete] -// CHECK:STDOUT: %Optional.0cc: type = class_type @Optional, @Optional(%Copy.facet.3ce) [concrete] +// CHECK:STDOUT: %.28c: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.346, %Iterate.facet [concrete] +// CHECK:STDOUT: %Optional.678: type = class_type @Optional, @Optional(%Copy.facet.3ce) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.Next.4a9, @EmptyRange.as.Iterate.impl.Next(%Copy.facet.3ce) [concrete] -// CHECK:STDOUT: %Optional.HasValue.type.a20: type = fn_type @Optional.HasValue, @Optional(%Copy.facet.3ce) [concrete] -// CHECK:STDOUT: %Optional.HasValue.c8a: %Optional.HasValue.type.a20 = struct_value () [concrete] -// CHECK:STDOUT: %Optional.Get.type.36c: type = fn_type @Optional.Get, @Optional(%Copy.facet.3ce) [concrete] -// CHECK:STDOUT: %Optional.Get.e9c: %Optional.Get.type.36c = struct_value () [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.c8a, @Optional.HasValue(%Copy.facet.3ce) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.e9c, @Optional.Get(%Copy.facet.3ce) [concrete] +// CHECK:STDOUT: %Optional.HasValue.type.101: type = fn_type @Optional.HasValue, @Optional(%Copy.facet.3ce) [concrete] +// CHECK:STDOUT: %Optional.HasValue.960: %Optional.HasValue.type.101 = struct_value () [concrete] +// CHECK:STDOUT: %Optional.Get.type.758: type = fn_type @Optional.Get, @Optional(%Copy.facet.3ce) [concrete] +// CHECK:STDOUT: %Optional.Get.2ff: %Optional.Get.type.758 = struct_value () [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.960, @Optional.HasValue(%Copy.facet.3ce) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.2ff, @Optional.Get(%Copy.facet.3ce) [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc10_61.1 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc10_61.2 [concrete] @@ -523,13 +523,13 @@ fn Run() { // CHECK:STDOUT: %Copy.impl_witness_table.3c8 = impl_witness_table (%Core.import_ref.445), @tuple.type.as.Copy.impl.da7 [concrete] // CHECK:STDOUT: %Core.import_ref.4d6: %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.164 = impl_witness_table (%Core.import_ref.4d6), @bool.as.Copy.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.f5d: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.051) = import_ref Core//prelude/parts/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6ae)] +// CHECK:STDOUT: %Core.import_ref.ab7: @Optional.%Optional.Get.type (%Optional.Get.type.1ac) = import_ref Core//prelude/parts/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.748)] // CHECK:STDOUT: %Main.import_ref.888 = import_ref Main//empty_range, loc7_68, unloaded // CHECK:STDOUT: %Main.import_ref.999 = import_ref Main//empty_range, loc7_68, unloaded // CHECK:STDOUT: %Main.import_ref.868: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.16c) = import_ref Main//empty_range, loc8_38, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.cbe)] // CHECK:STDOUT: %Main.import_ref.574: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.b9d) = import_ref Main//empty_range, loc11_58, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.682)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.888, %Main.import_ref.999, %Main.import_ref.868, %Main.import_ref.574), @EmptyRange.as.Iterate.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.37b: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.927) = import_ref Main//empty_range, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.966)] -// CHECK:STDOUT: %Main.import_ref.97a: @Optional.%Optional.Get.type (%Optional.Get.type.517) = import_ref Main//empty_range, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.ece)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -552,7 +552,7 @@ fn Run() { // CHECK:STDOUT: %.loc10_60.1: ref %EmptyRange.717 = temporary_storage // CHECK:STDOUT: %EmptyRange.Make.call: init %EmptyRange.717 to %.loc10_60.1 = call %EmptyRange.Make.specific_fn() // CHECK:STDOUT: %.loc10_60.2: ref %EmptyRange.717 = temporary %.loc10_60.1, %EmptyRange.Make.call -// CHECK:STDOUT: %impl.elem2: %.0cf = impl_witness_access constants.%Iterate.impl_witness.04a, element2 [concrete = constants.%EmptyRange.as.Iterate.impl.NewCursor.90c] +// CHECK:STDOUT: %impl.elem2: %.a72 = impl_witness_access constants.%Iterate.impl_witness.04a, element2 [concrete = constants.%EmptyRange.as.Iterate.impl.NewCursor.90c] // CHECK:STDOUT: %bound_method.loc10_61.1: = bound_method %.loc10_60.2, %impl.elem2 // CHECK:STDOUT: %specific_fn.loc10_61.1: = specific_function %impl.elem2, @EmptyRange.as.Iterate.impl.NewCursor(constants.%Copy.facet.3ce) [concrete = constants.%EmptyRange.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc10_61.2: = bound_method %.loc10_60.2, %specific_fn.loc10_61.1 @@ -564,33 +564,33 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !for.next: // CHECK:STDOUT: %addr: %ptr.c28 = addr_of %var -// CHECK:STDOUT: %impl.elem3: %.165 = impl_witness_access constants.%Iterate.impl_witness.04a, element3 [concrete = constants.%EmptyRange.as.Iterate.impl.Next.4a9] +// CHECK:STDOUT: %impl.elem3: %.28c = impl_witness_access constants.%Iterate.impl_witness.04a, element3 [concrete = constants.%EmptyRange.as.Iterate.impl.Next.4a9] // CHECK:STDOUT: %bound_method.loc10_61.3: = bound_method %.loc10_60.2, %impl.elem3 // CHECK:STDOUT: %specific_fn.loc10_61.2: = specific_function %impl.elem3, @EmptyRange.as.Iterate.impl.Next(constants.%Copy.facet.3ce) [concrete = constants.%EmptyRange.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc10_61.4: = bound_method %.loc10_60.2, %specific_fn.loc10_61.2 -// CHECK:STDOUT: %.loc10_61.1: ref %Optional.0cc = temporary_storage +// CHECK:STDOUT: %.loc10_61.1: ref %Optional.678 = temporary_storage // CHECK:STDOUT: %.loc10_60.4: %EmptyRange.717 = acquire_value %.loc10_60.2 -// CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.call: init %Optional.0cc to %.loc10_61.1 = call %bound_method.loc10_61.4(%.loc10_60.4, %addr) -// CHECK:STDOUT: %.loc10_61.2: ref %Optional.0cc = temporary %.loc10_61.1, %EmptyRange.as.Iterate.impl.Next.call -// CHECK:STDOUT: %.loc10_61.3: %Optional.HasValue.type.a20 = specific_constant imports.%Main.import_ref.37b, @Optional(constants.%Copy.facet.3ce) [concrete = constants.%Optional.HasValue.c8a] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.a20 = name_ref HasValue, %.loc10_61.3 [concrete = constants.%Optional.HasValue.c8a] +// CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.call: init %Optional.678 to %.loc10_61.1 = call %bound_method.loc10_61.4(%.loc10_60.4, %addr) +// CHECK:STDOUT: %.loc10_61.2: ref %Optional.678 = temporary %.loc10_61.1, %EmptyRange.as.Iterate.impl.Next.call +// CHECK:STDOUT: %.loc10_61.3: %Optional.HasValue.type.101 = specific_constant imports.%Core.import_ref.f5d, @Optional(constants.%Copy.facet.3ce) [concrete = constants.%Optional.HasValue.960] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.101 = name_ref HasValue, %.loc10_61.3 [concrete = constants.%Optional.HasValue.960] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc10_61.2, %HasValue.ref // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%Copy.facet.3ce) [concrete = constants.%Optional.HasValue.specific_fn] // CHECK:STDOUT: %bound_method.loc10_61.5: = bound_method %.loc10_61.2, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc10_61.4: %Optional.0cc = acquire_value %.loc10_61.2 +// CHECK:STDOUT: %.loc10_61.4: %Optional.678 = acquire_value %.loc10_61.2 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc10_61.5(%.loc10_61.4) // CHECK:STDOUT: %.loc10_61.5: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc10_61.6: bool = converted %Optional.HasValue.call, %.loc10_61.5 // CHECK:STDOUT: if %.loc10_61.6 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc10_61.7: %Optional.Get.type.36c = specific_constant imports.%Main.import_ref.97a, @Optional(constants.%Copy.facet.3ce) [concrete = constants.%Optional.Get.e9c] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.36c = name_ref Get, %.loc10_61.7 [concrete = constants.%Optional.Get.e9c] +// CHECK:STDOUT: %.loc10_61.7: %Optional.Get.type.758 = specific_constant imports.%Core.import_ref.ab7, @Optional(constants.%Copy.facet.3ce) [concrete = constants.%Optional.Get.2ff] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.758 = name_ref Get, %.loc10_61.7 [concrete = constants.%Optional.Get.2ff] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc10_61.2, %Get.ref // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%Copy.facet.3ce) [concrete = constants.%Optional.Get.specific_fn] // CHECK:STDOUT: %bound_method.loc10_61.6: = bound_method %.loc10_61.2, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc10_61.8: ref %tuple.type.784 = temporary_storage -// CHECK:STDOUT: %.loc10_61.9: %Optional.0cc = acquire_value %.loc10_61.2 +// CHECK:STDOUT: %.loc10_61.9: %Optional.678 = acquire_value %.loc10_61.2 // CHECK:STDOUT: %Optional.Get.call: init %tuple.type.784 to %.loc10_61.8 = call %bound_method.loc10_61.6(%.loc10_61.9) // CHECK:STDOUT: %.loc10_61.10: ref %tuple.type.784 = temporary %.loc10_61.8, %Optional.Get.call // CHECK:STDOUT: %tuple.elem0: ref bool = tuple_access %.loc10_61.10, element0 @@ -629,7 +629,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp.loc10_61.1(%self.param: ref %tuple.type.784) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @DestroyOp.loc10_61.2(%self.param: ref %Optional.0cc) = "no_op"; +// CHECK:STDOUT: fn @DestroyOp.loc10_61.2(%self.param: ref %Optional.678) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp.loc10_61.3(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: @@ -667,13 +667,12 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.Make.38a: %EmptyRange.Make.type.7da = struct_value () [concrete] // CHECK:STDOUT: %EmptyRange.Make.specific_fn: = specific_function %EmptyRange.Make.38a, @EmptyRange.Make(%Copy.facet.ad0) [concrete] // CHECK:STDOUT: %Iterate.type: type = facet_type <@Iterate> [concrete] -// CHECK:STDOUT: %Iterate.NewCursor.type: type = fn_type @Iterate.NewCursor [concrete] +// CHECK:STDOUT: %Optional.Get.type.1ac: type = fn_type @Optional.Get, @Optional(%T.56c) [symbolic] +// CHECK:STDOUT: %Optional.Get.748: %Optional.Get.type.1ac = struct_value () [symbolic] +// CHECK:STDOUT: %Optional.HasValue.type.051: type = fn_type @Optional.HasValue, @Optional(%T.56c) [symbolic] +// CHECK:STDOUT: %Optional.HasValue.6ae: %Optional.HasValue.type.051 = struct_value () [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.type.b9d: type = fn_type @EmptyRange.as.Iterate.impl.Next, @EmptyRange.as.Iterate.impl(%T.56c) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.682: %EmptyRange.as.Iterate.impl.Next.type.b9d = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.Get.type.517: type = fn_type @Optional.Get, @Optional(%T.56c) [symbolic] -// CHECK:STDOUT: %Optional.Get.ece: %Optional.Get.type.517 = struct_value () [symbolic] -// CHECK:STDOUT: %Optional.HasValue.type.927: type = fn_type @Optional.HasValue, @Optional(%T.56c) [symbolic] -// CHECK:STDOUT: %Optional.HasValue.966: %Optional.HasValue.type.927 = struct_value () [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.type.16c: type = fn_type @EmptyRange.as.Iterate.impl.NewCursor, @EmptyRange.as.Iterate.impl(%T.56c) [symbolic] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.cbe: %EmptyRange.as.Iterate.impl.NewCursor.type.16c = struct_value () [symbolic] // CHECK:STDOUT: %Iterate.impl_witness.a9d: = impl_witness imports.%Iterate.impl_witness_table, @EmptyRange.as.Iterate.impl(%Copy.facet.ad0) [concrete] @@ -682,18 +681,19 @@ fn Run() { // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.type.24c: type = fn_type @EmptyRange.as.Iterate.impl.Next, @EmptyRange.as.Iterate.impl(%Copy.facet.ad0) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.77c: %EmptyRange.as.Iterate.impl.Next.type.24c = struct_value () [concrete] // CHECK:STDOUT: %Iterate.facet: %Iterate.type = facet_value %EmptyRange.849, (%Iterate.impl_witness.a9d) [concrete] -// CHECK:STDOUT: %.826: type = fn_type_with_self_type %Iterate.NewCursor.type, %Iterate.facet [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.NewCursor.type.43a: type = fn_type @Iterate.WithSelf.NewCursor, @Iterate(%Iterate.facet) [concrete] +// CHECK:STDOUT: %Iterate.WithSelf.Next.type.cd1: type = fn_type @Iterate.WithSelf.Next, @Iterate(%Iterate.facet) [concrete] +// CHECK:STDOUT: %.722: type = fn_type_with_self_type %Iterate.WithSelf.NewCursor.type.43a, %Iterate.facet [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.NewCursor.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.NewCursor.94e, @EmptyRange.as.Iterate.impl.NewCursor(%Copy.facet.ad0) [concrete] -// CHECK:STDOUT: %Iterate.Next.type: type = fn_type @Iterate.Next [concrete] -// CHECK:STDOUT: %.2ac: type = fn_type_with_self_type %Iterate.Next.type, %Iterate.facet [concrete] -// CHECK:STDOUT: %Optional.fce: type = class_type @Optional, @Optional(%Copy.facet.ad0) [concrete] +// CHECK:STDOUT: %.44b: type = fn_type_with_self_type %Iterate.WithSelf.Next.type.cd1, %Iterate.facet [concrete] +// CHECK:STDOUT: %Optional.2f4: type = class_type @Optional, @Optional(%Copy.facet.ad0) [concrete] // CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.specific_fn: = specific_function %EmptyRange.as.Iterate.impl.Next.77c, @EmptyRange.as.Iterate.impl.Next(%Copy.facet.ad0) [concrete] -// CHECK:STDOUT: %Optional.HasValue.type.32e: type = fn_type @Optional.HasValue, @Optional(%Copy.facet.ad0) [concrete] -// CHECK:STDOUT: %Optional.HasValue.cc1: %Optional.HasValue.type.32e = struct_value () [concrete] -// CHECK:STDOUT: %Optional.Get.type.733: type = fn_type @Optional.Get, @Optional(%Copy.facet.ad0) [concrete] -// CHECK:STDOUT: %Optional.Get.dd4: %Optional.Get.type.733 = struct_value () [concrete] -// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.cc1, @Optional.HasValue(%Copy.facet.ad0) [concrete] -// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.dd4, @Optional.Get(%Copy.facet.ad0) [concrete] +// CHECK:STDOUT: %Optional.HasValue.type.6de: type = fn_type @Optional.HasValue, @Optional(%Copy.facet.ad0) [concrete] +// CHECK:STDOUT: %Optional.HasValue.de9: %Optional.HasValue.type.6de = struct_value () [concrete] +// CHECK:STDOUT: %Optional.Get.type.925: type = fn_type @Optional.Get, @Optional(%Copy.facet.ad0) [concrete] +// CHECK:STDOUT: %Optional.Get.a9e: %Optional.Get.type.925 = struct_value () [concrete] +// CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %Optional.HasValue.de9, @Optional.HasValue(%Copy.facet.ad0) [concrete] +// CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Optional.Get.a9e, @Optional.Get(%Copy.facet.ad0) [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc10_49.1 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc10_49.2 [concrete] @@ -714,13 +714,13 @@ fn Run() { // CHECK:STDOUT: %Copy.impl_witness_table.3c8 = impl_witness_table (%Core.import_ref.445), @tuple.type.as.Copy.impl.da7 [concrete] // CHECK:STDOUT: %Main.import_ref.cb5: %C.as.Copy.impl.Op.type = import_ref Main//empty_range, loc19_33, loaded [concrete = constants.%C.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.c52 = impl_witness_table (%Main.import_ref.cb5), @C.as.Copy.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.f5d: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.051) = import_ref Core//prelude/parts/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.6ae)] +// CHECK:STDOUT: %Core.import_ref.ab7: @Optional.%Optional.Get.type (%Optional.Get.type.1ac) = import_ref Core//prelude/parts/iterate, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.748)] // CHECK:STDOUT: %Main.import_ref.888 = import_ref Main//empty_range, loc7_68, unloaded // CHECK:STDOUT: %Main.import_ref.999 = import_ref Main//empty_range, loc7_68, unloaded // CHECK:STDOUT: %Main.import_ref.868: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor.type (%EmptyRange.as.Iterate.impl.NewCursor.type.16c) = import_ref Main//empty_range, loc8_38, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.NewCursor (constants.%EmptyRange.as.Iterate.impl.NewCursor.cbe)] // CHECK:STDOUT: %Main.import_ref.574: @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next.type (%EmptyRange.as.Iterate.impl.Next.type.b9d) = import_ref Main//empty_range, loc11_58, loaded [symbolic = @EmptyRange.as.Iterate.impl.%EmptyRange.as.Iterate.impl.Next (constants.%EmptyRange.as.Iterate.impl.Next.682)] // CHECK:STDOUT: %Iterate.impl_witness_table = impl_witness_table (%Main.import_ref.888, %Main.import_ref.999, %Main.import_ref.868, %Main.import_ref.574), @EmptyRange.as.Iterate.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.37b: @Optional.%Optional.HasValue.type (%Optional.HasValue.type.927) = import_ref Main//empty_range, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.HasValue (constants.%Optional.HasValue.966)] -// CHECK:STDOUT: %Main.import_ref.97a: @Optional.%Optional.Get.type (%Optional.Get.type.517) = import_ref Main//empty_range, inst{{[0-9A-F]+}} [indirect], loaded [symbolic = @Optional.%Optional.Get (constants.%Optional.Get.ece)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { @@ -743,7 +743,7 @@ fn Run() { // CHECK:STDOUT: %.loc10_48.1: ref %EmptyRange.849 = temporary_storage // CHECK:STDOUT: %EmptyRange.Make.call: init %EmptyRange.849 to %.loc10_48.1 = call %EmptyRange.Make.specific_fn() // CHECK:STDOUT: %.loc10_48.2: ref %EmptyRange.849 = temporary %.loc10_48.1, %EmptyRange.Make.call -// CHECK:STDOUT: %impl.elem2: %.826 = impl_witness_access constants.%Iterate.impl_witness.a9d, element2 [concrete = constants.%EmptyRange.as.Iterate.impl.NewCursor.94e] +// CHECK:STDOUT: %impl.elem2: %.722 = impl_witness_access constants.%Iterate.impl_witness.a9d, element2 [concrete = constants.%EmptyRange.as.Iterate.impl.NewCursor.94e] // CHECK:STDOUT: %bound_method.loc10_49.1: = bound_method %.loc10_48.2, %impl.elem2 // CHECK:STDOUT: %specific_fn.loc10_49.1: = specific_function %impl.elem2, @EmptyRange.as.Iterate.impl.NewCursor(constants.%Copy.facet.ad0) [concrete = constants.%EmptyRange.as.Iterate.impl.NewCursor.specific_fn] // CHECK:STDOUT: %bound_method.loc10_49.2: = bound_method %.loc10_48.2, %specific_fn.loc10_49.1 @@ -755,33 +755,33 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: !for.next: // CHECK:STDOUT: %addr: %ptr.c28 = addr_of %var -// CHECK:STDOUT: %impl.elem3: %.2ac = impl_witness_access constants.%Iterate.impl_witness.a9d, element3 [concrete = constants.%EmptyRange.as.Iterate.impl.Next.77c] +// CHECK:STDOUT: %impl.elem3: %.44b = impl_witness_access constants.%Iterate.impl_witness.a9d, element3 [concrete = constants.%EmptyRange.as.Iterate.impl.Next.77c] // CHECK:STDOUT: %bound_method.loc10_49.3: = bound_method %.loc10_48.2, %impl.elem3 // CHECK:STDOUT: %specific_fn.loc10_49.2: = specific_function %impl.elem3, @EmptyRange.as.Iterate.impl.Next(constants.%Copy.facet.ad0) [concrete = constants.%EmptyRange.as.Iterate.impl.Next.specific_fn] // CHECK:STDOUT: %bound_method.loc10_49.4: = bound_method %.loc10_48.2, %specific_fn.loc10_49.2 -// CHECK:STDOUT: %.loc10_49.1: ref %Optional.fce = temporary_storage +// CHECK:STDOUT: %.loc10_49.1: ref %Optional.2f4 = temporary_storage // CHECK:STDOUT: %.loc10_48.4: %EmptyRange.849 = acquire_value %.loc10_48.2 -// CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.call: init %Optional.fce to %.loc10_49.1 = call %bound_method.loc10_49.4(%.loc10_48.4, %addr) -// CHECK:STDOUT: %.loc10_49.2: ref %Optional.fce = temporary %.loc10_49.1, %EmptyRange.as.Iterate.impl.Next.call -// CHECK:STDOUT: %.loc10_49.3: %Optional.HasValue.type.32e = specific_constant imports.%Main.import_ref.37b, @Optional(constants.%Copy.facet.ad0) [concrete = constants.%Optional.HasValue.cc1] -// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.32e = name_ref HasValue, %.loc10_49.3 [concrete = constants.%Optional.HasValue.cc1] +// CHECK:STDOUT: %EmptyRange.as.Iterate.impl.Next.call: init %Optional.2f4 to %.loc10_49.1 = call %bound_method.loc10_49.4(%.loc10_48.4, %addr) +// CHECK:STDOUT: %.loc10_49.2: ref %Optional.2f4 = temporary %.loc10_49.1, %EmptyRange.as.Iterate.impl.Next.call +// CHECK:STDOUT: %.loc10_49.3: %Optional.HasValue.type.6de = specific_constant imports.%Core.import_ref.f5d, @Optional(constants.%Copy.facet.ad0) [concrete = constants.%Optional.HasValue.de9] +// CHECK:STDOUT: %HasValue.ref: %Optional.HasValue.type.6de = name_ref HasValue, %.loc10_49.3 [concrete = constants.%Optional.HasValue.de9] // CHECK:STDOUT: %Optional.HasValue.bound: = bound_method %.loc10_49.2, %HasValue.ref // CHECK:STDOUT: %Optional.HasValue.specific_fn: = specific_function %HasValue.ref, @Optional.HasValue(constants.%Copy.facet.ad0) [concrete = constants.%Optional.HasValue.specific_fn] // CHECK:STDOUT: %bound_method.loc10_49.5: = bound_method %.loc10_49.2, %Optional.HasValue.specific_fn -// CHECK:STDOUT: %.loc10_49.4: %Optional.fce = acquire_value %.loc10_49.2 +// CHECK:STDOUT: %.loc10_49.4: %Optional.2f4 = acquire_value %.loc10_49.2 // CHECK:STDOUT: %Optional.HasValue.call: init bool = call %bound_method.loc10_49.5(%.loc10_49.4) // CHECK:STDOUT: %.loc10_49.5: bool = value_of_initializer %Optional.HasValue.call // CHECK:STDOUT: %.loc10_49.6: bool = converted %Optional.HasValue.call, %.loc10_49.5 // CHECK:STDOUT: if %.loc10_49.6 br !for.body else br !for.done // CHECK:STDOUT: // CHECK:STDOUT: !for.body: -// CHECK:STDOUT: %.loc10_49.7: %Optional.Get.type.733 = specific_constant imports.%Main.import_ref.97a, @Optional(constants.%Copy.facet.ad0) [concrete = constants.%Optional.Get.dd4] -// CHECK:STDOUT: %Get.ref: %Optional.Get.type.733 = name_ref Get, %.loc10_49.7 [concrete = constants.%Optional.Get.dd4] +// CHECK:STDOUT: %.loc10_49.7: %Optional.Get.type.925 = specific_constant imports.%Core.import_ref.ab7, @Optional(constants.%Copy.facet.ad0) [concrete = constants.%Optional.Get.a9e] +// CHECK:STDOUT: %Get.ref: %Optional.Get.type.925 = name_ref Get, %.loc10_49.7 [concrete = constants.%Optional.Get.a9e] // CHECK:STDOUT: %Optional.Get.bound: = bound_method %.loc10_49.2, %Get.ref // CHECK:STDOUT: %Optional.Get.specific_fn: = specific_function %Get.ref, @Optional.Get(constants.%Copy.facet.ad0) [concrete = constants.%Optional.Get.specific_fn] // CHECK:STDOUT: %bound_method.loc10_49.6: = bound_method %.loc10_49.2, %Optional.Get.specific_fn // CHECK:STDOUT: %.loc10_49.8: ref %tuple.type.d23 = temporary_storage -// CHECK:STDOUT: %.loc10_49.9: %Optional.fce = acquire_value %.loc10_49.2 +// CHECK:STDOUT: %.loc10_49.9: %Optional.2f4 = acquire_value %.loc10_49.2 // CHECK:STDOUT: %Optional.Get.call: init %tuple.type.d23 to %.loc10_49.8 = call %bound_method.loc10_49.6(%.loc10_49.9) // CHECK:STDOUT: %.loc10_49.10: ref %tuple.type.d23 = temporary %.loc10_49.8, %Optional.Get.call // CHECK:STDOUT: %tuple.elem0: ref %C = tuple_access %.loc10_49.10, element0 @@ -812,7 +812,7 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp.loc10_49.1(%self.param: ref %tuple.type.d23) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @DestroyOp.loc10_49.2(%self.param: ref %Optional.fce) = "no_op"; +// CHECK:STDOUT: fn @DestroyOp.loc10_49.2(%self.param: ref %Optional.2f4) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp.loc10_49.3(%self.param: ref %empty_struct_type) = "no_op"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index 4d9d3ff329eb..6c36df93e2b0 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -36,12 +36,10 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic] @@ -49,7 +47,8 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -62,7 +61,8 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.290: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete] -// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.290 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.290) [concrete] +// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet.290 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %int_3.822, %Int.as.ImplicitAs.impl.Convert.dd4 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.17a: = bound_method %int_3.822, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -133,14 +133,14 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [concrete = constants.%Add] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc17_25: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc17_25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc17_25.1: = bound_method %int_1, %impl.elem0.loc17_25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc17_25: = specific_function %impl.elem0.loc17_25, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_25.2: = bound_method %int_1, %specific_fn.loc17_25 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17_25: init %i32 = call %bound_method.loc17_25.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17_25 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc17_25.2: %i32 = converted %int_1, %.loc17_25.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc17_28: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc17_28: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc17_28.1: = bound_method %int_2, %impl.elem0.loc17_28 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc17_28: = specific_function %impl.elem0.loc17_28, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_28.2: = bound_method %int_2, %specific_fn.loc17_28 [concrete = constants.%bound_method.646] @@ -148,7 +148,7 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %.loc17_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17_28 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc17_28.2: %i32 = converted %int_2, %.loc17_28.1 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %Add.call: init %i32 = call %Add.ref(%.loc17_25.2, %.loc17_28.2) [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc17_29: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %impl.elem0.loc17_29: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] // CHECK:STDOUT: %bound_method.loc17_29.1: = bound_method %Add.call, %impl.elem0.loc17_29 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc17_29: = specific_function %impl.elem0.loc17_29, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_29.2: = bound_method %Add.call, %specific_fn.loc17_29 [concrete = constants.%bound_method.17a] diff --git a/toolchain/check/testdata/function/builtin/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/call_from_operator.carbon index 7d025505a541..39028a1d5e5f 100644 --- a/toolchain/check/testdata/function/builtin/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/call_from_operator.carbon @@ -74,10 +74,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.binding.as_type.73e: type = symbolic_binding_type Self, 1, %Self.a37 [symbolic] // CHECK:STDOUT: %pattern_type.1f3: type = pattern_type %Self.binding.as_type.73e [symbolic] // CHECK:STDOUT: %.117: Core.Form = init_form %Self.binding.as_type.73e, call_param2 [symbolic] -// CHECK:STDOUT: %AddWith.Op.type.421: type = fn_type @AddWith.Op, @AddWith(%T) [symbolic] -// CHECK:STDOUT: %AddWith.Op.59b: %AddWith.Op.type.421 = struct_value () [symbolic] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type.65a: type = fn_type @AddWith.WithSelf.Op, @AddWith(%T, %Self.a37) [symbolic] +// CHECK:STDOUT: %AddWith.WithSelf.Op.647: %AddWith.WithSelf.Op.type.65a = struct_value () [symbolic] // CHECK:STDOUT: %AddWith.assoc_type.5ad: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic] -// CHECK:STDOUT: %assoc0.438: %AddWith.assoc_type.5ad = assoc_entity element0, @AddWith.%AddWith.Op.decl [symbolic] +// CHECK:STDOUT: %assoc0.90d: %AddWith.assoc_type.5ad = assoc_entity element0, @AddWith.%AddWith.WithSelf.Op.decl [symbolic] // CHECK:STDOUT: %As.type.3c9: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.3c9 = struct_value () [concrete] // CHECK:STDOUT: %As.type.b54: type = facet_type <@As, @As(%T)> [symbolic] @@ -86,66 +86,74 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %pattern_type.24e: type = pattern_type %Self.binding.as_type.69d [symbolic] // CHECK:STDOUT: %.3cf: Core.Form = init_form %T, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] -// CHECK:STDOUT: %As.Convert.type.d47: type = fn_type @As.Convert, @As(%T) [symbolic] -// CHECK:STDOUT: %As.Convert.4a7: %As.Convert.type.d47 = struct_value () [symbolic] +// CHECK:STDOUT: %As.WithSelf.Convert.type.aef: type = fn_type @As.WithSelf.Convert, @As(%T, %Self.a8c) [symbolic] +// CHECK:STDOUT: %As.WithSelf.Convert.a95: %As.WithSelf.Convert.type.aef = struct_value () [symbolic] // CHECK:STDOUT: %As.assoc_type.520: type = assoc_entity_type @As, @As(%T) [symbolic] -// CHECK:STDOUT: %assoc0.84f: %As.assoc_type.520 = assoc_entity element0, @As.%As.Convert.decl [symbolic] +// CHECK:STDOUT: %assoc0.84c: %As.assoc_type.520 = assoc_entity element0, @As.%As.WithSelf.Convert.decl [symbolic] // CHECK:STDOUT: %ImplicitAs.type.595: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.595 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.9fe: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] // CHECK:STDOUT: %Self.7c0: %ImplicitAs.type.9fe = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Self.binding.as_type.984: type = symbolic_binding_type Self, 1, %Self.7c0 [symbolic] // CHECK:STDOUT: %pattern_type.8de: type = pattern_type %Self.binding.as_type.984 [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type.103: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%T) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.2cc: %ImplicitAs.Convert.type.103 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.f6b: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%T, %Self.7c0) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.de0: %ImplicitAs.WithSelf.Convert.type.f6b = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.b04: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T) [symbolic] -// CHECK:STDOUT: %assoc0.cd9: %ImplicitAs.assoc_type.b04 = assoc_entity element0, @ImplicitAs.%ImplicitAs.Convert.decl [symbolic] +// CHECK:STDOUT: %assoc0.361: %ImplicitAs.assoc_type.b04 = assoc_entity element0, @ImplicitAs.%ImplicitAs.WithSelf.Convert.decl [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] // CHECK:STDOUT: %AddWith.type.aed: type = facet_type <@AddWith, @AddWith(%i32.builtin)> [concrete] // CHECK:STDOUT: %AddWith.impl_witness: = impl_witness @i32.builtin.as.AddWith.impl.%AddWith.impl_witness_table [concrete] // CHECK:STDOUT: %Self.aad: %AddWith.type.aed = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %AddWith.Op.type.bae: type = fn_type @AddWith.Op, @AddWith(%i32.builtin) [concrete] -// CHECK:STDOUT: %AddWith.Op.a6f: %AddWith.Op.type.bae = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type.479: type = fn_type @AddWith.WithSelf.Op, @AddWith(%i32.builtin, %Self.a37) [symbolic] +// CHECK:STDOUT: %AddWith.WithSelf.Op.8bc: %AddWith.WithSelf.Op.type.479 = struct_value () [symbolic] // CHECK:STDOUT: %AddWith.assoc_type.97c: type = assoc_entity_type @AddWith, @AddWith(%i32.builtin) [concrete] -// CHECK:STDOUT: %assoc0.61e: %AddWith.assoc_type.97c = assoc_entity element0, @AddWith.%AddWith.Op.decl [concrete] +// CHECK:STDOUT: %assoc0.4d8: %AddWith.assoc_type.97c = assoc_entity element0, @AddWith.%AddWith.WithSelf.Op.decl [concrete] // CHECK:STDOUT: %pattern_type.956: type = pattern_type %i32.builtin [concrete] // CHECK:STDOUT: %.2f6: Core.Form = init_form %i32.builtin, call_param2 [concrete] // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.type: type = fn_type @i32.builtin.as.AddWith.impl.Op [concrete] // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op: %i32.builtin.as.AddWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %AddWith.facet: %AddWith.type.aed = facet_value %i32.builtin, (%AddWith.impl_witness) [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type.493: type = fn_type @AddWith.WithSelf.Op, @AddWith(%i32.builtin, %AddWith.facet) [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.Op.d6a: %AddWith.WithSelf.Op.type.493 = struct_value () [concrete] // CHECK:STDOUT: %As.type.1ed: type = facet_type <@As, @As(%i32.builtin)> [concrete] // CHECK:STDOUT: %As.impl_witness: = impl_witness @Core.IntLiteral.as.As.impl.%As.impl_witness_table [concrete] // CHECK:STDOUT: %Self.037: %As.type.1ed = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %As.Convert.type.063: type = fn_type @As.Convert, @As(%i32.builtin) [concrete] -// CHECK:STDOUT: %As.Convert.701: %As.Convert.type.063 = struct_value () [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.a02: type = fn_type @As.WithSelf.Convert, @As(%i32.builtin, %Self.a8c) [symbolic] +// CHECK:STDOUT: %As.WithSelf.Convert.98f: %As.WithSelf.Convert.type.a02 = struct_value () [symbolic] // CHECK:STDOUT: %As.assoc_type.c44: type = assoc_entity_type @As, @As(%i32.builtin) [concrete] -// CHECK:STDOUT: %assoc0.d89: %As.assoc_type.c44 = assoc_entity element0, @As.%As.Convert.decl [concrete] +// CHECK:STDOUT: %assoc0.43d: %As.assoc_type.c44 = assoc_entity element0, @As.%As.WithSelf.Convert.decl [concrete] // CHECK:STDOUT: %.8a4: Core.Form = init_form %i32.builtin, call_param1 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.1ed = facet_value Core.IntLiteral, (%As.impl_witness) [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.204: type = fn_type @As.WithSelf.Convert, @As(%i32.builtin, %As.facet) [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.24c: %As.WithSelf.Convert.type.204 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.92b: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.ccd: = impl_witness @Core.IntLiteral.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] // CHECK:STDOUT: %Self.597: %ImplicitAs.type.92b = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type.424: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32.builtin) [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.a1f: %ImplicitAs.Convert.type.424 = struct_value () [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.d4c: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32.builtin, %Self.7c0) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.086: %ImplicitAs.WithSelf.Convert.type.d4c = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.c3f: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete] -// CHECK:STDOUT: %assoc0.5e9: %ImplicitAs.assoc_type.c3f = assoc_entity element0, @ImplicitAs.%ImplicitAs.Convert.decl [concrete] +// CHECK:STDOUT: %assoc0.124: %ImplicitAs.assoc_type.c3f = assoc_entity element0, @ImplicitAs.%ImplicitAs.WithSelf.Convert.decl [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b36: %ImplicitAs.type.92b = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.ccd) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.07c: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32.builtin, %ImplicitAs.facet.b36) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.a38: %ImplicitAs.WithSelf.Convert.type.07c = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.79c: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.985: = impl_witness @i32.builtin.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] // CHECK:STDOUT: %Self.55f: %ImplicitAs.type.79c = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type.785: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.aec: %ImplicitAs.Convert.type.785 = struct_value () [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.25a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %Self.7c0) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.1ae: %ImplicitAs.WithSelf.Convert.type.25a = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.793: type = assoc_entity_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %assoc0.49f: %ImplicitAs.assoc_type.793 = assoc_entity element0, @ImplicitAs.%ImplicitAs.Convert.decl [concrete] +// CHECK:STDOUT: %assoc0.e18: %ImplicitAs.assoc_type.793 = assoc_entity element0, @ImplicitAs.%ImplicitAs.WithSelf.Convert.decl [concrete] // CHECK:STDOUT: %.7dc: Core.Form = init_form Core.IntLiteral, call_param1 [concrete] // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert.type: type = fn_type @i32.builtin.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert: %i32.builtin.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.c5c: %ImplicitAs.type.79c = facet_value %i32.builtin, (%ImplicitAs.impl_witness.985) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.7aa: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.c5c) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.090: %ImplicitAs.WithSelf.Convert.type.7aa = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -254,53 +262,52 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.loc7_19.1: type = symbolic_binding T, 0 [symbolic = %T.loc7_19.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T.loc7_19.1)> [symbolic = %AddWith.type (constants.%AddWith.type.26b)] -// CHECK:STDOUT: %Self.loc7_29.2: @AddWith.%AddWith.type (%AddWith.type.26b) = symbolic_binding Self, 1 [symbolic = %Self.loc7_29.2 (constants.%Self.a37)] -// CHECK:STDOUT: %AddWith.Op.type: type = fn_type @AddWith.Op, @AddWith(%T.loc7_19.1) [symbolic = %AddWith.Op.type (constants.%AddWith.Op.type.421)] -// CHECK:STDOUT: %AddWith.Op: @AddWith.%AddWith.Op.type (%AddWith.Op.type.421) = struct_value () [symbolic = %AddWith.Op (constants.%AddWith.Op.59b)] -// CHECK:STDOUT: %AddWith.assoc_type: type = assoc_entity_type @AddWith, @AddWith(%T.loc7_19.1) [symbolic = %AddWith.assoc_type (constants.%AddWith.assoc_type.5ad)] -// CHECK:STDOUT: %assoc0.loc8_41.2: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.5ad) = assoc_entity element0, %AddWith.Op.decl [symbolic = %assoc0.loc8_41.2 (constants.%assoc0.438)] +// CHECK:STDOUT: %AddWith.type.loc7: type = facet_type <@AddWith, @AddWith(%T.loc7_19.1)> [symbolic = %AddWith.type.loc7 (constants.%AddWith.type.26b)] +// CHECK:STDOUT: %Self.loc7_29.2: @AddWith.%AddWith.type.loc7 (%AddWith.type.26b) = symbolic_binding Self, 1 [symbolic = %Self.loc7_29.2 (constants.%Self.a37)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc7_29.1: @AddWith.%AddWith.type (%AddWith.type.26b) = symbolic_binding Self, 1 [symbolic = %Self.loc7_29.2 (constants.%Self.a37)] -// CHECK:STDOUT: %AddWith.Op.decl: @AddWith.%AddWith.Op.type (%AddWith.Op.type.421) = fn_decl @AddWith.Op [symbolic = @AddWith.%AddWith.Op (constants.%AddWith.Op.59b)] { -// CHECK:STDOUT: %self.patt: @AddWith.Op.%pattern_type (%pattern_type.1f3) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @AddWith.Op.%pattern_type (%pattern_type.1f3) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: @AddWith.Op.%pattern_type (%pattern_type.1f3) = value_binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: @AddWith.Op.%pattern_type (%pattern_type.1f3) = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @AddWith.Op.%pattern_type (%pattern_type.1f3) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @AddWith.Op.%pattern_type (%pattern_type.1f3) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %Self.loc7_29.1: @AddWith.%AddWith.type.loc7 (%AddWith.type.26b) = symbolic_binding Self, 1 [symbolic = %Self.loc7_29.2 (constants.%Self.a37)] +// CHECK:STDOUT: interface_with_self_decl @AddWith [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %AddWith.WithSelf.Op.decl: @AddWith.%AddWith.WithSelf.Op.type (%AddWith.WithSelf.Op.type.65a) = fn_decl @AddWith.WithSelf.Op [symbolic = @AddWith.%AddWith.WithSelf.Op (constants.%AddWith.WithSelf.Op.647)] { +// CHECK:STDOUT: %self.patt: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.1f3) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.1f3) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %other.patt: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.1f3) = value_binding_pattern other [concrete] +// CHECK:STDOUT: %other.param_patt: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.1f3) = value_param_pattern %other.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.1f3) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @AddWith.WithSelf.Op.%pattern_type (%pattern_type.1f3) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_37.2: @AddWith.Op.%AddWith.type (%AddWith.type.26b) = specific_constant @AddWith.%Self.loc7_29.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.a37)] -// CHECK:STDOUT: %Self.ref.loc8_37: @AddWith.Op.%AddWith.type (%AddWith.type.26b) = name_ref Self, %.loc8_37.2 [symbolic = %Self (constants.%Self.a37)] +// CHECK:STDOUT: %.loc8_37.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = specific_constant @AddWith.%Self.loc7_29.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.a37)] +// CHECK:STDOUT: %Self.ref.loc8_37: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = name_ref Self, %.loc8_37.2 [symbolic = %Self (constants.%Self.a37)] // CHECK:STDOUT: %Self.as_type.loc8_37: type = facet_access_type %Self.ref.loc8_37 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)] // CHECK:STDOUT: %.loc8_37.3: type = converted %Self.ref.loc8_37, %Self.as_type.loc8_37 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)] // CHECK:STDOUT: %.loc8_37.4: Core.Form = init_form %.loc8_37.3, call_param2 [symbolic = %.loc8_37.1 (constants.%.117)] -// CHECK:STDOUT: %self.param: @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = value_param call_param0 +// CHECK:STDOUT: %self.param: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = value_param call_param0 // CHECK:STDOUT: %.loc8_15.1: type = splice_block %.loc8_15.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)] { -// CHECK:STDOUT: %.loc8_15.2: @AddWith.Op.%AddWith.type (%AddWith.type.26b) = specific_constant @AddWith.%Self.loc7_29.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.a37)] -// CHECK:STDOUT: %Self.ref.loc8_15: @AddWith.Op.%AddWith.type (%AddWith.type.26b) = name_ref Self, %.loc8_15.2 [symbolic = %Self (constants.%Self.a37)] +// CHECK:STDOUT: %.loc8_15.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = specific_constant @AddWith.%Self.loc7_29.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.a37)] +// CHECK:STDOUT: %Self.ref.loc8_15: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = name_ref Self, %.loc8_15.2 [symbolic = %Self (constants.%Self.a37)] // CHECK:STDOUT: %Self.as_type.loc8_15: type = facet_access_type %Self.ref.loc8_15 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)] // CHECK:STDOUT: %.loc8_15.3: type = converted %Self.ref.loc8_15, %Self.as_type.loc8_15 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = value_binding self, %self.param -// CHECK:STDOUT: %other.param: @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = value_param call_param1 +// CHECK:STDOUT: %self: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = value_binding self, %self.param +// CHECK:STDOUT: %other.param: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = value_param call_param1 // CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)] { -// CHECK:STDOUT: %.loc8_28.2: @AddWith.Op.%AddWith.type (%AddWith.type.26b) = specific_constant @AddWith.%Self.loc7_29.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.a37)] -// CHECK:STDOUT: %Self.ref.loc8_28: @AddWith.Op.%AddWith.type (%AddWith.type.26b) = name_ref Self, %.loc8_28.2 [symbolic = %Self (constants.%Self.a37)] +// CHECK:STDOUT: %.loc8_28.2: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = specific_constant @AddWith.%Self.loc7_29.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.a37)] +// CHECK:STDOUT: %Self.ref.loc8_28: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = name_ref Self, %.loc8_28.2 [symbolic = %Self (constants.%Self.a37)] // CHECK:STDOUT: %Self.as_type.loc8_28: type = facet_access_type %Self.ref.loc8_28 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)] // CHECK:STDOUT: %.loc8_28.3: type = converted %Self.ref.loc8_28, %Self.as_type.loc8_28 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)] // CHECK:STDOUT: } -// CHECK:STDOUT: %other: @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = value_binding other, %other.param -// CHECK:STDOUT: %return.param: ref @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = out_param call_param2 -// CHECK:STDOUT: %return: ref @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = return_slot %return.param +// CHECK:STDOUT: %other: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = value_binding other, %other.param +// CHECK:STDOUT: %return.param: ref @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = out_param call_param2 +// CHECK:STDOUT: %return: ref @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc8_41.1: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.5ad) = assoc_entity element0, %AddWith.Op.decl [symbolic = %assoc0.loc8_41.2 (constants.%assoc0.438)] +// CHECK:STDOUT: %assoc0.loc8_41.1: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.5ad) = assoc_entity element0, %AddWith.WithSelf.Op.decl [symbolic = %assoc0.loc8_41.2 (constants.%assoc0.90d)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc7_29.1 // CHECK:STDOUT: .Op = %assoc0.loc8_41.1 -// CHECK:STDOUT: witness = (%AddWith.Op.decl) +// CHECK:STDOUT: witness = (%AddWith.WithSelf.Op.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -310,41 +317,41 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.loc11_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc11_14.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T.loc11_14.1)> [symbolic = %As.type (constants.%As.type.b54)] -// CHECK:STDOUT: %Self.loc11_24.2: @As.%As.type (%As.type.b54) = symbolic_binding Self, 1 [symbolic = %Self.loc11_24.2 (constants.%Self.a8c)] -// CHECK:STDOUT: %As.Convert.type: type = fn_type @As.Convert, @As(%T.loc11_14.1) [symbolic = %As.Convert.type (constants.%As.Convert.type.d47)] -// CHECK:STDOUT: %As.Convert: @As.%As.Convert.type (%As.Convert.type.d47) = struct_value () [symbolic = %As.Convert (constants.%As.Convert.4a7)] -// CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As, @As(%T.loc11_14.1) [symbolic = %As.assoc_type (constants.%As.assoc_type.520)] -// CHECK:STDOUT: %assoc0.loc12_32.2: @As.%As.assoc_type (%As.assoc_type.520) = assoc_entity element0, %As.Convert.decl [symbolic = %assoc0.loc12_32.2 (constants.%assoc0.84f)] +// CHECK:STDOUT: %As.type.loc11: type = facet_type <@As, @As(%T.loc11_14.1)> [symbolic = %As.type.loc11 (constants.%As.type.b54)] +// CHECK:STDOUT: %Self.loc11_24.2: @As.%As.type.loc11 (%As.type.b54) = symbolic_binding Self, 1 [symbolic = %Self.loc11_24.2 (constants.%Self.a8c)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc11_24.1: @As.%As.type (%As.type.b54) = symbolic_binding Self, 1 [symbolic = %Self.loc11_24.2 (constants.%Self.a8c)] -// CHECK:STDOUT: %As.Convert.decl: @As.%As.Convert.type (%As.Convert.type.d47) = fn_decl @As.Convert [symbolic = @As.%As.Convert (constants.%As.Convert.4a7)] { -// CHECK:STDOUT: %self.patt: @As.Convert.%pattern_type.loc12_14 (%pattern_type.24e) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @As.Convert.%pattern_type.loc12_14 (%pattern_type.24e) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @As.Convert.%pattern_type.loc12_28 (%pattern_type.51d) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @As.Convert.%pattern_type.loc12_28 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %Self.loc11_24.1: @As.%As.type.loc11 (%As.type.b54) = symbolic_binding Self, 1 [symbolic = %Self.loc11_24.2 (constants.%Self.a8c)] +// CHECK:STDOUT: interface_with_self_decl @As [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %As.WithSelf.Convert.decl: @As.%As.WithSelf.Convert.type (%As.WithSelf.Convert.type.aef) = fn_decl @As.WithSelf.Convert [symbolic = @As.%As.WithSelf.Convert (constants.%As.WithSelf.Convert.a95)] { +// CHECK:STDOUT: %self.patt: @As.WithSelf.Convert.%pattern_type.loc12_14 (%pattern_type.24e) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @As.WithSelf.Convert.%pattern_type.loc12_14 (%pattern_type.24e) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @As.WithSelf.Convert.%pattern_type.loc12_28 (%pattern_type.51d) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @As.WithSelf.Convert.%pattern_type.loc12_28 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @As.%T.loc11_14.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %.loc12_31.2: Core.Form = init_form %T.ref, call_param1 [symbolic = %.loc12_31.1 (constants.%.3cf)] -// CHECK:STDOUT: %self.param: @As.Convert.%Self.binding.as_type (%Self.binding.as_type.69d) = value_param call_param0 +// CHECK:STDOUT: %self.param: @As.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type.69d) = value_param call_param0 // CHECK:STDOUT: %.loc12_20.1: type = splice_block %.loc12_20.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.69d)] { -// CHECK:STDOUT: %.loc12_20.2: @As.Convert.%As.type (%As.type.b54) = specific_constant @As.%Self.loc11_24.1, @As(constants.%T) [symbolic = %Self (constants.%Self.a8c)] -// CHECK:STDOUT: %Self.ref: @As.Convert.%As.type (%As.type.b54) = name_ref Self, %.loc12_20.2 [symbolic = %Self (constants.%Self.a8c)] +// CHECK:STDOUT: %.loc12_20.2: @As.WithSelf.Convert.%As.type (%As.type.b54) = specific_constant @As.%Self.loc11_24.1, @As(constants.%T) [symbolic = %Self (constants.%Self.a8c)] +// CHECK:STDOUT: %Self.ref: @As.WithSelf.Convert.%As.type (%As.type.b54) = name_ref Self, %.loc12_20.2 [symbolic = %Self (constants.%Self.a8c)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.69d)] // CHECK:STDOUT: %.loc12_20.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.69d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @As.Convert.%Self.binding.as_type (%Self.binding.as_type.69d) = value_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @As.Convert.%T (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @As.Convert.%T (%T) = return_slot %return.param +// CHECK:STDOUT: %self: @As.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type.69d) = value_binding self, %self.param +// CHECK:STDOUT: %return.param: ref @As.WithSelf.Convert.%T (%T) = out_param call_param1 +// CHECK:STDOUT: %return: ref @As.WithSelf.Convert.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc12_32.1: @As.%As.assoc_type (%As.assoc_type.520) = assoc_entity element0, %As.Convert.decl [symbolic = %assoc0.loc12_32.2 (constants.%assoc0.84f)] +// CHECK:STDOUT: %assoc0.loc12_32.1: @As.%As.assoc_type (%As.assoc_type.520) = assoc_entity element0, %As.WithSelf.Convert.decl [symbolic = %assoc0.loc12_32.2 (constants.%assoc0.84c)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc11_24.1 // CHECK:STDOUT: .T = +// CHECK:STDOUT: .T = // CHECK:STDOUT: .Convert = %assoc0.loc12_32.1 -// CHECK:STDOUT: witness = (%As.Convert.decl) +// CHECK:STDOUT: witness = (%As.WithSelf.Convert.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -354,41 +361,41 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.loc15_22.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_22.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc15_22.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.9fe)] -// CHECK:STDOUT: %Self.loc15_32.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_32.2 (constants.%Self.7c0)] -// CHECK:STDOUT: %ImplicitAs.Convert.type: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%T.loc15_22.1) [symbolic = %ImplicitAs.Convert.type (constants.%ImplicitAs.Convert.type.103)] -// CHECK:STDOUT: %ImplicitAs.Convert: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.103) = struct_value () [symbolic = %ImplicitAs.Convert (constants.%ImplicitAs.Convert.2cc)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T.loc15_22.1) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.b04)] -// CHECK:STDOUT: %assoc0.loc16_32.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.b04) = assoc_entity element0, %ImplicitAs.Convert.decl [symbolic = %assoc0.loc16_32.2 (constants.%assoc0.cd9)] +// CHECK:STDOUT: %ImplicitAs.type.loc15: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc15_22.1)> [symbolic = %ImplicitAs.type.loc15 (constants.%ImplicitAs.type.9fe)] +// CHECK:STDOUT: %Self.loc15_32.2: @ImplicitAs.%ImplicitAs.type.loc15 (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_32.2 (constants.%Self.7c0)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc15_32.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_32.2 (constants.%Self.7c0)] -// CHECK:STDOUT: %ImplicitAs.Convert.decl: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.103) = fn_decl @ImplicitAs.Convert [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.2cc)] { -// CHECK:STDOUT: %self.patt: @ImplicitAs.Convert.%pattern_type.loc16_14 (%pattern_type.8de) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @ImplicitAs.Convert.%pattern_type.loc16_14 (%pattern_type.8de) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @ImplicitAs.Convert.%pattern_type.loc16_28 (%pattern_type.51d) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @ImplicitAs.Convert.%pattern_type.loc16_28 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %Self.loc15_32.1: @ImplicitAs.%ImplicitAs.type.loc15 (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc15_32.2 (constants.%Self.7c0)] +// CHECK:STDOUT: interface_with_self_decl @ImplicitAs [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.decl: @ImplicitAs.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type.f6b) = fn_decl @ImplicitAs.WithSelf.Convert [symbolic = @ImplicitAs.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert.de0)] { +// CHECK:STDOUT: %self.patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc16_14 (%pattern_type.8de) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc16_14 (%pattern_type.8de) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc16_28 (%pattern_type.51d) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc16_28 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc15_22.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %.loc16_31.2: Core.Form = init_form %T.ref, call_param1 [symbolic = %.loc16_31.1 (constants.%.3cf)] -// CHECK:STDOUT: %self.param: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type.984) = value_param call_param0 +// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type.984) = value_param call_param0 // CHECK:STDOUT: %.loc16_20.1: type = splice_block %.loc16_20.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.984)] { -// CHECK:STDOUT: %.loc16_20.2: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = specific_constant @ImplicitAs.%Self.loc15_32.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.7c0)] -// CHECK:STDOUT: %Self.ref: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = name_ref Self, %.loc16_20.2 [symbolic = %Self (constants.%Self.7c0)] +// CHECK:STDOUT: %.loc16_20.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = specific_constant @ImplicitAs.%Self.loc15_32.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.7c0)] +// CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = name_ref Self, %.loc16_20.2 [symbolic = %Self (constants.%Self.7c0)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.984)] // CHECK:STDOUT: %.loc16_20.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.984)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type.984) = value_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @ImplicitAs.Convert.%T (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @ImplicitAs.Convert.%T (%T) = return_slot %return.param +// CHECK:STDOUT: %self: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type.984) = value_binding self, %self.param +// CHECK:STDOUT: %return.param: ref @ImplicitAs.WithSelf.Convert.%T (%T) = out_param call_param1 +// CHECK:STDOUT: %return: ref @ImplicitAs.WithSelf.Convert.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc16_32.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.b04) = assoc_entity element0, %ImplicitAs.Convert.decl [symbolic = %assoc0.loc16_32.2 (constants.%assoc0.cd9)] +// CHECK:STDOUT: %assoc0.loc16_32.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.b04) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc16_32.2 (constants.%assoc0.361)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc15_32.1 // CHECK:STDOUT: .T = +// CHECK:STDOUT: .T = // CHECK:STDOUT: .Convert = %assoc0.loc16_32.1 -// CHECK:STDOUT: witness = (%ImplicitAs.Convert.decl) +// CHECK:STDOUT: witness = (%ImplicitAs.WithSelf.Convert.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -505,39 +512,39 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int(%N.param: Core.IntLiteral) -> out %return.param: type = "int.make_type_signed"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AddWith.Op(@AddWith.%T.loc7_19.2: type, @AddWith.%Self.loc7_29.1: @AddWith.%AddWith.type (%AddWith.type.26b)) { +// CHECK:STDOUT: generic fn @AddWith.WithSelf.Op(@AddWith.%T.loc7_19.2: type, @AddWith.%Self.loc7_29.1: @AddWith.%AddWith.type.loc7 (%AddWith.type.26b)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.26b)] -// CHECK:STDOUT: %Self: @AddWith.Op.%AddWith.type (%AddWith.type.26b) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.a37)] +// CHECK:STDOUT: %Self: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.26b) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.a37)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.73e)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.1f3)] // CHECK:STDOUT: %.loc8_37.1: Core.Form = init_form %Self.binding.as_type, call_param2 [symbolic = %.loc8_37.1 (constants.%.117)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e), %other.param: @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e)) -> out %return.param: @AddWith.Op.%Self.binding.as_type (%Self.binding.as_type.73e); +// CHECK:STDOUT: fn(%self.param: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e), %other.param: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e)) -> out %return.param: @AddWith.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.73e); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @As.Convert(@As.%T.loc11_14.2: type, @As.%Self.loc11_24.1: @As.%As.type (%As.type.b54)) { +// CHECK:STDOUT: generic fn @As.WithSelf.Convert(@As.%T.loc11_14.2: type, @As.%Self.loc11_24.1: @As.%As.type.loc11 (%As.type.b54)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.b54)] -// CHECK:STDOUT: %Self: @As.Convert.%As.type (%As.type.b54) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.a8c)] +// CHECK:STDOUT: %Self: @As.WithSelf.Convert.%As.type (%As.type.b54) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.a8c)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.69d)] // CHECK:STDOUT: %pattern_type.loc12_14: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc12_14 (constants.%pattern_type.24e)] // CHECK:STDOUT: %.loc12_31.1: Core.Form = init_form %T, call_param1 [symbolic = %.loc12_31.1 (constants.%.3cf)] // CHECK:STDOUT: %pattern_type.loc12_28: type = pattern_type %T [symbolic = %pattern_type.loc12_28 (constants.%pattern_type.51d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @As.Convert.%Self.binding.as_type (%Self.binding.as_type.69d)) -> out %return.param: @As.Convert.%T (%T); +// CHECK:STDOUT: fn(%self.param: @As.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type.69d)) -> out %return.param: @As.WithSelf.Convert.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.Convert(@ImplicitAs.%T.loc15_22.2: type, @ImplicitAs.%Self.loc15_32.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe)) { +// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%T.loc15_22.2: type, @ImplicitAs.%Self.loc15_32.1: @ImplicitAs.%ImplicitAs.type.loc15 (%ImplicitAs.type.9fe)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.9fe)] -// CHECK:STDOUT: %Self: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.7c0)] +// CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.7c0)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.984)] // CHECK:STDOUT: %pattern_type.loc16_14: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc16_14 (constants.%pattern_type.8de)] // CHECK:STDOUT: %.loc16_31.1: Core.Form = init_form %T, call_param1 [symbolic = %.loc16_31.1 (constants.%.3cf)] // CHECK:STDOUT: %pattern_type.loc16_28: type = pattern_type %T [symbolic = %pattern_type.loc16_28 (constants.%pattern_type.51d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type.984)) -> out %return.param: @ImplicitAs.Convert.%T (%T); +// CHECK:STDOUT: fn(%self.param: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type.984)) -> out %return.param: @ImplicitAs.WithSelf.Convert.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @i32.builtin.as.AddWith.impl.Op(%self.param: %i32.builtin, %other.param: %i32.builtin) -> out %return.param: %i32.builtin = "int.sadd"; @@ -552,7 +559,9 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.loc7_19.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.Op(constants.%T, constants.%Self.a37) { +// CHECK:STDOUT: specific @AddWith(constants.%T, constants.%Self.a37) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @AddWith.WithSelf.Op(constants.%T, constants.%Self.a37) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.26b // CHECK:STDOUT: %Self => constants.%Self.a37 @@ -565,7 +574,9 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.loc11_14.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As.Convert(constants.%T, constants.%Self.a8c) { +// CHECK:STDOUT: specific @As(constants.%T, constants.%Self.a8c) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @As.WithSelf.Convert(constants.%T, constants.%Self.a8c) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %As.type => constants.%As.type.b54 // CHECK:STDOUT: %Self => constants.%Self.a8c @@ -579,7 +590,9 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.loc15_22.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs.Convert(constants.%T, constants.%Self.7c0) { +// CHECK:STDOUT: specific @ImplicitAs(constants.%T, constants.%Self.7c0) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%T, constants.%Self.7c0) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9fe // CHECK:STDOUT: %Self => constants.%Self.7c0 @@ -593,15 +606,33 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.loc7_19.1 => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.aed +// CHECK:STDOUT: %AddWith.type.loc7 => constants.%AddWith.type.aed // CHECK:STDOUT: %Self.loc7_29.2 => constants.%Self.aad -// CHECK:STDOUT: %AddWith.Op.type => constants.%AddWith.Op.type.bae -// CHECK:STDOUT: %AddWith.Op => constants.%AddWith.Op.a6f -// CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.97c -// CHECK:STDOUT: %assoc0.loc8_41.2 => constants.%assoc0.61e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.Op(constants.%i32.builtin, constants.%AddWith.facet) { +// CHECK:STDOUT: specific @AddWith(constants.%i32.builtin, constants.%Self.a37) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc8 => constants.%i32.builtin +// CHECK:STDOUT: %AddWith.type.loc8 => constants.%AddWith.type.aed +// CHECK:STDOUT: %Self.loc8 => constants.%Self.a37 +// CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.479 +// CHECK:STDOUT: %AddWith.WithSelf.Op => constants.%AddWith.WithSelf.Op.8bc +// CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.97c +// CHECK:STDOUT: %assoc0.loc8_41.2 => constants.%assoc0.4d8 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @AddWith(constants.%i32.builtin, constants.%AddWith.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc8 => constants.%i32.builtin +// CHECK:STDOUT: %AddWith.type.loc8 => constants.%AddWith.type.aed +// CHECK:STDOUT: %Self.loc8 => constants.%AddWith.facet +// CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.493 +// CHECK:STDOUT: %AddWith.WithSelf.Op => constants.%AddWith.WithSelf.Op.d6a +// CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.97c +// CHECK:STDOUT: %assoc0.loc8_41.2 => constants.%assoc0.4d8 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @AddWith.WithSelf.Op(constants.%i32.builtin, constants.%AddWith.facet) { // CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.aed // CHECK:STDOUT: %Self => constants.%AddWith.facet @@ -614,15 +645,33 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.loc11_14.1 => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %As.type => constants.%As.type.1ed +// CHECK:STDOUT: %As.type.loc11 => constants.%As.type.1ed // CHECK:STDOUT: %Self.loc11_24.2 => constants.%Self.037 -// CHECK:STDOUT: %As.Convert.type => constants.%As.Convert.type.063 -// CHECK:STDOUT: %As.Convert => constants.%As.Convert.701 -// CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.c44 -// CHECK:STDOUT: %assoc0.loc12_32.2 => constants.%assoc0.d89 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As.Convert(constants.%i32.builtin, constants.%As.facet) { +// CHECK:STDOUT: specific @As(constants.%i32.builtin, constants.%Self.a8c) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc12 => constants.%i32.builtin +// CHECK:STDOUT: %As.type.loc12 => constants.%As.type.1ed +// CHECK:STDOUT: %Self.loc12 => constants.%Self.a8c +// CHECK:STDOUT: %As.WithSelf.Convert.type => constants.%As.WithSelf.Convert.type.a02 +// CHECK:STDOUT: %As.WithSelf.Convert => constants.%As.WithSelf.Convert.98f +// CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.c44 +// CHECK:STDOUT: %assoc0.loc12_32.2 => constants.%assoc0.43d +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @As(constants.%i32.builtin, constants.%As.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc12 => constants.%i32.builtin +// CHECK:STDOUT: %As.type.loc12 => constants.%As.type.1ed +// CHECK:STDOUT: %Self.loc12 => constants.%As.facet +// CHECK:STDOUT: %As.WithSelf.Convert.type => constants.%As.WithSelf.Convert.type.204 +// CHECK:STDOUT: %As.WithSelf.Convert => constants.%As.WithSelf.Convert.24c +// CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.c44 +// CHECK:STDOUT: %assoc0.loc12_32.2 => constants.%assoc0.43d +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @As.WithSelf.Convert(constants.%i32.builtin, constants.%As.facet) { // CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: %As.type => constants.%As.type.1ed // CHECK:STDOUT: %Self => constants.%As.facet @@ -636,15 +685,33 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.loc15_22.1 => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.92b +// CHECK:STDOUT: %ImplicitAs.type.loc15 => constants.%ImplicitAs.type.92b // CHECK:STDOUT: %Self.loc15_32.2 => constants.%Self.597 -// CHECK:STDOUT: %ImplicitAs.Convert.type => constants.%ImplicitAs.Convert.type.424 -// CHECK:STDOUT: %ImplicitAs.Convert => constants.%ImplicitAs.Convert.a1f -// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.c3f -// CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.5e9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs.Convert(constants.%i32.builtin, constants.%ImplicitAs.facet.b36) { +// CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin, constants.%Self.7c0) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc16 => constants.%i32.builtin +// CHECK:STDOUT: %ImplicitAs.type.loc16 => constants.%ImplicitAs.type.92b +// CHECK:STDOUT: %Self.loc16 => constants.%Self.7c0 +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.d4c +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.086 +// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.c3f +// CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.124 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin, constants.%ImplicitAs.facet.b36) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc16 => constants.%i32.builtin +// CHECK:STDOUT: %ImplicitAs.type.loc16 => constants.%ImplicitAs.type.92b +// CHECK:STDOUT: %Self.loc16 => constants.%ImplicitAs.facet.b36 +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.07c +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.a38 +// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.c3f +// CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.124 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%i32.builtin, constants.%ImplicitAs.facet.b36) { // CHECK:STDOUT: %T => constants.%i32.builtin // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.92b // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.b36 @@ -658,15 +725,33 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.loc15_22.1 => Core.IntLiteral // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.79c +// CHECK:STDOUT: %ImplicitAs.type.loc15 => constants.%ImplicitAs.type.79c // CHECK:STDOUT: %Self.loc15_32.2 => constants.%Self.55f -// CHECK:STDOUT: %ImplicitAs.Convert.type => constants.%ImplicitAs.Convert.type.785 -// CHECK:STDOUT: %ImplicitAs.Convert => constants.%ImplicitAs.Convert.aec -// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.793 -// CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.49f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs.Convert(Core.IntLiteral, constants.%ImplicitAs.facet.c5c) { +// CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral, constants.%Self.7c0) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc16 => Core.IntLiteral +// CHECK:STDOUT: %ImplicitAs.type.loc16 => constants.%ImplicitAs.type.79c +// CHECK:STDOUT: %Self.loc16 => constants.%Self.7c0 +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.25a +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.1ae +// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.793 +// CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.e18 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral, constants.%ImplicitAs.facet.c5c) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc16 => Core.IntLiteral +// CHECK:STDOUT: %ImplicitAs.type.loc16 => constants.%ImplicitAs.type.79c +// CHECK:STDOUT: %Self.loc16 => constants.%ImplicitAs.facet.c5c +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.7aa +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.090 +// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.793 +// CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.e18 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(Core.IntLiteral, constants.%ImplicitAs.facet.c5c) { // CHECK:STDOUT: %T => Core.IntLiteral // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.79c // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.c5c @@ -690,23 +775,24 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %As.type.223: type = facet_type <@As, @As(%T)> [symbolic] // CHECK:STDOUT: %Self.2d0: %As.type.223 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %As.assoc_type.752: type = assoc_entity_type @As, @As(%T) [symbolic] -// CHECK:STDOUT: %assoc0.cc1: %As.assoc_type.752 = assoc_entity element0, imports.%Core.import_ref.77d [symbolic] -// CHECK:STDOUT: %As.Convert.type.47d: type = fn_type @As.Convert, @As(%T) [symbolic] -// CHECK:STDOUT: %As.Convert.099: %As.Convert.type.47d = struct_value () [symbolic] +// CHECK:STDOUT: %As.WithSelf.Convert.type.bb7: type = fn_type @As.WithSelf.Convert, @As(%T, %Self.2d0) [symbolic] +// CHECK:STDOUT: %As.WithSelf.Convert.923: %As.WithSelf.Convert.type.bb7 = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] // CHECK:STDOUT: %Self.binding.as_type.297: type = symbolic_binding_type Self, 1, %Self.2d0 [symbolic] // CHECK:STDOUT: %pattern_type.760: type = pattern_type %Self.binding.as_type.297 [symbolic] // CHECK:STDOUT: %.3cf: Core.Form = init_form %T, call_param1 [symbolic] // CHECK:STDOUT: %As.type.ffe: type = facet_type <@As, @As(%i32.builtin)> [concrete] // CHECK:STDOUT: %Self.af0: %As.type.ffe = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %As.Convert.type.378: type = fn_type @As.Convert, @As(%i32.builtin) [concrete] -// CHECK:STDOUT: %As.Convert.e51: %As.Convert.type.378 = struct_value () [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.06b: type = fn_type @As.WithSelf.Convert, @As(%i32.builtin, %Self.2d0) [symbolic] +// CHECK:STDOUT: %As.WithSelf.Convert.b84: %As.WithSelf.Convert.type.06b = struct_value () [symbolic] // CHECK:STDOUT: %As.assoc_type.bc2: type = assoc_entity_type @As, @As(%i32.builtin) [concrete] -// CHECK:STDOUT: %assoc0.09a: %As.assoc_type.bc2 = assoc_entity element0, imports.%Core.import_ref.77d [concrete] -// CHECK:STDOUT: %assoc0.5c9: %As.assoc_type.752 = assoc_entity element0, imports.%Core.import_ref.1ae [symbolic] +// CHECK:STDOUT: %assoc0.5d8: %As.assoc_type.bc2 = assoc_entity element0, imports.%Core.import_ref.0ec [concrete] +// CHECK:STDOUT: %assoc0.2f9: %As.assoc_type.752 = assoc_entity element0, imports.%Core.import_ref.4c6 [symbolic] // CHECK:STDOUT: %As.impl_witness: = impl_witness imports.%As.impl_witness_table [concrete] // CHECK:STDOUT: %As.facet: %As.type.ffe = facet_value Core.IntLiteral, (%As.impl_witness) [concrete] -// CHECK:STDOUT: %.9cc: type = fn_type_with_self_type %As.Convert.type.378, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.b07: type = fn_type @As.WithSelf.Convert, @As(%i32.builtin, %As.facet) [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.2d0: %As.WithSelf.Convert.type.b07 = struct_value () [concrete] +// CHECK:STDOUT: %.e3a: type = fn_type_with_self_type %As.WithSelf.Convert.type.b07, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.4b3: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete] @@ -719,22 +805,23 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %AddWith.type.6d9: type = facet_type <@AddWith, @AddWith(%T)> [symbolic] // CHECK:STDOUT: %Self.b7c: %AddWith.type.6d9 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %AddWith.assoc_type.b6a: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic] -// CHECK:STDOUT: %assoc0.5a5: %AddWith.assoc_type.b6a = assoc_entity element0, imports.%Core.import_ref.7c3 [symbolic] -// CHECK:STDOUT: %AddWith.Op.type.216: type = fn_type @AddWith.Op, @AddWith(%T) [symbolic] -// CHECK:STDOUT: %AddWith.Op.b1d: %AddWith.Op.type.216 = struct_value () [symbolic] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type.08f: type = fn_type @AddWith.WithSelf.Op, @AddWith(%T, %Self.b7c) [symbolic] +// CHECK:STDOUT: %AddWith.WithSelf.Op.fb8: %AddWith.WithSelf.Op.type.08f = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type.14b: type = symbolic_binding_type Self, 1, %Self.b7c [symbolic] // CHECK:STDOUT: %pattern_type.259: type = pattern_type %Self.binding.as_type.14b [symbolic] // CHECK:STDOUT: %.8b7: Core.Form = init_form %Self.binding.as_type.14b, call_param2 [symbolic] // CHECK:STDOUT: %AddWith.type.46d: type = facet_type <@AddWith, @AddWith(%i32.builtin)> [concrete] // CHECK:STDOUT: %Self.365: %AddWith.type.46d = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %AddWith.Op.type.0b7: type = fn_type @AddWith.Op, @AddWith(%i32.builtin) [concrete] -// CHECK:STDOUT: %AddWith.Op.9d6: %AddWith.Op.type.0b7 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type.de8: type = fn_type @AddWith.WithSelf.Op, @AddWith(%i32.builtin, %Self.b7c) [symbolic] +// CHECK:STDOUT: %AddWith.WithSelf.Op.31e: %AddWith.WithSelf.Op.type.de8 = struct_value () [symbolic] // CHECK:STDOUT: %AddWith.assoc_type.dff: type = assoc_entity_type @AddWith, @AddWith(%i32.builtin) [concrete] -// CHECK:STDOUT: %assoc0.1cc: %AddWith.assoc_type.dff = assoc_entity element0, imports.%Core.import_ref.7c3 [concrete] -// CHECK:STDOUT: %assoc0.7a7: %AddWith.assoc_type.b6a = assoc_entity element0, imports.%Core.import_ref.046 [symbolic] +// CHECK:STDOUT: %assoc0.6d5: %AddWith.assoc_type.dff = assoc_entity element0, imports.%Core.import_ref.1b1 [concrete] +// CHECK:STDOUT: %assoc0.20f: %AddWith.assoc_type.b6a = assoc_entity element0, imports.%Core.import_ref.a84 [symbolic] // CHECK:STDOUT: %AddWith.impl_witness: = impl_witness imports.%AddWith.impl_witness_table [concrete] // CHECK:STDOUT: %AddWith.facet: %AddWith.type.46d = facet_value %i32.builtin, (%AddWith.impl_witness) [concrete] -// CHECK:STDOUT: %.f15: type = fn_type_with_self_type %AddWith.Op.type.0b7, %AddWith.facet [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type.78e: type = fn_type @AddWith.WithSelf.Op, @AddWith(%i32.builtin, %AddWith.facet) [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.Op.d4d: %AddWith.WithSelf.Op.type.78e = struct_value () [concrete] +// CHECK:STDOUT: %.0ff: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.78e, %AddWith.facet [concrete] // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.type: type = fn_type @i32.builtin.as.AddWith.impl.Op [concrete] // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op: %i32.builtin.as.AddWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.bound.abd: = bound_method %int_1.f38, %i32.builtin.as.AddWith.impl.Op [concrete] @@ -744,27 +831,24 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %ImplicitAs.type.031: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] // CHECK:STDOUT: %Self.738: %ImplicitAs.type.031 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.ff3: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T) [symbolic] -// CHECK:STDOUT: %assoc0.ad7: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.218943.1 [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6d3: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%T) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.50f: %ImplicitAs.Convert.type.6d3 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b3a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%T, %Self.738) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.1de: %ImplicitAs.WithSelf.Convert.type.b3a = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type.a44: type = symbolic_binding_type Self, 1, %Self.738 [symbolic] // CHECK:STDOUT: %pattern_type.e9a: type = pattern_type %Self.binding.as_type.a44 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %Self.cce: %ImplicitAs.type.139 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.0e2: %ImplicitAs.Convert.type.71e = struct_value () [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.577: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %Self.738) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.f0a: %ImplicitAs.WithSelf.Convert.type.577 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.959: type = assoc_entity_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %assoc0.fc3: %ImplicitAs.assoc_type.959 = assoc_entity element0, imports.%Core.import_ref.218943.1 [concrete] -// CHECK:STDOUT: %assoc0.0bc: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.fa2 [symbolic] +// CHECK:STDOUT: %assoc0.461: %ImplicitAs.assoc_type.959 = assoc_entity element0, imports.%Core.import_ref.201 [concrete] +// CHECK:STDOUT: %assoc0.843: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.cc1 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.78a: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [concrete] -// CHECK:STDOUT: %ImplicitAs.assoc_type.398: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete] -// CHECK:STDOUT: %assoc0.58b: %ImplicitAs.assoc_type.398 = assoc_entity element0, imports.%Core.import_ref.218943.2 [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.059: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32.builtin) [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.4d7: %ImplicitAs.Convert.type.059 = struct_value () [concrete] // CHECK:STDOUT: %Self.dd8: %ImplicitAs.type.78a = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.304: = impl_witness imports.%ImplicitAs.impl_witness_table.267 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.7f3: %ImplicitAs.type.139 = facet_value %i32.builtin, (%ImplicitAs.impl_witness.304) [concrete] -// CHECK:STDOUT: %.e36: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.7f3 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e78: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.7f3) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.e56: %ImplicitAs.WithSelf.Convert.type.e78 = struct_value () [concrete] +// CHECK:STDOUT: %.626: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e78, %ImplicitAs.facet.7f3 [concrete] // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert.type: type = fn_type @i32.builtin.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert: %i32.builtin.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %i32.builtin.as.ImplicitAs.impl.Convert.bound: = bound_method %int_3.a0f, %i32.builtin.as.ImplicitAs.impl.Convert [concrete] @@ -780,9 +864,15 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, %i32.builtin) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%int_3.1ba, %int_4.0c1, %int_7) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.ea9: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32.builtin, %Self.738) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.149: %ImplicitAs.WithSelf.Convert.type.ea9 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.assoc_type.398: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete] +// CHECK:STDOUT: %assoc0.4a0: %ImplicitAs.assoc_type.398 = assoc_entity element0, imports.%Core.import_ref.201 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.586: = impl_witness imports.%ImplicitAs.impl_witness_table.7a2 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.fa4: %ImplicitAs.type.78a = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.586) [concrete] -// CHECK:STDOUT: %.7de: type = fn_type_with_self_type %ImplicitAs.Convert.type.059, %ImplicitAs.facet.fa4 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.66f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32.builtin, %ImplicitAs.facet.fa4) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.e20: %ImplicitAs.WithSelf.Convert.type.66f = struct_value () [concrete] +// CHECK:STDOUT: %.714: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.66f, %ImplicitAs.facet.fa4 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.a95: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] @@ -800,44 +890,43 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//default, Int, loaded [concrete = constants.%Int] // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//default, As, loaded [concrete = constants.%As.generic] +// CHECK:STDOUT: %Core.import_ref.8db: @As.%As.assoc_type (%As.assoc_type.752) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%assoc0 (constants.%assoc0.2f9)] +// CHECK:STDOUT: %Core.Convert.b81 = import_ref Core//default, Convert, unloaded +// CHECK:STDOUT: %Core.import_ref.0ec: @As.%As.WithSelf.Convert.type (%As.WithSelf.Convert.type.bb7) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%As.WithSelf.Convert (constants.%As.WithSelf.Convert.923)] +// CHECK:STDOUT: %Core.import_ref.b3bc94.2: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%T.1 (constants.%T)] +// CHECK:STDOUT: %Core.import_ref.1ac891.2: @As.%As.type.1 (%As.type.223) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%Self.1 (constants.%Self.2d0)] // CHECK:STDOUT: %Core.import_ref.0e7 = import_ref Core//default, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.import_ref.e0b: @As.%As.assoc_type (%As.assoc_type.752) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%assoc0 (constants.%assoc0.5c9)] -// CHECK:STDOUT: %Core.Convert.1f8 = import_ref Core//default, Convert, unloaded -// CHECK:STDOUT: %Core.import_ref.b3bc94.1: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.77d: @As.%As.Convert.type (%As.Convert.type.47d) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%As.Convert (constants.%As.Convert.099)] -// CHECK:STDOUT: %Core.import_ref.b3bc94.2: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.1ac: @As.%As.type (%As.type.223) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%Self (constants.%Self.2d0)] -// CHECK:STDOUT: %Core.import_ref.1ae = import_ref Core//default, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.b3bc94.3: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @As.%T.1 (constants.%T)] +// CHECK:STDOUT: %Core.import_ref.4c6 = import_ref Core//default, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.ad5: = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%As.impl_witness] // CHECK:STDOUT: %Core.import_ref.a86459.1: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.412: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%As.type.ffe] // CHECK:STDOUT: %Core.import_ref.d9d: %Core.IntLiteral.as.As.impl.Convert.type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] // CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (%Core.import_ref.d9d), @Core.IntLiteral.as.As.impl [concrete] // CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//default, AddWith, loaded [concrete = constants.%AddWith.generic] -// CHECK:STDOUT: %Core.import_ref.a40 = import_ref Core//default, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.import_ref.91c: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.b6a) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%assoc0 (constants.%assoc0.7a7)] +// CHECK:STDOUT: %Core.import_ref.3f3: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.b6a) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%assoc0 (constants.%assoc0.20f)] // CHECK:STDOUT: %Core.Op = import_ref Core//default, Op, unloaded -// CHECK:STDOUT: %Core.import_ref.b3bc94.3: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.7c3: @AddWith.%AddWith.Op.type (%AddWith.Op.type.216) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%AddWith.Op (constants.%AddWith.Op.b1d)] -// CHECK:STDOUT: %Core.import_ref.b3bc94.4: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.c10: @AddWith.%AddWith.type (%AddWith.type.6d9) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%Self (constants.%Self.b7c)] -// CHECK:STDOUT: %Core.import_ref.046 = import_ref Core//default, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.1b1: @AddWith.%AddWith.WithSelf.Op.type (%AddWith.WithSelf.Op.type.08f) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%AddWith.WithSelf.Op (constants.%AddWith.WithSelf.Op.fb8)] +// CHECK:STDOUT: %Core.import_ref.b3bc94.5: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%T.1 (constants.%T)] +// CHECK:STDOUT: %Core.import_ref.c10145.2: @AddWith.%AddWith.type.1 (%AddWith.type.6d9) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%Self.1 (constants.%Self.b7c)] +// CHECK:STDOUT: %Core.import_ref.a40 = import_ref Core//default, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.b3bc94.6: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @AddWith.%T.1 (constants.%T)] +// CHECK:STDOUT: %Core.import_ref.a84 = import_ref Core//default, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.bf0: = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%AddWith.impl_witness] // CHECK:STDOUT: %Core.import_ref.748f05.2: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%i32.builtin] // CHECK:STDOUT: %Core.import_ref.a41: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%AddWith.type.46d] // CHECK:STDOUT: %Core.import_ref.b8a: %i32.builtin.as.AddWith.impl.Op.type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%i32.builtin.as.AddWith.impl.Op] // CHECK:STDOUT: %AddWith.impl_witness_table = impl_witness_table (%Core.import_ref.b8a), @i32.builtin.as.AddWith.impl [concrete] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//default, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] +// CHECK:STDOUT: %Core.import_ref.178: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.843)] +// CHECK:STDOUT: %Core.Convert.2a3 = import_ref Core//default, Convert, unloaded +// CHECK:STDOUT: %Core.import_ref.201: @ImplicitAs.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type.b3a) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert.1de)] +// CHECK:STDOUT: %Core.import_ref.b3bc94.8: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%T.1 (constants.%T)] +// CHECK:STDOUT: %Core.import_ref.ac4dc5.2: @ImplicitAs.%ImplicitAs.type.1 (%ImplicitAs.type.031) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Self.1 (constants.%Self.738)] // CHECK:STDOUT: %Core.import_ref.9ec = import_ref Core//default, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.import_ref.a80: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.0bc)] -// CHECK:STDOUT: %Core.Convert.788 = import_ref Core//default, Convert, unloaded -// CHECK:STDOUT: %Core.import_ref.b3bc94.5: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.218943.1: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.6d3) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.50f)] -// CHECK:STDOUT: %Core.import_ref.b3bc94.6: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%T (constants.%T)] -// CHECK:STDOUT: %Core.import_ref.ac4: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.031) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Self (constants.%Self.738)] -// CHECK:STDOUT: %Core.import_ref.fa2 = import_ref Core//default, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.b3bc94.9: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%T.1 (constants.%T)] +// CHECK:STDOUT: %Core.import_ref.cc1 = import_ref Core//default, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %Core.import_ref.d1a: = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%ImplicitAs.impl_witness.586] -// CHECK:STDOUT: %Core.import_ref.218943.2: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.6d3) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.50f)] // CHECK:STDOUT: %Core.import_ref.a86459.2: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = Core.IntLiteral] // CHECK:STDOUT: %Core.import_ref.7e7: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%ImplicitAs.type.78a] // CHECK:STDOUT: %Core.import_ref.8be: = import_ref Core//default, loc{{\d+_\d+}}, loaded [concrete = constants.%ImplicitAs.impl_witness.304] @@ -868,7 +957,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Int.call.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %Int.call.loc4_27 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_27.2: type = converted %Int.call.loc4_27, %.loc4_27.1 [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_24: %.9cc = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc4_24: %.e3a = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] // CHECK:STDOUT: %bound_method.loc4_24: = bound_method %int_1, %impl.elem0.loc4_24 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.4b3] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc4_24: init %i32.builtin = call %bound_method.loc4_24(%int_1) [concrete = constants.%int_1.f38] // CHECK:STDOUT: %.loc4_24.1: %i32.builtin = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc4_24 [concrete = constants.%int_1.f38] @@ -878,17 +967,17 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Int.call.loc4_40: init type = call constants.%Int(%int_32.loc4_40) [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_40.1: type = value_of_initializer %Int.call.loc4_40 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_40.2: type = converted %Int.call.loc4_40, %.loc4_40.1 [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_37: %.9cc = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc4_37: %.e3a = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] // CHECK:STDOUT: %bound_method.loc4_37: = bound_method %int_2, %impl.elem0.loc4_37 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.7b2] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc4_37: init %i32.builtin = call %bound_method.loc4_37(%int_2) [concrete = constants.%int_2.5a1] // CHECK:STDOUT: %.loc4_37.1: %i32.builtin = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc4_37 [concrete = constants.%int_2.5a1] // CHECK:STDOUT: %.loc4_37.2: %i32.builtin = converted %int_2, %.loc4_37.1 [concrete = constants.%int_2.5a1] -// CHECK:STDOUT: %impl.elem0.loc4_32.1: %.f15 = impl_witness_access constants.%AddWith.impl_witness, element0 [concrete = constants.%i32.builtin.as.AddWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc4_32.1: %.0ff = impl_witness_access constants.%AddWith.impl_witness, element0 [concrete = constants.%i32.builtin.as.AddWith.impl.Op] // CHECK:STDOUT: %bound_method.loc4_32.1: = bound_method %.loc4_24.2, %impl.elem0.loc4_32.1 [concrete = constants.%i32.builtin.as.AddWith.impl.Op.bound.abd] // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.call: init %i32.builtin = call %bound_method.loc4_32.1(%.loc4_24.2, %.loc4_37.2) [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %.loc4_16.1: type = value_of_initializer %Int.call.loc4_16 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_16.2: type = converted %Int.call.loc4_16, %.loc4_16.1 [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_32.2: %.e36 = impl_witness_access constants.%ImplicitAs.impl_witness.304, element0 [concrete = constants.%i32.builtin.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc4_32.2: %.626 = impl_witness_access constants.%ImplicitAs.impl_witness.304, element0 [concrete = constants.%i32.builtin.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc4_32.2: = bound_method %i32.builtin.as.AddWith.impl.Op.call, %impl.elem0.loc4_32.2 [concrete = constants.%i32.builtin.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %.loc4_32.1: %i32.builtin = value_of_initializer %i32.builtin.as.AddWith.impl.Op.call [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %.loc4_32.2: %i32.builtin = converted %i32.builtin.as.AddWith.impl.Op.call, %.loc4_32.1 [concrete = constants.%int_3.a0f] @@ -900,64 +989,52 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %arr: ref %array_type = ref_binding arr, %arr.var [concrete = %arr.var] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @As(imports.%Core.import_ref.b3bc94.1: type) [from "core.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @As(imports.%Core.import_ref.b3bc94.3: type) [from "core.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.223)] -// CHECK:STDOUT: %Self: @As.%As.type (%As.type.223) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.2d0)] -// CHECK:STDOUT: %As.Convert.type: type = fn_type @As.Convert, @As(%T) [symbolic = %As.Convert.type (constants.%As.Convert.type.47d)] -// CHECK:STDOUT: %As.Convert: @As.%As.Convert.type (%As.Convert.type.47d) = struct_value () [symbolic = %As.Convert (constants.%As.Convert.099)] -// CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As, @As(%T) [symbolic = %As.assoc_type (constants.%As.assoc_type.752)] -// CHECK:STDOUT: %assoc0: @As.%As.assoc_type (%As.assoc_type.752) = assoc_entity element0, imports.%Core.import_ref.77d [symbolic = %assoc0 (constants.%assoc0.cc1)] +// CHECK:STDOUT: %As.type.1: type = facet_type <@As, @As(%T.1)> [symbolic = %As.type.1 (constants.%As.type.223)] +// CHECK:STDOUT: %Self.1: @As.%As.type.1 (%As.type.223) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.2d0)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Core.import_ref.0e7 -// CHECK:STDOUT: .Convert = imports.%Core.import_ref.e0b -// CHECK:STDOUT: witness = (imports.%Core.Convert.1f8) +// CHECK:STDOUT: .Convert = imports.%Core.import_ref.8db +// CHECK:STDOUT: witness = (imports.%Core.Convert.b81) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @AddWith(imports.%Core.import_ref.b3bc94.3: type) [from "core.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @AddWith(imports.%Core.import_ref.b3bc94.6: type) [from "core.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.6d9)] -// CHECK:STDOUT: %Self: @AddWith.%AddWith.type (%AddWith.type.6d9) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.b7c)] -// CHECK:STDOUT: %AddWith.Op.type: type = fn_type @AddWith.Op, @AddWith(%T) [symbolic = %AddWith.Op.type (constants.%AddWith.Op.type.216)] -// CHECK:STDOUT: %AddWith.Op: @AddWith.%AddWith.Op.type (%AddWith.Op.type.216) = struct_value () [symbolic = %AddWith.Op (constants.%AddWith.Op.b1d)] -// CHECK:STDOUT: %AddWith.assoc_type: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic = %AddWith.assoc_type (constants.%AddWith.assoc_type.b6a)] -// CHECK:STDOUT: %assoc0: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.b6a) = assoc_entity element0, imports.%Core.import_ref.7c3 [symbolic = %assoc0 (constants.%assoc0.5a5)] +// CHECK:STDOUT: %AddWith.type.1: type = facet_type <@AddWith, @AddWith(%T.1)> [symbolic = %AddWith.type.1 (constants.%AddWith.type.6d9)] +// CHECK:STDOUT: %Self.1: @AddWith.%AddWith.type.1 (%AddWith.type.6d9) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.b7c)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Core.import_ref.a40 -// CHECK:STDOUT: .Op = imports.%Core.import_ref.91c +// CHECK:STDOUT: .Op = imports.%Core.import_ref.3f3 // CHECK:STDOUT: witness = (imports.%Core.Op) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.b3bc94.5: type) [from "core.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.b3bc94.9: type) [from "core.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.031)] -// CHECK:STDOUT: %Self: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.738)] -// CHECK:STDOUT: %ImplicitAs.Convert.type: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%T) [symbolic = %ImplicitAs.Convert.type (constants.%ImplicitAs.Convert.type.6d3)] -// CHECK:STDOUT: %ImplicitAs.Convert: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.6d3) = struct_value () [symbolic = %ImplicitAs.Convert (constants.%ImplicitAs.Convert.50f)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.ff3)] -// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = assoc_entity element0, imports.%Core.import_ref.218943.1 [symbolic = %assoc0 (constants.%assoc0.ad7)] +// CHECK:STDOUT: %ImplicitAs.type.1: type = facet_type <@ImplicitAs, @ImplicitAs(%T.1)> [symbolic = %ImplicitAs.type.1 (constants.%ImplicitAs.type.031)] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type.1 (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.738)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Core.import_ref.9ec -// CHECK:STDOUT: .Convert = imports.%Core.import_ref.a80 -// CHECK:STDOUT: witness = (imports.%Core.Convert.788) +// CHECK:STDOUT: .Convert = imports.%Core.import_ref.178 +// CHECK:STDOUT: witness = (imports.%Core.Convert.2a3) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -985,10 +1062,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int = "int.make_type_signed" [from "core.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @As.Convert(imports.%Core.import_ref.b3bc94.2: type, imports.%Core.import_ref.1ac: @As.%As.type (%As.type.223)) [from "core.carbon"] { +// CHECK:STDOUT: generic fn @As.WithSelf.Convert(imports.%Core.import_ref.b3bc94.2: type, imports.%Core.import_ref.1ac891.2: @As.%As.type.1 (%As.type.223)) [from "core.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.223)] -// CHECK:STDOUT: %Self: @As.Convert.%As.type (%As.type.223) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.2d0)] +// CHECK:STDOUT: %Self: @As.WithSelf.Convert.%As.type (%As.type.223) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.2d0)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.297)] // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.760)] // CHECK:STDOUT: %.1: Core.Form = init_form %T, call_param1 [symbolic = %.1 (constants.%.3cf)] @@ -999,10 +1076,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: fn @Core.IntLiteral.as.As.impl.Convert = "int.convert_checked" [from "core.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AddWith.Op(imports.%Core.import_ref.b3bc94.4: type, imports.%Core.import_ref.c10: @AddWith.%AddWith.type (%AddWith.type.6d9)) [from "core.carbon"] { +// CHECK:STDOUT: generic fn @AddWith.WithSelf.Op(imports.%Core.import_ref.b3bc94.5: type, imports.%Core.import_ref.c10145.2: @AddWith.%AddWith.type.1 (%AddWith.type.6d9)) [from "core.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.6d9)] -// CHECK:STDOUT: %Self: @AddWith.Op.%AddWith.type (%AddWith.type.6d9) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.b7c)] +// CHECK:STDOUT: %Self: @AddWith.WithSelf.Op.%AddWith.type (%AddWith.type.6d9) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.b7c)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.14b)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.259)] // CHECK:STDOUT: %.1: Core.Form = init_form %Self.binding.as_type, call_param2 [symbolic = %.1 (constants.%.8b7)] @@ -1012,10 +1089,10 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: fn @i32.builtin.as.AddWith.impl.Op = "int.sadd" [from "core.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.Convert(imports.%Core.import_ref.b3bc94.6: type, imports.%Core.import_ref.ac4: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.031)) [from "core.carbon"] { +// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(imports.%Core.import_ref.b3bc94.8: type, imports.%Core.import_ref.ac4dc5.2: @ImplicitAs.%ImplicitAs.type.1 (%ImplicitAs.type.031)) [from "core.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.031)] -// CHECK:STDOUT: %Self: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.738)] +// CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.738)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.a44)] // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.e9a)] // CHECK:STDOUT: %.1: Core.Form = init_form %T, call_param1 [symbolic = %.1 (constants.%.3cf)] @@ -1037,7 +1114,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Int.call.loc4_61: init type = call constants.%Int(%int_32.loc4_61) [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_61.1: type = value_of_initializer %Int.call.loc4_61 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_61.2: type = converted %Int.call.loc4_61, %.loc4_61.1 [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_58: %.9cc = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc4_58: %.e3a = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] // CHECK:STDOUT: %bound_method.loc4_58: = bound_method %int_3.loc4_56, %impl.elem0.loc4_58 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.2b2] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc4_58: init %i32.builtin = call %bound_method.loc4_58(%int_3.loc4_56) [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %.loc4_58.1: %i32.builtin = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc4_58 [concrete = constants.%int_3.a0f] @@ -1047,23 +1124,23 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Int.call.loc4_74: init type = call constants.%Int(%int_32.loc4_74) [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_74.1: type = value_of_initializer %Int.call.loc4_74 [concrete = constants.%i32.builtin] // CHECK:STDOUT: %.loc4_74.2: type = converted %Int.call.loc4_74, %.loc4_74.1 [concrete = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_71: %.9cc = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc4_71: %.e3a = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] // CHECK:STDOUT: %bound_method.loc4_71: = bound_method %int_4.loc4_69, %impl.elem0.loc4_71 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.2d0] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc4_71: init %i32.builtin = call %bound_method.loc4_71(%int_4.loc4_69) [concrete = constants.%int_4.4f1] // CHECK:STDOUT: %.loc4_71.1: %i32.builtin = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc4_71 [concrete = constants.%int_4.4f1] // CHECK:STDOUT: %.loc4_71.2: %i32.builtin = converted %int_4.loc4_69, %.loc4_71.1 [concrete = constants.%int_4.4f1] -// CHECK:STDOUT: %impl.elem0.loc4_66: %.f15 = impl_witness_access constants.%AddWith.impl_witness, element0 [concrete = constants.%i32.builtin.as.AddWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc4_66: %.0ff = impl_witness_access constants.%AddWith.impl_witness, element0 [concrete = constants.%i32.builtin.as.AddWith.impl.Op] // CHECK:STDOUT: %bound_method.loc4_66: = bound_method %.loc4_58.2, %impl.elem0.loc4_66 [concrete = constants.%i32.builtin.as.AddWith.impl.Op.bound.bf8] // CHECK:STDOUT: %i32.builtin.as.AddWith.impl.Op.call: init %i32.builtin = call %bound_method.loc4_66(%.loc4_58.2, %.loc4_71.2) [concrete = constants.%int_7] // CHECK:STDOUT: %.loc4_78.1: %tuple.type = tuple_literal (%int_3.loc4_49, %int_4.loc4_52, %i32.builtin.as.AddWith.impl.Op.call) [concrete = constants.%tuple] -// CHECK:STDOUT: %impl.elem0.loc4_78.1: %.7de = impl_witness_access constants.%ImplicitAs.impl_witness.586, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc4_78.1: %.714 = impl_witness_access constants.%ImplicitAs.impl_witness.586, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc4_78.1: = bound_method %int_3.loc4_49, %impl.elem0.loc4_78.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.a95] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_78.1: init %i32.builtin = call %bound_method.loc4_78.1(%int_3.loc4_49) [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %.loc4_78.2: init %i32.builtin = converted %int_3.loc4_49, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_78.1 [concrete = constants.%int_3.a0f] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc4_78.3: ref %i32.builtin = array_index file.%arr.var, %int_0 // CHECK:STDOUT: %.loc4_78.4: init %i32.builtin to %.loc4_78.3 = in_place_init %.loc4_78.2 [concrete = constants.%int_3.a0f] -// CHECK:STDOUT: %impl.elem0.loc4_78.2: %.7de = impl_witness_access constants.%ImplicitAs.impl_witness.586, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc4_78.2: %.714 = impl_witness_access constants.%ImplicitAs.impl_witness.586, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc4_78.2: = bound_method %int_4.loc4_52, %impl.elem0.loc4_78.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.762] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_78.2: init %i32.builtin = call %bound_method.loc4_78.2(%int_4.loc4_52) [concrete = constants.%int_4.4f1] // CHECK:STDOUT: %.loc4_78.5: init %i32.builtin = converted %int_4.loc4_52, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_78.2 [concrete = constants.%int_4.4f1] @@ -1080,10 +1157,12 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @As.Convert(constants.%T, constants.%Self.2d0) { +// CHECK:STDOUT: specific @As(constants.%T, constants.%Self.2d0) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @As.WithSelf.Convert(constants.%T, constants.%Self.2d0) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %As.type => constants.%As.type.223 // CHECK:STDOUT: %Self => constants.%Self.2d0 @@ -1094,22 +1173,42 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%i32.builtin) { -// CHECK:STDOUT: %T => constants.%i32.builtin +// CHECK:STDOUT: %T.1 => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %As.type => constants.%As.type.ffe -// CHECK:STDOUT: %Self => constants.%Self.af0 -// CHECK:STDOUT: %As.Convert.type => constants.%As.Convert.type.378 -// CHECK:STDOUT: %As.Convert => constants.%As.Convert.e51 +// CHECK:STDOUT: %As.type.1 => constants.%As.type.ffe +// CHECK:STDOUT: %Self.1 => constants.%Self.af0 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @As(constants.%i32.builtin, constants.%Self.2d0) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%i32.builtin +// CHECK:STDOUT: %As.type.2 => constants.%As.type.ffe +// CHECK:STDOUT: %Self.2 => constants.%Self.2d0 +// CHECK:STDOUT: %As.WithSelf.Convert.type => constants.%As.WithSelf.Convert.type.06b +// CHECK:STDOUT: %As.WithSelf.Convert => constants.%As.WithSelf.Convert.b84 // CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.bc2 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.09a +// CHECK:STDOUT: %assoc0 => constants.%assoc0.5d8 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @As(constants.%i32.builtin, constants.%As.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%i32.builtin +// CHECK:STDOUT: %As.type.2 => constants.%As.type.ffe +// CHECK:STDOUT: %Self.2 => constants.%As.facet +// CHECK:STDOUT: %As.WithSelf.Convert.type => constants.%As.WithSelf.Convert.type.b07 +// CHECK:STDOUT: %As.WithSelf.Convert => constants.%As.WithSelf.Convert.2d0 +// CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.bc2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.5d8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.Op(constants.%T, constants.%Self.b7c) { +// CHECK:STDOUT: specific @AddWith(constants.%T, constants.%Self.b7c) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @AddWith.WithSelf.Op(constants.%T, constants.%Self.b7c) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.6d9 // CHECK:STDOUT: %Self => constants.%Self.b7c @@ -1119,22 +1218,42 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith(constants.%i32.builtin) { -// CHECK:STDOUT: %T => constants.%i32.builtin +// CHECK:STDOUT: %T.1 => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.46d -// CHECK:STDOUT: %Self => constants.%Self.365 -// CHECK:STDOUT: %AddWith.Op.type => constants.%AddWith.Op.type.0b7 -// CHECK:STDOUT: %AddWith.Op => constants.%AddWith.Op.9d6 +// CHECK:STDOUT: %AddWith.type.1 => constants.%AddWith.type.46d +// CHECK:STDOUT: %Self.1 => constants.%Self.365 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @AddWith(constants.%i32.builtin, constants.%Self.b7c) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%i32.builtin +// CHECK:STDOUT: %AddWith.type.2 => constants.%AddWith.type.46d +// CHECK:STDOUT: %Self.2 => constants.%Self.b7c +// CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.de8 +// CHECK:STDOUT: %AddWith.WithSelf.Op => constants.%AddWith.WithSelf.Op.31e // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.dff -// CHECK:STDOUT: %assoc0 => constants.%assoc0.1cc +// CHECK:STDOUT: %assoc0 => constants.%assoc0.6d5 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @AddWith(constants.%i32.builtin, constants.%AddWith.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%i32.builtin +// CHECK:STDOUT: %AddWith.type.2 => constants.%AddWith.type.46d +// CHECK:STDOUT: %Self.2 => constants.%AddWith.facet +// CHECK:STDOUT: %AddWith.WithSelf.Op.type => constants.%AddWith.WithSelf.Op.type.78e +// CHECK:STDOUT: %AddWith.WithSelf.Op => constants.%AddWith.WithSelf.Op.d4d +// CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.dff +// CHECK:STDOUT: %assoc0 => constants.%assoc0.6d5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs.Convert(constants.%T, constants.%Self.738) { +// CHECK:STDOUT: specific @ImplicitAs(constants.%T, constants.%Self.738) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%T, constants.%Self.738) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.031 // CHECK:STDOUT: %Self => constants.%Self.738 @@ -1145,26 +1264,62 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) { -// CHECK:STDOUT: %T => Core.IntLiteral +// CHECK:STDOUT: %T.1 => Core.IntLiteral // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.139 -// CHECK:STDOUT: %Self => constants.%Self.cce -// CHECK:STDOUT: %ImplicitAs.Convert.type => constants.%ImplicitAs.Convert.type.71e -// CHECK:STDOUT: %ImplicitAs.Convert => constants.%ImplicitAs.Convert.0e2 +// CHECK:STDOUT: %ImplicitAs.type.1 => constants.%ImplicitAs.type.139 +// CHECK:STDOUT: %Self.1 => constants.%Self.cce +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral, constants.%Self.738) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => Core.IntLiteral +// CHECK:STDOUT: %ImplicitAs.type.2 => constants.%ImplicitAs.type.139 +// CHECK:STDOUT: %Self.2 => constants.%Self.738 +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.577 +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.f0a // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.959 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.fc3 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.461 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) { -// CHECK:STDOUT: %T => constants.%i32.builtin +// CHECK:STDOUT: %T.1 => constants.%i32.builtin // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.78a -// CHECK:STDOUT: %Self => constants.%Self.dd8 -// CHECK:STDOUT: %ImplicitAs.Convert.type => constants.%ImplicitAs.Convert.type.059 -// CHECK:STDOUT: %ImplicitAs.Convert => constants.%ImplicitAs.Convert.4d7 +// CHECK:STDOUT: %ImplicitAs.type.1 => constants.%ImplicitAs.type.78a +// CHECK:STDOUT: %Self.1 => constants.%Self.dd8 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral, constants.%ImplicitAs.facet.7f3) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => Core.IntLiteral +// CHECK:STDOUT: %ImplicitAs.type.2 => constants.%ImplicitAs.type.139 +// CHECK:STDOUT: %Self.2 => constants.%ImplicitAs.facet.7f3 +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.e78 +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.e56 +// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.959 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.461 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin, constants.%Self.738) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%i32.builtin +// CHECK:STDOUT: %ImplicitAs.type.2 => constants.%ImplicitAs.type.78a +// CHECK:STDOUT: %Self.2 => constants.%Self.738 +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.ea9 +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.149 // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.398 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.58b +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4a0 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin, constants.%ImplicitAs.facet.fa4) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%i32.builtin +// CHECK:STDOUT: %ImplicitAs.type.2 => constants.%ImplicitAs.type.78a +// CHECK:STDOUT: %Self.2 => constants.%ImplicitAs.facet.fa4 +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.66f +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.e20 +// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.398 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.4a0 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/builtin/fail_redefined.carbon b/toolchain/check/testdata/function/builtin/fail_redefined.carbon index e820a554119d..32f013ab92d5 100644 --- a/toolchain/check/testdata/function/builtin/fail_redefined.carbon +++ b/toolchain/check/testdata/function/builtin/fail_redefined.carbon @@ -57,14 +57,14 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %A.type.8165c1.2: type = fn_type @A.loc23 [concrete] // CHECK:STDOUT: %A.8aef9d.2: %A.type.8165c1.2 = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %B.type.d6bcfe.1: type = fn_type @B.loc25 [concrete] // CHECK:STDOUT: %B.5d732e.1: %B.type.d6bcfe.1 = struct_value () [concrete] @@ -260,7 +260,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: fn @A.loc23(%n.param: %i32, %m.param: %i32) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc23_38.1: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc23_38.2: = bound_method %n.ref, %specific_fn @@ -271,7 +271,7 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: fn @B.loc25(%n.param: %i32, %m.param: %i32) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc25_38.1: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc25_38.2: = bound_method %n.ref, %specific_fn diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index d4f117e33507..e9630cb06a98 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -30,10 +30,10 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %Self.binding.as_type.d31: type = symbolic_binding_type Self, 0, %Self.ab9 [symbolic] // CHECK:STDOUT: %pattern_type.fa0: type = pattern_type %Self.binding.as_type.d31 [symbolic] // CHECK:STDOUT: %.389: Core.Form = init_form %Self.binding.as_type.d31, call_param2 [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I(%Self.ab9) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.705: %I.WithSelf.F.type.08c = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.524: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0.18e: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // 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] @@ -44,11 +44,12 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %i32.as.I.impl.F.type: type = fn_type @i32.as.I.impl.F [concrete] // CHECK:STDOUT: %i32.as.I.impl.F: %i32.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.f37: type = fn_type @I.WithSelf.F, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.b05: %I.WithSelf.F.type.f37 = struct_value () [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -57,29 +58,29 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.290: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] -// CHECK:STDOUT: %.acc: type = fn_type_with_self_type %I.F.type, %I.facet [concrete] +// CHECK:STDOUT: %.131: type = fn_type_with_self_type %I.WithSelf.F.type.f37, %I.facet [concrete] // CHECK:STDOUT: %i32.as.I.impl.F.bound: = bound_method %int_1.5d2, %i32.as.I.impl.F [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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.6bc: = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.646: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -89,7 +90,8 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.290: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete] -// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.290 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.290) [concrete] +// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet.290 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %int_3.822, %Int.as.ImplicitAs.impl.Convert.dd4 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.17a: = bound_method %int_3.822, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -141,7 +143,7 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc23_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc23_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc23_24: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0.loc23_24: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc23_24.1: = bound_method %int_1, %impl.elem0.loc23_24 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc23_24: = specific_function %impl.elem0.loc23_24, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_24.2: = bound_method %int_1, %specific_fn.loc23_24 [concrete = constants.%bound_method.290] @@ -149,11 +151,11 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %.loc23_24.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc23_24.2: %i32 = converted %int_1, %.loc23_24.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0.524] -// CHECK:STDOUT: %impl.elem0.loc23_31: %.acc = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%i32.as.I.impl.F] +// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0.18e] +// CHECK:STDOUT: %impl.elem0.loc23_31: %.131 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%i32.as.I.impl.F] // CHECK:STDOUT: %bound_method.loc23_31: = bound_method %.loc23_24.2, %impl.elem0.loc23_31 [concrete = constants.%i32.as.I.impl.F.bound] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc23_38: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc23_38: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc23_38.1: = bound_method %int_2, %impl.elem0.loc23_38 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc23_38: = specific_function %impl.elem0.loc23_38, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_38.2: = bound_method %int_2, %specific_fn.loc23_38 [concrete = constants.%bound_method.646] @@ -161,7 +163,7 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: %.loc23_38.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc23_38.2: %i32 = converted %int_2, %.loc23_38.1 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %i32.as.I.impl.F.call: init %i32 = call %bound_method.loc23_31(%.loc23_24.2, %.loc23_38.2) [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc23_39: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %impl.elem0.loc23_39: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] // CHECK:STDOUT: %bound_method.loc23_39.1: = bound_method %i32.as.I.impl.F.call, %impl.elem0.loc23_39 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc23_39: = specific_function %impl.elem0.loc23_39, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_39.2: = bound_method %i32.as.I.impl.F.call, %specific_fn.loc23_39 [concrete = constants.%bound_method.17a] @@ -176,42 +178,45 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { -// CHECK:STDOUT: %self.patt: @I.F.%pattern_type (%pattern_type.fa0) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: @I.F.%pattern_type (%pattern_type.fa0) = value_binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: @I.F.%pattern_type (%pattern_type.fa0) = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @I.F.%pattern_type (%pattern_type.fa0) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @I.F.%pattern_type (%pattern_type.fa0) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %Self.loc15: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.705)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type.fa0) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %other.patt: @I.WithSelf.F.%pattern_type (%pattern_type.fa0) = value_binding_pattern other [concrete] +// CHECK:STDOUT: %other.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.fa0) = value_param_pattern %other.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @I.WithSelf.F.%pattern_type (%pattern_type.fa0) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.fa0) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc16_36: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] +// CHECK:STDOUT: %Self.ref.loc16_36: %I.type = name_ref Self, @I.%Self.loc15 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %Self.as_type.loc16_36: type = facet_access_type %Self.ref.loc16_36 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %.loc16_36.2: type = converted %Self.ref.loc16_36, %Self.as_type.loc16_36 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %.loc16_36.3: Core.Form = init_form %.loc16_36.2, call_param2 [symbolic = %.loc16_36.1 (constants.%.389)] -// CHECK:STDOUT: %self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.d31) = value_param call_param0 // CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] { -// CHECK:STDOUT: %Self.ref.loc16_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] +// CHECK:STDOUT: %Self.ref.loc16_14: %I.type = name_ref Self, @I.%Self.loc15 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %Self.as_type.loc16_14: type = facet_access_type %Self.ref.loc16_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %.loc16_14.2: type = converted %Self.ref.loc16_14, %Self.as_type.loc16_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31) = value_binding self, %self.param -// CHECK:STDOUT: %other.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31) = value_param call_param1 +// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.d31) = value_binding self, %self.param +// CHECK:STDOUT: %other.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.d31) = value_param call_param1 // CHECK:STDOUT: %.loc16_27.1: type = splice_block %.loc16_27.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] { -// CHECK:STDOUT: %Self.ref.loc16_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] +// CHECK:STDOUT: %Self.ref.loc16_27: %I.type = name_ref Self, @I.%Self.loc15 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %Self.as_type.loc16_27: type = facet_access_type %Self.ref.loc16_27 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %.loc16_27.2: type = converted %Self.ref.loc16_27, %Self.as_type.loc16_27 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: } -// CHECK:STDOUT: %other: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31) = value_binding other, %other.param -// CHECK:STDOUT: %return.param: ref @I.F.%Self.binding.as_type (%Self.binding.as_type.d31) = out_param call_param2 -// CHECK:STDOUT: %return: ref @I.F.%Self.binding.as_type (%Self.binding.as_type.d31) = return_slot %return.param +// CHECK:STDOUT: %other: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.d31) = value_binding other, %other.param +// CHECK:STDOUT: %return.param: ref @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.d31) = out_param call_param2 +// CHECK:STDOUT: %return: ref @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.d31) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0.524] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0.18e] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -251,25 +256,39 @@ var arr: array(i32, (1 as i32).(I.F)(2)); // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc15: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.fa0)] // CHECK:STDOUT: %.loc16_36.1: Core.Form = init_form %Self.binding.as_type, call_param2 [symbolic = %.loc16_36.1 (constants.%.389)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31), %other.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31)) -> out %return.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.d31), %other.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.d31)) -> out %return.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.d31); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @i32.as.I.impl.F(%self.param: %i32, %other.param: %i32) -> out %return.param: %i32 = "int.sadd"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.ab9) { +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => 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.binding.as_type => constants.%Self.binding.as_type.d31 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fa0 // CHECK:STDOUT: %.loc16_36.1 => constants.%.389 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.f37 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.b05 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet) { // CHECK:STDOUT: %Self => constants.%I.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index efb31e0efea0..36b055472785 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -41,7 +41,6 @@ fn Run() { // 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.4a8: type = facet_type <@ImplicitAs, @ImplicitAs(%f64.d77)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.726: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f64.d77) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] @@ -49,7 +48,8 @@ fn Run() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.4a8 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.cb2) [concrete] -// CHECK:STDOUT: %.b13: type = fn_type_with_self_type %ImplicitAs.Convert.type.726, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a33: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f64.d77, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.6c5: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a33, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -106,7 +106,7 @@ fn Run() { // CHECK:STDOUT: fn @Foo() -> out %return.param: %f64.d77 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] -// CHECK:STDOUT: %impl.elem0: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] +// CHECK:STDOUT: %impl.elem0: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] // CHECK:STDOUT: %bound_method.loc15_29.1: = bound_method %float, %impl.elem0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_29.2: = bound_method %float, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index 915956bd070f..f5d0b6ed0eec 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -34,14 +34,14 @@ fn Main() { // CHECK:STDOUT: %Echo.type: type = fn_type @Echo [concrete] // CHECK:STDOUT: %Echo: %Echo.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Main.type: type = fn_type @Main [concrete] // CHECK:STDOUT: %Main: %Main.type = struct_value () [concrete] @@ -49,7 +49,6 @@ fn Main() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -57,7 +56,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -117,7 +117,7 @@ fn Main() { // CHECK:STDOUT: fn @Echo(%a.param: %i32) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc16_10.1: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_10.2: = bound_method %a.ref, %specific_fn @@ -134,7 +134,7 @@ fn Main() { // CHECK:STDOUT: %b.var: ref %i32 = var %b.var_patt // CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [concrete = constants.%Echo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc20_21.1: = bound_method %int_1, %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.loc20_21.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index 2eab1d7ae8cf..00c36b993148 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -43,7 +43,6 @@ fn Main() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -51,7 +50,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -125,7 +125,7 @@ fn Main() { // CHECK:STDOUT: %x.var: ref %tuple.type.a1c = var %x.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc18_22.1: %tuple.type.985 = tuple_literal (%int_1) [concrete = constants.%tuple.378] -// CHECK:STDOUT: %impl.elem0.loc18: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_22.1: = bound_method %int_1, %impl.elem0.loc18 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_22.2: = bound_method %int_1, %specific_fn.loc18 [concrete = constants.%bound_method.38b] @@ -147,7 +147,7 @@ fn Main() { // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %x.ref, element0 // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] // CHECK:STDOUT: %.loc20_8: %i32 = acquire_value %tuple.elem0 -// CHECK:STDOUT: %impl.elem0.loc20: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc20: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc20_12.1: = bound_method %int_6, %impl.elem0.loc20 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.502] // CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_12.2: = bound_method %int_6, %specific_fn.loc20 [concrete = constants.%bound_method.bc2] diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index 65ec84f59576..9dcc3718c8d9 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -35,7 +35,6 @@ fn Main() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -43,7 +42,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -93,7 +93,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_7.1: = bound_method %int_1, %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.loc18_7.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/call/params_one_comma.carbon b/toolchain/check/testdata/function/call/params_one_comma.carbon index 7722035ff877..e3da8eb0f1d1 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -36,7 +36,6 @@ fn Main() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -44,7 +43,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -94,7 +94,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref.loc18: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc18: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_7.1: = bound_method %int_1.loc18, %impl.elem0.loc18 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_7.2: = bound_method %int_1.loc18, %specific_fn.loc18 [concrete = constants.%bound_method] @@ -104,7 +104,7 @@ fn Main() { // CHECK:STDOUT: %Foo.call.loc18: init %empty_tuple.type = call %Foo.ref.loc18(%.loc18_7.2) // CHECK:STDOUT: %Foo.ref.loc19: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc19: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc19: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc19_7.1: = bound_method %int_1.loc19, %impl.elem0.loc19 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_7.2: = bound_method %int_1.loc19, %specific_fn.loc19 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/call/params_two.carbon b/toolchain/check/testdata/function/call/params_two.carbon index 265c39b64d03..0475e8c536c5 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -36,7 +36,6 @@ fn Main() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -44,7 +43,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -106,14 +106,14 @@ fn Main() { // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc18_7: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_7: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_7.1: = bound_method %int_1, %impl.elem0.loc18_7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc18_7: = specific_function %impl.elem0.loc18_7, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_7.2: = bound_method %int_1, %specific_fn.loc18_7 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_7: init %i32 = call %bound_method.loc18_7.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_7.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_7 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_7.2: %i32 = converted %int_1, %.loc18_7.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc18_10: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_10: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_10.1: = bound_method %int_2, %impl.elem0.loc18_10 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc18_10: = specific_function %impl.elem0.loc18_10, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_10.2: = bound_method %int_2, %specific_fn.loc18_10 [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/function/call/params_two_comma.carbon b/toolchain/check/testdata/function/call/params_two_comma.carbon index a6e824d9e089..6591d504acf9 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -37,7 +37,6 @@ fn Main() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -45,7 +44,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -107,14 +107,14 @@ fn Main() { // CHECK:STDOUT: %Foo.ref.loc18: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc18: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc18_7: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_7: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_7.1: = bound_method %int_1.loc18, %impl.elem0.loc18_7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc18_7: = specific_function %impl.elem0.loc18_7, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_7.2: = bound_method %int_1.loc18, %specific_fn.loc18_7 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_7: init %i32 = call %bound_method.loc18_7.2(%int_1.loc18) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_7.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_7 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_7.2: %i32 = converted %int_1.loc18, %.loc18_7.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc18_10: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_10: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_10.1: = bound_method %int_2.loc18, %impl.elem0.loc18_10 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc18_10: = specific_function %impl.elem0.loc18_10, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_10.2: = bound_method %int_2.loc18, %specific_fn.loc18_10 [concrete = constants.%bound_method.646] @@ -125,14 +125,14 @@ fn Main() { // CHECK:STDOUT: %Foo.ref.loc19: %Foo.type = name_ref Foo, file.%Foo.decl [concrete = constants.%Foo] // CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc19: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc19_7: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc19_7: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc19_7.1: = bound_method %int_1.loc19, %impl.elem0.loc19_7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc19_7: = specific_function %impl.elem0.loc19_7, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_7.2: = bound_method %int_1.loc19, %specific_fn.loc19_7 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19_7: init %i32 = call %bound_method.loc19_7.2(%int_1.loc19) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc19_7.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19_7 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc19_7.2: %i32 = converted %int_1.loc19, %.loc19_7.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc19_10: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc19_10: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc19_10.1: = bound_method %int_2.loc19, %impl.elem0.loc19_10 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc19_10: = specific_function %impl.elem0.loc19_10, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_10.2: = bound_method %int_2.loc19, %specific_fn.loc19_10 [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon index 2b829275c367..e84401339fe2 100644 --- a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon +++ b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon @@ -54,7 +54,6 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -62,7 +61,8 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -171,7 +171,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: fn() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_29.1: = bound_method %int_0, %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.loc8_29.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/call/ref.carbon b/toolchain/check/testdata/function/call/ref.carbon index 7ed21394e01d..c5b36f713e99 100644 --- a/toolchain/check/testdata/function/call/ref.carbon +++ b/toolchain/check/testdata/function/call/ref.carbon @@ -114,7 +114,6 @@ fn G() { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -122,7 +121,8 @@ fn G() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -161,7 +161,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %y.var: ref %i32 = var %y.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %int_0, %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.loc8_3.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index 71e1e7ebddf9..9bf135427a7a 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -487,7 +487,6 @@ import library "extern_api"; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -495,7 +494,8 @@ import library "extern_api"; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -622,7 +622,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%Main.B [concrete = constants.%B] // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc7: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc7: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc7_16.1: = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_16.2: = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method] @@ -634,7 +634,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc8_25.1: %tuple.type.985 = tuple_literal (%int_1.loc8) [concrete = constants.%tuple.378] -// CHECK:STDOUT: %impl.elem0.loc8: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_25.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @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_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method] @@ -687,7 +687,6 @@ import library "extern_api"; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -695,7 +694,8 @@ import library "extern_api"; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -840,7 +840,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc53: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc53: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc53_16.1: = bound_method %int_1.loc53, %impl.elem0.loc53 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc53_16.2: = bound_method %int_1.loc53, %specific_fn.loc53 [concrete = constants.%bound_method] @@ -852,7 +852,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_1.loc54: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc54_25.1: %tuple.type.985 = tuple_literal (%int_1.loc54) [concrete = constants.%tuple.378] -// CHECK:STDOUT: %impl.elem0.loc54: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc54: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc54_25.1: = bound_method %int_1.loc54, %impl.elem0.loc54 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc54: = specific_function %impl.elem0.loc54, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc54_25.2: = bound_method %int_1.loc54, %specific_fn.loc54 [concrete = constants.%bound_method] @@ -905,7 +905,6 @@ import library "extern_api"; // 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.cf3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6da: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.004: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.255: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.004 = struct_value () [symbolic] @@ -913,7 +912,8 @@ import library "extern_api"; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.199: 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.5f4: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.199 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.cf3 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.58d) [concrete] -// CHECK:STDOUT: %.952: type = fn_type_with_self_type %ImplicitAs.Convert.type.6da, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.979: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.7c3: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.979, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1058,7 +1058,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc13: %.952 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] +// CHECK:STDOUT: %impl.elem0.loc13: %.7c3 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] // CHECK:STDOUT: %bound_method.loc13_16.1: = bound_method %int_1.loc13, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_16.2: = bound_method %int_1.loc13, %specific_fn.loc13 [concrete = constants.%bound_method] @@ -1070,7 +1070,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc14_25.1: %tuple.type.985 = tuple_literal (%int_1.loc14) [concrete = constants.%tuple.378] -// CHECK:STDOUT: %impl.elem0.loc14: %.952 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] +// CHECK:STDOUT: %impl.elem0.loc14: %.7c3 = impl_witness_access constants.%ImplicitAs.impl_witness.58d, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.5f4] // CHECK:STDOUT: %bound_method.loc14_25.1: = bound_method %int_1.loc14, %impl.elem0.loc14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_25.2: = bound_method %int_1.loc14, %specific_fn.loc14 [concrete = constants.%bound_method] @@ -1110,7 +1110,6 @@ import library "extern_api"; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1118,7 +1117,8 @@ import library "extern_api"; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1245,7 +1245,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%Main.B [concrete = constants.%B] // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc53: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc53: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc53_16.1: = bound_method %int_1.loc53, %impl.elem0.loc53 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc53_16.2: = bound_method %int_1.loc53, %specific_fn.loc53 [concrete = constants.%bound_method] @@ -1257,7 +1257,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %int_1.loc54: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc54_25.1: %tuple.type.985 = tuple_literal (%int_1.loc54) [concrete = constants.%tuple.378] -// CHECK:STDOUT: %impl.elem0.loc54: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc54: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc54_25.1: = bound_method %int_1.loc54, %impl.elem0.loc54 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc54: = specific_function %impl.elem0.loc54, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc54_25.2: = bound_method %int_1.loc54, %specific_fn.loc54 [concrete = constants.%bound_method] @@ -1297,7 +1297,6 @@ import library "extern_api"; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1305,7 +1304,8 @@ import library "extern_api"; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1432,7 +1432,7 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%Main.B [concrete = constants.%B] // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc53: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc53: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc53_16.1: = bound_method %int_1.loc53, %impl.elem0.loc53 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc53: = specific_function %impl.elem0.loc53, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc53_16.2: = bound_method %int_1.loc53, %specific_fn.loc53 [concrete = constants.%bound_method] @@ -1444,7 +1444,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %int_1.loc54: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc54_25.1: %tuple.type.985 = tuple_literal (%int_1.loc54) [concrete = constants.%tuple.378] -// CHECK:STDOUT: %impl.elem0.loc54: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc54: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc54_25.1: = bound_method %int_1.loc54, %impl.elem0.loc54 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc54: = specific_function %impl.elem0.loc54, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc54_25.2: = bound_method %int_1.loc54, %specific_fn.loc54 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index 536f4ea812fd..b120a5efe613 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -129,14 +129,14 @@ fn D() {} // CHECK:STDOUT: %B.type: type = fn_type @B [concrete] // CHECK:STDOUT: %B: %B.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %tuple.type.85c: type = tuple_type (type) [concrete] // CHECK:STDOUT: %tuple.896: %tuple.type.85c = tuple_value (%i32) [concrete] @@ -225,7 +225,7 @@ fn D() {} // CHECK:STDOUT: fn @B(%b.param: %i32) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc5_30.1: = bound_method %b.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc5_30.2: = bound_method %b.ref, %specific_fn @@ -239,7 +239,7 @@ fn D() {} // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0: %i32 = tuple_access %c.ref, element0 // CHECK:STDOUT: %.loc6_48.1: %struct_type.c = struct_literal (%tuple.elem0) -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_46.1: = bound_method %tuple.elem0, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_46.2: = bound_method %tuple.elem0, %specific_fn @@ -295,7 +295,6 @@ fn D() {} // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -303,7 +302,8 @@ fn D() {} // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -394,7 +394,7 @@ fn D() {} // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%Main.B [concrete = constants.%B] // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc7: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc7: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc7_16.1: = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_16.2: = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method] @@ -406,7 +406,7 @@ fn D() {} // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc8_25.1: %tuple.type.985 = tuple_literal (%int_1.loc8) [concrete = constants.%tuple.378] -// CHECK:STDOUT: %impl.elem0.loc8: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_25.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @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_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/function/generic/call.carbon b/toolchain/check/testdata/function/generic/call.carbon index 821f439b0f04..b67409ace9a7 100644 --- a/toolchain/check/testdata/function/generic/call.carbon +++ b/toolchain/check/testdata/function/generic/call.carbon @@ -77,16 +77,16 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: %T.035: %Copy.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.ce2: type = pattern_type %Copy.type [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic] -// CHECK:STDOUT: %.6c815b.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] // CHECK:STDOUT: %Function.type: type = fn_type @Function [concrete] // CHECK:STDOUT: %Function: %Function.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.67c: = require_complete_type %T.binding.as_type [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.lookup_impl_witness.58d: = lookup_impl_witness %T.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9: = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic] +// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdc: = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] // CHECK:STDOUT: %require_complete.ef1: = require_complete_type %ptr.e8f [symbolic] @@ -109,10 +109,12 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: %complete_type.17a: = complete_type_witness %ptr.31e [concrete] // CHECK:STDOUT: %Copy.facet.a7f: %Copy.type = facet_value %ptr.31e, (%Copy.impl_witness.2c7) [concrete] // CHECK:STDOUT: %Function.specific_fn.9da: = specific_function %Function, @Function(%Copy.facet.a7f) [concrete] -// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c25 [symbolic] -// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b84: = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet.c25) [symbolic] -// CHECK:STDOUT: %.cda: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.a7f [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.c25) [symbolic] +// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet.c25 [symbolic] +// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.366: = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet.c25) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.259: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.a7f) [concrete] +// CHECK:STDOUT: %.64b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.259, %Copy.facet.a7f [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.ed9, @ptr.as.Copy.impl.Op(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -130,15 +132,15 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: file { // CHECK:STDOUT: %Function.decl: %Function.type = fn_decl @Function [concrete = constants.%Function] { // CHECK:STDOUT: %T.patt: %pattern_type.ce2 = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: %x.patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = value_binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = value_param_pattern %x.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %x.patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = value_binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = value_param_pattern %x.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc5_37: %Copy.type = name_ref T, %T.loc5_13.2 [symbolic = %T.loc5_13.1 (constants.%T.035)] // CHECK:STDOUT: %T.as_type.loc5_37: type = facet_access_type %T.ref.loc5_37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc5_37.3: type = converted %T.ref.loc5_37, %T.as_type.loc5_37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc5_37.4: Core.Form = init_form %.loc5_37.3, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %.loc5_37.4: Core.Form = init_form %.loc5_37.3, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.2)] // CHECK:STDOUT: %.loc5_21: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] @@ -160,26 +162,27 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: generic fn @Function(%T.loc5_13.2: %Copy.type) { // CHECK:STDOUT: %T.loc5_13.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T.035)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc5_13.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.1)] -// CHECK:STDOUT: %.loc5_37.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.2)] +// CHECK:STDOUT: %.loc5_37.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.67c)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc5_13.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc6: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc5_13.1 [symbolic = %.loc6 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%T.loc5_13.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T.loc5_13.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc6: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc5_13.1 [symbolic = %.loc6 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%T.loc5_13.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Function.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @Function.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @Function.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x -// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %x.ref, %impl.elem0.loc6_10.1 -// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %x.ref, %specific_impl_fn.loc6_10.1 // CHECK:STDOUT: %.loc5_37.1: ref @Function.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) to %.loc5_37.1 = call %bound_method.loc6_10.2(%x.ref) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) to %.loc5_37.1 = call %bound_method.loc6_10.2(%x.ref) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -252,22 +255,23 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: specific @Function(constants.%T.035) { // CHECK:STDOUT: %T.loc5_13.1 => constants.%T.035 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1 -// CHECK:STDOUT: %.loc5_37.2 => constants.%.6c815b.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2 +// CHECK:STDOUT: %.loc5_37.2 => constants.%.6c815b.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.67c // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.58d -// CHECK:STDOUT: %.loc6 => constants.%.72e -// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.07b -// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.2c9 +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.735e75.2 +// CHECK:STDOUT: %.loc6 => constants.%.023 +// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.594 +// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.bdc // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%T.035) { // CHECK:STDOUT: %T.loc10_16.1 => constants.%T.035 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1 -// CHECK:STDOUT: %.loc10_40.2 => constants.%.6c815b.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2 +// CHECK:STDOUT: %.loc10_40.2 => constants.%.6c815b.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericPtr(constants.%T.67d) { @@ -286,9 +290,10 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.2e6 -// CHECK:STDOUT: %.loc6 => constants.%.b46 -// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.201 -// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.b84 +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.d82 +// CHECK:STDOUT: %.loc6 => constants.%.299 +// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.1c7 +// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.366 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Function(constants.%Copy.facet.a7f) { @@ -300,7 +305,8 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.17a // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.2c7 -// CHECK:STDOUT: %.loc6 => constants.%.cda +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.259 +// CHECK:STDOUT: %.loc6 => constants.%.64b // CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%ptr.as.Copy.impl.Op.ed9 // CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } @@ -312,16 +318,16 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: %T.035: %Copy.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.ce2: type = pattern_type %Copy.type [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic] -// CHECK:STDOUT: %.6c815b.1: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic] // CHECK:STDOUT: %Function.type: type = fn_type @Function [concrete] // CHECK:STDOUT: %Function: %Function.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.67c: = require_complete_type %T.binding.as_type [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.lookup_impl_witness.58d: = lookup_impl_witness %T.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9: = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic] +// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdc: = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] // CHECK:STDOUT: %require_complete.ef1: = require_complete_type %ptr.e8f [symbolic] @@ -344,10 +350,12 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: %complete_type.17a: = complete_type_witness %ptr.31e [concrete] // CHECK:STDOUT: %Copy.facet.a7f: %Copy.type = facet_value %ptr.31e, (%Copy.impl_witness.2c7) [concrete] // CHECK:STDOUT: %Function.specific_fn.9da: = specific_function %Function, @Function(%Copy.facet.a7f) [concrete] -// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c25 [symbolic] -// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b84: = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet.c25) [symbolic] -// CHECK:STDOUT: %.cda: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.a7f [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.c25) [symbolic] +// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet.c25 [symbolic] +// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.366: = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet.c25) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.259: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.a7f) [concrete] +// CHECK:STDOUT: %.64b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.259, %Copy.facet.a7f [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.ed9, @ptr.as.Copy.impl.Op(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -365,15 +373,15 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: file { // CHECK:STDOUT: %Function.decl: %Function.type = fn_decl @Function [concrete = constants.%Function] { // CHECK:STDOUT: %T.patt: %pattern_type.ce2 = symbolic_binding_pattern T, 0 [concrete] -// CHECK:STDOUT: %x.patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = value_binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = value_param_pattern %x.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %x.patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = value_binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = value_param_pattern %x.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Function.%pattern_type (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc5_37: %Copy.type = name_ref T, %T.loc5_13.2 [symbolic = %T.loc5_13.1 (constants.%T.035)] // CHECK:STDOUT: %T.as_type.loc5_37: type = facet_access_type %T.ref.loc5_37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc5_37.3: type = converted %T.ref.loc5_37, %T.as_type.loc5_37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc5_37.4: Core.Form = init_form %.loc5_37.3, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %.loc5_37.4: Core.Form = init_form %.loc5_37.3, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.2)] // CHECK:STDOUT: %.loc5_21: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] @@ -395,26 +403,27 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: generic fn @Function(%T.loc5_13.2: %Copy.type) { // CHECK:STDOUT: %T.loc5_13.1: %Copy.type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T.035)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc5_13.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.1)] -// CHECK:STDOUT: %.loc5_37.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.2)] +// CHECK:STDOUT: %.loc5_37.2: Core.Form = init_form %T.binding.as_type, call_param1 [symbolic = %.loc5_37.2 (constants.%.6c815b.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.67c)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc5_13.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc6: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc5_13.1 [symbolic = %.loc6 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%T.loc5_13.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T.loc5_13.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc6: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T.loc5_13.1 [symbolic = %.loc6 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%T.loc5_13.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Function.%T.binding.as_type (%T.binding.as_type)) -> out %return.param: @Function.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @Function.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x -// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.07b)] +// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.594)] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %x.ref, %impl.elem0.loc6_10.1 -// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.2c9)] +// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.bdc)] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %x.ref, %specific_impl_fn.loc6_10.1 // CHECK:STDOUT: %.loc5_37.1: ref @Function.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) to %.loc5_37.1 = call %bound_method.loc6_10.2(%x.ref) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) to %.loc5_37.1 = call %bound_method.loc6_10.2(%x.ref) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -478,22 +487,23 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: specific @Function(constants.%T.035) { // CHECK:STDOUT: %T.loc5_13.1 => constants.%T.035 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1 -// CHECK:STDOUT: %.loc5_37.2 => constants.%.6c815b.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2 +// CHECK:STDOUT: %.loc5_37.2 => constants.%.6c815b.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.67c // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.58d -// CHECK:STDOUT: %.loc6 => constants.%.72e -// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.07b -// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.2c9 +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.735e75.2 +// CHECK:STDOUT: %.loc6 => constants.%.023 +// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.594 +// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.bdc // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGeneric(constants.%T.035) { // CHECK:STDOUT: %T.loc10_16.1 => constants.%T.035 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1 -// CHECK:STDOUT: %.loc10_40.2 => constants.%.6c815b.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2 +// CHECK:STDOUT: %.loc10_40.2 => constants.%.6c815b.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericPtr(constants.%T.67d) { @@ -512,9 +522,10 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.2e6 -// CHECK:STDOUT: %.loc6 => constants.%.b46 -// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.201 -// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.b84 +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.d82 +// CHECK:STDOUT: %.loc6 => constants.%.299 +// CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.1c7 +// CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.366 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Function(constants.%Copy.facet.a7f) { @@ -526,7 +537,8 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.17a // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.2c7 -// CHECK:STDOUT: %.loc6 => constants.%.cda +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.259 +// CHECK:STDOUT: %.loc6 => constants.%.64b // CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%ptr.as.Copy.impl.Op.ed9 // CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } 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 af819ee21908..36a5626e5212 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 @@ -50,10 +50,10 @@ fn G() { // CHECK:STDOUT: %Generic.generic: %Generic.type.835 = struct_value () [concrete] // CHECK:STDOUT: %Generic.type.03dff7.1: type = facet_type <@Generic, @Generic(%Scalar)> [symbolic] // CHECK:STDOUT: %Self.15d2d5.1: %Generic.type.03dff7.1 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.8aacdf.1: type = fn_type @Generic.F, @Generic(%Scalar) [symbolic] -// CHECK:STDOUT: %Generic.F.673760.1: %Generic.F.type.8aacdf.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.type.74390a.1: type = fn_type @Generic.WithSelf.F, @Generic(%Scalar, %Self.15d2d5.1) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.baf95a.1: %Generic.WithSelf.F.type.74390a.1 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.22afda.1: type = assoc_entity_type @Generic, @Generic(%Scalar) [symbolic] -// CHECK:STDOUT: %assoc0.6ba576.1: %Generic.assoc_type.22afda.1 = assoc_entity element0, @Generic.%Generic.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.e0dc00.1: %Generic.assoc_type.22afda.1 = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %GenericParam: type = class_type @GenericParam [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] @@ -61,23 +61,27 @@ fn G() { // CHECK:STDOUT: %Generic.type.498: type = facet_type <@Generic, @Generic(%GenericParam)> [concrete] // CHECK:STDOUT: %Generic.impl_witness: = impl_witness @ImplsGeneric.as.Generic.impl.%Generic.impl_witness_table [concrete] // CHECK:STDOUT: %Self.1f5: %Generic.type.498 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.0a1: type = fn_type @Generic.F, @Generic(%GenericParam) [concrete] -// CHECK:STDOUT: %Generic.F.edf: %Generic.F.type.0a1 = struct_value () [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.type.a23: type = fn_type @Generic.WithSelf.F, @Generic(%GenericParam, %Self.15d2d5.1) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.fe0: %Generic.WithSelf.F.type.a23 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.6dc: type = assoc_entity_type @Generic, @Generic(%GenericParam) [concrete] -// CHECK:STDOUT: %assoc0.d01: %Generic.assoc_type.6dc = assoc_entity element0, @Generic.%Generic.F.decl [concrete] +// CHECK:STDOUT: %assoc0.717: %Generic.assoc_type.6dc = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [concrete] // CHECK:STDOUT: %ImplsGeneric.as.Generic.impl.F.type: type = fn_type @ImplsGeneric.as.Generic.impl.F [concrete] // CHECK:STDOUT: %ImplsGeneric.as.Generic.impl.F: %ImplsGeneric.as.Generic.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %Generic.facet: %Generic.type.498 = facet_value %ImplsGeneric, (%Generic.impl_witness) [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.type.c86: type = fn_type @Generic.WithSelf.F, @Generic(%GenericParam, %Generic.facet) [concrete] +// CHECK:STDOUT: %Generic.WithSelf.F.1fd: %Generic.WithSelf.F.type.c86 = struct_value () [concrete] // CHECK:STDOUT: %Other.type: type = facet_type <@Other> [concrete] // CHECK:STDOUT: %Self.8c4: %Other.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Other.G.type: type = fn_type @Other.G [concrete] -// CHECK:STDOUT: %Other.G: %Other.G.type = struct_value () [concrete] +// CHECK:STDOUT: %Other.WithSelf.G.type.acd: type = fn_type @Other.WithSelf.G, @Other(%Self.8c4) [symbolic] +// CHECK:STDOUT: %Other.WithSelf.G.63d: %Other.WithSelf.G.type.acd = struct_value () [symbolic] // CHECK:STDOUT: %Other.assoc_type: type = assoc_entity_type @Other [concrete] -// CHECK:STDOUT: %assoc0.96c: %Other.assoc_type = assoc_entity element0, @Other.%Other.G.decl [concrete] +// CHECK:STDOUT: %assoc0.205: %Other.assoc_type = assoc_entity element0, @Other.%Other.WithSelf.G.decl [concrete] // CHECK:STDOUT: %Other.impl_witness: = impl_witness @ImplsGeneric.as.Other.impl.%Other.impl_witness_table [concrete] // CHECK:STDOUT: %ImplsGeneric.as.Other.impl.G.type: type = fn_type @ImplsGeneric.as.Other.impl.G [concrete] // CHECK:STDOUT: %ImplsGeneric.as.Other.impl.G: %ImplsGeneric.as.Other.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: %Other.facet: %Other.type = facet_value %ImplsGeneric, (%Other.impl_witness) [concrete] +// CHECK:STDOUT: %Other.WithSelf.G.type.1df: type = fn_type @Other.WithSelf.G, @Other(%Other.facet) [concrete] +// CHECK:STDOUT: %Other.WithSelf.G.13d: %Other.WithSelf.G.type.1df = struct_value () [concrete] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Generic.type.03dff7.2: type = facet_type <@Generic, @Generic(%T)> [symbolic] // CHECK:STDOUT: %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic] @@ -85,22 +89,24 @@ fn G() { // CHECK:STDOUT: %CallGenericMethod.type: type = fn_type @CallGenericMethod [concrete] // CHECK:STDOUT: %CallGenericMethod: %CallGenericMethod.type = struct_value () [concrete] // CHECK:STDOUT: %Self.15d2d5.2: %Generic.type.03dff7.2 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Generic.F.type.8aacdf.2: type = fn_type @Generic.F, @Generic(%T) [symbolic] -// CHECK:STDOUT: %Generic.F.673760.2: %Generic.F.type.8aacdf.2 = struct_value () [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.type.74390a.2: type = fn_type @Generic.WithSelf.F, @Generic(%T, %Self.15d2d5.1) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.baf95a.2: %Generic.WithSelf.F.type.74390a.2 = struct_value () [symbolic] // CHECK:STDOUT: %Generic.assoc_type.22afda.2: type = assoc_entity_type @Generic, @Generic(%T) [symbolic] -// CHECK:STDOUT: %assoc0.6ba576.2: %Generic.assoc_type.22afda.2 = assoc_entity element0, @Generic.%Generic.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.e0dc00.2: %Generic.assoc_type.22afda.2 = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Generic.type.03dff7.2 [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.type.56e: type = fn_type @Generic.WithSelf.F, @Generic(%T, %U) [symbolic] +// CHECK:STDOUT: %Generic.WithSelf.F.a99: %Generic.WithSelf.F.type.56e = struct_value () [symbolic] // CHECK:STDOUT: %U.binding.as_type: type = symbolic_binding_type U, 1, %U [symbolic] // CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U, @Generic, @Generic(%T) [symbolic] -// CHECK:STDOUT: %.c48: type = fn_type_with_self_type %Generic.F.type.8aacdf.2, %U [symbolic] -// CHECK:STDOUT: %impl.elem0: %.c48 = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Generic.F(%T, %U) [symbolic] +// CHECK:STDOUT: %.ab3: type = fn_type_with_self_type %Generic.WithSelf.F.type.56e, %U [symbolic] +// CHECK:STDOUT: %impl.elem0: %.ab3 = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Generic.WithSelf.F(%T, %U) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.cba: type = pattern_type %Generic.type.498 [concrete] // CHECK:STDOUT: %CallGenericMethod.specific_fn: = specific_function %CallGenericMethod, @CallGenericMethod(%GenericParam, %Generic.facet) [concrete] // CHECK:STDOUT: %complete_type.57a: = complete_type_witness %Generic.type.498 [concrete] -// CHECK:STDOUT: %.b07: type = fn_type_with_self_type %Generic.F.type.0a1, %Generic.facet [concrete] +// CHECK:STDOUT: %.fcf: type = fn_type_with_self_type %Generic.WithSelf.F.type.c86, %Generic.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -161,36 +167,38 @@ fn G() { // CHECK:STDOUT: %Scalar.loc15_19.1: type = symbolic_binding Scalar, 0 [symbolic = %Scalar.loc15_19.1 (constants.%Scalar)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(%Scalar.loc15_19.1)> [symbolic = %Generic.type (constants.%Generic.type.03dff7.1)] -// CHECK:STDOUT: %Self.loc15_34.2: @Generic.%Generic.type (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.15d2d5.1)] -// CHECK:STDOUT: %Generic.F.type: type = fn_type @Generic.F, @Generic(%Scalar.loc15_19.1) [symbolic = %Generic.F.type (constants.%Generic.F.type.8aacdf.1)] -// CHECK:STDOUT: %Generic.F: @Generic.%Generic.F.type (%Generic.F.type.8aacdf.1) = struct_value () [symbolic = %Generic.F (constants.%Generic.F.673760.1)] -// CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%Scalar.loc15_19.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.22afda.1)] -// CHECK:STDOUT: %assoc0.loc16_9.2: @Generic.%Generic.assoc_type (%Generic.assoc_type.22afda.1) = assoc_entity element0, %Generic.F.decl [symbolic = %assoc0.loc16_9.2 (constants.%assoc0.6ba576.1)] +// CHECK:STDOUT: %Generic.type.loc15: type = facet_type <@Generic, @Generic(%Scalar.loc15_19.1)> [symbolic = %Generic.type.loc15 (constants.%Generic.type.03dff7.1)] +// CHECK:STDOUT: %Self.loc15_34.2: @Generic.%Generic.type.loc15 (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.15d2d5.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc15_34.1: @Generic.%Generic.type (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.15d2d5.1)] -// CHECK:STDOUT: %Generic.F.decl: @Generic.%Generic.F.type (%Generic.F.type.8aacdf.1) = fn_decl @Generic.F [symbolic = @Generic.%Generic.F (constants.%Generic.F.673760.1)] {} {} -// CHECK:STDOUT: %assoc0.loc16_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.22afda.1) = assoc_entity element0, %Generic.F.decl [symbolic = %assoc0.loc16_9.2 (constants.%assoc0.6ba576.1)] +// CHECK:STDOUT: %Self.loc15_34.1: @Generic.%Generic.type.loc15 (%Generic.type.03dff7.1) = symbolic_binding Self, 1 [symbolic = %Self.loc15_34.2 (constants.%Self.15d2d5.1)] +// CHECK:STDOUT: interface_with_self_decl @Generic [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Generic.WithSelf.F.decl: @Generic.%Generic.WithSelf.F.type (%Generic.WithSelf.F.type.74390a.1) = fn_decl @Generic.WithSelf.F [symbolic = @Generic.%Generic.WithSelf.F (constants.%Generic.WithSelf.F.baf95a.1)] {} {} +// CHECK:STDOUT: %assoc0.loc16_9.1: @Generic.%Generic.assoc_type (%Generic.assoc_type.22afda.1) = assoc_entity element0, %Generic.WithSelf.F.decl [symbolic = %assoc0.loc16_9.2 (constants.%assoc0.e0dc00.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc15_34.1 // CHECK:STDOUT: .F = %assoc0.loc16_9.1 -// CHECK:STDOUT: witness = (%Generic.F.decl) +// CHECK:STDOUT: witness = (%Generic.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Other { -// CHECK:STDOUT: %Self: %Other.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8c4] -// CHECK:STDOUT: %Other.G.decl: %Other.G.type = fn_decl @Other.G [concrete = constants.%Other.G] {} {} -// CHECK:STDOUT: %assoc0: %Other.assoc_type = assoc_entity element0, %Other.G.decl [concrete = constants.%assoc0.96c] +// CHECK:STDOUT: %Self.loc26: %Other.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8c4] +// CHECK:STDOUT: interface_with_self_decl @Other [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Other.WithSelf.G.decl: @Other.%Other.WithSelf.G.type (%Other.WithSelf.G.type.acd) = fn_decl @Other.WithSelf.G [symbolic = @Other.%Other.WithSelf.G (constants.%Other.WithSelf.G.63d)] {} {} +// CHECK:STDOUT: %assoc0: %Other.assoc_type = assoc_entity element0, %Other.WithSelf.G.decl [concrete = constants.%assoc0.205] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc26 // CHECK:STDOUT: .G = %assoc0 -// CHECK:STDOUT: witness = (%Other.G.decl) +// CHECK:STDOUT: witness = (%Other.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -231,7 +239,7 @@ fn G() { // CHECK:STDOUT: .Self = constants.%ImplsGeneric // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Generic.F(@Generic.%Scalar.loc15_19.2: type, @Generic.%Self.loc15_34.1: @Generic.%Generic.type (%Generic.type.03dff7.1)) { +// CHECK:STDOUT: generic fn @Generic.WithSelf.F(@Generic.%Scalar.loc15_19.2: type, @Generic.%Self.loc15_34.1: @Generic.%Generic.type.loc15 (%Generic.type.03dff7.1)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -240,7 +248,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Other.G(@Other.%Self: %Other.type) { +// CHECK:STDOUT: generic fn @Other.WithSelf.G(@Other.%Self.loc26: %Other.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -256,23 +264,23 @@ fn G() { // CHECK:STDOUT: %require_complete: = require_complete_type %Generic.type.loc33_45.1 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %U.binding.as_type: type = symbolic_binding_type U, 1, %U.loc33_32.1 [symbolic = %U.binding.as_type (constants.%U.binding.as_type)] // CHECK:STDOUT: %Generic.assoc_type: type = assoc_entity_type @Generic, @Generic(%T.loc33_22.1) [symbolic = %Generic.assoc_type (constants.%Generic.assoc_type.22afda.2)] -// CHECK:STDOUT: %assoc0: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = assoc_entity element0, @Generic.%Generic.F.decl [symbolic = %assoc0 (constants.%assoc0.6ba576.2)] +// CHECK:STDOUT: %assoc0: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = assoc_entity element0, @Generic.%Generic.WithSelf.F.decl [symbolic = %assoc0 (constants.%assoc0.e0dc00.2)] // CHECK:STDOUT: %Generic.lookup_impl_witness: = lookup_impl_witness %U.loc33_32.1, @Generic, @Generic(%T.loc33_22.1) [symbolic = %Generic.lookup_impl_witness (constants.%Generic.lookup_impl_witness)] -// CHECK:STDOUT: %Generic.F.type: type = fn_type @Generic.F, @Generic(%T.loc33_22.1) [symbolic = %Generic.F.type (constants.%Generic.F.type.8aacdf.2)] -// CHECK:STDOUT: %.loc34_4.3: type = fn_type_with_self_type %Generic.F.type, %U.loc33_32.1 [symbolic = %.loc34_4.3 (constants.%.c48)] -// CHECK:STDOUT: %impl.elem0.loc34_4.2: @CallGenericMethod.%.loc34_4.3 (%.c48) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc34_4.2: = specific_impl_function %impl.elem0.loc34_4.2, @Generic.F(%T.loc33_22.1, %U.loc33_32.1) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Generic.WithSelf.F.type: type = fn_type @Generic.WithSelf.F, @Generic(%T.loc33_22.1, %U.loc33_32.1) [symbolic = %Generic.WithSelf.F.type (constants.%Generic.WithSelf.F.type.56e)] +// CHECK:STDOUT: %.loc34_4.3: type = fn_type_with_self_type %Generic.WithSelf.F.type, %U.loc33_32.1 [symbolic = %.loc34_4.3 (constants.%.ab3)] +// CHECK:STDOUT: %impl.elem0.loc34_4.2: @CallGenericMethod.%.loc34_4.3 (%.ab3) = impl_witness_access %Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc34_4.2: = specific_impl_function %impl.elem0.loc34_4.2, @Generic.WithSelf.F(%T.loc33_22.1, %U.loc33_32.1) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %U.ref: @CallGenericMethod.%Generic.type.loc33_45.1 (%Generic.type.03dff7.2) = name_ref U, %U.loc33_32.2 [symbolic = %U.loc33_32.1 (constants.%U)] // CHECK:STDOUT: %U.as_type: type = facet_access_type %U.ref [symbolic = %U.binding.as_type (constants.%U.binding.as_type)] // CHECK:STDOUT: %.loc34_4.1: type = converted %U.ref, %U.as_type [symbolic = %U.binding.as_type (constants.%U.binding.as_type)] -// CHECK:STDOUT: %.loc34_4.2: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = specific_constant @Generic.%assoc0.loc16_9.1, @Generic(constants.%T) [symbolic = %assoc0 (constants.%assoc0.6ba576.2)] -// CHECK:STDOUT: %F.ref: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = name_ref F, %.loc34_4.2 [symbolic = %assoc0 (constants.%assoc0.6ba576.2)] -// CHECK:STDOUT: %impl.elem0.loc34_4.1: @CallGenericMethod.%.loc34_4.3 (%.c48) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc34_4.1: = specific_impl_function %impl.elem0.loc34_4.1, @Generic.F(constants.%T, constants.%U) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %Generic.F.call: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1() +// CHECK:STDOUT: %.loc34_4.2: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = specific_constant @Generic.%assoc0.loc16_9.1, @Generic(constants.%T, constants.%U) [symbolic = %assoc0 (constants.%assoc0.e0dc00.2)] +// CHECK:STDOUT: %F.ref: @CallGenericMethod.%Generic.assoc_type (%Generic.assoc_type.22afda.2) = name_ref F, %.loc34_4.2 [symbolic = %assoc0 (constants.%assoc0.e0dc00.2)] +// CHECK:STDOUT: %impl.elem0.loc34_4.1: @CallGenericMethod.%.loc34_4.3 (%.ab3) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc34_4.1: = specific_impl_function %impl.elem0.loc34_4.1, @Generic.WithSelf.F(constants.%T, constants.%U) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Generic.WithSelf.F.call: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -293,36 +301,66 @@ fn G() { // CHECK:STDOUT: %Scalar.loc15_19.1 => constants.%Scalar // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.F(constants.%Scalar, constants.%Self.15d2d5.1) {} +// CHECK:STDOUT: specific @Generic(constants.%Scalar, constants.%Self.15d2d5.1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%Scalar, constants.%Self.15d2d5.1) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%GenericParam) { // CHECK:STDOUT: %Scalar.loc15_19.1 => constants.%GenericParam // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type => constants.%Generic.type.498 +// CHECK:STDOUT: %Generic.type.loc15 => constants.%Generic.type.498 // CHECK:STDOUT: %Self.loc15_34.2 => constants.%Self.1f5 -// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.0a1 -// CHECK:STDOUT: %Generic.F => constants.%Generic.F.edf -// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc -// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.d01 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.F(constants.%GenericParam, constants.%Generic.facet) {} +// CHECK:STDOUT: specific @Generic(constants.%GenericParam, constants.%Self.15d2d5.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc16 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc16 => constants.%Generic.type.498 +// CHECK:STDOUT: %Self.loc16 => constants.%Self.15d2d5.1 +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.a23 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.fe0 +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc +// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.717 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Other.G(constants.%Self.8c4) {} +// CHECK:STDOUT: specific @Generic(constants.%GenericParam, constants.%Generic.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc16 => constants.%GenericParam +// CHECK:STDOUT: %Generic.type.loc16 => constants.%Generic.type.498 +// CHECK:STDOUT: %Self.loc16 => constants.%Generic.facet +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.c86 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.1fd +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc +// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.717 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Other.G(constants.%Other.facet) {} +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%GenericParam, constants.%Generic.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Other(constants.%Self.8c4) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc27 => constants.%Self.8c4 +// CHECK:STDOUT: %Other.WithSelf.G.type => constants.%Other.WithSelf.G.type.acd +// CHECK:STDOUT: %Other.WithSelf.G => constants.%Other.WithSelf.G.63d +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Other.WithSelf.G(constants.%Self.8c4) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Other(constants.%Other.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc27 => constants.%Other.facet +// CHECK:STDOUT: %Other.WithSelf.G.type => constants.%Other.WithSelf.G.type.1df +// CHECK:STDOUT: %Other.WithSelf.G => constants.%Other.WithSelf.G.13d +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Other.WithSelf.G(constants.%Other.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%T) { // CHECK:STDOUT: %Scalar.loc15_19.1 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Generic.type => constants.%Generic.type.03dff7.2 +// CHECK:STDOUT: %Generic.type.loc15 => constants.%Generic.type.03dff7.2 // CHECK:STDOUT: %Self.loc15_34.2 => constants.%Self.15d2d5.2 -// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.8aacdf.2 -// CHECK:STDOUT: %Generic.F => constants.%Generic.F.673760.2 -// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.22afda.2 -// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.6ba576.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%T, constants.%U) { @@ -332,7 +370,29 @@ fn G() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c49 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Generic.F(constants.%T, constants.%U) {} +// CHECK:STDOUT: specific @Generic(constants.%T, constants.%Self.15d2d5.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc16 => constants.%T +// CHECK:STDOUT: %Generic.type.loc16 => constants.%Generic.type.03dff7.2 +// CHECK:STDOUT: %Self.loc16 => constants.%Self.15d2d5.1 +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.74390a.2 +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.baf95a.2 +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.22afda.2 +// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.e0dc00.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic(constants.%T, constants.%U) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Scalar.loc16 => constants.%T +// CHECK:STDOUT: %Generic.type.loc16 => constants.%Generic.type.03dff7.2 +// CHECK:STDOUT: %Self.loc16 => constants.%U +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.56e +// CHECK:STDOUT: %Generic.WithSelf.F => constants.%Generic.WithSelf.F.a99 +// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.22afda.2 +// CHECK:STDOUT: %assoc0.loc16_9.2 => constants.%assoc0.e0dc00.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic.WithSelf.F(constants.%T, constants.%U) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) { // CHECK:STDOUT: %T.loc33_22.1 => constants.%GenericParam @@ -344,10 +404,10 @@ fn G() { // CHECK:STDOUT: %require_complete => constants.%complete_type.57a // CHECK:STDOUT: %U.binding.as_type => constants.%ImplsGeneric // CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.6dc -// CHECK:STDOUT: %assoc0 => constants.%assoc0.d01 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.717 // CHECK:STDOUT: %Generic.lookup_impl_witness => constants.%Generic.impl_witness -// CHECK:STDOUT: %Generic.F.type => constants.%Generic.F.type.0a1 -// CHECK:STDOUT: %.loc34_4.3 => constants.%.b07 +// CHECK:STDOUT: %Generic.WithSelf.F.type => constants.%Generic.WithSelf.F.type.c86 +// CHECK:STDOUT: %.loc34_4.3 => constants.%.fcf // CHECK:STDOUT: %impl.elem0.loc34_4.2 => constants.%ImplsGeneric.as.Generic.impl.F // CHECK:STDOUT: %specific_impl_fn.loc34_4.2 => constants.%ImplsGeneric.as.Generic.impl.F // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index dba3a82159f5..f481c5cafbc1 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -857,7 +857,6 @@ fn F() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -865,7 +864,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @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] @@ -936,7 +936,7 @@ fn F() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc7_19.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2) [concrete = constants.%tuple.ad8] // CHECK:STDOUT: %TupleParam.specific_fn: = specific_function %TupleParam.ref, @TupleParam(Core.IntLiteral) [concrete = constants.%TupleParam.specific_fn] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc7_19.1: = bound_method %int_2, %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.loc7_19.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] @@ -995,7 +995,6 @@ fn F() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1003,7 +1002,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @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] @@ -1072,7 +1072,7 @@ fn F() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc7_30.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct.4aa] // CHECK:STDOUT: %StructParam.specific_fn: = specific_function %StructParam.ref, @StructParam(Core.IntLiteral) [concrete = constants.%StructParam.specific_fn] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc7_30.1: = bound_method %int_2, %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.loc7_30.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] @@ -1626,6 +1626,7 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Z.impl_witness.c05: = impl_witness @EE.as.Z.impl.%Z.impl_witness_table [concrete] +// CHECK:STDOUT: %Z.facet.5dc: %Z.type = facet_value %EE, (%Z.impl_witness.c05) [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %E: type = symbolic_binding E, 0 [symbolic] @@ -1634,6 +1635,7 @@ fn F() { // CHECK:STDOUT: %DD.generic: %DD.type = struct_value () [concrete] // CHECK:STDOUT: %DD.a29: type = class_type @DD, @DD(%E) [symbolic] // CHECK:STDOUT: %Z.impl_witness.437: = impl_witness @DD.as.Z.impl.%Z.impl_witness_table, @DD.as.Z.impl(%E) [symbolic] +// CHECK:STDOUT: %Z.facet.dc0: %Z.type = facet_value %DD.a29, (%Z.impl_witness.437) [symbolic] // CHECK:STDOUT: %D: %Z.type = symbolic_binding D, 0 [symbolic] // CHECK:STDOUT: %pattern_type.22b: type = pattern_type %Z.type [concrete] // CHECK:STDOUT: %CC.type: type = generic_class_type @CC [concrete] @@ -1644,6 +1646,7 @@ fn F() { // CHECK:STDOUT: %Z.facet.892: %Z.type = facet_value %DD.a29, (%Z.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %CC.4e1: type = class_type @CC, @CC(%Z.facet.892) [symbolic] // CHECK:STDOUT: %Z.impl_witness.40e: = impl_witness @CC.as.Z.impl.%Z.impl_witness_table, @CC.as.Z.impl(%E) [symbolic] +// CHECK:STDOUT: %Z.facet.b7b: %Z.type = facet_value %CC.4e1, (%Z.impl_witness.40e) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %DD.2e1: type = class_type @DD, @DD(%EE) [concrete] @@ -1722,6 +1725,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -1825,6 +1829,14 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Z.facet.5dc) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @DD(constants.%E) { // CHECK:STDOUT: %E.loc8_10.1 => constants.%E // CHECK:STDOUT: } @@ -1837,6 +1849,10 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Z.facet.dc0) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @CC(constants.%D) { // CHECK:STDOUT: %D.loc11_10.1 => constants.%D // CHECK:STDOUT: } @@ -1855,6 +1871,10 @@ fn F() { // CHECK:STDOUT: %Z.impl_witness.loc12_39.2 => constants.%Z.impl_witness.40e // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Z.facet.b7b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @DD(constants.%EE) { // CHECK:STDOUT: %E.loc8_10.1 => constants.%EE // 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 6e2452bf8f98..cd83e3b799c4 100644 --- a/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon +++ b/toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon @@ -48,7 +48,9 @@ fn F() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Y.impl_witness: = impl_witness @DD.as.Y.impl.%Y.impl_witness_table [concrete] +// CHECK:STDOUT: %Y.facet.215: %Y.type = facet_value %DD, (%Y.impl_witness) [concrete] // CHECK:STDOUT: %W.impl_witness: = impl_witness @DD.as.W.impl.%W.impl_witness_table [concrete] +// CHECK:STDOUT: %W.facet: %W.type = facet_value %DD, (%W.impl_witness) [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %D: %Y.type = symbolic_binding D, 0 [symbolic] @@ -61,10 +63,10 @@ fn F() { // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %Y.type, %type.as.BitAndWith.impl.Op [concrete] @@ -76,13 +78,13 @@ fn F() { // CHECK:STDOUT: %Y.facet.9df: %Y.type = facet_value %E.binding.as_type, (%Y.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %CC.dc2: type = class_type @CC, @CC(%Y.facet.9df) [symbolic] // CHECK:STDOUT: %Z.impl_witness.506: = impl_witness @CC.as.Z.impl.%Z.impl_witness_table, @CC.as.Z.impl(%E) [symbolic] +// CHECK:STDOUT: %Z.facet.8c4: %Z.type = facet_value %CC.dc2, (%Z.impl_witness.506) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %Y.facet.215: %Y.type = facet_value %DD, (%Y.impl_witness) [concrete] // CHECK:STDOUT: %CC.062: type = class_type @CC, @CC(%Y.facet.215) [concrete] // CHECK:STDOUT: %facet_value: %facet_type = facet_value %DD, (%Y.impl_witness, %W.impl_witness) [concrete] // CHECK:STDOUT: %Z.impl_witness.c39: = impl_witness @CC.as.Z.impl.%Z.impl_witness_table, @CC.as.Z.impl(%facet_value) [concrete] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC.062, (%Z.impl_witness.c39) [concrete] +// CHECK:STDOUT: %Z.facet.d22: %Z.type = facet_value %CC.062, (%Z.impl_witness.c39) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -142,7 +144,7 @@ fn F() { // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] // CHECK:STDOUT: %W.ref: type = name_ref W, file.%W.decl [concrete = constants.%W.type] -// CHECK:STDOUT: %impl.elem0: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %Y.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%Y.ref, %W.ref) [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc19_20.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] @@ -155,6 +157,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Y { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = constants.%Self.162] +// CHECK:STDOUT: interface_with_self_decl @Y [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -165,6 +168,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @W { // CHECK:STDOUT: %Self: %W.type = symbolic_binding Self, 0 [symbolic = constants.%Self.62a] +// CHECK:STDOUT: interface_with_self_decl @W [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -175,6 +179,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -248,15 +253,35 @@ fn F() { // CHECK:STDOUT: %.loc22_9: %Y.type = converted %DD.ref, %Y.facet [concrete = constants.%Y.facet.215] // CHECK:STDOUT: %CC: type = class_type @CC, @CC(constants.%Y.facet.215) [concrete = constants.%CC.062] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC, (constants.%Z.impl_witness.c39) [concrete = constants.%Z.facet] -// CHECK:STDOUT: %.loc22_12: %Z.type = converted %CC, %Z.facet [concrete = constants.%Z.facet] +// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %CC, (constants.%Z.impl_witness.c39) [concrete = constants.%Z.facet.d22] +// CHECK:STDOUT: %.loc22_12: %Z.type = converted %CC, %Z.facet [concrete = constants.%Z.facet.d22] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%Self.162) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @W(constants.%Self.62a) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%Y.facet.215) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @W(constants.%W.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @CC(constants.%D) { // CHECK:STDOUT: %D.loc12_10.1 => constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Self.c59) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @CC(constants.%Y.facet.9df) { // CHECK:STDOUT: %D.loc12_10.1 => constants.%Y.facet.9df // CHECK:STDOUT: } @@ -270,6 +295,10 @@ fn F() { // CHECK:STDOUT: %Z.impl_witness.loc19_36.2 => constants.%Z.impl_witness.506 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Z.facet.8c4) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @CC(constants.%Y.facet.215) { // CHECK:STDOUT: %D.loc12_10.1 => constants.%Y.facet.215 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon b/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon index e310b1f99d06..aa6b5182d2e7 100644 --- a/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon +++ b/toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon @@ -91,6 +91,7 @@ fn B() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -114,6 +115,10 @@ fn B() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%T) { // CHECK:STDOUT: %T.loc4_6.1 => constants.%T // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type @@ -127,6 +132,7 @@ fn B() { // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] +// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %T: %Z.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.e5e: type = pattern_type %Z.type [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] @@ -234,6 +240,10 @@ fn B() { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @A.loc4(constants.%T) { // CHECK:STDOUT: %T.loc4_6.1 => constants.%T // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type diff --git a/toolchain/check/testdata/function/generic/indirect_generic_type.carbon b/toolchain/check/testdata/function/generic/indirect_generic_type.carbon index c3e97d6ca0d8..7eba75868808 100644 --- a/toolchain/check/testdata/function/generic/indirect_generic_type.carbon +++ b/toolchain/check/testdata/function/generic/indirect_generic_type.carbon @@ -30,13 +30,13 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: %.4fe: Core.Form = init_form %ptr.e8f, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: = lookup_impl_witness %ptr.e8f, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e8f, (%Copy.lookup_impl_witness.2e6) [symbolic] -// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b84: = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic] +// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.366: = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,21 +50,22 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: %.loc6_10.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc4_6.1) [symbolic = %.loc6_10.3 (constants.%.2f2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc4_20.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc4_20.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc6_10.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc6_10.4 (constants.%.b46)] -// CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.4 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.201)] -// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d82)] +// CHECK:STDOUT: %.loc6_10.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc6_10.4 (constants.%.299)] +// CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.4 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.1c7)] +// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%p.param: @F.%ptr.loc4_21.1 (%ptr.125)) -> out %return.param: @F.%ptr.loc4_20.1 (%ptr.e8f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: @F.%ptr.loc4_21.1 (%ptr.125) = name_ref p, %p // CHECK:STDOUT: %.loc6_10.1: ref @F.%ptr.loc4_20.1 (%ptr.e8f) = deref %p.ref // CHECK:STDOUT: %.loc6_10.2: @F.%ptr.loc4_20.1 (%ptr.e8f) = acquire_value %.loc6_10.1 -// CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.4 (%.b46) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.201)] +// CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.4 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.1c7)] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %.loc6_10.2, %impl.elem0.loc6_10.1 -// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %.loc6_10.2, %specific_impl_fn.loc6_10.1 -// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr.loc4_20.1 (%ptr.e8f) = call %bound_method.loc6_10.2(%.loc6_10.2) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc4_20.1 (%ptr.e8f) = call %bound_method.loc6_10.2(%.loc6_10.2) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/param_in_type.carbon b/toolchain/check/testdata/function/generic/param_in_type.carbon index bdba1d4aaeed..49443c07a0f7 100644 --- a/toolchain/check/testdata/function/generic/param_in_type.carbon +++ b/toolchain/check/testdata/function/generic/param_in_type.carbon @@ -28,7 +28,6 @@ fn F(N:! i32, a: array(i32, N)*); // 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: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic] @@ -36,7 +35,8 @@ fn F(N:! i32, a: array(i32, N)*); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete] -// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %N.5de, %Int.as.ImplicitAs.impl.Convert.dd4 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %N.5de, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic] @@ -83,7 +83,7 @@ fn F(N:! i32, a: array(i32, N)*); // CHECK:STDOUT: %int_32.loc15_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc15_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc15_6.2 [symbolic = %N.loc15_6.1 (constants.%N.5de)] -// CHECK:STDOUT: %impl.elem0: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %impl.elem0: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] // CHECK:STDOUT: %bound_method.loc15_29.2: = bound_method %N.ref, %impl.elem0 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_29.3: = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc15_29.1 (constants.%bound_method)] diff --git a/toolchain/check/testdata/function/generic/resolve_used.carbon b/toolchain/check/testdata/function/generic/resolve_used.carbon index f38a5c32e79e..131ccce0d120 100644 --- a/toolchain/check/testdata/function/generic/resolve_used.carbon +++ b/toolchain/check/testdata/function/generic/resolve_used.carbon @@ -56,12 +56,12 @@ fn CallNegative() { // CHECK:STDOUT: %require_complete.901: = require_complete_type %Int [symbolic] // CHECK:STDOUT: %pattern_type.764: type = pattern_type %Int [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Int, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.1c0: %Destroy.type = facet_value %Int, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.3e7: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.1c0 [symbolic] -// CHECK:STDOUT: %impl.elem0: %.3e7 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet.1c0) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.297: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.1c0) [symbolic] +// CHECK:STDOUT: %.e63: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.297, %Destroy.facet.1c0 [symbolic] +// CHECK:STDOUT: %impl.elem0: %.e63 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet.1c0) [symbolic] // CHECK:STDOUT: %CallNegative.type: type = fn_type @CallNegative [concrete] // CHECK:STDOUT: %CallNegative: %CallNegative.type = struct_value () [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] @@ -73,7 +73,8 @@ fn CallNegative() { // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.809: = custom_witness (%DestroyOp), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.7e1: %Destroy.type = facet_value %i0, (%custom_witness.809) [concrete] -// CHECK:STDOUT: %.918: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.7e1 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.e5a: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.7e1) [concrete] +// CHECK:STDOUT: %.011: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.e5a, %Destroy.facet.7e1 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -121,9 +122,10 @@ fn CallNegative() { // CHECK:STDOUT: %pattern_type: type = pattern_type %Int.loc15_20.2 [symbolic = %pattern_type (constants.%pattern_type.764)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %Int.loc15_20.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %Int.loc15_20.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.1c0)] -// CHECK:STDOUT: %.loc15_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc15_3 (constants.%.3e7)] -// CHECK:STDOUT: %impl.elem0.loc15_3.2: @ErrorIfNIsZero.%.loc15_3 (%.3e7) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc15_3.2: = specific_impl_function %impl.elem0.loc15_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc15_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.297)] +// CHECK:STDOUT: %.loc15_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc15_3 (constants.%.e63)] +// CHECK:STDOUT: %impl.elem0.loc15_3.2: @ErrorIfNIsZero.%.loc15_3 (%.e63) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc15_3.2: = specific_impl_function %impl.elem0.loc15_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc15_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -139,11 +141,11 @@ fn CallNegative() { // CHECK:STDOUT: %Int.loc15_20.1: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc15_20.2 (constants.%Int)] // CHECK:STDOUT: } // CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%Int.loc15_20.2 (%Int) = ref_binding v, %v.var -// CHECK:STDOUT: %impl.elem0.loc15_3.1: @ErrorIfNIsZero.%.loc15_3 (%.3e7) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc15_3.1: @ErrorIfNIsZero.%.loc15_3 (%.e63) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_3.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc15_3.1: = bound_method %v.var, %impl.elem0.loc15_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc15_3.1: = specific_impl_function %impl.elem0.loc15_3.1, @Destroy.Op(constants.%Destroy.facet.1c0) [symbolic = %specific_impl_fn.loc15_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc15_3.1: = specific_impl_function %impl.elem0.loc15_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.1c0) [symbolic = %specific_impl_fn.loc15_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc15_3.2: = bound_method %v.var, %specific_impl_fn.loc15_3.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc15_3.2(%v.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc15_3.2(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -172,7 +174,8 @@ fn CallNegative() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.47b // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.809 // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.7e1 -// CHECK:STDOUT: %.loc15_3 => constants.%.918 +// CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.e5a +// CHECK:STDOUT: %.loc15_3 => constants.%.011 // CHECK:STDOUT: %impl.elem0.loc15_3.2 => constants.%DestroyOp // CHECK:STDOUT: %specific_impl_fn.loc15_3.2 => constants.%DestroyOp // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/type_param.carbon b/toolchain/check/testdata/function/generic/type_param.carbon index d874b260e177..34c4bd90c7e3 100644 --- a/toolchain/check/testdata/function/generic/type_param.carbon +++ b/toolchain/check/testdata/function/generic/type_param.carbon @@ -33,12 +33,12 @@ fn F(T:! type) { // CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.655: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.655 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.bb2: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %.c3f: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.bb2, %Destroy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.c3f = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,9 +75,10 @@ fn F(T:! type) { // CHECK:STDOUT: %pattern_type.loc17: type = pattern_type %T.loc15_6.1 [symbolic = %pattern_type.loc17 (constants.%pattern_type.51d)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.loc16_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)] -// CHECK:STDOUT: %.loc16_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc16_3 (constants.%.655)] -// CHECK:STDOUT: %impl.elem0.loc16_3.2: @F.%.loc16_3 (%.655) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc16_3.2: = specific_impl_function %impl.elem0.loc16_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.bb2)] +// CHECK:STDOUT: %.loc16_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc16_3 (constants.%.c3f)] +// CHECK:STDOUT: %impl.elem0.loc16_3.2: @F.%.loc16_3 (%.c3f) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc16_3.2: = specific_impl_function %impl.elem0.loc16_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -100,11 +101,11 @@ fn F(T:! type) { // CHECK:STDOUT: %T.ref.loc17: type = name_ref T, %T.loc15_6.2 [symbolic = %T.loc15_6.1 (constants.%T)] // CHECK:STDOUT: %.loc17_14.2: @F.%T.loc15_6.1 (%T) = acquire_value %.loc17_14.1 // CHECK:STDOUT: %n: @F.%T.loc15_6.1 (%T) = value_binding n, %.loc17_14.2 -// CHECK:STDOUT: %impl.elem0.loc16_3.1: @F.%.loc16_3 (%.655) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc16_3.1: @F.%.loc16_3 (%.c3f) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_3.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %p.var, %impl.elem0.loc16_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc16_3.1: = specific_impl_function %impl.elem0.loc16_3.1, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc16_3.1: = specific_impl_function %impl.elem0.loc16_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc16_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %p.var, %specific_impl_fn.loc16_3.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc16_3.2(%p.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc16_3.2(%p.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/type_param_scope.carbon b/toolchain/check/testdata/function/generic/type_param_scope.carbon index d19e3e08c244..00d64087ed52 100644 --- a/toolchain/check/testdata/function/generic/type_param_scope.carbon +++ b/toolchain/check/testdata/function/generic/type_param_scope.carbon @@ -29,13 +29,13 @@ fn F(T:! type, n: T*) -> T* { // CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr [symbolic] // CHECK:STDOUT: %.4fe: Core.Form = init_form %ptr, call_param1 [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: = lookup_impl_witness %ptr, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness.2e6) [symbolic] -// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b84: = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic] +// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.366: = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,9 +49,10 @@ fn F(T:! type, n: T*) -> T* { // CHECK:STDOUT: %.loc7_10.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc4_6.1) [symbolic = %.loc7_10.1 (constants.%.2f2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc4_20.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc4_20.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc7_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc7_10.2 (constants.%.b46)] -// CHECK:STDOUT: %impl.elem0.loc7_10.2: @F.%.loc7_10.2 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.201)] -// CHECK:STDOUT: %specific_impl_fn.loc7_10.2: = specific_impl_function %impl.elem0.loc7_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d82)] +// CHECK:STDOUT: %.loc7_10.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc7_10.2 (constants.%.299)] +// CHECK:STDOUT: %impl.elem0.loc7_10.2: @F.%.loc7_10.2 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.1c7)] +// CHECK:STDOUT: %specific_impl_fn.loc7_10.2: = specific_impl_function %impl.elem0.loc7_10.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%n.param: @F.%ptr.loc4_20.1 (%ptr)) -> out %return.param: @F.%ptr.loc4_20.1 (%ptr) { // CHECK:STDOUT: !entry: @@ -65,12 +66,12 @@ fn F(T:! type, n: T*) -> T* { // CHECK:STDOUT: } // CHECK:STDOUT: %m: @F.%ptr.loc4_20.1 (%ptr) = value_binding m, %n.ref // CHECK:STDOUT: %m.ref: @F.%ptr.loc4_20.1 (%ptr) = name_ref m, %m -// CHECK:STDOUT: %impl.elem0.loc7_10.1: @F.%.loc7_10.2 (%.b46) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.201)] +// CHECK:STDOUT: %impl.elem0.loc7_10.1: @F.%.loc7_10.2 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.1c7)] // CHECK:STDOUT: %bound_method.loc7_10.1: = bound_method %m.ref, %impl.elem0.loc7_10.1 -// CHECK:STDOUT: %specific_impl_fn.loc7_10.1: = specific_impl_function %impl.elem0.loc7_10.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %specific_impl_fn.loc7_10.1: = specific_impl_function %impl.elem0.loc7_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: %bound_method.loc7_10.2: = bound_method %m.ref, %specific_impl_fn.loc7_10.1 -// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr.loc4_20.1 (%ptr) = call %bound_method.loc7_10.2(%m.ref) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc4_20.1 (%ptr) = call %bound_method.loc7_10.2(%m.ref) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/complete_type.carbon b/toolchain/check/testdata/generic/complete_type.carbon index 2f110abc14e0..1b0d11fd8057 100644 --- a/toolchain/check/testdata/generic/complete_type.carbon +++ b/toolchain/check/testdata/generic/complete_type.carbon @@ -212,12 +212,12 @@ fn G() { F(B); } // CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic] // CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.617: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.655: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.617 [symbolic] -// CHECK:STDOUT: %impl.elem0: %.655 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet.617) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.bb2: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.617) [symbolic] +// CHECK:STDOUT: %.c3f: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.bb2, %Destroy.facet.617 [symbolic] +// CHECK:STDOUT: %impl.elem0: %.c3f = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet.617) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%B) [concrete] @@ -230,7 +230,8 @@ fn G() { F(B); } // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.809: = custom_witness (%DestroyOp), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.4ad: %Destroy.type = facet_value %ptr.27c, (%custom_witness.809) [concrete] -// CHECK:STDOUT: %.d33: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.4ad [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.936: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.4ad) [concrete] +// CHECK:STDOUT: %.86b: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.936, %Destroy.facet.4ad [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -279,9 +280,10 @@ fn G() { F(B); } // CHECK:STDOUT: %require_complete.loc8: = require_complete_type %T.loc6_6.1 [symbolic = %require_complete.loc8 (constants.%require_complete.944)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc7_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.loc7_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.617)] -// CHECK:STDOUT: %.loc7_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc7_3 (constants.%.655)] -// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3 (%.655) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.bb2)] +// CHECK:STDOUT: %.loc7_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc7_3 (constants.%.c3f)] +// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3 (%.c3f) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -298,11 +300,11 @@ fn G() { F(B); } // CHECK:STDOUT: %v.ref: ref @F.%ptr.loc7_11.2 (%ptr.e8f) = name_ref v, %v // CHECK:STDOUT: %.loc8_4: @F.%ptr.loc7_11.2 (%ptr.e8f) = acquire_value %v.ref // CHECK:STDOUT: %.loc8_3: ref @F.%T.loc6_6.1 (%T) = deref %.loc8_4 -// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3 (%.655) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3 (%.c3f) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem0.loc7_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.Op(constants.%Destroy.facet.617) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.617) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_impl_fn.loc7_3.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%v.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -332,7 +334,8 @@ fn G() { F(B); } // CHECK:STDOUT: %require_complete.loc8 => constants.%complete_type.357 // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.809 // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.4ad -// CHECK:STDOUT: %.loc7_3 => constants.%.d33 +// CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.936 +// CHECK:STDOUT: %.loc7_3 => constants.%.86b // CHECK:STDOUT: %impl.elem0.loc7_3.2 => constants.%DestroyOp // CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%DestroyOp // CHECK:STDOUT: } @@ -353,12 +356,12 @@ fn G() { F(B); } // CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic] // CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.617: %Destroy.type = facet_value %ptr.e8f, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.655: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.617 [symbolic] -// CHECK:STDOUT: %impl.elem0: %.655 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet.617) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.bb2: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.617) [symbolic] +// CHECK:STDOUT: %.c3f: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.bb2, %Destroy.facet.617 [symbolic] +// CHECK:STDOUT: %impl.elem0: %.c3f = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet.617) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%B) [concrete] @@ -369,7 +372,8 @@ fn G() { F(B); } // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.809: = custom_witness (%DestroyOp), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.4ad: %Destroy.type = facet_value %ptr.27c, (%custom_witness.809) [concrete] -// CHECK:STDOUT: %.d33: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.4ad [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.936: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.4ad) [concrete] +// CHECK:STDOUT: %.86b: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.936, %Destroy.facet.4ad [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -411,9 +415,10 @@ fn G() { F(B); } // CHECK:STDOUT: %require_complete.loc14: = require_complete_type %T.loc6_6.1 [symbolic = %require_complete.loc14 (constants.%require_complete.944)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc7_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.loc7_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.617)] -// CHECK:STDOUT: %.loc7_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc7_3 (constants.%.655)] -// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3 (%.655) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.bb2)] +// CHECK:STDOUT: %.loc7_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc7_3 (constants.%.c3f)] +// CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3 (%.c3f) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.2: = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -430,11 +435,11 @@ fn G() { F(B); } // CHECK:STDOUT: %v.ref: ref @F.%ptr.loc7_11.2 (%ptr.e8f) = name_ref v, %v // CHECK:STDOUT: %.loc14_4: @F.%ptr.loc7_11.2 (%ptr.e8f) = acquire_value %v.ref // CHECK:STDOUT: %.loc14_3: ref @F.%T.loc6_6.1 (%T) = deref %.loc14_4 -// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3 (%.655) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3 (%.c3f) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %v.var, %impl.elem0.loc7_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.Op(constants.%Destroy.facet.617) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc7_3.1: = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.617) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %v.var, %specific_impl_fn.loc7_3.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%v.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc7_3.2(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -464,7 +469,8 @@ fn G() { F(B); } // CHECK:STDOUT: %require_complete.loc14 => // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.809 // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.4ad -// CHECK:STDOUT: %.loc7_3 => constants.%.d33 +// CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.936 +// CHECK:STDOUT: %.loc7_3 => constants.%.86b // CHECK:STDOUT: %impl.elem0.loc7_3.2 => constants.%DestroyOp // CHECK:STDOUT: %specific_impl_fn.loc7_3.2 => constants.%DestroyOp // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/generic/dependent_param.carbon b/toolchain/check/testdata/generic/dependent_param.carbon index 6df81829941d..9d67b419901a 100644 --- a/toolchain/check/testdata/generic/dependent_param.carbon +++ b/toolchain/check/testdata/generic/dependent_param.carbon @@ -36,7 +36,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %Outer.4b9: type = class_type @Outer, @Outer(%T.035) [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic] // CHECK:STDOUT: %U.959: %T.binding.as_type = symbolic_binding U, 1 [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %Inner.type.af4: type = generic_class_type @Inner, @Outer(%T.035) [symbolic] // CHECK:STDOUT: %Inner.generic.994: %Inner.type.af4 = struct_value () [symbolic] // CHECK:STDOUT: %Inner.c23: type = class_type @Inner, @Inner(%T.035, %U.959) [symbolic] @@ -44,13 +44,13 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %Inner.Get.type.6ef: type = fn_type @Inner.Get, @Inner(%T.035, %U.959) [symbolic] // CHECK:STDOUT: %Inner.Get.ba5: %Inner.Get.type.6ef = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.67c: = require_complete_type %T.binding.as_type [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.lookup_impl_witness.58d: = lookup_impl_witness %T.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e: type = fn_type_with_self_type %Copy.Op.type, %T.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b: %.72e = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9: = specific_impl_function %impl.elem0.07b, @Copy.Op(%T.035) [symbolic] -// CHECK:STDOUT: %bound_method.949: = bound_method %U.959, %impl.elem0.07b [symbolic] -// CHECK:STDOUT: %bound_method.397: = bound_method %U.959, %specific_impl_fn.2c9 [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.2: type = fn_type @Copy.WithSelf.Op, @Copy(%T.035) [symbolic] +// CHECK:STDOUT: %.023: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.2, %T.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594: %.023 = impl_witness_access %Copy.lookup_impl_witness.58d, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdc: = specific_impl_function %impl.elem0.594, @Copy.WithSelf.Op(%T.035) [symbolic] +// CHECK:STDOUT: %bound_method.068: = bound_method %U.959, %impl.elem0.594 [symbolic] +// CHECK:STDOUT: %bound_method.d5d: = bound_method %U.959, %specific_impl_fn.bdc [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] @@ -70,7 +70,6 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %Copy.impl_witness.006: = impl_witness imports.%Copy.impl_witness_table.b6d [concrete] // CHECK:STDOUT: %Copy.facet.cdd: %Copy.type = facet_value Core.IntLiteral, (%Copy.impl_witness.006) [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -78,7 +77,8 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.cb9: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -88,7 +88,8 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %Inner.Get.f96: %Inner.Get.type.20d = struct_value () [concrete] // CHECK:STDOUT: %.437: Core.Form = init_form %i32, call_param0 [concrete] // CHECK:STDOUT: %Inner.Get.specific_fn: = specific_function %Inner.Get.f96, @Inner.Get(%Copy.facet.de4, %int_42.c68) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_42.c68, %Int.as.Copy.impl.Op.664 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d85: = bound_method %int_42.c68, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -142,8 +143,8 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Inner.Get.decl: @Inner.%Inner.Get.type (%Inner.Get.type.6ef) = fn_decl @Inner.Get [symbolic = @Inner.%Inner.Get (constants.%Inner.Get.ba5)] { -// CHECK:STDOUT: %return.patt: @Inner.Get.%pattern_type (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Inner.Get.%pattern_type (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @Inner.Get.%pattern_type (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Inner.Get.%pattern_type (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: %Copy.type = name_ref T, @Outer.%T.loc4_13.2 [symbolic = %T (constants.%T.035)] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] @@ -167,28 +168,29 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %T: %Copy.type = symbolic_binding T, 0 [symbolic = %T (constants.%T.035)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc7_17.2: Core.Form = init_form %T.binding.as_type, call_param0 [symbolic = %.loc7_17.2 (constants.%.823)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.67c)] // CHECK:STDOUT: %U: @Inner.Get.%T.binding.as_type (%T.binding.as_type) = symbolic_binding U, 1 [symbolic = %U (constants.%U.959)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58d)] -// CHECK:STDOUT: %.loc7_28: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc7_28 (constants.%.72e)] -// CHECK:STDOUT: %impl.elem0.loc7_28.2: @Inner.Get.%.loc7_28 (%.72e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_28.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %bound_method.loc7_28.3: = bound_method %U, %impl.elem0.loc7_28.2 [symbolic = %bound_method.loc7_28.3 (constants.%bound_method.949)] -// CHECK:STDOUT: %specific_impl_fn.loc7_28.2: = specific_impl_function %impl.elem0.loc7_28.2, @Copy.Op(%T) [symbolic = %specific_impl_fn.loc7_28.2 (constants.%specific_impl_fn.2c9)] -// CHECK:STDOUT: %bound_method.loc7_28.4: = bound_method %U, %specific_impl_fn.loc7_28.2 [symbolic = %bound_method.loc7_28.4 (constants.%bound_method.397)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%T) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.2)] +// CHECK:STDOUT: %.loc7_28: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %T [symbolic = %.loc7_28 (constants.%.023)] +// CHECK:STDOUT: %impl.elem0.loc7_28.2: @Inner.Get.%.loc7_28 (%.023) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_28.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %bound_method.loc7_28.3: = bound_method %U, %impl.elem0.loc7_28.2 [symbolic = %bound_method.loc7_28.3 (constants.%bound_method.068)] +// CHECK:STDOUT: %specific_impl_fn.loc7_28.2: = specific_impl_function %impl.elem0.loc7_28.2, @Copy.WithSelf.Op(%T) [symbolic = %specific_impl_fn.loc7_28.2 (constants.%specific_impl_fn.bdc)] +// CHECK:STDOUT: %bound_method.loc7_28.4: = bound_method %U, %specific_impl_fn.loc7_28.2 [symbolic = %bound_method.loc7_28.4 (constants.%bound_method.d5d)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: @Inner.Get.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %U.ref: @Inner.Get.%T.binding.as_type (%T.binding.as_type) = name_ref U, @Inner.%U.loc5_15.2 [symbolic = %U (constants.%U.959)] -// CHECK:STDOUT: %impl.elem0.loc7_28.1: @Inner.Get.%.loc7_28 (%.72e) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc7_28.2 (constants.%impl.elem0.07b)] -// CHECK:STDOUT: %bound_method.loc7_28.1: = bound_method %U.ref, %impl.elem0.loc7_28.1 [symbolic = %bound_method.loc7_28.3 (constants.%bound_method.949)] -// CHECK:STDOUT: %specific_impl_fn.loc7_28.1: = specific_impl_function %impl.elem0.loc7_28.1, @Copy.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc7_28.2 (constants.%specific_impl_fn.2c9)] -// CHECK:STDOUT: %bound_method.loc7_28.2: = bound_method %U.ref, %specific_impl_fn.loc7_28.1 [symbolic = %bound_method.loc7_28.4 (constants.%bound_method.397)] +// CHECK:STDOUT: %impl.elem0.loc7_28.1: @Inner.Get.%.loc7_28 (%.023) = impl_witness_access constants.%Copy.lookup_impl_witness.58d, element0 [symbolic = %impl.elem0.loc7_28.2 (constants.%impl.elem0.594)] +// CHECK:STDOUT: %bound_method.loc7_28.1: = bound_method %U.ref, %impl.elem0.loc7_28.1 [symbolic = %bound_method.loc7_28.3 (constants.%bound_method.068)] +// CHECK:STDOUT: %specific_impl_fn.loc7_28.1: = specific_impl_function %impl.elem0.loc7_28.1, @Copy.WithSelf.Op(constants.%T.035) [symbolic = %specific_impl_fn.loc7_28.2 (constants.%specific_impl_fn.bdc)] +// CHECK:STDOUT: %bound_method.loc7_28.2: = bound_method %U.ref, %specific_impl_fn.loc7_28.1 [symbolic = %bound_method.loc7_28.4 (constants.%bound_method.d5d)] // CHECK:STDOUT: %.loc7_17.1: ref @Inner.Get.%T.binding.as_type (%T.binding.as_type) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.Op.call: init @Inner.Get.%T.binding.as_type (%T.binding.as_type) to %.loc7_17.1 = call %bound_method.loc7_28.2(%U.ref) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Inner.Get.%T.binding.as_type (%T.binding.as_type) to %.loc7_17.1 = call %bound_method.loc7_28.2(%U.ref) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -205,7 +207,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %Copy.facet.loc13_33: %Copy.type = facet_value Core.IntLiteral, (constants.%Copy.impl_witness.006) [concrete = constants.%Copy.facet.cdd] // CHECK:STDOUT: %.loc13_33.1: %Copy.type = converted Core.IntLiteral, %Copy.facet.loc13_33 [concrete = constants.%Copy.facet.cdd] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_33.1: = bound_method constants.%int_42.20e, %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_33.2: = bound_method constants.%int_42.20e, %specific_fn [concrete = constants.%bound_method.cb9] @@ -233,7 +235,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %T => constants.%T.035 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %U.loc5_15.1 => constants.%U.959 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Inner.Get.type => constants.%Inner.Get.type.6ef @@ -244,7 +246,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %T => constants.%T.035 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %.loc7_17.2 => constants.%.823 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%Copy.facet.de4) { @@ -276,7 +278,8 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a // CHECK:STDOUT: %U => constants.%int_42.c68 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.f17 -// CHECK:STDOUT: %.loc7_28 => constants.%.f79 +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.081 +// CHECK:STDOUT: %.loc7_28 => constants.%.8e2 // CHECK:STDOUT: %impl.elem0.loc7_28.2 => constants.%Int.as.Copy.impl.Op.664 // CHECK:STDOUT: %bound_method.loc7_28.3 => constants.%Int.as.Copy.impl.Op.bound // CHECK:STDOUT: %specific_impl_fn.loc7_28.2 => constants.%Int.as.Copy.impl.Op.specific_fn diff --git a/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon b/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon index 106131af33c9..6d0d9a66a1ae 100644 --- a/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon +++ b/toolchain/check/testdata/generic/dot_self_symbolic_type.carbon @@ -86,7 +86,7 @@ fn H(T:! type) { // CHECK:STDOUT: %A.type.ade3d9.2: type = facet_type <@A, @A(%CC)> [symbolic] // CHECK:STDOUT: %.Self.660472.1: %A.type.ade3d9.2 = symbolic_binding .Self [symbolic] // CHECK:STDOUT: %A.assoc_type.9f4820.2: type = assoc_entity_type @A, @A(%CC) [symbolic] -// CHECK:STDOUT: %assoc0.7951f9.2: %A.assoc_type.9f4820.2 = assoc_entity element0, @A.%X [symbolic] +// CHECK:STDOUT: %assoc0.9fa860.2: %A.assoc_type.9f4820.2 = assoc_entity element0, @A.%X [symbolic] // CHECK:STDOUT: %require_complete.f58: = require_complete_type %A.type.ade3d9.2 [symbolic] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.660472.1 [symbolic] // CHECK:STDOUT: %A.lookup_impl_witness.04abbb.1: = lookup_impl_witness %.Self.660472.1, @A, @A(%CC) [symbolic] @@ -143,8 +143,8 @@ fn H(T:! type) { // CHECK:STDOUT: %.Self.ref: @C.F.%A.type.loc11_16.1 (%A.type.ade3d9.2) = name_ref .Self, %.Self.3 [symbolic = %.Self.1 (constants.%.Self.660472.1)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type)] // CHECK:STDOUT: %.loc11_24.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type)] -// CHECK:STDOUT: %.loc11_24.2: @C.F.%A.assoc_type (%A.assoc_type.9f4820.2) = specific_constant @X.%assoc0, @A(constants.%CC) [symbolic = %assoc0 (constants.%assoc0.7951f9.2)] -// CHECK:STDOUT: %X.ref: @C.F.%A.assoc_type (%A.assoc_type.9f4820.2) = name_ref X, %.loc11_24.2 [symbolic = %assoc0 (constants.%assoc0.7951f9.2)] +// CHECK:STDOUT: %.loc11_24.2: @C.F.%A.assoc_type (%A.assoc_type.9f4820.2) = specific_constant @X.%assoc0, @A(constants.%CC, constants.%.Self.660472.1) [symbolic = %assoc0 (constants.%assoc0.9fa860.2)] +// CHECK:STDOUT: %X.ref: @C.F.%A.assoc_type (%A.assoc_type.9f4820.2) = name_ref X, %.loc11_24.2 [symbolic = %assoc0 (constants.%assoc0.9fa860.2)] // CHECK:STDOUT: %impl.elem0.loc11_24.2: type = impl_witness_access constants.%A.lookup_impl_witness.04abbb.1, element0 [symbolic = %impl.elem0.loc11_24.1 (constants.%impl.elem0.f51d29.1)] // CHECK:STDOUT: %CC.ref.loc11_29: type = name_ref CC, @C.%CC.loc6_9.2 [symbolic = %CC (constants.%CC)] // CHECK:STDOUT: %.loc11_18.2: type = where_expr %.Self.3 [symbolic = %A_where.type (constants.%A_where.type.4028e0.1)] { @@ -190,7 +190,7 @@ fn H(T:! type) { // CHECK:STDOUT: %require_complete: = require_complete_type %A.type.loc11_16.1 [symbolic = %require_complete (constants.%require_complete.f58)] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.1 [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type)] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A, @A(%CC) [symbolic = %A.assoc_type (constants.%A.assoc_type.9f4820.2)] -// CHECK:STDOUT: %assoc0: @C.F.%A.assoc_type (%A.assoc_type.9f4820.2) = assoc_entity element0, @A.%X [symbolic = %assoc0 (constants.%assoc0.7951f9.2)] +// CHECK:STDOUT: %assoc0: @C.F.%A.assoc_type (%A.assoc_type.9f4820.2) = assoc_entity element0, @A.%X [symbolic = %assoc0 (constants.%assoc0.9fa860.2)] // CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %.Self.1, @A, @A(%CC) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness.04abbb.1)] // CHECK:STDOUT: %impl.elem0.loc11_24.1: type = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_24.1 (constants.%impl.elem0.f51d29.1)] // CHECK:STDOUT: %A_where.type: type = facet_type <@A, @A(%CC) where %impl.elem0.loc11_24.1 = %CC> [symbolic = %A_where.type (constants.%A_where.type.4028e0.1)] @@ -246,7 +246,7 @@ fn H(T:! type) { // CHECK:STDOUT: %require_complete => constants.%require_complete.f58 // CHECK:STDOUT: %.Self.binding.as_type => constants.%.Self.binding.as_type // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.9f4820.2 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.7951f9.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.9fa860.2 // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.lookup_impl_witness.04abbb.1 // CHECK:STDOUT: %impl.elem0.loc11_24.1 => constants.%impl.elem0.f51d29.1 // CHECK:STDOUT: %A_where.type => constants.%A_where.type.4028e0.1 @@ -376,7 +376,7 @@ fn H(T:! type) { // CHECK:STDOUT: %.Self.ref: @BB.binding.as_type.as.B.impl.%A.type.loc9_34.2 (%A.type.ade3d9.1) = name_ref .Self, %.Self.3 [symbolic = %.Self.4 (constants.%.Self.660472.1)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type)] // CHECK:STDOUT: %.loc9_42.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type)] -// CHECK:STDOUT: %.loc9_42.2: @BB.binding.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = specific_constant @X.%assoc0, @A(constants.%AA) [symbolic = %assoc0 (constants.%assoc0)] +// CHECK:STDOUT: %.loc9_42.2: @BB.binding.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = specific_constant @X.%assoc0, @A(constants.%AA, constants.%.Self.660472.1) [symbolic = %assoc0 (constants.%assoc0)] // CHECK:STDOUT: %X.ref: @BB.binding.as_type.as.B.impl.%A.assoc_type (%A.assoc_type) = name_ref X, %.loc9_42.2 [symbolic = %assoc0 (constants.%assoc0)] // CHECK:STDOUT: %impl.elem0.loc9_42.1: type = impl_witness_access constants.%A.lookup_impl_witness.04abbb.1, element0 [symbolic = %impl.elem0.loc9_42.2 (constants.%impl.elem0.f51d29.1)] // CHECK:STDOUT: %.loc9_48.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] diff --git a/toolchain/check/testdata/generic/extend_type_completion.carbon b/toolchain/check/testdata/generic/extend_type_completion.carbon index 75f091812dba..b6dd59223f1b 100644 --- a/toolchain/check/testdata/generic/extend_type_completion.carbon +++ b/toolchain/check/testdata/generic/extend_type_completion.carbon @@ -63,7 +63,10 @@ interface J(N:! i32) { extend require impls K(array(i32, N)); } interface I(N:! i32) { - // CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+3]]:24: note: in `J(-1)` used here [ResolvingSpecificHere] + // CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+6]]:24: note: in `J(-1)` used here [ResolvingSpecificHere] + // CHECK:STDERR: extend require impls J(N); + // CHECK:STDERR: ^~~~ + // CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+3]]:24: note: checking for complete facet type `J(-1)` here [RequiringCompleteFacetTypeHere] // CHECK:STDERR: extend require impls J(N); // CHECK:STDERR: ^~~~ extend require impls J(N); @@ -75,7 +78,10 @@ interface I(N:! i32) { // need a location for the type in context.bind_name_map() to use as the // location to Convert(). // -// CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+4]]:1: note: in `I(-1)` used here [ResolvingSpecificHere] +// CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+7]]:1: note: in `I(-1)` used here [ResolvingSpecificHere] +// CHECK:STDERR: var v: I(-1); +// CHECK:STDERR: ^~~~~~~~~~~~ +// CHECK:STDERR: fail_interface_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+4]]:1: note: checking for complete facet type `I(-1)` here [RequiringCompleteFacetTypeHere] // CHECK:STDERR: var v: I(-1); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: @@ -103,14 +109,20 @@ constraint J(N:! i32) { extend require impls K(array(i32, N)); } constraint I(N:! i32) { - // CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+3]]:24: note: in `J(-1)` used here [ResolvingSpecificHere] + // CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+6]]:24: note: in `J(-1)` used here [ResolvingSpecificHere] + // CHECK:STDERR: extend require impls J(N); + // CHECK:STDERR: ^~~~ + // CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+3]]:24: note: checking for complete facet type `J(-1)` here [RequiringCompleteFacetTypeHere] // CHECK:STDERR: extend require impls J(N); // CHECK:STDERR: ^~~~ extend require impls J(N); } // I extends J extends K so the type of K is completed, but is invalid. -// CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+4]]:1: note: in `I(-1)` used here [ResolvingSpecificHere] +// CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+7]]:1: note: in `I(-1)` used here [ResolvingSpecificHere] +// CHECK:STDERR: var v: I(-1); +// CHECK:STDERR: ^~~~~~~~~~~~ +// CHECK:STDERR: fail_constraint_extend_require_impls_does_need_complete_interface.carbon:[[@LINE+4]]:1: note: checking for complete facet type `I(-1)` here [RequiringCompleteFacetTypeHere] // CHECK:STDERR: var v: I(-1); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: diff --git a/toolchain/check/testdata/generic/identify_specific_facet_type.carbon b/toolchain/check/testdata/generic/identify_specific_facet_type.carbon index e6b08fe0d5a6..ed756969f83e 100644 --- a/toolchain/check/testdata/generic/identify_specific_facet_type.carbon +++ b/toolchain/check/testdata/generic/identify_specific_facet_type.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; // Identification tries to form the specific interface `K(array(i32, -1))` which -// is invalid. So the constraint J is seen as having 0 interfaces to impl. +// is invalid, so the impl as a whole is invalid. interface K(T:! type) {} constraint J(N:! i32) { @@ -27,6 +27,9 @@ constraint J(N:! i32) { require impls K(array(i32, N)); } +// TODO: This should be be a "facet type cannot be identified" diagnostic, but +// we need to plumb that diagnoser through the construction of the specific. +// // CHECK:STDERR: fail_error_in_identifying_require_facet_type.carbon:[[@LINE+4]]:12: note: identifying facet type `J(-1)` here [IdentifyingFacetTypeHere] // CHECK:STDERR: impl {} as J(-1) {} // CHECK:STDERR: ^~~~~ @@ -37,22 +40,23 @@ impl {} as J(-1) {} library "[[@TEST_NAME]]"; // Identification tries to form the specific interface `K(array(i32, -1))` which -// is invalid. So the constraint J is seen as having 0 interfaces to impl. -// -// `extend require` is identified in the same way as the non-extend case. +// is invalid, so the impl as a whole is invalid. interface K(T:! type) {} constraint J(N:! i32) { - // CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE+6]]:37: error: array bound of -1 is negative [ArrayBoundNegative] + // CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE+3]]:24: error: array bound of -1 is negative [ArrayBoundNegative] // CHECK:STDERR: extend require impls K(array(i32, N)); - // CHECK:STDERR: ^ - // CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE+3]]:3: note: in `require` used here [ResolvingSpecificHere] - // CHECK:STDERR: extend require impls K(array(i32, N)); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~ extend require impls K(array(i32, N)); } -// CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE+4]]:12: note: identifying facet type `J(-1)` here [IdentifyingFacetTypeHere] +// TODO: This should be be a "facet type cannot be identified" diagnostic, but +// we need to plumb that diagnoser through the construction of the specific. +// +// CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE+7]]:12: note: in `J(-1)` used here [ResolvingSpecificHere] +// CHECK:STDERR: impl {} as J(-1) {} +// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: fail_error_in_identifying_extend_require_facet_type.carbon:[[@LINE+4]]:12: note: checking for complete facet type `J(-1)` here [RequiringCompleteFacetTypeHere] // CHECK:STDERR: impl {} as J(-1) {} // CHECK:STDERR: ^~~~~ // CHECK:STDERR: diff --git a/toolchain/check/testdata/generic/local.carbon b/toolchain/check/testdata/generic/local.carbon index 9c4f400dc029..76ff8c4e2657 100644 --- a/toolchain/check/testdata/generic/local.carbon +++ b/toolchain/check/testdata/generic/local.carbon @@ -81,7 +81,6 @@ class C(C:! type) { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -89,7 +88,8 @@ class C(C:! type) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -162,7 +162,7 @@ class C(C:! type) { // CHECK:STDOUT: %v.var: ref %C.d45 = var %v.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc8_26.1: %struct_type.x.c96 = struct_literal (%int_1) [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_26.1: = bound_method %int_1, %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.loc8_26.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/generic/template/convert.carbon b/toolchain/check/testdata/generic/template/convert.carbon index bee7469e42ae..454705beaa13 100644 --- a/toolchain/check/testdata/generic/template/convert.carbon +++ b/toolchain/check/testdata/generic/template/convert.carbon @@ -82,14 +82,14 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete] // CHECK:STDOUT: %complete_type.f8a: = complete_type_witness %i32.builtin [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Test1.type: type = fn_type @Test1 [concrete] // CHECK:STDOUT: %Test1: %Test1.type = struct_value () [concrete] @@ -100,11 +100,11 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.892: = impl_witness @C.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type: type = fn_type @C.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert: %C.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value %C, (%ImplicitAs.impl_witness.892) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.ee5: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [concrete] // CHECK:STDOUT: %complete_type.54b: = complete_type_witness %struct_type.n [concrete] // CHECK:STDOUT: %Test2.type: type = fn_type @Test2 [concrete] @@ -119,14 +119,14 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %inst.as_compatible.97f: = inst_value [concrete] { // CHECK:STDOUT: %.b3d: %C = as_compatible @F.%x.ref // CHECK:STDOUT: } -// CHECK:STDOUT: %.13d: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] -// CHECK:STDOUT: %inst.splice_block.0b4: = inst_value [concrete] { -// CHECK:STDOUT: %.e50: %i32 = splice_block %.330 { -// CHECK:STDOUT: %impl.elem0.247: %.13d = impl_witness_access %ImplicitAs.impl_witness.892, element0 [concrete = %C.as.ImplicitAs.impl.Convert] -// CHECK:STDOUT: %bound_method: = bound_method %.b3d, %impl.elem0.247 +// CHECK:STDOUT: %.e4e: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.ee5, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %inst.splice_block.f09: = inst_value [concrete] { +// CHECK:STDOUT: %.774: %i32 = splice_block %.9e4 { +// CHECK:STDOUT: %impl.elem0.65e: %.e4e = impl_witness_access %ImplicitAs.impl_witness.892, element0 [concrete = %C.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %bound_method: = bound_method %.b3d, %impl.elem0.65e // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method(%.b3d) -// CHECK:STDOUT: %.d7e: %i32 = value_of_initializer %C.as.ImplicitAs.impl.Convert.call -// CHECK:STDOUT: %.330: %i32 = converted %.b3d, %.d7e +// CHECK:STDOUT: %.6c6: %i32 = value_of_initializer %C.as.ImplicitAs.impl.Convert.call +// CHECK:STDOUT: %.9e4: %i32 = converted %.b3d, %.6c6 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -276,7 +276,7 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %.loc5_16.2: %i32 = splice_inst %.loc5_16.4 // CHECK:STDOUT: %n: %i32 = value_binding n, %.loc5_16.2 // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %n.ref, %specific_fn @@ -300,7 +300,7 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %n.ref: %C.elem = name_ref n, @C.%.loc14 [concrete = @C.%.loc14] // CHECK:STDOUT: %.loc16_50.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc16_50.2: %i32 = acquire_value %.loc16_50.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc16_50.1: = bound_method %.loc16_50.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_50.2: = bound_method %.loc16_50.2, %specific_fn @@ -339,7 +339,7 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.54b // CHECK:STDOUT: %.loc5_16.3 => constants.%inst.as_compatible.97f -// CHECK:STDOUT: %.loc5_16.4 => constants.%inst.splice_block.0b4 +// CHECK:STDOUT: %.loc5_16.4 => constants.%inst.splice_block.f09 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_cannot_convert.carbon @@ -361,14 +361,14 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67db0b.1 [template] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -479,7 +479,7 @@ fn Test(d: D) -> i32 { // CHECK:STDOUT: %.loc11_16.2: %i32 = splice_inst %.loc11_16.4 // CHECK:STDOUT: %n: %i32 = value_binding n, %.loc11_16.2 // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc12_10.1: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc12_10.2: = bound_method %n.ref, %specific_fn diff --git a/toolchain/check/testdata/generic/template/member_access.carbon b/toolchain/check/testdata/generic/template/member_access.carbon index a51b078d57f7..b2f1a5ea63e8 100644 --- a/toolchain/check/testdata/generic/template/member_access.carbon +++ b/toolchain/check/testdata/generic/template/member_access.carbon @@ -104,14 +104,14 @@ fn Test(e: E) { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67db0b.1 [template] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [concrete] @@ -254,7 +254,7 @@ fn Test(e: E) { // CHECK:STDOUT: %.loc5_17.3: %i32 = splice_inst %.loc5_17.7 // CHECK:STDOUT: %n: %i32 = value_binding n, %.loc5_17.3 // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %n.ref, %specific_fn @@ -329,14 +329,14 @@ fn Test(e: E) { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67db0b.1 [template] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %D.elem: type = unbound_element_type %D, %i32 [concrete] @@ -446,7 +446,7 @@ fn Test(e: E) { // CHECK:STDOUT: %.loc8_17.3: %i32 = splice_inst %.loc8_17.7 // CHECK:STDOUT: %n: %i32 = value_binding n, %.loc8_17.3 // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc9_10.1: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_10.2: = bound_method %n.ref, %specific_fn @@ -500,14 +500,14 @@ fn Test(e: E) { // CHECK:STDOUT: %F.d98: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67db0b.1 [template] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] // CHECK:STDOUT: %F.c40: type = class_type @F.loc16 [concrete] @@ -638,7 +638,7 @@ fn Test(e: E) { // CHECK:STDOUT: %.loc11_17.3: %i32 = splice_inst %.loc11_17.7 // CHECK:STDOUT: %n: %i32 = value_binding n, %.loc11_17.3 // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc12_10.1: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc12_10.2: = bound_method %n.ref, %specific_fn diff --git a/toolchain/check/testdata/generic/template/unimplemented.carbon b/toolchain/check/testdata/generic/template/unimplemented.carbon index 0fd3edf638e1..0597c7d3aa74 100644 --- a/toolchain/check/testdata/generic/template/unimplemented.carbon +++ b/toolchain/check/testdata/generic/template/unimplemented.carbon @@ -257,7 +257,7 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %T.765: %Destroy.type = symbolic_binding T, 0, template [template] // CHECK:STDOUT: %pattern_type.cac: type = pattern_type %Destroy.type [concrete] // CHECK:STDOUT: %T.binding.as_type.140: type = symbolic_binding_type T, 0, template, %T.765 [template] -// CHECK:STDOUT: %pattern_type.a64db1.1: type = pattern_type %T.binding.as_type.140 [template] +// CHECK:STDOUT: %pattern_type.a64db1.2: type = pattern_type %T.binding.as_type.140 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.6d1: = require_complete_type %T.binding.as_type.140 [template] @@ -270,13 +270,13 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %T.765, @Destroy [template] -// CHECK:STDOUT: %.11b: type = fn_type_with_self_type %Destroy.Op.type, %T.765 [template] -// CHECK:STDOUT: %impl.elem0.f50: %.11b = impl_witness_access %Destroy.lookup_impl_witness, element0 [template] -// CHECK:STDOUT: %specific_impl_fn.b9c: = specific_impl_function %impl.elem0.f50, @Destroy.Op(%T.765) [template] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.cb2e47.2: type = fn_type @Destroy.WithSelf.Op, @Destroy(%T.765) [template] +// CHECK:STDOUT: %.d5f: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.cb2e47.2, %T.765 [template] +// CHECK:STDOUT: %impl.elem0.a6b: %.d5f = impl_witness_access %Destroy.lookup_impl_witness, element0 [template] +// CHECK:STDOUT: %specific_impl_fn.761: = specific_impl_function %impl.elem0.a6b, @Destroy.WithSelf.Op(%T.765) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -300,8 +300,8 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] { // CHECK:STDOUT: %T.patt: %pattern_type.cac = symbolic_binding_pattern T, 0, template [concrete] -// CHECK:STDOUT: %x.patt: @F.%pattern_type (%pattern_type.a64db1.1) = value_binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @F.%pattern_type (%pattern_type.a64db1.1) = value_param_pattern %x.patt, call_param0 [concrete] +// CHECK:STDOUT: %x.patt: @F.%pattern_type (%pattern_type.a64db1.2) = value_binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @F.%pattern_type (%pattern_type.a64db1.2) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc4_23: type = splice_block %Destroy.ref [concrete = constants.%Destroy.type] { // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] @@ -322,7 +322,7 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: generic fn @F(%T.loc4_15.2: %Destroy.type) { // CHECK:STDOUT: %T.loc4_15.1: %Destroy.type = symbolic_binding T, 0, template [template = %T.loc4_15.1 (constants.%T.765)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, template, %T.loc4_15.1 [template = %T.binding.as_type (constants.%T.binding.as_type.140)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [template = %pattern_type (constants.%pattern_type.a64db1.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %T.binding.as_type [template = %pattern_type (constants.%pattern_type.a64db1.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [template = %require_complete (constants.%require_complete.6d1)] @@ -330,15 +330,16 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %.loc14_3.3: = access_member_action %ImplicitAs.type.loc14_3.1, Convert [template] // CHECK:STDOUT: %.loc14_3.4: type = type_of_inst %.loc14_3.3 [template] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %T.loc4_15.1, @Destroy [template = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] -// CHECK:STDOUT: %.loc14_3.5: type = fn_type_with_self_type constants.%Destroy.Op.type, %T.loc4_15.1 [template = %.loc14_3.5 (constants.%.11b)] -// CHECK:STDOUT: %impl.elem0.loc14_3.2: @F.%.loc14_3.5 (%.11b) = impl_witness_access %Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.f50)] -// CHECK:STDOUT: %specific_impl_fn.loc14_3.2: = specific_impl_function %impl.elem0.loc14_3.2, @Destroy.Op(%T.loc4_15.1) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.b9c)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%T.loc4_15.1) [template = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.cb2e47.2)] +// CHECK:STDOUT: %.loc14_3.5: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %T.loc4_15.1 [template = %.loc14_3.5 (constants.%.d5f)] +// CHECK:STDOUT: %impl.elem0.loc14_3.2: @F.%.loc14_3.5 (%.d5f) = impl_witness_access %Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.a6b)] +// CHECK:STDOUT: %specific_impl_fn.loc14_3.2: = specific_impl_function %impl.elem0.loc14_3.2, @Destroy.WithSelf.Op(%T.loc4_15.1) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.761)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @F.%T.binding.as_type (%T.binding.as_type.140)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { -// CHECK:STDOUT: %v.patt: @F.%pattern_type (%pattern_type.a64db1.1) = ref_binding_pattern v [concrete] -// CHECK:STDOUT: %v.var_patt: @F.%pattern_type (%pattern_type.a64db1.1) = var_pattern %v.patt [concrete] +// CHECK:STDOUT: %v.patt: @F.%pattern_type (%pattern_type.a64db1.2) = ref_binding_pattern v [concrete] +// CHECK:STDOUT: %v.var_patt: @F.%pattern_type (%pattern_type.a64db1.2) = var_pattern %v.patt [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref @F.%T.binding.as_type (%T.binding.as_type.140) = var %v.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] @@ -367,11 +368,11 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %w: ref %i32 = ref_binding w, %w.var // CHECK:STDOUT: %DestroyOp.bound: = bound_method %w.var, constants.%DestroyOp // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%w.var) -// CHECK:STDOUT: %impl.elem0.loc14_3.1: @F.%.loc14_3.5 (%.11b) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.f50)] +// CHECK:STDOUT: %impl.elem0.loc14_3.1: @F.%.loc14_3.5 (%.d5f) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.a6b)] // CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %v.var, %impl.elem0.loc14_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc14_3.1: = specific_impl_function %impl.elem0.loc14_3.1, @Destroy.Op(constants.%T.765) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.b9c)] +// CHECK:STDOUT: %specific_impl_fn.loc14_3.1: = specific_impl_function %impl.elem0.loc14_3.1, @Destroy.WithSelf.Op(constants.%T.765) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.761)] // CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %v.var, %specific_impl_fn.loc14_3.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc14_3.2(%v.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc14_3.2(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -381,6 +382,6 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: specific @F(constants.%T.765) { // CHECK:STDOUT: %T.loc4_15.1 => constants.%T.765 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type.140 -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.a64db1.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.a64db1.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/template_dependence.carbon b/toolchain/check/testdata/generic/template_dependence.carbon index baddcc378247..5971e9f90511 100644 --- a/toolchain/check/testdata/generic/template_dependence.carbon +++ b/toolchain/check/testdata/generic/template_dependence.carbon @@ -45,13 +45,13 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: %require_complete.fbe: = require_complete_type %ptr.125 [template] // CHECK:STDOUT: %require_complete.ef162c.1: = require_complete_type %ptr.e8f8f9.1 [template] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67db0b.1) [template] // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: = lookup_impl_witness %ptr.e8f8f9.1, @Copy [template] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e8f8f9.1, (%Copy.lookup_impl_witness.2e6) [template] -// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [template] -// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [template] -// CHECK:STDOUT: %specific_impl_fn.b84: = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet) [template] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [template] +// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet [template] +// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [template] +// CHECK:STDOUT: %specific_impl_fn.366: = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -96,21 +96,22 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: %.loc6_10.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc5_15.1) [template = %.loc6_10.3 (constants.%.2f2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc5_29.1, @Copy [template = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc5_29.1, (%Copy.lookup_impl_witness) [template = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc6_10.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [template = %.loc6_10.4 (constants.%.b46)] -// CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.4 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [template = %impl.elem0.loc6_10.2 (constants.%impl.elem0.201)] -// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%Copy.facet) [template = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [template = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d82)] +// CHECK:STDOUT: %.loc6_10.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [template = %.loc6_10.4 (constants.%.299)] +// CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.4 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [template = %impl.elem0.loc6_10.2 (constants.%impl.elem0.1c7)] +// CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.WithSelf.Op(%Copy.facet) [template = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @F.%ptr.loc5_30.1 (%ptr.125)) -> out %return.param: @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @F.%ptr.loc5_30.1 (%ptr.125) = name_ref x, %x // CHECK:STDOUT: %.loc6_10.1: ref @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = deref %x.ref // CHECK:STDOUT: %.loc6_10.2: @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = acquire_value %.loc6_10.1 -// CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.4 (%.b46) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [template = %impl.elem0.loc6_10.2 (constants.%impl.elem0.201)] +// CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.4 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [template = %impl.elem0.loc6_10.2 (constants.%impl.elem0.1c7)] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %.loc6_10.2, %impl.elem0.loc6_10.1 -// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%Copy.facet) [template = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [template = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %.loc6_10.2, %specific_impl_fn.loc6_10.1 -// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = call %bound_method.loc6_10.2(%.loc6_10.2) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = call %bound_method.loc6_10.2(%.loc6_10.2) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if/basics.carbon b/toolchain/check/testdata/if/basics.carbon index 1931ebcbccf1..d65c1b37c230 100644 --- a/toolchain/check/testdata/if/basics.carbon +++ b/toolchain/check/testdata/if/basics.carbon @@ -223,10 +223,10 @@ fn VarScope(b: bool) -> bool { // CHECK:STDOUT: %If: %If.type = struct_value () [concrete] // CHECK:STDOUT: %false: bool = bool_literal false [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.348: = impl_witness imports.%Copy.impl_witness_table.3cc [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value bool, (%Copy.impl_witness.348) [concrete] -// CHECK:STDOUT: %.56b: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.6dd: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.86d: type = fn_type_with_self_type %Copy.WithSelf.Op.type.6dd, %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.082: = bound_method %false, %bool.as.Copy.impl.Op [concrete] @@ -269,14 +269,14 @@ fn VarScope(b: bool) -> bool { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] -// CHECK:STDOUT: %impl.elem0.loc6: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc6: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc6: = bound_method %false, %impl.elem0.loc6 [concrete = constants.%bool.as.Copy.impl.Op.bound.082] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc6: init bool = call %bound_method.loc6(%false) [concrete = constants.%false] // CHECK:STDOUT: return %bool.as.Copy.impl.Op.call.loc6 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc8: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc8: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc8: = bound_method %true, %impl.elem0.loc8 [concrete = constants.%bool.as.Copy.impl.Op.bound.12b] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc8: init bool = call %bound_method.loc8(%true) [concrete = constants.%true] // CHECK:STDOUT: return %bool.as.Copy.impl.Op.call.loc8 diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index 1c9f51d3375e..13beedff30bc 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -42,7 +42,6 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -50,21 +49,22 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.6a9) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -144,7 +144,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %x.var: ref %array_type = var %x.var_patt // CHECK:STDOUT: %int_0.loc16_27: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc16_29.1: %tuple.type.985 = tuple_literal (%int_0.loc16_27) [concrete = constants.%tuple.4f2] -// CHECK:STDOUT: %impl.elem0.loc16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_29.1: = bound_method %int_0.loc16_27, %impl.elem0.loc16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_29.2: = bound_method %int_0.loc16_27, %specific_fn.loc16 [concrete = constants.%bound_method] @@ -186,7 +186,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc17_10: %i32 = block_arg !if.expr.result -// CHECK:STDOUT: %impl.elem0.loc17: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc17: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc17_10.1: = bound_method %.loc17_10, %impl.elem0.loc17 // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_10.2: = bound_method %.loc17_10, %specific_fn.loc17 diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index 6f986ec356b3..08410cf044cd 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -53,7 +53,6 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -61,7 +60,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %.e54: Core.Form = init_form %i32, call_param1 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -77,7 +77,6 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] @@ -87,7 +86,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.de4: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] @@ -100,7 +100,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.c3c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.a7b: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.a7b [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.a7b) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet.a7b [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc28 [concrete] @@ -212,7 +213,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: fn @A() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_25.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // 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_25.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.38b] @@ -224,7 +225,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: fn @B() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_25.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // 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.loc16_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.646] @@ -254,7 +255,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc19_10: %i32 = block_arg !if.expr.result -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc19_10.1: = bound_method %.loc19_10, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc19_10.2: = bound_method %.loc19_10, %specific_fn @@ -283,7 +284,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc23_10: %i32 = block_arg !if.expr.result -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc23_10.1: = bound_method %.loc23_10, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc23_10.2: = bound_method %.loc23_10, %specific_fn @@ -299,7 +300,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc27: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc27: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc27_3.1: = bound_method %int_1, %impl.elem0.loc27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_3.2: = bound_method %int_1, %specific_fn.loc27 [concrete = constants.%bound_method.38b] @@ -336,7 +337,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %w.var: ref %ptr.235 = var %w.var_patt // CHECK:STDOUT: %v.ref: ref %i32 = name_ref v, %v // CHECK:STDOUT: %addr: %ptr.235 = addr_of %v.ref -// CHECK:STDOUT: %impl.elem0.loc28: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc28: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc28_40.1: = bound_method %addr, %impl.elem0.loc28 // CHECK:STDOUT: %specific_fn.loc28: = specific_function %impl.elem0.loc28, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc28_40.2: = bound_method %addr, %specific_fn.loc28 @@ -369,7 +370,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %.loc29_11: %ptr.235 = acquire_value %w.ref // CHECK:STDOUT: %.loc29_10.1: ref %i32 = deref %.loc29_11 // CHECK:STDOUT: %.loc29_10.2: %i32 = acquire_value %.loc29_10.1 -// CHECK:STDOUT: %impl.elem0.loc29: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc29: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc29_10.1: = bound_method %.loc29_10.2, %impl.elem0.loc29 // CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc29_10.2: = bound_method %.loc29_10.2, %specific_fn.loc29 @@ -393,7 +394,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc33: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc33: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc33_3.1: = bound_method %int_1, %impl.elem0.loc33 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc33: = specific_function %impl.elem0.loc33, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc33_3.2: = bound_method %int_1, %specific_fn.loc33 [concrete = constants.%bound_method.38b] @@ -428,7 +429,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %w.var: ref %ptr.235 = var %w.var_patt // CHECK:STDOUT: %v.ref: ref %i32 = name_ref v, %v // CHECK:STDOUT: %addr: %ptr.235 = addr_of %v.ref -// CHECK:STDOUT: %impl.elem0.loc34: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc34: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc34_38.1: = bound_method %addr, %impl.elem0.loc34 // CHECK:STDOUT: %specific_fn.loc34: = specific_function %impl.elem0.loc34, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc34_38.2: = bound_method %addr, %specific_fn.loc34 @@ -460,7 +461,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %.loc35_11: %ptr.235 = acquire_value %w.ref // CHECK:STDOUT: %.loc35_10.1: ref %i32 = deref %.loc35_11 // CHECK:STDOUT: %.loc35_10.2: %i32 = acquire_value %.loc35_10.1 -// CHECK:STDOUT: %impl.elem0.loc35: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc35: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc35_10.1: = bound_method %.loc35_10.2, %impl.elem0.loc35 // CHECK:STDOUT: %specific_fn.loc35: = specific_function %impl.elem0.loc35, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc35_10.2: = bound_method %.loc35_10.2, %specific_fn.loc35 diff --git a/toolchain/check/testdata/if_expr/control_flow.carbon b/toolchain/check/testdata/if_expr/control_flow.carbon index 40140a2ddbdb..27a999fa4135 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -35,7 +35,6 @@ fn F(b: bool) -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -43,7 +42,8 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %.e54: Core.Form = init_form %i32, call_param1 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -61,14 +61,14 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -143,7 +143,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @A() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_25.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // 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_25.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.38b] @@ -155,7 +155,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @B() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_25.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // 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.loc16_25.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.646] @@ -185,7 +185,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc19_10: %i32 = block_arg !if.expr.result -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc19_10.1: = bound_method %.loc19_10, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc19_10.2: = bound_method %.loc19_10, %specific_fn diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index 6a5c137a7aa1..d527ff0d1f86 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -35,7 +35,6 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -43,7 +42,8 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -61,14 +61,14 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %bound_method.6d7: = 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: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -149,7 +149,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc16_25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc16_25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc16_25: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16_25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_25.1: = bound_method %int_1, %impl.elem0.loc16_25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc16_25: = specific_function %impl.elem0.loc16_25, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_25.2: = bound_method %int_1, %specific_fn.loc16_25 [concrete = constants.%bound_method.38b] @@ -160,7 +160,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc16_20: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc16_32: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16_32: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_32.1: = bound_method %int_2, %impl.elem0.loc16_32 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc16_32: = specific_function %impl.elem0.loc16_32, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_32.2: = bound_method %int_2, %specific_fn.loc16_32 [concrete = constants.%bound_method.646] @@ -181,7 +181,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_32.loc16_49: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc16_49: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc16_49: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16_49: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_49.1: = bound_method %int_3, %impl.elem0.loc16_49 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc16_49: = specific_function %impl.elem0.loc16_49, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_49.2: = bound_method %int_3, %specific_fn.loc16_49 [concrete = constants.%bound_method.fa7] @@ -192,7 +192,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc16_44: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc16_56: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16_56: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_56.1: = bound_method %int_4, %impl.elem0.loc16_56 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc16_56: = specific_function %impl.elem0.loc16_56, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_56.2: = bound_method %int_4, %specific_fn.loc16_56 [concrete = constants.%bound_method.6d7] @@ -207,7 +207,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc16_10: // CHECK:STDOUT: %.loc16_10: %i32 = block_arg !if.expr.result.loc16_10 -// CHECK:STDOUT: %impl.elem0.loc16_10: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc16_10: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc16_10.1: = bound_method %.loc16_10, %impl.elem0.loc16_10 // CHECK:STDOUT: %specific_fn.loc16_10: = specific_function %impl.elem0.loc16_10, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_10.2: = bound_method %.loc16_10, %specific_fn.loc16_10 diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index e64be08dd670..f500df0c7086 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -43,7 +43,6 @@ fn F(cond: bool) { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -51,7 +50,8 @@ fn F(cond: bool) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -129,7 +129,7 @@ fn F(cond: bool) { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc18_46.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct.4aa] -// CHECK:STDOUT: %impl.elem0.loc18_46.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_46.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_46.1: = bound_method %int_1, %impl.elem0.loc18_46.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc18_46.1: = specific_function %impl.elem0.loc18_46.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_46.2: = bound_method %int_1, %specific_fn.loc18_46.1 [concrete = constants.%bound_method.38b] @@ -137,7 +137,7 @@ fn F(cond: bool) { // CHECK:STDOUT: %.loc18_46.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_46.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_46.3: ref %i32 = struct_access %a.var, element0 // CHECK:STDOUT: %.loc18_46.4: init %i32 to %.loc18_46.3 = in_place_init %.loc18_46.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc18_46.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_46.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_46.3: = bound_method %int_2, %impl.elem0.loc18_46.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc18_46.2: = specific_function %impl.elem0.loc18_46.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_46.4: = bound_method %int_2, %specific_fn.loc18_46.2 [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/impl/assoc_const_self.carbon b/toolchain/check/testdata/impl/assoc_const_self.carbon index 66c907647b36..0f1ca7dde512 100644 --- a/toolchain/check/testdata/impl/assoc_const_self.carbon +++ b/toolchain/check/testdata/impl/assoc_const_self.carbon @@ -72,7 +72,10 @@ interface I(N:! Core.IntLiteral()) { let V:! array(Self, N); } -// CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE+4]]:24: note: in `V` used here [ResolvingSpecificHere] +// CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE+7]]:24: note: in `I(-1)` used here [ResolvingSpecificHere] +// CHECK:STDERR: impl {} as I(-1) where .V = () {} +// CHECK:STDERR: ^~ +// CHECK:STDERR: fail_monomorphization_failure.carbon:[[@LINE+4]]:24: note: checking for complete facet type `I(-1)` here [RequiringCompleteFacetTypeHere] // CHECK:STDERR: impl {} as I(-1) where .V = () {} // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -107,7 +110,7 @@ fn CallF() { // CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type.d31: type = symbolic_binding_type Self, 0, %Self.ab9 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.8a1: %I.assoc_type = assoc_entity element0, @I.%V [concrete] +// CHECK:STDOUT: %assoc0.490: %I.assoc_type = assoc_entity element0, @I.%V [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self] @@ -116,6 +119,8 @@ fn CallF() { // CHECK:STDOUT: %impl.elem0: %.Self.binding.as_type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type.ec3: type = facet_type <@I where %impl.elem0 = %empty_struct> [concrete] // CHECK:STDOUT: %I.impl_witness.df7: = impl_witness @empty_struct_type.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %empty_struct.type.facet: %type = facet_value %empty_struct_type, () [concrete] // CHECK:STDOUT: %I.facet.47f: %I.type = facet_value %empty_struct_type, (%I.impl_witness.df7) [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -124,11 +129,10 @@ fn CallF() { // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %I_where.type.b52: type = facet_type <@I where %impl.elem0 = %int_0.5c6> [concrete] // CHECK:STDOUT: %I.impl_witness.550: = impl_witness @i32.as.I.impl.%I.impl_witness_table [concrete] -// CHECK:STDOUT: %I.facet.608: %I.type = facet_value %i32, (%I.impl_witness.550) [concrete] +// CHECK:STDOUT: %Int.type.facet: %type = facet_value %i32, () [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -136,11 +140,13 @@ fn CallF() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] +// CHECK:STDOUT: %I.facet.608: %I.type = facet_value %i32, (%I.impl_witness.550) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -171,7 +177,7 @@ fn CallF() { // 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.binding.as_type] // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.8a1] +// CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.490] // CHECK:STDOUT: %impl.elem0: %.Self.binding.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc8_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] @@ -189,7 +195,7 @@ fn CallF() { // 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.binding.as_type] // CHECK:STDOUT: %.loc10_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.8a1] +// CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.490] // CHECK:STDOUT: %impl.elem0.loc10_21: %.Self.binding.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc10_15.1: type = where_expr %.Self [concrete = constants.%I_where.type.b52] { @@ -200,26 +206,22 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %V: @V.%Self.binding.as_type (%Self.binding.as_type.d31) = assoc_const_decl @V [concrete] { -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [concrete = constants.%assoc0.8a1] +// CHECK:STDOUT: %Self.loc4: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %V: @I.%Self.binding.as_type (%Self.binding.as_type.d31) = assoc_const_decl @V [concrete] { +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [concrete = constants.%assoc0.490] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .V = @V.%assoc0 // CHECK:STDOUT: witness = (%V) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @V(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.ab9)] -// CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const V:! @V.%Self.binding.as_type (%Self.binding.as_type.d31); -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @empty_struct_type.as.I.impl: %.loc8_7.2 as %.loc8_14 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @empty_struct_type.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.df7] @@ -232,7 +234,7 @@ fn CallF() { // CHECK:STDOUT: impl @i32.as.I.impl: %i32 as %.loc10_15.1 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @i32.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.550] -// CHECK:STDOUT: %impl.elem0.loc10_15: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_15: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_15.1: = bound_method constants.%int_0.5c6, %impl.elem0.loc10_15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc10_15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_15.2: = bound_method constants.%int_0.5c6, %specific_fn [concrete = constants.%bound_method] @@ -245,23 +247,39 @@ fn CallF() { // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%Self.ab9) { -// CHECK:STDOUT: %Self => constants.%Self.ab9 +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self.ab9 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.d31 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%.Self) { -// CHECK:STDOUT: %Self => constants.%.Self +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%.Self // CHECK:STDOUT: %Self.binding.as_type => constants.%.Self.binding.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet.47f) { -// CHECK:STDOUT: %Self => constants.%I.facet.47f +// CHECK:STDOUT: specific @I(constants.%empty_struct.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%empty_struct.type.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%empty_struct_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet.608) { -// CHECK:STDOUT: %Self => constants.%I.facet.608 +// CHECK:STDOUT: specific @I(constants.%I.facet.47f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%I.facet.47f +// CHECK:STDOUT: %Self.binding.as_type => constants.%empty_struct_type +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Int.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Int.type.facet +// CHECK:STDOUT: %Self.binding.as_type => constants.%i32 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet.608) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%I.facet.608 // CHECK:STDOUT: %Self.binding.as_type => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -272,7 +290,7 @@ fn CallF() { // CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type.d31: type = symbolic_binding_type Self, 0, %Self.ab9 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.8a1: %I.assoc_type = assoc_entity element0, @I.%V [concrete] +// CHECK:STDOUT: %assoc0.490: %I.assoc_type = assoc_entity element0, @I.%V [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self] @@ -282,9 +300,11 @@ fn CallF() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %int_0> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @empty_struct_type.as.I.impl.%I.impl_witness_table [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_struct_type, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %empty_struct.type.facet: %type = facet_value %empty_struct_type, () [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_struct_type, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -311,7 +331,7 @@ fn CallF() { // 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.binding.as_type] // CHECK:STDOUT: %.loc15_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.8a1] +// CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.490] // CHECK:STDOUT: %impl.elem0: %.Self.binding.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc15_14.1: type = where_expr %.Self [concrete = constants.%I_where.type] { @@ -322,26 +342,22 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %V: @V.%Self.binding.as_type (%Self.binding.as_type.d31) = assoc_const_decl @V [concrete] { -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [concrete = constants.%assoc0.8a1] +// CHECK:STDOUT: %Self.loc4: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %V: @I.%Self.binding.as_type (%Self.binding.as_type.d31) = assoc_const_decl @V [concrete] { +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [concrete = constants.%assoc0.490] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .V = @V.%assoc0 // CHECK:STDOUT: witness = (%V) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @V(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.ab9)] -// CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const V:! @V.%Self.binding.as_type (%Self.binding.as_type.d31); -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @empty_struct_type.as.I.impl: %.loc15_7.2 as %.loc15_14.1 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @empty_struct_type.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] @@ -352,18 +368,27 @@ fn CallF() { // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%Self.ab9) { -// CHECK:STDOUT: %Self => constants.%Self.ab9 +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self.ab9 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.d31 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%.Self) { -// CHECK:STDOUT: %Self => constants.%.Self +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%.Self // CHECK:STDOUT: %Self.binding.as_type => constants.%.Self.binding.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet) { -// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: specific @I(constants.%empty_struct.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%empty_struct.type.facet +// CHECK:STDOUT: %Self.binding.as_type => constants.%empty_struct_type +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%I.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%empty_struct_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -374,7 +399,7 @@ fn CallF() { // CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type.d31: type = symbolic_binding_type Self, 0, %Self.ab9 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.8a1: %I.assoc_type = assoc_entity element0, @I.%V [concrete] +// CHECK:STDOUT: %assoc0.490: %I.assoc_type = assoc_entity element0, @I.%V [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -384,13 +409,13 @@ fn CallF() { // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.20a: type = facet_type <@ImplicitAs, @ImplicitAs(%C)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness @empty_tuple.type.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.f13: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%C) [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %.b89: Core.Form = init_form %C, call_param1 [concrete] // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] // CHECK:STDOUT: %empty_tuple.type.as.ImplicitAs.impl.Convert.type: type = fn_type @empty_tuple.type.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %empty_tuple.type.as.ImplicitAs.impl.Convert: %empty_tuple.type.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.20a = facet_value %empty_tuple.type, (%ImplicitAs.impl_witness) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.59f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%C, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self] @@ -399,9 +424,11 @@ fn CallF() { // CHECK:STDOUT: %impl.elem0: %.Self.binding.as_type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] -// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] -// CHECK:STDOUT: %.697: type = fn_type_with_self_type %ImplicitAs.Convert.type.f13, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] +// CHECK:STDOUT: %.e9b: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.59f, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %empty_tuple.type.as.ImplicitAs.impl.Convert.bound: = bound_method %empty_tuple, %empty_tuple.type.as.ImplicitAs.impl.Convert [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -437,7 +464,7 @@ fn CallF() { // 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.binding.as_type] // CHECK:STDOUT: %.loc18_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.8a1] +// CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.490] // CHECK:STDOUT: %impl.elem0.loc18_19: %.Self.binding.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc18_25.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] @@ -450,26 +477,22 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %V: @V.%Self.binding.as_type (%Self.binding.as_type.d31) = assoc_const_decl @V [concrete] { -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [concrete = constants.%assoc0.8a1] +// CHECK:STDOUT: %Self.loc4: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %V: @I.%Self.binding.as_type (%Self.binding.as_type.d31) = assoc_const_decl @V [concrete] { +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [concrete = constants.%assoc0.490] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .V = @V.%assoc0 // CHECK:STDOUT: witness = (%V) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @V(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.ab9)] -// CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const V:! @V.%Self.binding.as_type (%Self.binding.as_type.d31); -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.ImplicitAs.impl: %.loc10_7.2 as %ImplicitAs.type { // CHECK:STDOUT: %empty_tuple.type.as.ImplicitAs.impl.Convert.decl: %empty_tuple.type.as.ImplicitAs.impl.Convert.type = fn_decl @empty_tuple.type.as.ImplicitAs.impl.Convert [concrete = constants.%empty_tuple.type.as.ImplicitAs.impl.Convert] { // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = value_binding_pattern self [concrete] @@ -500,7 +523,7 @@ fn CallF() { // CHECK:STDOUT: impl @C.as.I.impl: %C.ref as %.loc18_13.1 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @C.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] -// CHECK:STDOUT: %impl.elem0.loc18_13: %.697 = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%empty_tuple.type.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc18_13: %.e9b = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%empty_tuple.type.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method: = bound_method constants.%empty_tuple, %impl.elem0.loc18_13 [concrete = constants.%empty_tuple.type.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %.loc18_13.2: ref %C = temporary_storage // CHECK:STDOUT: %empty_tuple.type.as.ImplicitAs.impl.Convert.call: init %C to %.loc18_13.2 = call %bound_method(constants.%empty_tuple) @@ -529,18 +552,27 @@ fn CallF() { // CHECK:STDOUT: return %.loc11_42 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%Self.ab9) { -// CHECK:STDOUT: %Self => constants.%Self.ab9 +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self.ab9 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.d31 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%.Self) { -// CHECK:STDOUT: %Self => constants.%.Self +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%.Self // CHECK:STDOUT: %Self.binding.as_type => constants.%.Self.binding.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%I.facet) { -// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: specific @I(constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%C.type.facet +// CHECK:STDOUT: %Self.binding.as_type => constants.%C +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%I.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: @@ -561,15 +593,15 @@ fn CallF() { // CHECK:STDOUT: %Self.binding.as_type.6f3: type = symbolic_binding_type Self, 1, %Self.cad [symbolic] // CHECK:STDOUT: %array_type: type = array_type %N, %Self.binding.as_type.6f3 [symbolic] // CHECK:STDOUT: %I.assoc_type.223: type = assoc_entity_type @I, @I(%N) [symbolic] -// CHECK:STDOUT: %assoc0.e69: %I.assoc_type.223 = assoc_entity element0, @I.%V [symbolic] +// CHECK:STDOUT: %assoc0.b3d: %I.assoc_type.223 = assoc_entity element0, @I.%V [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete] // CHECK:STDOUT: %Negate.impl_witness: = impl_witness imports.%Negate.impl_witness_table [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness) [concrete] -// CHECK:STDOUT: %.826: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.4dd: type = fn_type @Negate.WithSelf.Op, @Negate(%Negate.facet) [concrete] +// CHECK:STDOUT: %.b42: type = fn_type_with_self_type %Negate.WithSelf.Op.type.4dd, %Negate.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.type: type = fn_type @Core.IntLiteral.as.Negate.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op: %Core.IntLiteral.as.Negate.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.bound: = bound_method %int_1, %Core.IntLiteral.as.Negate.impl.Op [concrete] @@ -578,9 +610,8 @@ fn CallF() { // CHECK:STDOUT: %.Self.6e0: %I.type.54b = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Self.575: %I.type.54b = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %I.assoc_type.e1a: type = assoc_entity_type @I, @I(%int_-1) [concrete] -// CHECK:STDOUT: %assoc0.209: %I.assoc_type.e1a = assoc_entity element0, @I.%V [concrete] +// CHECK:STDOUT: %assoc0.578: %I.assoc_type.e1a = assoc_entity element0, @I.%V [concrete] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.6e0 [symbolic_self] -// CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self.6e0, @I, @I(%int_-1) [symbolic_self] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -618,27 +649,25 @@ fn CallF() { // CHECK:STDOUT: %N.loc4_13.2: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_13.1 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @empty_struct_type.as..impl [concrete] {} { -// CHECK:STDOUT: %.loc15_7.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %.loc15_7.2: type = converted %.loc15_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc18_7.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] +// CHECK:STDOUT: %.loc18_7.2: type = converted %.loc18_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %impl.elem1: %.826 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.b42 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %int_1, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op.bound] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.call: init Core.IntLiteral = call %bound_method(%int_1) [concrete = constants.%int_-1] -// CHECK:STDOUT: %.loc15_16.1: Core.IntLiteral = value_of_initializer %Core.IntLiteral.as.Negate.impl.Op.call [concrete = constants.%int_-1] -// CHECK:STDOUT: %.loc15_16.2: Core.IntLiteral = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc15_16.1 [concrete = constants.%int_-1] +// CHECK:STDOUT: %.loc18_16.1: Core.IntLiteral = value_of_initializer %Core.IntLiteral.as.Negate.impl.Op.call [concrete = constants.%int_-1] +// CHECK:STDOUT: %.loc18_16.2: Core.IntLiteral = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc18_16.1 [concrete = constants.%int_-1] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%int_-1)> [concrete = constants.%I.type.54b] // CHECK:STDOUT: %.Self: %I.type.54b = symbolic_binding .Self [symbolic_self = constants.%.Self.6e0] // CHECK:STDOUT: %.Self.ref: %I.type.54b = name_ref .Self, %.Self [symbolic_self = constants.%.Self.6e0] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %.loc15_24.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %.loc15_24.2: %I.assoc_type.e1a = specific_constant @V.%assoc0, @I(constants.%int_-1) [concrete = constants.%assoc0.209] -// CHECK:STDOUT: %V.ref: %I.assoc_type.e1a = name_ref V, %.loc15_24.2 [concrete = constants.%assoc0.209] -// CHECK:STDOUT: %impl.elem0: = impl_witness_access constants.%I.lookup_impl_witness, element0 [concrete = ] -// CHECK:STDOUT: %.loc15_30: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] -// CHECK:STDOUT: %.loc15_18: type = where_expr %.Self [concrete = ] { +// CHECK:STDOUT: %.loc18_24: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] +// CHECK:STDOUT: %V.ref: = name_ref V, [concrete = ] +// CHECK:STDOUT: %.loc18_30: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] +// CHECK:STDOUT: %.loc18_18: type = where_expr %.Self [concrete = ] { // CHECK:STDOUT: requirement_base_facet_type constants.%I.type.54b -// CHECK:STDOUT: requirement_rewrite %impl.elem0, +// CHECK:STDOUT: requirement_rewrite %V.ref, // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -647,20 +676,22 @@ fn CallF() { // CHECK:STDOUT: %N.loc4_13.1: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N.loc4_13.1 (constants.%N)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%N.loc4_13.1)> [symbolic = %I.type (constants.%I.type.68b)] -// CHECK:STDOUT: %Self.loc4_36.2: @I.%I.type (%I.type.68b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_36.2 (constants.%Self.cad)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%N.loc4_13.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.223)] -// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.223) = assoc_entity element0, %V [symbolic = %assoc0 (constants.%assoc0.e69)] +// CHECK:STDOUT: %I.type.loc4: type = facet_type <@I, @I(%N.loc4_13.1)> [symbolic = %I.type.loc4 (constants.%I.type.68b)] +// CHECK:STDOUT: %Self.loc4_36.2: @I.%I.type.loc4 (%I.type.68b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_36.2 (constants.%Self.cad)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_36.1: @I.%I.type (%I.type.68b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_36.2 (constants.%Self.cad)] -// CHECK:STDOUT: %V: @V.%array_type (%array_type) = assoc_const_decl @V [concrete] { -// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.223) = assoc_entity element0, @I.%V [symbolic = @I.%assoc0 (constants.%assoc0.e69)] +// CHECK:STDOUT: %Self.loc4_36.1: @I.%I.type.loc4 (%I.type.68b) = symbolic_binding Self, 1 [symbolic = %Self.loc4_36.2 (constants.%Self.cad)] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %V: @I.%array_type (%array_type) = assoc_const_decl @V [concrete] { +// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.223) = assoc_entity element0, @I.%V [symbolic = @I.%assoc0 (constants.%assoc0.b3d)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_36.1 // CHECK:STDOUT: .N = +// CHECK:STDOUT: .N = // CHECK:STDOUT: .V = @V.%assoc0 // CHECK:STDOUT: witness = (%V) // CHECK:STDOUT: @@ -668,17 +699,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @V(@I.%N.loc4_13.2: Core.IntLiteral, @I.%Self.loc4_36.1: @I.%I.type (%I.type.68b)) { -// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic = %N (constants.%N)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%N)> [symbolic = %I.type (constants.%I.type.68b)] -// CHECK:STDOUT: %Self: @V.%I.type (%I.type.68b) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.cad)] -// CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.6f3)] -// CHECK:STDOUT: %array_type: type = array_type %N, %Self.binding.as_type [symbolic = %array_type (constants.%array_type)] -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const V:! @V.%array_type (%array_type); -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: impl @empty_struct_type.as..impl: %.loc15_7.2 as %.loc15_18 { +// CHECK:STDOUT: impl @empty_struct_type.as..impl: %.loc18_7.2 as %.loc18_18 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = // CHECK:STDOUT: } @@ -687,30 +708,25 @@ fn CallF() { // CHECK:STDOUT: %N.loc4_13.1 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%N, constants.%Self.cad) { -// CHECK:STDOUT: %N => constants.%N -// CHECK:STDOUT: %I.type => constants.%I.type.68b -// CHECK:STDOUT: %Self => constants.%Self.cad -// CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.6f3 -// CHECK:STDOUT: %array_type => constants.%array_type -// CHECK:STDOUT: } +// CHECK:STDOUT: specific @I(constants.%N, constants.%Self.cad) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%int_-1) { // CHECK:STDOUT: %N.loc4_13.1 => constants.%int_-1 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type => constants.%I.type.54b +// CHECK:STDOUT: %I.type.loc4 => constants.%I.type.54b // CHECK:STDOUT: %Self.loc4_36.2 => constants.%Self.575 -// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.e1a -// CHECK:STDOUT: %assoc0 => constants.%assoc0.209 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%int_-1, constants.%.Self.6e0) { -// CHECK:STDOUT: %N => constants.%int_-1 -// CHECK:STDOUT: %I.type => constants.%I.type.54b -// CHECK:STDOUT: %Self => constants.%.Self.6e0 -// CHECK:STDOUT: %Self.binding.as_type => constants.%.Self.binding.as_type +// CHECK:STDOUT: specific @I(constants.%int_-1, constants.%Self.cad) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %N.loc8 => constants.%int_-1 +// CHECK:STDOUT: %I.type.loc8 => constants.%I.type.54b +// CHECK:STDOUT: %Self.loc8 => constants.%Self.cad +// CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.6f3 // CHECK:STDOUT: %array_type => +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.e1a +// CHECK:STDOUT: %assoc0 => constants.%assoc0.578 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_constrained_fn.carbon @@ -720,7 +736,7 @@ fn CallF() { // CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type.d31: type = symbolic_binding_type Self, 0, %Self.ab9 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.8a1: %I.assoc_type = assoc_entity element0, @I.%V [concrete] +// CHECK:STDOUT: %assoc0.490: %I.assoc_type = assoc_entity element0, @I.%V [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.1dc: %I.type = symbolic_binding .Self [symbolic_self] @@ -777,7 +793,7 @@ fn CallF() { // CHECK:STDOUT: %.Self.ref.loc8_54: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.1dc] // CHECK:STDOUT: %.Self.as_type.loc8_54: type = facet_access_type %.Self.ref.loc8_54 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc8_54: type = converted %.Self.ref.loc8_54, %.Self.as_type.loc8_54 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.8a1] +// CHECK:STDOUT: %V.ref: %I.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.490] // CHECK:STDOUT: %impl.elem0: %.Self.binding.as_type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc8_60.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] @@ -794,26 +810,22 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %V: @V.%Self.binding.as_type (%Self.binding.as_type.d31) = assoc_const_decl @V [concrete] { -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [concrete = constants.%assoc0.8a1] +// CHECK:STDOUT: %Self.loc4: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %V: @I.%Self.binding.as_type (%Self.binding.as_type.d31) = assoc_const_decl @V [concrete] { +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%V [concrete = constants.%assoc0.490] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .V = @V.%assoc0 // CHECK:STDOUT: witness = (%V) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @V(@I.%Self: %I.type) { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.ab9)] -// CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const V:! @V.%Self.binding.as_type (%Self.binding.as_type.d31); -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc8_6.2: %I_where.type) { // CHECK:STDOUT: %T.loc8_6.1: %I_where.type = symbolic_binding T, 0 [symbolic = %T.loc8_6.1 (constants.%T)] // CHECK:STDOUT: @@ -827,13 +839,15 @@ fn CallF() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%Self.ab9) { -// CHECK:STDOUT: %Self => constants.%Self.ab9 +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self.ab9 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.d31 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%.Self.1dc) { -// CHECK:STDOUT: %Self => constants.%.Self.1dc +// CHECK:STDOUT: specific @I(constants.%.Self.1dc) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%.Self.1dc // CHECK:STDOUT: %Self.binding.as_type => constants.%.Self.binding.as_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index 4144bbb50115..fd4df4efa22c 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -135,10 +135,10 @@ fn InstanceCallFail() { // CHECK:STDOUT: %pattern_type.8de: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.3cf: Core.Form = init_form %Dest, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %Dest [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert: %ImplicitAs.Convert.type = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Dest, %Self) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert: %ImplicitAs.WithSelf.Convert.type = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %assoc0: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%ImplicitAs.Convert.decl [symbolic] +// CHECK:STDOUT: %assoc0: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%ImplicitAs.WithSelf.Convert.decl [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -157,63 +157,65 @@ fn InstanceCallFail() { // CHECK:STDOUT: %Dest.loc3_22.1: type = symbolic_binding Dest, 0 [symbolic = %Dest.loc3_22.1 (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_22.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.9fe)] -// CHECK:STDOUT: %Self.loc3_35.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] -// CHECK:STDOUT: %ImplicitAs.Convert.type: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest.loc3_22.1) [symbolic = %ImplicitAs.Convert.type (constants.%ImplicitAs.Convert.type)] -// CHECK:STDOUT: %ImplicitAs.Convert: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type) = struct_value () [symbolic = %ImplicitAs.Convert (constants.%ImplicitAs.Convert)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest.loc3_22.1) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type)] -// CHECK:STDOUT: %assoc0.loc4_35.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] +// CHECK:STDOUT: %ImplicitAs.type.loc3: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_22.1)> [symbolic = %ImplicitAs.type.loc3 (constants.%ImplicitAs.type.9fe)] +// CHECK:STDOUT: %Self.loc3_35.2: @ImplicitAs.%ImplicitAs.type.loc3 (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] -// CHECK:STDOUT: %ImplicitAs.Convert.decl: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type) = fn_decl @ImplicitAs.Convert [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert)] { -// CHECK:STDOUT: %self.patt: @ImplicitAs.Convert.%pattern_type.loc4_14 (%pattern_type.8de) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @ImplicitAs.Convert.%pattern_type.loc4_14 (%pattern_type.8de) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @ImplicitAs.Convert.%pattern_type.loc4_28 (%pattern_type.51d) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @ImplicitAs.Convert.%pattern_type.loc4_28 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type.loc3 (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @ImplicitAs [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.decl: @ImplicitAs.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type) = fn_decl @ImplicitAs.WithSelf.Convert [symbolic = @ImplicitAs.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert)] { +// CHECK:STDOUT: %self.patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_14 (%pattern_type.8de) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_14 (%pattern_type.8de) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_28 (%pattern_type.51d) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_28 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @ImplicitAs.%Dest.loc3_22.2 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %.loc4_31.2: Core.Form = init_form %Dest.ref, call_param1 [symbolic = %.loc4_31.1 (constants.%.3cf)] -// CHECK:STDOUT: %self.param: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %.loc4_20.2: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = specific_constant @ImplicitAs.%Self.loc3_35.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = name_ref Self, %.loc4_20.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc4_20.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = specific_constant @ImplicitAs.%Self.loc3_35.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = name_ref Self, %.loc4_20.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc4_20.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @ImplicitAs.Convert.%Dest (%Dest) = out_param call_param1 -// CHECK:STDOUT: %return: ref @ImplicitAs.Convert.%Dest (%Dest) = return_slot %return.param +// CHECK:STDOUT: %self: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %return.param: ref @ImplicitAs.WithSelf.Convert.%Dest (%Dest) = out_param call_param1 +// CHECK:STDOUT: %return: ref @ImplicitAs.WithSelf.Convert.%Dest (%Dest) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc4_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] +// CHECK:STDOUT: %assoc0.loc4_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc3_35.1 // CHECK:STDOUT: .Dest = +// CHECK:STDOUT: .Dest = // CHECK:STDOUT: .Convert = %assoc0.loc4_35.1 -// CHECK:STDOUT: witness = (%ImplicitAs.Convert.decl) +// CHECK:STDOUT: witness = (%ImplicitAs.WithSelf.Convert.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.Convert(@ImplicitAs.%Dest.loc3_22.2: type, @ImplicitAs.%Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe)) { +// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%Dest.loc3_22.2: type, @ImplicitAs.%Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type.loc3 (%ImplicitAs.type.9fe)) { // CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.9fe)] -// CHECK:STDOUT: %Self: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type.loc4_14: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc4_14 (constants.%pattern_type.8de)] // CHECK:STDOUT: %.loc4_31.1: Core.Form = init_form %Dest, call_param1 [symbolic = %.loc4_31.1 (constants.%.3cf)] // CHECK:STDOUT: %pattern_type.loc4_28: type = pattern_type %Dest [symbolic = %pattern_type.loc4_28 (constants.%pattern_type.51d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @ImplicitAs.Convert.%Dest (%Dest); +// CHECK:STDOUT: fn(%self.param: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @ImplicitAs.WithSelf.Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc3_22.1 => constants.%Dest // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs.Convert(constants.%Dest, constants.%Self) { +// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest, constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%Dest, constants.%Self) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9fe // CHECK:STDOUT: %Self => constants.%Self @@ -228,20 +230,22 @@ fn InstanceCallFail() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %NonInstance1.type: type = facet_type <@NonInstance1> [concrete] // CHECK:STDOUT: %Self: %NonInstance1.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %NonInstance1.F1.type: type = fn_type @NonInstance1.F1 [concrete] +// CHECK:STDOUT: %NonInstance1.WithSelf.F1.type.3a6: type = fn_type @NonInstance1.WithSelf.F1, @NonInstance1(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %NonInstance1.F1: %NonInstance1.F1.type = struct_value () [concrete] +// CHECK:STDOUT: %NonInstance1.WithSelf.F1.898: %NonInstance1.WithSelf.F1.type.3a6 = struct_value () [symbolic] // CHECK:STDOUT: %NonInstance1.assoc_type: type = assoc_entity_type @NonInstance1 [concrete] -// CHECK:STDOUT: %assoc0: %NonInstance1.assoc_type = assoc_entity element0, @NonInstance1.%NonInstance1.F1.decl [concrete] +// CHECK:STDOUT: %assoc0: %NonInstance1.assoc_type = assoc_entity element0, @NonInstance1.%NonInstance1.WithSelf.F1.decl [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete] // CHECK:STDOUT: %NonInstance1.impl_witness: = impl_witness @struct_type.a.as.NonInstance1.impl.%NonInstance1.impl_witness_table [concrete] // CHECK:STDOUT: %struct_type.a.as.NonInstance1.impl.F1.type: type = fn_type @struct_type.a.as.NonInstance1.impl.F1 [concrete] // CHECK:STDOUT: %struct_type.a.as.NonInstance1.impl.F1: %struct_type.a.as.NonInstance1.impl.F1.type = struct_value () [concrete] // CHECK:STDOUT: %NonInstance1.facet: %NonInstance1.type = facet_value %struct_type.a, (%NonInstance1.impl_witness) [concrete] +// CHECK:STDOUT: %NonInstance1.WithSelf.F1.type.a2c: type = fn_type @NonInstance1.WithSelf.F1, @NonInstance1(%NonInstance1.facet) [concrete] +// CHECK:STDOUT: %NonInstance1.WithSelf.F1.e33: %NonInstance1.WithSelf.F1.type.a2c = struct_value () [concrete] // CHECK:STDOUT: %NonInstanceCall1.type: type = fn_type @NonInstanceCall1 [concrete] // CHECK:STDOUT: %NonInstanceCall1: %NonInstanceCall1.type = struct_value () [concrete] -// CHECK:STDOUT: %.0cb: type = fn_type_with_self_type %NonInstance1.F1.type, %NonInstance1.facet [concrete] +// CHECK:STDOUT: %.737: type = fn_type_with_self_type %NonInstance1.WithSelf.F1.type.a2c, %NonInstance1.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -260,14 +264,17 @@ fn InstanceCallFail() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @NonInstance1 { -// CHECK:STDOUT: %Self: %NonInstance1.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %NonInstance1.F1.decl: %NonInstance1.F1.type = fn_decl @NonInstance1.F1 [concrete = constants.%NonInstance1.F1] {} {} -// CHECK:STDOUT: %assoc0: %NonInstance1.assoc_type = assoc_entity element0, %NonInstance1.F1.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc3: %NonInstance1.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @NonInstance1 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %NonInstance1.WithSelf.F1.decl: @NonInstance1.%NonInstance1.WithSelf.F1.type (%NonInstance1.WithSelf.F1.type.3a6) = fn_decl @NonInstance1.WithSelf.F1 [symbolic = @NonInstance1.%NonInstance1.WithSelf.F1 (constants.%NonInstance1.WithSelf.F1.898)] {} {} +// CHECK:STDOUT: %assoc0: %NonInstance1.assoc_type = assoc_entity element0, %NonInstance1.WithSelf.F1.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 // CHECK:STDOUT: .F1 = %assoc0 -// CHECK:STDOUT: witness = (%NonInstance1.F1.decl) +// CHECK:STDOUT: witness = (%NonInstance1.WithSelf.F1.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -282,7 +289,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: witness = %NonInstance1.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NonInstance1.F1(@NonInstance1.%Self: %NonInstance1.type) { +// CHECK:STDOUT: generic fn @NonInstance1.WithSelf.F1(@NonInstance1.%Self.loc3: %NonInstance1.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -300,31 +307,47 @@ fn InstanceCallFail() { // CHECK:STDOUT: %F1.ref: %NonInstance1.assoc_type = name_ref F1, @NonInstance1.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %NonInstance1.facet: %NonInstance1.type = facet_value %struct_type.a, (constants.%NonInstance1.impl_witness) [concrete = constants.%NonInstance1.facet] // CHECK:STDOUT: %.loc12_11: %NonInstance1.type = converted %struct_type.a, %NonInstance1.facet [concrete = constants.%NonInstance1.facet] -// CHECK:STDOUT: %impl.elem0: %.0cb = impl_witness_access constants.%NonInstance1.impl_witness, element0 [concrete = constants.%struct_type.a.as.NonInstance1.impl.F1] +// CHECK:STDOUT: %impl.elem0: %.737 = impl_witness_access constants.%NonInstance1.impl_witness, element0 [concrete = constants.%struct_type.a.as.NonInstance1.impl.F1] // CHECK:STDOUT: %struct_type.a.as.NonInstance1.impl.F1.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @NonInstance1.F1(constants.%Self) {} +// CHECK:STDOUT: specific @NonInstance1(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Self +// CHECK:STDOUT: %NonInstance1.WithSelf.F1.type => constants.%NonInstance1.WithSelf.F1.type.3a6 +// CHECK:STDOUT: %NonInstance1.WithSelf.F1 => constants.%NonInstance1.WithSelf.F1.898 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @NonInstance1.F1(constants.%NonInstance1.facet) {} +// CHECK:STDOUT: specific @NonInstance1.WithSelf.F1(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NonInstance1(constants.%NonInstance1.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%NonInstance1.facet +// CHECK:STDOUT: %NonInstance1.WithSelf.F1.type => constants.%NonInstance1.WithSelf.F1.type.a2c +// CHECK:STDOUT: %NonInstance1.WithSelf.F1 => constants.%NonInstance1.WithSelf.F1.e33 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NonInstance1.WithSelf.F1(constants.%NonInstance1.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_non-instance.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %NonInstance2.type: type = facet_type <@NonInstance2> [concrete] // CHECK:STDOUT: %Self.e6c: %NonInstance2.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %NonInstance2.F2.type: type = fn_type @NonInstance2.F2 [concrete] +// CHECK:STDOUT: %NonInstance2.WithSelf.F2.type.824: type = fn_type @NonInstance2.WithSelf.F2, @NonInstance2(%Self.e6c) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %NonInstance2.F2: %NonInstance2.F2.type = struct_value () [concrete] +// CHECK:STDOUT: %NonInstance2.WithSelf.F2.9da: %NonInstance2.WithSelf.F2.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %NonInstance2.assoc_type: type = assoc_entity_type @NonInstance2 [concrete] -// CHECK:STDOUT: %assoc0.a61: %NonInstance2.assoc_type = assoc_entity element0, @NonInstance2.%NonInstance2.F2.decl [concrete] +// CHECK:STDOUT: %assoc0.56f: %NonInstance2.assoc_type = assoc_entity element0, @NonInstance2.%NonInstance2.WithSelf.F2.decl [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %empty_tuple.type} [concrete] // CHECK:STDOUT: %NonInstance2.impl_witness: = impl_witness @struct_type.b.as.NonInstance2.impl.%NonInstance2.impl_witness_table [concrete] // CHECK:STDOUT: %struct_type.b.as.NonInstance2.impl.F2.type: type = fn_type @struct_type.b.as.NonInstance2.impl.F2 [concrete] // CHECK:STDOUT: %struct_type.b.as.NonInstance2.impl.F2: %struct_type.b.as.NonInstance2.impl.F2.type = struct_value () [concrete] // CHECK:STDOUT: %NonInstance2.facet: %NonInstance2.type = facet_value %struct_type.b, (%NonInstance2.impl_witness) [concrete] +// CHECK:STDOUT: %NonInstance2.WithSelf.F2.type.041: type = fn_type @NonInstance2.WithSelf.F2, @NonInstance2(%NonInstance2.facet) [concrete] +// CHECK:STDOUT: %NonInstance2.WithSelf.F2.fc4: %NonInstance2.WithSelf.F2.type.041 = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.d5c: type = pattern_type %struct_type.b [concrete] // CHECK:STDOUT: %NonInstanceCall2.type: type = fn_type @NonInstanceCall2 [concrete] // CHECK:STDOUT: %NonInstanceCall2: %NonInstanceCall2.type = struct_value () [concrete] @@ -334,20 +357,19 @@ fn InstanceCallFail() { // CHECK:STDOUT: %ImplicitAs.type.031: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] // CHECK:STDOUT: %Self.738: %ImplicitAs.type.031 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.ff3: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %assoc0.ad7: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.218 [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6d3: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.50f: %ImplicitAs.Convert.type.6d3 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b3a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Dest, %Self.738) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.1de: %ImplicitAs.WithSelf.Convert.type.b3a = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %Dest [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.738 [symbolic] // CHECK:STDOUT: %pattern_type.e9a: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.3cf: Core.Form = init_form %Dest, call_param1 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.282: type = facet_type <@ImplicitAs, @ImplicitAs(%NonInstance2.type)> [concrete] // CHECK:STDOUT: %Self.df1: %ImplicitAs.type.282 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type.756: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%NonInstance2.type) [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.27b: %ImplicitAs.Convert.type.756 = struct_value () [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.03b: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%NonInstance2.type, %Self.738) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.4fe: %ImplicitAs.WithSelf.Convert.type.03b = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.cd6: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%NonInstance2.type) [concrete] -// CHECK:STDOUT: %assoc0.5c6: %ImplicitAs.assoc_type.cd6 = assoc_entity element0, imports.%Core.import_ref.218 [concrete] -// CHECK:STDOUT: %assoc0.0bc: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.fa2 [symbolic] +// CHECK:STDOUT: %assoc0.af4: %ImplicitAs.assoc_type.cd6 = assoc_entity element0, imports.%Core.import_ref.201 [concrete] +// CHECK:STDOUT: %assoc0.843: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.cc1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -356,14 +378,14 @@ fn InstanceCallFail() { // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//default, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.9ec = import_ref Core//default, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.import_ref.a80: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.0bc)] +// CHECK:STDOUT: %Core.import_ref.178: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.843)] // CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded -// CHECK:STDOUT: %Core.import_ref.b3bc94.1: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.218: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.6d3) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.50f)] -// CHECK:STDOUT: %Core.import_ref.b3bc94.2: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ac4: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.031) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Self (constants.%Self.738)] -// CHECK:STDOUT: %Core.import_ref.fa2 = import_ref Core//default, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.201: @ImplicitAs.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type.b3a) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert.1de)] +// CHECK:STDOUT: %Core.import_ref.b3bc94.2: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Dest.1 (constants.%Dest)] +// CHECK:STDOUT: %Core.import_ref.ac4dc5.2: @ImplicitAs.%ImplicitAs.type.1 (%ImplicitAs.type.031) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Self.1 (constants.%Self.738)] +// CHECK:STDOUT: %Core.import_ref.9ec = import_ref Core//default, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.b3bc94.3: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Dest.1 (constants.%Dest)] +// CHECK:STDOUT: %Core.import_ref.cc1 = import_ref Core//default, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -395,33 +417,32 @@ fn InstanceCallFail() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @NonInstance2 { -// CHECK:STDOUT: %Self: %NonInstance2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.e6c] -// CHECK:STDOUT: %NonInstance2.F2.decl: %NonInstance2.F2.type = fn_decl @NonInstance2.F2 [concrete = constants.%NonInstance2.F2] {} {} -// CHECK:STDOUT: %assoc0: %NonInstance2.assoc_type = assoc_entity element0, %NonInstance2.F2.decl [concrete = constants.%assoc0.a61] +// CHECK:STDOUT: %Self.loc5: %NonInstance2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.e6c] +// CHECK:STDOUT: interface_with_self_decl @NonInstance2 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %NonInstance2.WithSelf.F2.decl: @NonInstance2.%NonInstance2.WithSelf.F2.type (%NonInstance2.WithSelf.F2.type.824) = fn_decl @NonInstance2.WithSelf.F2 [symbolic = @NonInstance2.%NonInstance2.WithSelf.F2 (constants.%NonInstance2.WithSelf.F2.9da)] {} {} +// CHECK:STDOUT: %assoc0: %NonInstance2.assoc_type = assoc_entity element0, %NonInstance2.WithSelf.F2.decl [concrete = constants.%assoc0.56f] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc5 // CHECK:STDOUT: .F2 = %assoc0 -// CHECK:STDOUT: witness = (%NonInstance2.F2.decl) +// CHECK:STDOUT: witness = (%NonInstance2.WithSelf.F2.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.b3bc94.1: type) [from "core.carbon"] { -// CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic = %Dest (constants.%Dest)] +// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.b3bc94.3: type) [from "core.carbon"] { +// CHECK:STDOUT: %Dest.1: type = symbolic_binding Dest, 0 [symbolic = %Dest.1 (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.031)] -// CHECK:STDOUT: %Self: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.738)] -// CHECK:STDOUT: %ImplicitAs.Convert.type: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.Convert.type (constants.%ImplicitAs.Convert.type.6d3)] -// CHECK:STDOUT: %ImplicitAs.Convert: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.6d3) = struct_value () [symbolic = %ImplicitAs.Convert (constants.%ImplicitAs.Convert.50f)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.ff3)] -// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = assoc_entity element0, imports.%Core.import_ref.218 [symbolic = %assoc0 (constants.%assoc0.ad7)] +// CHECK:STDOUT: %ImplicitAs.type.1: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.1)> [symbolic = %ImplicitAs.type.1 (constants.%ImplicitAs.type.031)] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type.1 (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.738)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Core.import_ref.9ec -// CHECK:STDOUT: .Convert = imports.%Core.import_ref.a80 +// CHECK:STDOUT: .Convert = imports.%Core.import_ref.178 // CHECK:STDOUT: witness = (imports.%Core.Convert) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -438,7 +459,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: witness = %NonInstance2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NonInstance2.F2(@NonInstance2.%Self: %NonInstance2.type) { +// CHECK:STDOUT: generic fn @NonInstance2.WithSelf.F2(@NonInstance2.%Self.loc5: %NonInstance2.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -451,15 +472,15 @@ fn InstanceCallFail() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %struct_type.b = name_ref n, %n // CHECK:STDOUT: %NonInstance2.ref: type = name_ref NonInstance2, file.%NonInstance2.decl [concrete = constants.%NonInstance2.type] -// CHECK:STDOUT: %F2.ref: %NonInstance2.assoc_type = name_ref F2, @NonInstance2.%assoc0 [concrete = constants.%assoc0.a61] +// CHECK:STDOUT: %F2.ref: %NonInstance2.assoc_type = name_ref F2, @NonInstance2.%assoc0 [concrete = constants.%assoc0.56f] // CHECK:STDOUT: %.loc21: %NonInstance2.type = converted %n.ref, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.Convert(imports.%Core.import_ref.b3bc94.2: type, imports.%Core.import_ref.ac4: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.031)) [from "core.carbon"] { +// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(imports.%Core.import_ref.b3bc94.2: type, imports.%Core.import_ref.ac4dc5.2: @ImplicitAs.%ImplicitAs.type.1 (%ImplicitAs.type.031)) [from "core.carbon"] { // CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.031)] -// CHECK:STDOUT: %Self: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.738)] +// CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.738)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.e9a)] // CHECK:STDOUT: %.1: Core.Form = init_form %Dest, call_param1 [symbolic = %.1 (constants.%.3cf)] @@ -468,15 +489,31 @@ fn InstanceCallFail() { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @NonInstance2.F2(constants.%Self.e6c) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @NonInstance2.F2(constants.%NonInstance2.facet) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { -// CHECK:STDOUT: %Dest => constants.%Dest +// CHECK:STDOUT: specific @NonInstance2(constants.%Self.e6c) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc6 => constants.%Self.e6c +// CHECK:STDOUT: %NonInstance2.WithSelf.F2.type => constants.%NonInstance2.WithSelf.F2.type.824 +// CHECK:STDOUT: %NonInstance2.WithSelf.F2 => constants.%NonInstance2.WithSelf.F2.9da // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs.Convert(constants.%Dest, constants.%Self.738) { +// CHECK:STDOUT: specific @NonInstance2.WithSelf.F2(constants.%Self.e6c) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NonInstance2(constants.%NonInstance2.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc6 => constants.%NonInstance2.facet +// CHECK:STDOUT: %NonInstance2.WithSelf.F2.type => constants.%NonInstance2.WithSelf.F2.type.041 +// CHECK:STDOUT: %NonInstance2.WithSelf.F2 => constants.%NonInstance2.WithSelf.F2.fc4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NonInstance2.WithSelf.F2(constants.%NonInstance2.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { +// CHECK:STDOUT: %Dest.1 => constants.%Dest +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest, constants.%Self.738) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%Dest, constants.%Self.738) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.031 // CHECK:STDOUT: %Self => constants.%Self.738 @@ -487,15 +524,22 @@ fn InstanceCallFail() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%NonInstance2.type) { -// CHECK:STDOUT: %Dest => constants.%NonInstance2.type +// CHECK:STDOUT: %Dest.1 => constants.%NonInstance2.type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.282 -// CHECK:STDOUT: %Self => constants.%Self.df1 -// CHECK:STDOUT: %ImplicitAs.Convert.type => constants.%ImplicitAs.Convert.type.756 -// CHECK:STDOUT: %ImplicitAs.Convert => constants.%ImplicitAs.Convert.27b +// CHECK:STDOUT: %ImplicitAs.type.1 => constants.%ImplicitAs.type.282 +// CHECK:STDOUT: %Self.1 => constants.%Self.df1 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(constants.%NonInstance2.type, constants.%Self.738) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Dest.2 => constants.%NonInstance2.type +// CHECK:STDOUT: %ImplicitAs.type.2 => constants.%ImplicitAs.type.282 +// CHECK:STDOUT: %Self.2 => constants.%Self.738 +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.03b +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.4fe // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.cd6 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.5c6 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.af4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_non-instance_indirect.carbon @@ -503,17 +547,19 @@ fn InstanceCallFail() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %NonInstance3.type: type = facet_type <@NonInstance3> [concrete] // CHECK:STDOUT: %Self.0da: %NonInstance3.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %NonInstance3.F3.type: type = fn_type @NonInstance3.F3 [concrete] +// CHECK:STDOUT: %NonInstance3.WithSelf.F3.type.c21: type = fn_type @NonInstance3.WithSelf.F3, @NonInstance3(%Self.0da) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %NonInstance3.F3: %NonInstance3.F3.type = struct_value () [concrete] +// CHECK:STDOUT: %NonInstance3.WithSelf.F3.b62: %NonInstance3.WithSelf.F3.type.c21 = struct_value () [symbolic] // CHECK:STDOUT: %NonInstance3.assoc_type: type = assoc_entity_type @NonInstance3 [concrete] -// CHECK:STDOUT: %assoc0.1b9: %NonInstance3.assoc_type = assoc_entity element0, @NonInstance3.%NonInstance3.F3.decl [concrete] +// CHECK:STDOUT: %assoc0.342: %NonInstance3.assoc_type = assoc_entity element0, @NonInstance3.%NonInstance3.WithSelf.F3.decl [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %empty_tuple.type} [concrete] // CHECK:STDOUT: %NonInstance3.impl_witness: = impl_witness @struct_type.c.as.NonInstance3.impl.%NonInstance3.impl_witness_table [concrete] // CHECK:STDOUT: %struct_type.c.as.NonInstance3.impl.F3.type: type = fn_type @struct_type.c.as.NonInstance3.impl.F3 [concrete] // CHECK:STDOUT: %struct_type.c.as.NonInstance3.impl.F3: %struct_type.c.as.NonInstance3.impl.F3.type = struct_value () [concrete] // CHECK:STDOUT: %NonInstance3.facet: %NonInstance3.type = facet_value %struct_type.c, (%NonInstance3.impl_witness) [concrete] +// CHECK:STDOUT: %NonInstance3.WithSelf.F3.type.a3f: type = fn_type @NonInstance3.WithSelf.F3, @NonInstance3(%NonInstance3.facet) [concrete] +// CHECK:STDOUT: %NonInstance3.WithSelf.F3.04b: %NonInstance3.WithSelf.F3.type.a3f = struct_value () [concrete] // CHECK:STDOUT: %ptr: type = ptr_type %struct_type.c [concrete] // CHECK:STDOUT: %pattern_type.5f5: type = pattern_type %ptr [concrete] // CHECK:STDOUT: %NonInstanceCallIndirect.type: type = fn_type @NonInstanceCallIndirect [concrete] @@ -524,20 +570,19 @@ fn InstanceCallFail() { // CHECK:STDOUT: %ImplicitAs.type.031: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] // CHECK:STDOUT: %Self.738: %ImplicitAs.type.031 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.ff3: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %assoc0.ad7: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.218 [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6d3: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.50f: %ImplicitAs.Convert.type.6d3 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b3a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Dest, %Self.738) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.1de: %ImplicitAs.WithSelf.Convert.type.b3a = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %Dest [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.738 [symbolic] // CHECK:STDOUT: %pattern_type.e9a: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.3cf: Core.Form = init_form %Dest, call_param1 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.deb: type = facet_type <@ImplicitAs, @ImplicitAs(%NonInstance3.type)> [concrete] // CHECK:STDOUT: %Self.9cf: %ImplicitAs.type.deb = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type.f03: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%NonInstance3.type) [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.4c3: %ImplicitAs.Convert.type.f03 = struct_value () [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.8ec: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%NonInstance3.type, %Self.738) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.0e4: %ImplicitAs.WithSelf.Convert.type.8ec = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.eea: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%NonInstance3.type) [concrete] -// CHECK:STDOUT: %assoc0.af9: %ImplicitAs.assoc_type.eea = assoc_entity element0, imports.%Core.import_ref.218 [concrete] -// CHECK:STDOUT: %assoc0.0bc: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.fa2 [symbolic] +// CHECK:STDOUT: %assoc0.605: %ImplicitAs.assoc_type.eea = assoc_entity element0, imports.%Core.import_ref.201 [concrete] +// CHECK:STDOUT: %assoc0.843: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.cc1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -546,14 +591,14 @@ fn InstanceCallFail() { // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//default, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %Core.import_ref.9ec = import_ref Core//default, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.import_ref.a80: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.0bc)] +// CHECK:STDOUT: %Core.import_ref.178: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.843)] // CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded -// CHECK:STDOUT: %Core.import_ref.b3bc94.1: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.218: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.6d3) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.50f)] -// CHECK:STDOUT: %Core.import_ref.b3bc94.2: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)] -// CHECK:STDOUT: %Core.import_ref.ac4: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.031) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Self (constants.%Self.738)] -// CHECK:STDOUT: %Core.import_ref.fa2 = import_ref Core//default, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.201: @ImplicitAs.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type.b3a) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert.1de)] +// CHECK:STDOUT: %Core.import_ref.b3bc94.2: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Dest.1 (constants.%Dest)] +// CHECK:STDOUT: %Core.import_ref.ac4dc5.2: @ImplicitAs.%ImplicitAs.type.1 (%ImplicitAs.type.031) = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Self.1 (constants.%Self.738)] +// CHECK:STDOUT: %Core.import_ref.9ec = import_ref Core//default, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.b3bc94.3: type = import_ref Core//default, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%Dest.1 (constants.%Dest)] +// CHECK:STDOUT: %Core.import_ref.cc1 = import_ref Core//default, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -586,33 +631,32 @@ fn InstanceCallFail() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @NonInstance3 { -// CHECK:STDOUT: %Self: %NonInstance3.type = symbolic_binding Self, 0 [symbolic = constants.%Self.0da] -// CHECK:STDOUT: %NonInstance3.F3.decl: %NonInstance3.F3.type = fn_decl @NonInstance3.F3 [concrete = constants.%NonInstance3.F3] {} {} -// CHECK:STDOUT: %assoc0: %NonInstance3.assoc_type = assoc_entity element0, %NonInstance3.F3.decl [concrete = constants.%assoc0.1b9] +// CHECK:STDOUT: %Self.loc5: %NonInstance3.type = symbolic_binding Self, 0 [symbolic = constants.%Self.0da] +// CHECK:STDOUT: interface_with_self_decl @NonInstance3 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %NonInstance3.WithSelf.F3.decl: @NonInstance3.%NonInstance3.WithSelf.F3.type (%NonInstance3.WithSelf.F3.type.c21) = fn_decl @NonInstance3.WithSelf.F3 [symbolic = @NonInstance3.%NonInstance3.WithSelf.F3 (constants.%NonInstance3.WithSelf.F3.b62)] {} {} +// CHECK:STDOUT: %assoc0: %NonInstance3.assoc_type = assoc_entity element0, %NonInstance3.WithSelf.F3.decl [concrete = constants.%assoc0.342] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc5 // CHECK:STDOUT: .F3 = %assoc0 -// CHECK:STDOUT: witness = (%NonInstance3.F3.decl) +// CHECK:STDOUT: witness = (%NonInstance3.WithSelf.F3.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.b3bc94.1: type) [from "core.carbon"] { -// CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic = %Dest (constants.%Dest)] +// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.b3bc94.3: type) [from "core.carbon"] { +// CHECK:STDOUT: %Dest.1: type = symbolic_binding Dest, 0 [symbolic = %Dest.1 (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.031)] -// CHECK:STDOUT: %Self: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.738)] -// CHECK:STDOUT: %ImplicitAs.Convert.type: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.Convert.type (constants.%ImplicitAs.Convert.type.6d3)] -// CHECK:STDOUT: %ImplicitAs.Convert: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.6d3) = struct_value () [symbolic = %ImplicitAs.Convert (constants.%ImplicitAs.Convert.50f)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.ff3)] -// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = assoc_entity element0, imports.%Core.import_ref.218 [symbolic = %assoc0 (constants.%assoc0.ad7)] +// CHECK:STDOUT: %ImplicitAs.type.1: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.1)> [symbolic = %ImplicitAs.type.1 (constants.%ImplicitAs.type.031)] +// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type.1 (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.738)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Core.import_ref.9ec -// CHECK:STDOUT: .Convert = imports.%Core.import_ref.a80 +// CHECK:STDOUT: .Convert = imports.%Core.import_ref.178 // CHECK:STDOUT: witness = (imports.%Core.Convert) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -629,7 +673,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: witness = %NonInstance3.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NonInstance3.F3(@NonInstance3.%Self: %NonInstance3.type) { +// CHECK:STDOUT: generic fn @NonInstance3.WithSelf.F3(@NonInstance3.%Self.loc5: %NonInstance3.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -642,16 +686,16 @@ fn InstanceCallFail() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p // CHECK:STDOUT: %NonInstance3.ref: type = name_ref NonInstance3, file.%NonInstance3.decl [concrete = constants.%NonInstance3.type] -// CHECK:STDOUT: %F3.ref: %NonInstance3.assoc_type = name_ref F3, @NonInstance3.%assoc0 [concrete = constants.%assoc0.1b9] +// CHECK:STDOUT: %F3.ref: %NonInstance3.assoc_type = name_ref F3, @NonInstance3.%assoc0 [concrete = constants.%assoc0.342] // CHECK:STDOUT: %.loc21_4.1: ref %struct_type.c = deref %p.ref // CHECK:STDOUT: %.loc21_4.2: %NonInstance3.type = converted %.loc21_4.1, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.Convert(imports.%Core.import_ref.b3bc94.2: type, imports.%Core.import_ref.ac4: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.031)) [from "core.carbon"] { +// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(imports.%Core.import_ref.b3bc94.2: type, imports.%Core.import_ref.ac4dc5.2: @ImplicitAs.%ImplicitAs.type.1 (%ImplicitAs.type.031)) [from "core.carbon"] { // CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.031)] -// CHECK:STDOUT: %Self: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.738)] +// CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.031) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.738)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.e9a)] // CHECK:STDOUT: %.1: Core.Form = init_form %Dest, call_param1 [symbolic = %.1 (constants.%.3cf)] @@ -660,15 +704,31 @@ fn InstanceCallFail() { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @NonInstance3.F3(constants.%Self.0da) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @NonInstance3.F3(constants.%NonInstance3.facet) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { -// CHECK:STDOUT: %Dest => constants.%Dest +// CHECK:STDOUT: specific @NonInstance3(constants.%Self.0da) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc6 => constants.%Self.0da +// CHECK:STDOUT: %NonInstance3.WithSelf.F3.type => constants.%NonInstance3.WithSelf.F3.type.c21 +// CHECK:STDOUT: %NonInstance3.WithSelf.F3 => constants.%NonInstance3.WithSelf.F3.b62 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs.Convert(constants.%Dest, constants.%Self.738) { +// CHECK:STDOUT: specific @NonInstance3.WithSelf.F3(constants.%Self.0da) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NonInstance3(constants.%NonInstance3.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc6 => constants.%NonInstance3.facet +// CHECK:STDOUT: %NonInstance3.WithSelf.F3.type => constants.%NonInstance3.WithSelf.F3.type.a3f +// CHECK:STDOUT: %NonInstance3.WithSelf.F3 => constants.%NonInstance3.WithSelf.F3.04b +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NonInstance3.WithSelf.F3(constants.%NonInstance3.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { +// CHECK:STDOUT: %Dest.1 => constants.%Dest +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest, constants.%Self.738) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%Dest, constants.%Self.738) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.031 // CHECK:STDOUT: %Self => constants.%Self.738 @@ -679,15 +739,22 @@ fn InstanceCallFail() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%NonInstance3.type) { -// CHECK:STDOUT: %Dest => constants.%NonInstance3.type +// CHECK:STDOUT: %Dest.1 => constants.%NonInstance3.type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.deb -// CHECK:STDOUT: %Self => constants.%Self.9cf -// CHECK:STDOUT: %ImplicitAs.Convert.type => constants.%ImplicitAs.Convert.type.f03 -// CHECK:STDOUT: %ImplicitAs.Convert => constants.%ImplicitAs.Convert.4c3 +// CHECK:STDOUT: %ImplicitAs.type.1 => constants.%ImplicitAs.type.deb +// CHECK:STDOUT: %Self.1 => constants.%Self.9cf +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs(constants.%NonInstance3.type, constants.%Self.738) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Dest.2 => constants.%NonInstance3.type +// CHECK:STDOUT: %ImplicitAs.type.2 => constants.%ImplicitAs.type.deb +// CHECK:STDOUT: %Self.2 => constants.%Self.738 +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type => constants.%ImplicitAs.WithSelf.Convert.type.8ec +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert => constants.%ImplicitAs.WithSelf.Convert.0e4 // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.eea -// CHECK:STDOUT: %assoc0 => constants.%assoc0.af9 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.605 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- instance_success.carbon @@ -697,11 +764,11 @@ fn InstanceCallFail() { // CHECK:STDOUT: %Self: %Instance1.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.97b: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %Instance1.G1.type: type = fn_type @Instance1.G1 [concrete] +// CHECK:STDOUT: %Instance1.WithSelf.G1.type.291: type = fn_type @Instance1.WithSelf.G1, @Instance1(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Instance1.G1: %Instance1.G1.type = struct_value () [concrete] +// CHECK:STDOUT: %Instance1.WithSelf.G1.db7: %Instance1.WithSelf.G1.type.291 = struct_value () [symbolic] // CHECK:STDOUT: %Instance1.assoc_type: type = assoc_entity_type @Instance1 [concrete] -// CHECK:STDOUT: %assoc0: %Instance1.assoc_type = assoc_entity element0, @Instance1.%Instance1.G1.decl [concrete] +// CHECK:STDOUT: %assoc0: %Instance1.assoc_type = assoc_entity element0, @Instance1.%Instance1.WithSelf.G1.decl [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %struct_type.d: type = struct_type {.d: %empty_tuple.type} [concrete] // CHECK:STDOUT: %Instance1.impl_witness: = impl_witness @struct_type.d.as.Instance1.impl.%Instance1.impl_witness_table [concrete] @@ -709,9 +776,11 @@ fn InstanceCallFail() { // CHECK:STDOUT: %struct_type.d.as.Instance1.impl.G1.type: type = fn_type @struct_type.d.as.Instance1.impl.G1 [concrete] // CHECK:STDOUT: %struct_type.d.as.Instance1.impl.G1: %struct_type.d.as.Instance1.impl.G1.type = struct_value () [concrete] // CHECK:STDOUT: %Instance1.facet: %Instance1.type = facet_value %struct_type.d, (%Instance1.impl_witness) [concrete] +// CHECK:STDOUT: %Instance1.WithSelf.G1.type.ba6: type = fn_type @Instance1.WithSelf.G1, @Instance1(%Instance1.facet) [concrete] +// CHECK:STDOUT: %Instance1.WithSelf.G1.ceb: %Instance1.WithSelf.G1.type.ba6 = struct_value () [concrete] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [concrete] // CHECK:STDOUT: %InstanceCall: %InstanceCall.type = struct_value () [concrete] -// CHECK:STDOUT: %.1a6: type = fn_type_with_self_type %Instance1.G1.type, %Instance1.facet [concrete] +// CHECK:STDOUT: %.276: type = fn_type_with_self_type %Instance1.WithSelf.G1.type.ba6, %Instance1.facet [concrete] // CHECK:STDOUT: %ptr: type = ptr_type %struct_type.d [concrete] // CHECK:STDOUT: %pattern_type.8d6: type = pattern_type %ptr [concrete] // CHECK:STDOUT: %InstanceCallIndirect.type: type = fn_type @InstanceCallIndirect [concrete] @@ -760,25 +829,28 @@ fn InstanceCallFail() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Instance1 { -// CHECK:STDOUT: %Self: %Instance1.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Instance1.G1.decl: %Instance1.G1.type = fn_decl @Instance1.G1 [concrete = constants.%Instance1.G1] { -// CHECK:STDOUT: %self.patt: @Instance1.G1.%pattern_type (%pattern_type.97b) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Instance1.G1.%pattern_type (%pattern_type.97b) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc3: %Instance1.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Instance1 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Instance1.WithSelf.G1.decl: @Instance1.%Instance1.WithSelf.G1.type (%Instance1.WithSelf.G1.type.291) = fn_decl @Instance1.WithSelf.G1 [symbolic = @Instance1.%Instance1.WithSelf.G1 (constants.%Instance1.WithSelf.G1.db7)] { +// CHECK:STDOUT: %self.patt: @Instance1.WithSelf.G1.%pattern_type (%pattern_type.97b) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Instance1.WithSelf.G1.%pattern_type (%pattern_type.97b) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @Instance1.G1.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Instance1.WithSelf.G1.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc4_15.1: type = splice_block %.loc4_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %Instance1.type = name_ref Self, @Instance1.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %Instance1.type = name_ref Self, @Instance1.%Self.loc3 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc4_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Instance1.G1.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @Instance1.WithSelf.G1.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %Instance1.assoc_type = assoc_entity element0, %Instance1.G1.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %Instance1.assoc_type = assoc_entity element0, %Instance1.WithSelf.G1.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 // CHECK:STDOUT: .G1 = %assoc0 -// CHECK:STDOUT: witness = (%Instance1.G1.decl) +// CHECK:STDOUT: witness = (%Instance1.WithSelf.G1.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -800,12 +872,12 @@ fn InstanceCallFail() { // CHECK:STDOUT: witness = %Instance1.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Instance1.G1(@Instance1.%Self: %Instance1.type) { +// CHECK:STDOUT: generic fn @Instance1.WithSelf.G1(@Instance1.%Self.loc3: %Instance1.type) { // CHECK:STDOUT: %Self: %Instance1.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.97b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Instance1.G1.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @Instance1.WithSelf.G1.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @struct_type.d.as.Instance1.impl.G1(%self.param: %struct_type.d) { @@ -818,7 +890,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: %n.ref: %struct_type.d = name_ref n, %n // CHECK:STDOUT: %Instance1.ref: type = name_ref Instance1, file.%Instance1.decl [concrete = constants.%Instance1.type] // CHECK:STDOUT: %G1.ref: %Instance1.assoc_type = name_ref G1, @Instance1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.1a6 = impl_witness_access constants.%Instance1.impl_witness, element0 [concrete = constants.%struct_type.d.as.Instance1.impl.G1] +// CHECK:STDOUT: %impl.elem0: %.276 = impl_witness_access constants.%Instance1.impl_witness, element0 [concrete = constants.%struct_type.d.as.Instance1.impl.G1] // CHECK:STDOUT: %bound_method: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %struct_type.d.as.Instance1.impl.G1.call: init %empty_tuple.type = call %bound_method(%n.ref) // CHECK:STDOUT: return @@ -830,7 +902,7 @@ fn InstanceCallFail() { // CHECK:STDOUT: %Instance1.ref: type = name_ref Instance1, file.%Instance1.decl [concrete = constants.%Instance1.type] // CHECK:STDOUT: %G1.ref: %Instance1.assoc_type = name_ref G1, @Instance1.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %.loc16_4.1: ref %struct_type.d = deref %p.ref -// CHECK:STDOUT: %impl.elem0: %.1a6 = impl_witness_access constants.%Instance1.impl_witness, element0 [concrete = constants.%struct_type.d.as.Instance1.impl.G1] +// CHECK:STDOUT: %impl.elem0: %.276 = impl_witness_access constants.%Instance1.impl_witness, element0 [concrete = constants.%struct_type.d.as.Instance1.impl.G1] // CHECK:STDOUT: %bound_method: = bound_method %.loc16_4.1, %impl.elem0 // CHECK:STDOUT: %.loc16_4.2: ref %empty_tuple.type = struct_access %.loc16_4.1, element0 // CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] @@ -841,13 +913,27 @@ fn InstanceCallFail() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Instance1.G1(constants.%Self) { +// CHECK:STDOUT: specific @Instance1(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Self +// CHECK:STDOUT: %Instance1.WithSelf.G1.type => constants.%Instance1.WithSelf.G1.type.291 +// CHECK:STDOUT: %Instance1.WithSelf.G1 => constants.%Instance1.WithSelf.G1.db7 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Instance1.WithSelf.G1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.97b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Instance1.G1(constants.%Instance1.facet) { +// CHECK:STDOUT: specific @Instance1(constants.%Instance1.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Instance1.facet +// CHECK:STDOUT: %Instance1.WithSelf.G1.type => constants.%Instance1.WithSelf.G1.type.ba6 +// CHECK:STDOUT: %Instance1.WithSelf.G1 => constants.%Instance1.WithSelf.G1.ceb +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Instance1.WithSelf.G1(constants.%Instance1.facet) { // CHECK:STDOUT: %Self => constants.%Instance1.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%struct_type.d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.515 @@ -860,11 +946,11 @@ fn InstanceCallFail() { // CHECK:STDOUT: %Self: %Instance2.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.a35: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %Instance2.G2.type: type = fn_type @Instance2.G2 [concrete] +// CHECK:STDOUT: %Instance2.WithSelf.G2.type.e15: type = fn_type @Instance2.WithSelf.G2, @Instance2(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Instance2.G2: %Instance2.G2.type = struct_value () [concrete] +// CHECK:STDOUT: %Instance2.WithSelf.G2.6c8: %Instance2.WithSelf.G2.type.e15 = struct_value () [symbolic] // CHECK:STDOUT: %Instance2.assoc_type: type = assoc_entity_type @Instance2 [concrete] -// CHECK:STDOUT: %assoc0: %Instance2.assoc_type = assoc_entity element0, @Instance2.%Instance2.G2.decl [concrete] +// CHECK:STDOUT: %assoc0: %Instance2.assoc_type = assoc_entity element0, @Instance2.%Instance2.WithSelf.G2.decl [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %struct_type.e: type = struct_type {.e: %empty_tuple.type} [concrete] // CHECK:STDOUT: %Instance2.impl_witness: = impl_witness @struct_type.e.as.Instance2.impl.%Instance2.impl_witness_table [concrete] @@ -872,6 +958,8 @@ fn InstanceCallFail() { // CHECK:STDOUT: %struct_type.e.as.Instance2.impl.G2.type: type = fn_type @struct_type.e.as.Instance2.impl.G2 [concrete] // CHECK:STDOUT: %struct_type.e.as.Instance2.impl.G2: %struct_type.e.as.Instance2.impl.G2.type = struct_value () [concrete] // CHECK:STDOUT: %Instance2.facet: %Instance2.type = facet_value %struct_type.e, (%Instance2.impl_witness) [concrete] +// CHECK:STDOUT: %Instance2.WithSelf.G2.type.008: type = fn_type @Instance2.WithSelf.G2, @Instance2(%Instance2.facet) [concrete] +// CHECK:STDOUT: %Instance2.WithSelf.G2.f23: %Instance2.WithSelf.G2.type.008 = struct_value () [concrete] // CHECK:STDOUT: %InstanceCallFail.type: type = fn_type @InstanceCallFail [concrete] // CHECK:STDOUT: %InstanceCallFail: %InstanceCallFail.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -892,25 +980,28 @@ fn InstanceCallFail() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Instance2 { -// CHECK:STDOUT: %Self: %Instance2.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Instance2.G2.decl: %Instance2.G2.type = fn_decl @Instance2.G2 [concrete = constants.%Instance2.G2] { -// CHECK:STDOUT: %self.patt: @Instance2.G2.%pattern_type (%pattern_type.a35) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Instance2.G2.%pattern_type (%pattern_type.a35) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc3: %Instance2.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Instance2 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Instance2.WithSelf.G2.decl: @Instance2.%Instance2.WithSelf.G2.type (%Instance2.WithSelf.G2.type.e15) = fn_decl @Instance2.WithSelf.G2 [symbolic = @Instance2.%Instance2.WithSelf.G2 (constants.%Instance2.WithSelf.G2.6c8)] { +// CHECK:STDOUT: %self.patt: @Instance2.WithSelf.G2.%pattern_type (%pattern_type.a35) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Instance2.WithSelf.G2.%pattern_type (%pattern_type.a35) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @Instance2.G2.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Instance2.WithSelf.G2.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc4_15.1: type = splice_block %.loc4_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %Instance2.type = name_ref Self, @Instance2.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %Instance2.type = name_ref Self, @Instance2.%Self.loc3 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc4_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Instance2.G2.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @Instance2.WithSelf.G2.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %Instance2.assoc_type = assoc_entity element0, %Instance2.G2.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %Instance2.assoc_type = assoc_entity element0, %Instance2.WithSelf.G2.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 // CHECK:STDOUT: .G2 = %assoc0 -// CHECK:STDOUT: witness = (%Instance2.G2.decl) +// CHECK:STDOUT: witness = (%Instance2.WithSelf.G2.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -932,12 +1023,12 @@ fn InstanceCallFail() { // CHECK:STDOUT: witness = %Instance2.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Instance2.G2(@Instance2.%Self: %Instance2.type) { +// CHECK:STDOUT: generic fn @Instance2.WithSelf.G2(@Instance2.%Self.loc3: %Instance2.type) { // CHECK:STDOUT: %Self: %Instance2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.a35)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Instance2.G2.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @Instance2.WithSelf.G2.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @struct_type.e.as.Instance2.impl.G2(%self.param: %struct_type.e) { @@ -955,13 +1046,27 @@ fn InstanceCallFail() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Instance2.G2(constants.%Self) { +// CHECK:STDOUT: specific @Instance2(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Self +// CHECK:STDOUT: %Instance2.WithSelf.G2.type => constants.%Instance2.WithSelf.G2.type.e15 +// CHECK:STDOUT: %Instance2.WithSelf.G2 => constants.%Instance2.WithSelf.G2.6c8 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Instance2.WithSelf.G2(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a35 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Instance2.G2(constants.%Instance2.facet) { +// CHECK:STDOUT: specific @Instance2(constants.%Instance2.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Instance2.facet +// CHECK:STDOUT: %Instance2.WithSelf.G2.type => constants.%Instance2.WithSelf.G2.type.008 +// CHECK:STDOUT: %Instance2.WithSelf.G2 => constants.%Instance2.WithSelf.G2.f23 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Instance2.WithSelf.G2(constants.%Instance2.facet) { // CHECK:STDOUT: %Self => constants.%Instance2.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%struct_type.e // CHECK:STDOUT: %pattern_type => constants.%pattern_type.efd diff --git a/toolchain/check/testdata/impl/declaration.carbon b/toolchain/check/testdata/impl/declaration.carbon index ddb2c7dd5cf2..cf7a19cbfcd3 100644 --- a/toolchain/check/testdata/impl/declaration.carbon +++ b/toolchain/check/testdata/impl/declaration.carbon @@ -28,6 +28,7 @@ impl i32 as I {} // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @i32.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -60,6 +61,7 @@ impl i32 as I {} // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -76,3 +78,11 @@ impl i32 as I {} // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/empty.carbon b/toolchain/check/testdata/impl/empty.carbon index fb1e408e1905..f067aee64ff9 100644 --- a/toolchain/check/testdata/impl/empty.carbon +++ b/toolchain/check/testdata/impl/empty.carbon @@ -28,6 +28,7 @@ impl i32 as Empty { // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %Empty.impl_witness: = impl_witness @i32.as.Empty.impl.%Empty.impl_witness_table [concrete] +// CHECK:STDOUT: %Empty.facet: %Empty.type = facet_value %i32, (%Empty.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -55,6 +56,7 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { // CHECK:STDOUT: %Self: %Empty.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Empty [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -71,3 +73,11 @@ impl i32 as Empty { // CHECK:STDOUT: witness = %Empty.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%Empty.facet) { +// CHECK:STDOUT: !definition: +// 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 6b138bd31495..a5eb0ebe68d8 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -65,10 +65,10 @@ class X(U:! type) { // CHECK:STDOUT: %Self.c1f: %HasF.type.8a4 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %.41b: Core.Form = init_form %T.67d, call_param0 [symbolic] // CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T.67d [symbolic] -// CHECK:STDOUT: %HasF.F.type.607: type = fn_type @HasF.F, @HasF(%T.67d) [symbolic] -// CHECK:STDOUT: %HasF.F.39f: %HasF.F.type.607 = struct_value () [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.type.246: type = fn_type @HasF.WithSelf.F, @HasF(%T.67d, %Self.c1f) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.58b: %HasF.WithSelf.F.type.246 = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type.196: type = assoc_entity_type @HasF, @HasF(%T.67d) [symbolic] -// CHECK:STDOUT: %assoc0.303: %HasF.assoc_type.196 = assoc_entity element0, @HasF.%HasF.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.b54: %HasF.assoc_type.196 = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %Param: type = class_type @Param [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] @@ -82,15 +82,17 @@ class X(U:! type) { // CHECK:STDOUT: %HasF.type.a3d: type = facet_type <@HasF, @HasF(%Param)> [concrete] // CHECK:STDOUT: %HasF.impl_witness: = impl_witness @C.as.HasF.impl.%HasF.impl_witness_table [concrete] // CHECK:STDOUT: %Self.5e8: %HasF.type.a3d = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %HasF.F.type.f31: type = fn_type @HasF.F, @HasF(%Param) [concrete] -// CHECK:STDOUT: %HasF.F.85a: %HasF.F.type.f31 = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.a94: type = fn_type @HasF.WithSelf.F, @HasF(%Param, %Self.c1f) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.1c0: %HasF.WithSelf.F.type.a94 = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type.078: type = assoc_entity_type @HasF, @HasF(%Param) [concrete] -// CHECK:STDOUT: %assoc0.2b0: %HasF.assoc_type.078 = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %assoc0.22c: %HasF.assoc_type.078 = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [concrete] // CHECK:STDOUT: %.e8f: Core.Form = init_form %Param, call_param0 [concrete] // CHECK:STDOUT: %pattern_type.9ea: type = pattern_type %Param [concrete] // CHECK:STDOUT: %C.as.HasF.impl.F.type: type = fn_type @C.as.HasF.impl.F [concrete] // CHECK:STDOUT: %C.as.HasF.impl.F: %C.as.HasF.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.facet: %HasF.type.a3d = facet_value %C, (%HasF.impl_witness) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.a36: type = fn_type @HasF.WithSelf.F, @HasF(%Param, %HasF.facet) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.753: %HasF.WithSelf.F.type.a36 = 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: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] @@ -99,7 +101,6 @@ class X(U:! type) { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -107,7 +108,8 @@ class X(U:! type) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -117,16 +119,19 @@ class X(U:! type) { // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %.2bf: type = fn_type_with_self_type %HasF.F.type.f31, %HasF.facet [concrete] +// CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.70d: type = fn_type @HasF.WithSelf.F, @HasF(%Param, %C.type.facet) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.489: %HasF.WithSelf.F.type.70d = struct_value () [concrete] +// CHECK:STDOUT: %.095: type = fn_type_with_self_type %HasF.WithSelf.F.type.a36, %HasF.facet [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc22_20 [concrete] @@ -185,32 +190,32 @@ class X(U:! type) { // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_16.1)> [symbolic = %HasF.type (constants.%HasF.type.8a4)] -// CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F, @HasF(%T.loc4_16.1) [symbolic = %HasF.F.type (constants.%HasF.F.type.607)] -// CHECK:STDOUT: %HasF.F: @HasF.%HasF.F.type (%HasF.F.type.607) = struct_value () [symbolic = %HasF.F (constants.%HasF.F.39f)] -// CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF, @HasF(%T.loc4_16.1) [symbolic = %HasF.assoc_type (constants.%HasF.assoc_type.196)] -// CHECK:STDOUT: %assoc0.loc5_14.2: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_14.2 (constants.%assoc0.303)] +// CHECK:STDOUT: %HasF.type.loc4: type = facet_type <@HasF, @HasF(%T.loc4_16.1)> [symbolic = %HasF.type.loc4 (constants.%HasF.type.8a4)] +// CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type.loc4 (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)] -// CHECK:STDOUT: %HasF.F.decl: @HasF.%HasF.F.type (%HasF.F.type.607) = fn_decl @HasF.F [symbolic = @HasF.%HasF.F (constants.%HasF.F.39f)] { -// CHECK:STDOUT: %return.patt: @HasF.F.%pattern_type (%pattern_type.51d1c4.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @HasF.F.%pattern_type (%pattern_type.51d1c4.1) = out_param_pattern %return.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type.loc4 (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)] +// CHECK:STDOUT: interface_with_self_decl @HasF [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.246) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.58b)] { +// CHECK:STDOUT: %return.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.51d1c4.1) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.51d1c4.1) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @HasF.%T.loc4_16.2 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %.loc5_13.2: Core.Form = init_form %T.ref, call_param0 [symbolic = %.loc5_13.1 (constants.%.41b)] -// CHECK:STDOUT: %return.param: ref @HasF.F.%T (%T.67d) = out_param call_param0 -// CHECK:STDOUT: %return: ref @HasF.F.%T (%T.67d) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @HasF.WithSelf.F.%T (%T.67d) = out_param call_param0 +// CHECK:STDOUT: %return: ref @HasF.WithSelf.F.%T (%T.67d) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc5_14.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_14.2 (constants.%assoc0.303)] +// CHECK:STDOUT: %assoc0.loc5_14.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.WithSelf.F.decl [symbolic = %assoc0.loc5_14.2 (constants.%assoc0.b54)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_26.1 // CHECK:STDOUT: .T = +// CHECK:STDOUT: .T = // CHECK:STDOUT: .F = %assoc0.loc5_14.1 // CHECK:STDOUT: .Param = -// CHECK:STDOUT: witness = (%HasF.F.decl) +// CHECK:STDOUT: witness = (%HasF.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -265,19 +270,19 @@ class X(U:! type) { // CHECK:STDOUT: extend @C.as.HasF.impl.%HasF.type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(@HasF.%T.loc4_16.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4)) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_16.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type.loc4 (%HasF.type.8a4)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %.loc5_13.1: Core.Form = init_form %T, call_param0 [symbolic = %.loc5_13.1 (constants.%.41b)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d1c4.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @HasF.F.%T (%T.67d); +// CHECK:STDOUT: fn() -> out %return.param: @HasF.WithSelf.F.%T (%T.67d); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.HasF.impl.F() -> out %return.param: %Param { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc15_21.1: %struct_type.x.c96 = struct_literal (%int_2) [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_21.1: = bound_method %int_2, %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_21.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method] @@ -296,9 +301,9 @@ class X(U:! type) { // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %.loc21_17: %HasF.assoc_type.078 = specific_constant @HasF.%assoc0.loc5_14.1, @HasF(constants.%Param) [concrete = constants.%assoc0.2b0] -// CHECK:STDOUT: %F.ref.loc21: %HasF.assoc_type.078 = name_ref F, %.loc21_17 [concrete = constants.%assoc0.2b0] -// CHECK:STDOUT: %impl.elem0.loc21: %.2bf = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] +// CHECK:STDOUT: %.loc21_17: %HasF.assoc_type.078 = specific_constant @HasF.%assoc0.loc5_14.1, @HasF(constants.%Param, constants.%C.type.facet) [concrete = constants.%assoc0.22c] +// CHECK:STDOUT: %F.ref.loc21: %HasF.assoc_type.078 = name_ref F, %.loc21_17 [concrete = constants.%assoc0.22c] +// CHECK:STDOUT: %impl.elem0.loc21: %.095 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] // CHECK:STDOUT: %.loc21_20.1: ref %Param = temporary_storage // CHECK:STDOUT: %C.as.HasF.impl.F.call.loc21: init %Param to %.loc21_20.1 = call %impl.elem0.loc21() // CHECK:STDOUT: %.loc21_20.2: ref %Param = temporary %.loc21_20.1, %C.as.HasF.impl.F.call.loc21 @@ -316,16 +321,16 @@ class X(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %i32 = var %b.var_patt // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %.loc22_17: %HasF.assoc_type.078 = specific_constant @HasF.%assoc0.loc5_14.1, @HasF(constants.%Param) [concrete = constants.%assoc0.2b0] -// CHECK:STDOUT: %F.ref.loc22: %HasF.assoc_type.078 = name_ref F, %.loc22_17 [concrete = constants.%assoc0.2b0] -// CHECK:STDOUT: %impl.elem0.loc22_17: %.2bf = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] +// CHECK:STDOUT: %.loc22_17: %HasF.assoc_type.078 = specific_constant @HasF.%assoc0.loc5_14.1, @HasF(constants.%Param, constants.%C.type.facet) [concrete = constants.%assoc0.22c] +// CHECK:STDOUT: %F.ref.loc22: %HasF.assoc_type.078 = name_ref F, %.loc22_17 [concrete = constants.%assoc0.22c] +// CHECK:STDOUT: %impl.elem0.loc22_17: %.095 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] // CHECK:STDOUT: %.loc22_20.1: ref %Param = temporary_storage // CHECK:STDOUT: %C.as.HasF.impl.F.call.loc22: init %Param to %.loc22_20.1 = call %impl.elem0.loc22_17() // CHECK:STDOUT: %.loc22_20.2: ref %Param = temporary %.loc22_20.1, %C.as.HasF.impl.F.call.loc22 // CHECK:STDOUT: %x.ref.loc22: %Param.elem = name_ref x, @Param.%.loc9 [concrete = @Param.%.loc9] // CHECK:STDOUT: %.loc22_21.1: ref %i32 = class_element_access %.loc22_20.2, element0 // CHECK:STDOUT: %.loc22_21.2: %i32 = acquire_value %.loc22_21.1 -// CHECK:STDOUT: %impl.elem0.loc22_21: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc22_21: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc22_21.1: = bound_method %.loc22_21.2, %impl.elem0.loc22_21 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc22_21, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc22_21.2: = bound_method %.loc22_21.2, %specific_fn @@ -353,7 +358,9 @@ class X(U:! type) { // CHECK:STDOUT: %T.loc4_16.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%T.67d, constants.%Self.c1f) { +// CHECK:STDOUT: specific @HasF(constants.%T.67d, constants.%Self.c1f) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%T.67d, constants.%Self.c1f) { // CHECK:STDOUT: %T => constants.%T.67d // CHECK:STDOUT: %.loc5_13.1 => constants.%.41b // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.1 @@ -363,20 +370,49 @@ class X(U:! type) { // CHECK:STDOUT: %T.loc4_16.1 => constants.%Param // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %HasF.type => constants.%HasF.type.a3d +// CHECK:STDOUT: %HasF.type.loc4 => constants.%HasF.type.a3d // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.5e8 -// CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.f31 -// CHECK:STDOUT: %HasF.F => constants.%HasF.F.85a -// CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.078 -// CHECK:STDOUT: %assoc0.loc5_14.2 => constants.%assoc0.2b0 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%Param, constants.%HasF.facet) { +// CHECK:STDOUT: specific @HasF(constants.%Param, constants.%Self.c1f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%Param +// CHECK:STDOUT: %HasF.type.loc5 => constants.%HasF.type.a3d +// CHECK:STDOUT: %Self.loc5 => constants.%Self.c1f +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.a94 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.1c0 +// CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.078 +// CHECK:STDOUT: %assoc0.loc5_14.2 => constants.%assoc0.22c +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%Param, constants.%HasF.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%Param +// CHECK:STDOUT: %HasF.type.loc5 => constants.%HasF.type.a3d +// CHECK:STDOUT: %Self.loc5 => constants.%HasF.facet +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.a36 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.753 +// CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.078 +// CHECK:STDOUT: %assoc0.loc5_14.2 => constants.%assoc0.22c +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Param, constants.%HasF.facet) { // CHECK:STDOUT: %T => constants.%Param // CHECK:STDOUT: %.loc5_13.1 => constants.%.e8f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9ea // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%Param, constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%Param +// CHECK:STDOUT: %HasF.type.loc5 => constants.%HasF.type.a3d +// CHECK:STDOUT: %Self.loc5 => constants.%C.type.facet +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.70d +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.489 +// CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.078 +// CHECK:STDOUT: %assoc0.loc5_14.2 => constants.%assoc0.22c +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- extend_impl_generic_class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -391,10 +427,10 @@ class X(U:! type) { // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.fdb544.1 [symbolic] // CHECK:STDOUT: %pattern_type.a8a: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %pattern_type.51d1c4.1: type = pattern_type %T [symbolic] -// CHECK:STDOUT: %I.F.type.93703d.1: type = fn_type @I.F, @I(%T) [symbolic] -// CHECK:STDOUT: %I.F.a37974.1: %I.F.type.93703d.1 = struct_value () [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.1d69d8.1: type = fn_type @I.WithSelf.F, @I(%T, %Self.fdb544.1) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.cd4fc9.1: %I.WithSelf.F.type.1d69d8.1 = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type.76c031.1: type = assoc_entity_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %assoc0.6a687a.1: %I.assoc_type.76c031.1 = assoc_entity element0, @I.%I.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.203667.1: %I.assoc_type.76c031.1 = assoc_entity element0, @I.%I.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %X.type: type = generic_class_type @X [concrete] // CHECK:STDOUT: %X.generic: %X.type = struct_value () [concrete] @@ -402,16 +438,18 @@ class X(U:! type) { // CHECK:STDOUT: %I.type.1ab3e4.2: type = facet_type <@I, @I(%U)> [symbolic] // CHECK:STDOUT: %I.impl_witness: = impl_witness @X.as.I.impl.%I.impl_witness_table, @X.as.I.impl(%U) [symbolic] // CHECK:STDOUT: %Self.fdb544.2: %I.type.1ab3e4.2 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %I.F.type.93703d.2: type = fn_type @I.F, @I(%U) [symbolic] -// CHECK:STDOUT: %I.F.a37974.2: %I.F.type.93703d.2 = struct_value () [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.1d69d8.2: type = fn_type @I.WithSelf.F, @I(%U, %Self.fdb544.1) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.cd4fc9.2: %I.WithSelf.F.type.1d69d8.2 = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type.76c031.2: type = assoc_entity_type @I, @I(%U) [symbolic] -// CHECK:STDOUT: %assoc0.6a687a.2: %I.assoc_type.76c031.2 = assoc_entity element0, @I.%I.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.203667.2: %I.assoc_type.76c031.2 = assoc_entity element0, @I.%I.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %require_complete.e36: = require_complete_type %I.type.1ab3e4.2 [symbolic] // CHECK:STDOUT: %pattern_type.e07: type = pattern_type %X [symbolic] // CHECK:STDOUT: %pattern_type.51d1c4.2: type = pattern_type %U [symbolic] // CHECK:STDOUT: %X.as.I.impl.F.type: type = fn_type @X.as.I.impl.F, @X.as.I.impl(%U) [symbolic] // CHECK:STDOUT: %X.as.I.impl.F: %X.as.I.impl.F.type = struct_value () [symbolic] // CHECK:STDOUT: %I.facet: %I.type.1ab3e4.2 = facet_value %X, (%I.impl_witness) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.94a: type = fn_type @I.WithSelf.F, @I(%U, %I.facet) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.8fe: %I.WithSelf.F.type.94a = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %require_complete.5dd: = require_complete_type %X [symbolic] @@ -450,41 +488,41 @@ class X(U:! type) { // CHECK:STDOUT: %T.loc4_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc4_13.1)> [symbolic = %I.type (constants.%I.type.1ab3e4.1)] -// CHECK:STDOUT: %Self.loc4_23.2: @I.%I.type (%I.type.1ab3e4.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.fdb544.1)] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F, @I(%T.loc4_13.1) [symbolic = %I.F.type (constants.%I.F.type.93703d.1)] -// CHECK:STDOUT: %I.F: @I.%I.F.type (%I.F.type.93703d.1) = struct_value () [symbolic = %I.F (constants.%I.F.a37974.1)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc4_13.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.76c031.1)] -// CHECK:STDOUT: %assoc0.loc5_25.2: @I.%I.assoc_type (%I.assoc_type.76c031.1) = assoc_entity element0, %I.F.decl [symbolic = %assoc0.loc5_25.2 (constants.%assoc0.6a687a.1)] +// CHECK:STDOUT: %I.type.loc4: type = facet_type <@I, @I(%T.loc4_13.1)> [symbolic = %I.type.loc4 (constants.%I.type.1ab3e4.1)] +// CHECK:STDOUT: %Self.loc4_23.2: @I.%I.type.loc4 (%I.type.1ab3e4.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.fdb544.1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_23.1: @I.%I.type (%I.type.1ab3e4.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.fdb544.1)] -// CHECK:STDOUT: %I.F.decl: @I.%I.F.type (%I.F.type.93703d.1) = fn_decl @I.F [symbolic = @I.%I.F (constants.%I.F.a37974.1)] { -// CHECK:STDOUT: %self.patt: @I.F.%pattern_type.loc5_8 (%pattern_type.a8a) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type.loc5_8 (%pattern_type.a8a) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %t.patt: @I.F.%pattern_type.loc5_20 (%pattern_type.51d1c4.1) = value_binding_pattern t [concrete] -// CHECK:STDOUT: %t.param_patt: @I.F.%pattern_type.loc5_20 (%pattern_type.51d1c4.1) = value_param_pattern %t.patt, call_param1 [concrete] +// CHECK:STDOUT: %Self.loc4_23.1: @I.%I.type.loc4 (%I.type.1ab3e4.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.fdb544.1)] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.1d69d8.1) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.cd4fc9.1)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type.loc5_8 (%pattern_type.a8a) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type.loc5_8 (%pattern_type.a8a) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %t.patt: @I.WithSelf.F.%pattern_type.loc5_20 (%pattern_type.51d1c4.1) = value_binding_pattern t [concrete] +// CHECK:STDOUT: %t.param_patt: @I.WithSelf.F.%pattern_type.loc5_20 (%pattern_type.51d1c4.1) = value_param_pattern %t.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %.loc5_14.2: @I.F.%I.type (%I.type.1ab3e4.1) = specific_constant @I.%Self.loc4_23.1, @I(constants.%T) [symbolic = %Self (constants.%Self.fdb544.1)] -// CHECK:STDOUT: %Self.ref: @I.F.%I.type (%I.type.1ab3e4.1) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.fdb544.1)] +// CHECK:STDOUT: %.loc5_14.2: @I.WithSelf.F.%I.type (%I.type.1ab3e4.1) = specific_constant @I.%Self.loc4_23.1, @I(constants.%T) [symbolic = %Self (constants.%Self.fdb544.1)] +// CHECK:STDOUT: %Self.ref: @I.WithSelf.F.%I.type (%I.type.1ab3e4.1) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.fdb544.1)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param -// CHECK:STDOUT: %t.param: @I.F.%T (%T) = value_param call_param1 +// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %t.param: @I.WithSelf.F.%T (%T) = value_param call_param1 // CHECK:STDOUT: %T.ref: type = name_ref T, @I.%T.loc4_13.2 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %t: @I.F.%T (%T) = value_binding t, %t.param +// CHECK:STDOUT: %t: @I.WithSelf.F.%T (%T) = value_binding t, %t.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc5_25.1: @I.%I.assoc_type (%I.assoc_type.76c031.1) = assoc_entity element0, %I.F.decl [symbolic = %assoc0.loc5_25.2 (constants.%assoc0.6a687a.1)] +// CHECK:STDOUT: %assoc0.loc5_25.1: @I.%I.assoc_type (%I.assoc_type.76c031.1) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc5_25.2 (constants.%assoc0.203667.1)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_23.1 // CHECK:STDOUT: .T = +// CHECK:STDOUT: .T = // CHECK:STDOUT: .F = %assoc0.loc5_25.1 // CHECK:STDOUT: .U = -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -554,15 +592,15 @@ class X(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%T.loc4_13.2: type, @I.%Self.loc4_23.1: @I.%I.type (%I.type.1ab3e4.1)) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc4_13.2: type, @I.%Self.loc4_23.1: @I.%I.type.loc4 (%I.type.1ab3e4.1)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab3e4.1)] -// CHECK:STDOUT: %Self: @I.F.%I.type (%I.type.1ab3e4.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.fdb544.1)] +// CHECK:STDOUT: %Self: @I.WithSelf.F.%I.type (%I.type.1ab3e4.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.fdb544.1)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.a8a)] // CHECK:STDOUT: %pattern_type.loc5_20: type = pattern_type %T [symbolic = %pattern_type.loc5_20 (constants.%pattern_type.51d1c4.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type), %t.param: @I.F.%T (%T)); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type), %t.param: @I.WithSelf.F.%T (%T)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @X.as.I.impl.F(@X.%U.loc8_9.2: type) { @@ -587,7 +625,9 @@ class X(U:! type) { // CHECK:STDOUT: %T.loc4_13.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%T, constants.%Self.fdb544.1) { +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.fdb544.1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%T, constants.%Self.fdb544.1) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.1ab3e4.1 // CHECK:STDOUT: %Self => constants.%Self.fdb544.1 @@ -608,12 +648,8 @@ class X(U:! type) { // CHECK:STDOUT: %T.loc4_13.1 => constants.%U // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type => constants.%I.type.1ab3e4.2 +// CHECK:STDOUT: %I.type.loc4 => constants.%I.type.1ab3e4.2 // CHECK:STDOUT: %Self.loc4_23.2 => constants.%Self.fdb544.2 -// CHECK:STDOUT: %I.F.type => constants.%I.F.type.93703d.2 -// CHECK:STDOUT: %I.F => constants.%I.F.a37974.2 -// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.76c031.2 -// CHECK:STDOUT: %assoc0.loc5_25.2 => constants.%assoc0.6a687a.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X.as.I.impl(constants.%U) { @@ -628,6 +664,17 @@ class X(U:! type) { // CHECK:STDOUT: %X.as.I.impl.F => constants.%X.as.I.impl.F // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%U, constants.%Self.fdb544.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%U +// CHECK:STDOUT: %I.type.loc5 => constants.%I.type.1ab3e4.2 +// CHECK:STDOUT: %Self.loc5 => constants.%Self.fdb544.1 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.1d69d8.2 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.cd4fc9.2 +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.76c031.2 +// CHECK:STDOUT: %assoc0.loc5_25.2 => constants.%assoc0.203667.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @X.as.I.impl.F(constants.%U) { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: %X => constants.%X @@ -637,7 +684,18 @@ class X(U:! type) { // CHECK:STDOUT: %pattern_type.loc10_22 => constants.%pattern_type.51d1c4.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%U, constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%U, constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%U +// CHECK:STDOUT: %I.type.loc5 => constants.%I.type.1ab3e4.2 +// CHECK:STDOUT: %Self.loc5 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.94a +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.8fe +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.76c031.2 +// CHECK:STDOUT: %assoc0.loc5_25.2 => constants.%assoc0.203667.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%U, constants.%I.facet) { // CHECK:STDOUT: %T => constants.%U // CHECK:STDOUT: %I.type => constants.%I.type.1ab3e4.2 // CHECK:STDOUT: %Self => constants.%I.facet diff --git a/toolchain/check/testdata/impl/fail_alias.carbon b/toolchain/check/testdata/impl/fail_alias.carbon index f005e4c61fa3..b3f9926f18ea 100644 --- a/toolchain/check/testdata/impl/fail_alias.carbon +++ b/toolchain/check/testdata/impl/fail_alias.carbon @@ -38,6 +38,7 @@ impl AC as AI {} // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.e47215.1.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -65,6 +66,7 @@ impl AC as AI {} // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -94,3 +96,11 @@ impl AC as AI {} // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// 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 251b51f64039..f38485e5abd3 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -35,11 +35,11 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %Self: %Simple.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.5e9: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %Simple.G.type: type = fn_type @Simple.G [concrete] +// CHECK:STDOUT: %Simple.WithSelf.G.type.d78: type = fn_type @Simple.WithSelf.G, @Simple(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Simple.G: %Simple.G.type = struct_value () [concrete] +// CHECK:STDOUT: %Simple.WithSelf.G.41d: %Simple.WithSelf.G.type.d78 = struct_value () [symbolic] // CHECK:STDOUT: %Simple.assoc_type: type = assoc_entity_type @Simple [concrete] -// CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, @Simple.%Simple.G.decl [concrete] +// CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, @Simple.%Simple.WithSelf.G.decl [concrete] // 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] @@ -48,12 +48,14 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %i32.as.Simple.impl.G.type.32ad7a.1: type = fn_type @i32.as.Simple.impl.G.loc24_27.1 [concrete] // CHECK:STDOUT: %i32.as.Simple.impl.G.4f6260.1: %i32.as.Simple.impl.G.type.32ad7a.1 = struct_value () [concrete] // CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %i32, (%Simple.impl_witness) [concrete] +// CHECK:STDOUT: %Simple.WithSelf.G.type.9d9: type = fn_type @Simple.WithSelf.G, @Simple(%Simple.facet) [concrete] +// CHECK:STDOUT: %Simple.WithSelf.G.26c: %Simple.WithSelf.G.type.9d9 = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %i32.as.Simple.impl.G.type.32ad7a.2: type = fn_type @i32.as.Simple.impl.G.loc24_27.2 [concrete] // CHECK:STDOUT: %i32.as.Simple.impl.G.4f6260.2: %i32.as.Simple.impl.G.type.32ad7a.2 = struct_value () [concrete] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [concrete] // CHECK:STDOUT: %InstanceCall: %InstanceCall.type = struct_value () [concrete] -// CHECK:STDOUT: %.93d: type = fn_type_with_self_type %Simple.G.type, %Simple.facet [concrete] +// CHECK:STDOUT: %.a46: type = fn_type_with_self_type %Simple.WithSelf.G.type.9d9, %Simple.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -93,25 +95,28 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: %Simple.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Simple.G.decl: %Simple.G.type = fn_decl @Simple.G [concrete = constants.%Simple.G] { -// CHECK:STDOUT: %self.patt: @Simple.G.%pattern_type (%pattern_type.5e9) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Simple.G.%pattern_type (%pattern_type.5e9) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc15: %Simple.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Simple [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Simple.WithSelf.G.decl: @Simple.%Simple.WithSelf.G.type (%Simple.WithSelf.G.type.d78) = fn_decl @Simple.WithSelf.G [symbolic = @Simple.%Simple.WithSelf.G (constants.%Simple.WithSelf.G.41d)] { +// CHECK:STDOUT: %self.patt: @Simple.WithSelf.G.%pattern_type (%pattern_type.5e9) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Simple.WithSelf.G.%pattern_type (%pattern_type.5e9) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @Simple.G.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Simple.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self.loc15 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc16_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Simple.G.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @Simple.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, %Simple.G.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, %Simple.WithSelf.G.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .G = %assoc0 -// CHECK:STDOUT: witness = (%Simple.G.decl) +// CHECK:STDOUT: witness = (%Simple.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -141,12 +146,12 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: witness = %Simple.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Simple.G(@Simple.%Self: %Simple.type) { +// CHECK:STDOUT: generic fn @Simple.WithSelf.G(@Simple.%Self.loc15: %Simple.type) { // CHECK:STDOUT: %Self: %Simple.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.5e9)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Simple.G.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @Simple.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @i32.as.Simple.impl.G.loc24_27.1(%self.param: ); @@ -165,7 +170,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [concrete = constants.%Simple.type] // CHECK:STDOUT: %G.ref.loc28_12: %Simple.assoc_type = name_ref G, @Simple.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.93d = impl_witness_access constants.%Simple.impl_witness, element0 [concrete = constants.%i32.as.Simple.impl.G.4f6260.2] +// CHECK:STDOUT: %impl.elem0: %.a46 = impl_witness_access constants.%Simple.impl_witness, element0 [concrete = constants.%i32.as.Simple.impl.G.4f6260.2] // CHECK:STDOUT: %bound_method: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %G.ref.loc28_16: %i32.as.Simple.impl.G.type.32ad7a.1 = name_ref G, @i32.as.Simple.impl.%i32.as.Simple.impl.G.decl.loc24_27.1 [concrete = constants.%i32.as.Simple.impl.G.4f6260.1] // CHECK:STDOUT: %i32.as.Simple.impl.G.bound: = bound_method %n.ref, %G.ref.loc28_16 @@ -173,13 +178,27 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Simple.G(constants.%Self) { +// CHECK:STDOUT: specific @Simple(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Self +// CHECK:STDOUT: %Simple.WithSelf.G.type => constants.%Simple.WithSelf.G.type.d78 +// CHECK:STDOUT: %Simple.WithSelf.G => constants.%Simple.WithSelf.G.41d +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Simple.WithSelf.G(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.5e9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Simple.G(constants.%Simple.facet) { +// CHECK:STDOUT: specific @Simple(constants.%Simple.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Simple.facet +// CHECK:STDOUT: %Simple.WithSelf.G.type => constants.%Simple.WithSelf.G.type.9d9 +// CHECK:STDOUT: %Simple.WithSelf.G => constants.%Simple.WithSelf.G.26c +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Simple.WithSelf.G(constants.%Simple.facet) { // CHECK:STDOUT: %Self => constants.%Simple.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%i32 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7ce diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index 7f67206c4467..263410f1b750 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -38,10 +38,10 @@ class C { // CHECK:STDOUT: %GenericInterface.type.8bc: type = facet_type <@GenericInterface, @GenericInterface(%T)> [symbolic] // CHECK:STDOUT: %Self: %GenericInterface.type.8bc = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] -// CHECK:STDOUT: %GenericInterface.F.type: type = fn_type @GenericInterface.F, @GenericInterface(%T) [symbolic] -// CHECK:STDOUT: %GenericInterface.F: %GenericInterface.F.type = struct_value () [symbolic] +// CHECK:STDOUT: %GenericInterface.WithSelf.F.type: type = fn_type @GenericInterface.WithSelf.F, @GenericInterface(%T, %Self) [symbolic] +// CHECK:STDOUT: %GenericInterface.WithSelf.F: %GenericInterface.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %GenericInterface.assoc_type: type = assoc_entity_type @GenericInterface, @GenericInterface(%T) [symbolic] -// CHECK:STDOUT: %assoc0: %GenericInterface.assoc_type = assoc_entity element0, @GenericInterface.%GenericInterface.F.decl [symbolic] +// CHECK:STDOUT: %assoc0: %GenericInterface.assoc_type = assoc_entity element0, @GenericInterface.%GenericInterface.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %GenericInterface.impl_witness: = impl_witness @C.as.GenericInterface.impl.%GenericInterface.impl_witness_table, @C.as.GenericInterface.impl(%T) [symbolic] // CHECK:STDOUT: %C.as.GenericInterface.impl.F.type: type = fn_type @C.as.GenericInterface.impl.F, @C.as.GenericInterface.impl(%T) [symbolic] @@ -69,30 +69,30 @@ class C { // CHECK:STDOUT: %T.loc15_28.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_28.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %GenericInterface.type: type = facet_type <@GenericInterface, @GenericInterface(%T.loc15_28.1)> [symbolic = %GenericInterface.type (constants.%GenericInterface.type.8bc)] -// CHECK:STDOUT: %Self.loc15_38.2: @GenericInterface.%GenericInterface.type (%GenericInterface.type.8bc) = symbolic_binding Self, 1 [symbolic = %Self.loc15_38.2 (constants.%Self)] -// CHECK:STDOUT: %GenericInterface.F.type: type = fn_type @GenericInterface.F, @GenericInterface(%T.loc15_28.1) [symbolic = %GenericInterface.F.type (constants.%GenericInterface.F.type)] -// CHECK:STDOUT: %GenericInterface.F: @GenericInterface.%GenericInterface.F.type (%GenericInterface.F.type) = struct_value () [symbolic = %GenericInterface.F (constants.%GenericInterface.F)] -// CHECK:STDOUT: %GenericInterface.assoc_type: type = assoc_entity_type @GenericInterface, @GenericInterface(%T.loc15_28.1) [symbolic = %GenericInterface.assoc_type (constants.%GenericInterface.assoc_type)] -// CHECK:STDOUT: %assoc0.loc16_13.2: @GenericInterface.%GenericInterface.assoc_type (%GenericInterface.assoc_type) = assoc_entity element0, %GenericInterface.F.decl [symbolic = %assoc0.loc16_13.2 (constants.%assoc0)] +// CHECK:STDOUT: %GenericInterface.type.loc15: type = facet_type <@GenericInterface, @GenericInterface(%T.loc15_28.1)> [symbolic = %GenericInterface.type.loc15 (constants.%GenericInterface.type.8bc)] +// CHECK:STDOUT: %Self.loc15_38.2: @GenericInterface.%GenericInterface.type.loc15 (%GenericInterface.type.8bc) = symbolic_binding Self, 1 [symbolic = %Self.loc15_38.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc15_38.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.8bc) = symbolic_binding Self, 1 [symbolic = %Self.loc15_38.2 (constants.%Self)] -// CHECK:STDOUT: %GenericInterface.F.decl: @GenericInterface.%GenericInterface.F.type (%GenericInterface.F.type) = fn_decl @GenericInterface.F [symbolic = @GenericInterface.%GenericInterface.F (constants.%GenericInterface.F)] { -// CHECK:STDOUT: %x.patt: @GenericInterface.F.%pattern_type (%pattern_type.51d) = value_binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @GenericInterface.F.%pattern_type (%pattern_type.51d) = value_param_pattern %x.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc15_38.1: @GenericInterface.%GenericInterface.type.loc15 (%GenericInterface.type.8bc) = symbolic_binding Self, 1 [symbolic = %Self.loc15_38.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @GenericInterface [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %GenericInterface.WithSelf.F.decl: @GenericInterface.%GenericInterface.WithSelf.F.type (%GenericInterface.WithSelf.F.type) = fn_decl @GenericInterface.WithSelf.F [symbolic = @GenericInterface.%GenericInterface.WithSelf.F (constants.%GenericInterface.WithSelf.F)] { +// CHECK:STDOUT: %x.patt: @GenericInterface.WithSelf.F.%pattern_type (%pattern_type.51d) = value_binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @GenericInterface.WithSelf.F.%pattern_type (%pattern_type.51d) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %x.param: @GenericInterface.F.%T (%T) = value_param call_param0 +// CHECK:STDOUT: %x.param: @GenericInterface.WithSelf.F.%T (%T) = value_param call_param0 // CHECK:STDOUT: %T.ref: type = name_ref T, @GenericInterface.%T.loc15_28.2 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %x: @GenericInterface.F.%T (%T) = value_binding x, %x.param +// CHECK:STDOUT: %x: @GenericInterface.WithSelf.F.%T (%T) = value_binding x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc16_13.1: @GenericInterface.%GenericInterface.assoc_type (%GenericInterface.assoc_type) = assoc_entity element0, %GenericInterface.F.decl [symbolic = %assoc0.loc16_13.2 (constants.%assoc0)] +// CHECK:STDOUT: %assoc0.loc16_13.1: @GenericInterface.%GenericInterface.assoc_type (%GenericInterface.assoc_type) = assoc_entity element0, %GenericInterface.WithSelf.F.decl [symbolic = %assoc0.loc16_13.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc15_38.1 // CHECK:STDOUT: .T = +// CHECK:STDOUT: .T = // CHECK:STDOUT: .F = %assoc0.loc16_13.1 -// CHECK:STDOUT: witness = (%GenericInterface.F.decl) +// CHECK:STDOUT: witness = (%GenericInterface.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -146,11 +146,11 @@ class C { // CHECK:STDOUT: has_error // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @GenericInterface.F(@GenericInterface.%T.loc15_28.2: type, @GenericInterface.%Self.loc15_38.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.8bc)) { +// CHECK:STDOUT: generic fn @GenericInterface.WithSelf.F(@GenericInterface.%T.loc15_28.2: type, @GenericInterface.%Self.loc15_38.1: @GenericInterface.%GenericInterface.type.loc15 (%GenericInterface.type.8bc)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @GenericInterface.F.%T (%T)); +// CHECK:STDOUT: fn(%x.param: @GenericInterface.WithSelf.F.%T (%T)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @C.as.GenericInterface.impl.F(@C.as.GenericInterface.impl.%T.loc24_23.2: type) { @@ -170,7 +170,9 @@ class C { // CHECK:STDOUT: %T.loc15_28.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @GenericInterface.F(constants.%T, constants.%Self) { +// CHECK:STDOUT: specific @GenericInterface(constants.%T, constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericInterface.WithSelf.F(constants.%T, constants.%Self) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon index e9ef703e6c34..e2f30424e922 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -97,6 +97,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -113,6 +114,8 @@ fn F() { // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_extend_impl_function_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -145,6 +148,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @J { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @J [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -171,16 +175,18 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_extend_impl_self_interface.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.Zero.type: type = fn_type @Z.Zero [concrete] +// CHECK:STDOUT: %Z.WithSelf.Zero.type.e4a: type = fn_type @Z.WithSelf.Zero, @Z(%Self.c59) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Z.Zero: %Z.Zero.type = struct_value () [concrete] +// CHECK:STDOUT: %Z.WithSelf.Zero.3f4: %Z.WithSelf.Zero.type.e4a = struct_value () [symbolic] // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z [concrete] -// CHECK:STDOUT: %assoc0.aba: %Z.assoc_type = assoc_entity element0, @Z.%Z.Zero.decl [concrete] +// CHECK:STDOUT: %assoc0.cc0: %Z.assoc_type = assoc_entity element0, @Z.%Z.WithSelf.Zero.decl [concrete] // CHECK:STDOUT: %.as.Z.impl.Zero.type: type = fn_type @.as.Z.impl.Zero, @.as.Z.impl(%Self.c59) [symbolic] // CHECK:STDOUT: %.as.Z.impl.Zero: %.as.Z.impl.Zero.type = struct_value () [symbolic] // CHECK:STDOUT: %Point: type = class_type @Point [concrete] @@ -188,13 +194,19 @@ fn F() { // CHECK:STDOUT: %Point.as.Z.impl.Zero.type: type = fn_type @Point.as.Z.impl.Zero [concrete] // CHECK:STDOUT: %Point.as.Z.impl.Zero: %Point.as.Z.impl.Zero.type = struct_value () [concrete] // CHECK:STDOUT: %Z.facet: %Z.type = facet_value %Point, (%Z.impl_witness) [concrete] +// CHECK:STDOUT: %Z.WithSelf.Zero.type.bb1: type = fn_type @Z.WithSelf.Zero, @Z(%Z.facet) [concrete] +// CHECK:STDOUT: %Z.WithSelf.Zero.22c: %Z.WithSelf.Zero.type.bb1 = 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: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %Point.val: %Point = struct_value () [concrete] -// CHECK:STDOUT: %.01a: type = fn_type_with_self_type %Z.Zero.type, %Z.facet [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %Point.type.facet: %type = facet_value %Point, () [concrete] +// CHECK:STDOUT: %Z.WithSelf.Zero.type.15e: type = fn_type @Z.WithSelf.Zero, @Z(%Point.type.facet) [concrete] +// CHECK:STDOUT: %Z.WithSelf.Zero.55b: %Z.WithSelf.Zero.type.15e = struct_value () [concrete] +// CHECK:STDOUT: %.c1b: type = fn_type_with_self_type %Z.WithSelf.Zero.type.bb1, %Z.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] @@ -223,23 +235,27 @@ fn 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.Zero.decl: %Z.Zero.type = fn_decl @Z.Zero [concrete = constants.%Z.Zero] {} {} -// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, %Z.Zero.decl [concrete = constants.%assoc0.aba] +// CHECK:STDOUT: %Self.loc3: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Zero.decl: @Z.%Z.WithSelf.Zero.type (%Z.WithSelf.Zero.type.e4a) = fn_decl @Z.WithSelf.Zero [symbolic = @Z.%Z.WithSelf.Zero (constants.%Z.WithSelf.Zero.3f4)] {} {} +// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, %Z.WithSelf.Zero.decl [concrete = constants.%assoc0.cc0] // CHECK:STDOUT: impl_decl @.as.Z.impl [concrete] {} { // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 +// CHECK:STDOUT: .Z = // CHECK:STDOUT: .Zero = %assoc0 // CHECK:STDOUT: .Z = -// CHECK:STDOUT: witness = (%Z.Zero.decl) +// CHECK:STDOUT: witness = (%Z.WithSelf.Zero.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @.as.Z.impl(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic impl @.as.Z.impl(@Z.%Self.loc3: %Z.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %.as.Z.impl.Zero.type: type = fn_type @.as.Z.impl.Zero, @.as.Z.impl(%Self) [symbolic = %.as.Z.impl.Zero.type (constants.%.as.Z.impl.Zero.type)] @@ -279,11 +295,11 @@ fn F() { // CHECK:STDOUT: extend @Point.as.Z.impl.%Z.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Z.Zero(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic fn @Z.WithSelf.Zero(@Z.%Self.loc3: %Z.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @.as.Z.impl.Zero(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic fn @.as.Z.impl.Zero(@Z.%Self.loc3: %Z.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -305,8 +321,8 @@ fn F() { // CHECK:STDOUT: %.loc25_5.3: init %Point to %.loc25_5.2 = class_init () [concrete = constants.%Point.val] // CHECK:STDOUT: %.loc25_5.4: ref %Point = temporary %.loc25_5.2, %.loc25_5.3 // CHECK:STDOUT: %.loc25_7: ref %Point = converted %.loc25_5.1, %.loc25_5.4 -// CHECK:STDOUT: %Zero.ref: %Z.assoc_type = name_ref Zero, @Z.%assoc0 [concrete = constants.%assoc0.aba] -// CHECK:STDOUT: %impl.elem0: %.01a = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%Point.as.Z.impl.Zero] +// CHECK:STDOUT: %Zero.ref: %Z.assoc_type = name_ref Zero, @Z.%assoc0 [concrete = constants.%assoc0.cc0] +// CHECK:STDOUT: %impl.elem0: %.c1b = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%Point.as.Z.impl.Zero] // CHECK:STDOUT: %Point.as.Z.impl.Zero.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: %DestroyOp.bound: = bound_method %.loc25_5.4, constants.%DestroyOp // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc25_5.4) @@ -315,7 +331,14 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %Point) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Zero(constants.%Self.c59) {} +// CHECK:STDOUT: specific @Z(constants.%Self.c59) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Self.c59 +// CHECK:STDOUT: %Z.WithSelf.Zero.type => constants.%Z.WithSelf.Zero.type.e4a +// CHECK:STDOUT: %Z.WithSelf.Zero => constants.%Z.WithSelf.Zero.3f4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Zero(constants.%Self.c59) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @.as.Z.impl(constants.%Self.c59) { // CHECK:STDOUT: !definition: @@ -326,5 +349,19 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @.as.Z.impl.Zero(constants.%Self.c59) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Zero(constants.%Z.facet) {} +// CHECK:STDOUT: specific @Z(constants.%Z.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Z.facet +// CHECK:STDOUT: %Z.WithSelf.Zero.type => constants.%Z.WithSelf.Zero.type.bb1 +// CHECK:STDOUT: %Z.WithSelf.Zero => constants.%Z.WithSelf.Zero.22c +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Zero(constants.%Z.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Point.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Point.type.facet +// CHECK:STDOUT: %Z.WithSelf.Zero.type => constants.%Z.WithSelf.Zero.type.15e +// CHECK:STDOUT: %Z.WithSelf.Zero => constants.%Z.WithSelf.Zero.55b +// 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 6b4852324da0..f8228d42d1b8 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon @@ -63,6 +63,7 @@ class E { // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] // CHECK:STDOUT: %I.impl_witness.1f6: = impl_witness @E.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %E, (%I.impl_witness.1f6) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -91,6 +92,7 @@ class E { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -158,3 +160,11 @@ class E { // CHECK:STDOUT: extend @E.as.I.impl.%I.ref // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon index abdfb5c01d9a..61c88197f120 100644 --- a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon @@ -44,11 +44,15 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %C.decl: type = class_decl @C [symbolic = constants.%C] {} {} +// CHECK:STDOUT: %Self.loc15: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %C.decl: type = class_decl @C [symbolic = @I.%C (constants.%C)] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 +// CHECK:STDOUT: .I = // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: .I = // CHECK:STDOUT: witness = () @@ -56,7 +60,7 @@ interface I { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @C.as.I.impl(@I.%Self: %I.type) { +// CHECK:STDOUT: generic impl @C.as.I.impl(@I.%Self.loc15: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C)] // CHECK:STDOUT: %I.impl_witness.loc24_21.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%Self) [symbolic = %I.impl_witness.loc24_21.2 (constants.%I.impl_witness)] @@ -64,7 +68,7 @@ interface I { // CHECK:STDOUT: impl: %Self.ref as %I.ref; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(@I.%Self: %I.type) { +// CHECK:STDOUT: generic class @C(@I.%Self.loc15: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { @@ -82,6 +86,8 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl(constants.%Self) { diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index 460f8f0f00cc..2322d8b7d496 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -136,6 +136,7 @@ class X { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -161,6 +162,8 @@ class X { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_impl_as_function_scope.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -195,6 +198,7 @@ class X { // CHECK:STDOUT: // CHECK:STDOUT: interface @J { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @J [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -223,21 +227,23 @@ class X { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_impl_as_self_interface.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.Zero.type: type = fn_type @Z.Zero [concrete] +// CHECK:STDOUT: %Z.WithSelf.Zero.type.e4a: type = fn_type @Z.WithSelf.Zero, @Z(%Self.c59) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Z.Zero: %Z.Zero.type = struct_value () [concrete] +// CHECK:STDOUT: %Z.WithSelf.Zero.3f4: %Z.WithSelf.Zero.type.e4a = struct_value () [symbolic] // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z [concrete] -// CHECK:STDOUT: %assoc0.aba: %Z.assoc_type = assoc_entity element0, @Z.%Z.Zero.decl [concrete] +// CHECK:STDOUT: %assoc0.cc0: %Z.assoc_type = assoc_entity element0, @Z.%Z.WithSelf.Zero.decl [concrete] // CHECK:STDOUT: %Self.binding.as_type.62d: type = symbolic_binding_type Self, 0, %Self.c59 [symbolic] // CHECK:STDOUT: %pattern_type.84b: type = pattern_type %Self.binding.as_type.62d [symbolic] -// CHECK:STDOUT: %Z.Method.type: type = fn_type @Z.Method [concrete] -// CHECK:STDOUT: %Z.Method: %Z.Method.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %Z.assoc_type = assoc_entity element1, @Z.%Z.Method.decl [concrete] +// CHECK:STDOUT: %Z.WithSelf.Method.type.dfd: type = fn_type @Z.WithSelf.Method, @Z(%Self.c59) [symbolic] +// CHECK:STDOUT: %Z.WithSelf.Method.324: %Z.WithSelf.Method.type.dfd = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1: %Z.assoc_type = assoc_entity element1, @Z.%Z.WithSelf.Method.decl [concrete] // CHECK:STDOUT: %.as.Z.impl.Zero.type: type = fn_type @.as.Z.impl.Zero, @.as.Z.impl(%Self.c59) [symbolic] // CHECK:STDOUT: %.as.Z.impl.Zero: %.as.Z.impl.Zero.type = struct_value () [symbolic] // CHECK:STDOUT: %.as.Z.impl.Method.type: type = fn_type @.as.Z.impl.Method, @.as.Z.impl(%Self.c59) [symbolic] @@ -251,14 +257,18 @@ class X { // CHECK:STDOUT: %Point.as.Z.impl.Method.type: type = fn_type @Point.as.Z.impl.Method [concrete] // CHECK:STDOUT: %Point.as.Z.impl.Method: %Point.as.Z.impl.Method.type = struct_value () [concrete] // CHECK:STDOUT: %Z.facet: %Z.type = facet_value %Point, (%Z.impl_witness) [concrete] +// CHECK:STDOUT: %Z.WithSelf.Zero.type.949: type = fn_type @Z.WithSelf.Zero, @Z(%Z.facet) [concrete] +// CHECK:STDOUT: %Z.WithSelf.Zero.3ae: %Z.WithSelf.Zero.type.949 = struct_value () [concrete] +// CHECK:STDOUT: %Z.WithSelf.Method.type.707: type = fn_type @Z.WithSelf.Method, @Z(%Z.facet) [concrete] +// CHECK:STDOUT: %Z.WithSelf.Method.74d: %Z.WithSelf.Method.type.707 = 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: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %.1d6: type = fn_type_with_self_type %Z.Zero.type, %Z.facet [concrete] +// CHECK:STDOUT: %.8c9: type = fn_type_with_self_type %Z.WithSelf.Zero.type.949, %Z.facet [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %Point.val: %Point = struct_value () [concrete] -// CHECK:STDOUT: %.f99: type = fn_type_with_self_type %Z.Method.type, %Z.facet [concrete] +// CHECK:STDOUT: %.429: type = fn_type_with_self_type %Z.WithSelf.Method.type.707, %Z.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] @@ -287,37 +297,41 @@ class X { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { -// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] -// CHECK:STDOUT: %Z.Zero.decl: %Z.Zero.type = fn_decl @Z.Zero [concrete = constants.%Z.Zero] {} {} -// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, %Z.Zero.decl [concrete = constants.%assoc0.aba] -// CHECK:STDOUT: %Z.Method.decl: %Z.Method.type = fn_decl @Z.Method [concrete = constants.%Z.Method] { -// CHECK:STDOUT: %self.patt: @Z.Method.%pattern_type (%pattern_type.84b) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Z.Method.%pattern_type (%pattern_type.84b) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc3: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Zero.decl: @Z.%Z.WithSelf.Zero.type (%Z.WithSelf.Zero.type.e4a) = fn_decl @Z.WithSelf.Zero [symbolic = @Z.%Z.WithSelf.Zero (constants.%Z.WithSelf.Zero.3f4)] {} {} +// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, %Z.WithSelf.Zero.decl [concrete = constants.%assoc0.cc0] +// CHECK:STDOUT: %Z.WithSelf.Method.decl: @Z.%Z.WithSelf.Method.type (%Z.WithSelf.Method.type.dfd) = fn_decl @Z.WithSelf.Method [symbolic = @Z.%Z.WithSelf.Method (constants.%Z.WithSelf.Method.324)] { +// CHECK:STDOUT: %self.patt: @Z.WithSelf.Method.%pattern_type (%pattern_type.84b) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Z.WithSelf.Method.%pattern_type (%pattern_type.84b) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @Z.Method.%Self.binding.as_type (%Self.binding.as_type.62d) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Z.WithSelf.Method.%Self.binding.as_type (%Self.binding.as_type.62d) = value_param call_param0 // CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.62d)] { -// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.c59)] +// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self.loc3 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.62d)] // CHECK:STDOUT: %.loc5_19.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.62d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Z.Method.%Self.binding.as_type (%Self.binding.as_type.62d) = value_binding self, %self.param +// CHECK:STDOUT: %self: @Z.WithSelf.Method.%Self.binding.as_type (%Self.binding.as_type.62d) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %Z.assoc_type = assoc_entity element1, %Z.Method.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %Z.assoc_type = assoc_entity element1, %Z.WithSelf.Method.decl [concrete = constants.%assoc1] // CHECK:STDOUT: impl_decl @.as.Z.impl [concrete] {} { // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 +// CHECK:STDOUT: .Z = // CHECK:STDOUT: .Zero = %assoc0 // CHECK:STDOUT: .Method = %assoc1 // CHECK:STDOUT: .Z = -// CHECK:STDOUT: witness = (%Z.Zero.decl, %Z.Method.decl) +// CHECK:STDOUT: witness = (%Z.WithSelf.Zero.decl, %Z.WithSelf.Method.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @.as.Z.impl(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic impl @.as.Z.impl(@Z.%Self.loc3: %Z.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %.as.Z.impl.Zero.type: type = fn_type @.as.Z.impl.Zero, @.as.Z.impl(%Self) [symbolic = %.as.Z.impl.Zero.type (constants.%.as.Z.impl.Zero.type)] @@ -333,7 +347,7 @@ class X { // CHECK:STDOUT: } { // CHECK:STDOUT: %self.param: @.as.Z.impl.Method.%Self.binding.as_type (%Self.binding.as_type.62d) = value_param call_param0 // CHECK:STDOUT: %.loc13_21.1: type = splice_block %.loc13_21.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.62d)] { -// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.c59)] +// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self.loc3 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.62d)] // CHECK:STDOUT: %.loc13_21.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.62d)] // CHECK:STDOUT: } @@ -379,19 +393,19 @@ class X { // CHECK:STDOUT: .Z = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Z.Zero(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic fn @Z.WithSelf.Zero(@Z.%Self.loc3: %Z.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Z.Method(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic fn @Z.WithSelf.Method(@Z.%Self.loc3: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.62d)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.84b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Z.Method.%Self.binding.as_type (%Self.binding.as_type.62d)); +// CHECK:STDOUT: fn(%self.param: @Z.WithSelf.Method.%Self.binding.as_type (%Self.binding.as_type.62d)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @.as.Z.impl.Zero(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic fn @.as.Z.impl.Zero(@Z.%Self.loc3: %Z.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -400,7 +414,7 @@ class X { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @.as.Z.impl.Method(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic fn @.as.Z.impl.Method(@Z.%Self.loc3: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.62d)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.84b)] @@ -428,10 +442,10 @@ class X { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Point.ref.loc28: type = name_ref Point, file.%Point.decl [concrete = constants.%Point] // CHECK:STDOUT: %Z.ref.loc28: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] -// CHECK:STDOUT: %Zero.ref: %Z.assoc_type = name_ref Zero, @Z.%assoc0 [concrete = constants.%assoc0.aba] +// CHECK:STDOUT: %Zero.ref: %Z.assoc_type = name_ref Zero, @Z.%assoc0 [concrete = constants.%assoc0.cc0] // CHECK:STDOUT: %Z.facet: %Z.type = facet_value %Point.ref.loc28, (constants.%Z.impl_witness) [concrete = constants.%Z.facet] // CHECK:STDOUT: %.loc28: %Z.type = converted %Point.ref.loc28, %Z.facet [concrete = constants.%Z.facet] -// CHECK:STDOUT: %impl.elem0: %.1d6 = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%Point.as.Z.impl.Zero] +// CHECK:STDOUT: %impl.elem0: %.8c9 = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%Point.as.Z.impl.Zero] // CHECK:STDOUT: %Point.as.Z.impl.Zero.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: %.loc29_5.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %Point.ref.loc29: type = name_ref Point, file.%Point.decl [concrete = constants.%Point] @@ -441,7 +455,7 @@ class X { // CHECK:STDOUT: %.loc29_7.1: ref %Point = converted %.loc29_5.1, %.loc29_5.4 // CHECK:STDOUT: %Z.ref.loc29: type = name_ref Z, file.%Z.decl [concrete = constants.%Z.type] // CHECK:STDOUT: %Method.ref: %Z.assoc_type = name_ref Method, @Z.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1: %.f99 = impl_witness_access constants.%Z.impl_witness, element1 [concrete = constants.%Point.as.Z.impl.Method] +// CHECK:STDOUT: %impl.elem1: %.429 = impl_witness_access constants.%Z.impl_witness, element1 [concrete = constants.%Point.as.Z.impl.Method] // CHECK:STDOUT: %bound_method: = bound_method %.loc29_7.1, %impl.elem1 // CHECK:STDOUT: %.loc29_7.2: %Point = acquire_value %.loc29_7.1 // CHECK:STDOUT: %Point.as.Z.impl.Method.call: init %empty_tuple.type = call %bound_method(%.loc29_7.2) @@ -452,9 +466,18 @@ class X { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %Point) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Zero(constants.%Self.c59) {} +// CHECK:STDOUT: specific @Z(constants.%Self.c59) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Self.c59 +// CHECK:STDOUT: %Z.WithSelf.Zero.type => constants.%Z.WithSelf.Zero.type.e4a +// CHECK:STDOUT: %Z.WithSelf.Zero => constants.%Z.WithSelf.Zero.3f4 +// CHECK:STDOUT: %Z.WithSelf.Method.type => constants.%Z.WithSelf.Method.type.dfd +// CHECK:STDOUT: %Z.WithSelf.Method => constants.%Z.WithSelf.Method.324 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Method(constants.%Self.c59) { +// CHECK:STDOUT: specific @Z.WithSelf.Zero(constants.%Self.c59) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Method(constants.%Self.c59) { // CHECK:STDOUT: %Self => constants.%Self.c59 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.62d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.84b @@ -477,9 +500,18 @@ class X { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.84b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Zero(constants.%Z.facet) {} +// CHECK:STDOUT: specific @Z(constants.%Z.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Z.facet +// CHECK:STDOUT: %Z.WithSelf.Zero.type => constants.%Z.WithSelf.Zero.type.949 +// CHECK:STDOUT: %Z.WithSelf.Zero => constants.%Z.WithSelf.Zero.3ae +// CHECK:STDOUT: %Z.WithSelf.Method.type => constants.%Z.WithSelf.Method.type.707 +// CHECK:STDOUT: %Z.WithSelf.Method => constants.%Z.WithSelf.Method.74d +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Method(constants.%Z.facet) { +// CHECK:STDOUT: specific @Z.WithSelf.Zero(constants.%Z.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Method(constants.%Z.facet) { // CHECK:STDOUT: %Self => constants.%Z.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%Point // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c86 @@ -490,11 +522,11 @@ class X { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %Self.c51: %A.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %A.B.type: type = fn_type @A.B [concrete] +// CHECK:STDOUT: %A.WithSelf.B.type.386: type = fn_type @A.WithSelf.B, @A(%Self.c51) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %A.B: %A.B.type = struct_value () [concrete] +// CHECK:STDOUT: %A.WithSelf.B.b88: %A.WithSelf.B.type.386 = struct_value () [symbolic] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete] -// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, @A.%A.B.decl [concrete] +// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, @A.%A.WithSelf.B.decl [concrete] // CHECK:STDOUT: %C.type: type = facet_type <@C> [concrete] // CHECK:STDOUT: %Self.b7c: %C.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] @@ -504,6 +536,8 @@ class X { // CHECK:STDOUT: %X.as.A.impl.B.type: type = fn_type @X.as.A.impl.B [concrete] // CHECK:STDOUT: %X.as.A.impl.B: %X.as.A.impl.B.type = struct_value () [concrete] // CHECK:STDOUT: %A.facet: %A.type = facet_value %X, (%A.impl_witness) [concrete] +// CHECK:STDOUT: %A.WithSelf.B.type.c6b: type = fn_type @A.WithSelf.B, @A(%A.facet) [concrete] +// CHECK:STDOUT: %A.WithSelf.B.f2a: %A.WithSelf.B.type.c6b = 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: } @@ -531,20 +565,24 @@ class X { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { -// CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c51] -// CHECK:STDOUT: %A.B.decl: %A.B.type = fn_decl @A.B [concrete = constants.%A.B] {} {} -// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.B.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc4: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c51] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %A.WithSelf.B.decl: @A.%A.WithSelf.B.type (%A.WithSelf.B.type.386) = fn_decl @A.WithSelf.B [symbolic = @A.%A.WithSelf.B (constants.%A.WithSelf.B.b88)] {} {} +// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.WithSelf.B.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .B = %assoc0 -// CHECK:STDOUT: witness = (%A.B.decl) +// CHECK:STDOUT: witness = (%A.WithSelf.B.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @C { // CHECK:STDOUT: %Self: %C.type = symbolic_binding Self, 0 [symbolic = constants.%Self.b7c] +// CHECK:STDOUT: interface_with_self_decl @C [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -588,7 +626,7 @@ class X { // CHECK:STDOUT: .G = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @A.B(@A.%Self: %A.type) { +// CHECK:STDOUT: generic fn @A.WithSelf.B(@A.%Self.loc4: %A.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -604,7 +642,23 @@ class X { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.B(constants.%Self.c51) {} +// CHECK:STDOUT: specific @A(constants.%Self.c51) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self.c51 +// CHECK:STDOUT: %A.WithSelf.B.type => constants.%A.WithSelf.B.type.386 +// CHECK:STDOUT: %A.WithSelf.B => constants.%A.WithSelf.B.b88 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.B(constants.%A.facet) {} +// CHECK:STDOUT: specific @A.WithSelf.B(constants.%Self.c51) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%Self.b7c) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%A.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%A.facet +// CHECK:STDOUT: %A.WithSelf.B.type => constants.%A.WithSelf.B.type.c6b +// CHECK:STDOUT: %A.WithSelf.B => constants.%A.WithSelf.B.f2a +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.B(constants.%A.facet) {} // 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 78b91969de5c..f9f37cea629a 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon @@ -33,6 +33,7 @@ impl () as I {} // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @empty_tuple.type.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,6 +50,9 @@ impl () as I {} // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -61,10 +65,6 @@ impl () as I {} // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.I.impl: %.loc24_7.2 as %I.ref { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @empty_tuple.type.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] @@ -73,5 +73,11 @@ impl () as I {} // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// 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 a44e36e48925..976a7bb20f76 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -245,22 +245,31 @@ class SelfNestedBadReturnType { // 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: %I.F.type: type = fn_type @I.F [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I(%Self.ab9) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.705: %I.WithSelf.F.type.08c = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.524: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0.18e: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %NoF: type = class_type @NoF [concrete] // CHECK:STDOUT: %I.impl_witness.187: = impl_witness @NoF.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet.fc8: %I.type = facet_value %NoF, (%I.impl_witness.187) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.cec: type = fn_type @I.WithSelf.F, @I(%I.facet.fc8) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.733: %I.WithSelf.F.type.cec = 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: %FNotFunction: type = class_type @FNotFunction [concrete] // CHECK:STDOUT: %I.impl_witness.cf4: = impl_witness @FNotFunction.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %F: type = class_type @F [concrete] +// CHECK:STDOUT: %I.facet.c1a: %I.type = facet_value %FNotFunction, (%I.impl_witness.cf4) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.1b8: type = fn_type @I.WithSelf.F, @I(%I.facet.c1a) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.7e3: %I.WithSelf.F.type.1b8 = struct_value () [concrete] // CHECK:STDOUT: %PossiblyF.type: type = fn_type @PossiblyF [concrete] // CHECK:STDOUT: %PossiblyF: %PossiblyF.type = struct_value () [concrete] // CHECK:STDOUT: %FAlias: type = class_type @FAlias [concrete] // CHECK:STDOUT: %I.impl_witness.109: = impl_witness @FAlias.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet.574: %I.type = facet_value %FAlias, (%I.impl_witness.109) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.f26: type = fn_type @I.WithSelf.F, @I(%I.facet.574) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.5e6: %I.WithSelf.F.type.f26 = struct_value () [concrete] // CHECK:STDOUT: %FExtraParam: type = class_type @FExtraParam [concrete] // CHECK:STDOUT: %I.impl_witness.627: = impl_witness @FExtraParam.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] @@ -269,6 +278,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %FExtraParam.as.I.impl.F.type.531438.1: type = fn_type @FExtraParam.as.I.impl.F.loc69_18.1 [concrete] // CHECK:STDOUT: %FExtraParam.as.I.impl.F.33e1fe.1: %FExtraParam.as.I.impl.F.type.531438.1 = struct_value () [concrete] // CHECK:STDOUT: %I.facet.b53: %I.type = facet_value %FExtraParam, (%I.impl_witness.627) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.99d: type = fn_type @I.WithSelf.F, @I(%I.facet.b53) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.eab: %I.WithSelf.F.type.99d = struct_value () [concrete] // CHECK:STDOUT: %FExtraParam.as.I.impl.F.type.531438.2: type = fn_type @FExtraParam.as.I.impl.F.loc69_18.2 [concrete] // CHECK:STDOUT: %FExtraParam.as.I.impl.F.33e1fe.2: %FExtraParam.as.I.impl.F.type.531438.2 = struct_value () [concrete] // CHECK:STDOUT: %FExtraImplicitParam: type = class_type @FExtraImplicitParam [concrete] @@ -277,6 +288,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %FExtraImplicitParam.as.I.impl.F.type.9dd145.1: type = fn_type @FExtraImplicitParam.as.I.impl.F.loc85_23.1 [concrete] // CHECK:STDOUT: %FExtraImplicitParam.as.I.impl.F.99eae8.1: %FExtraImplicitParam.as.I.impl.F.type.9dd145.1 = struct_value () [concrete] // CHECK:STDOUT: %I.facet.5a5: %I.type = facet_value %FExtraImplicitParam, (%I.impl_witness.e9e) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.e46: type = fn_type @I.WithSelf.F, @I(%I.facet.5a5) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.5bc: %I.WithSelf.F.type.e46 = struct_value () [concrete] // CHECK:STDOUT: %FExtraImplicitParam.as.I.impl.F.type.9dd145.2: type = fn_type @FExtraImplicitParam.as.I.impl.F.loc85_23.2 [concrete] // CHECK:STDOUT: %FExtraImplicitParam.as.I.impl.F.99eae8.2: %FExtraImplicitParam.as.I.impl.F.type.9dd145.2 = struct_value () [concrete] // CHECK:STDOUT: %FExtraReturnType: type = class_type @FExtraReturnType [concrete] @@ -285,19 +298,23 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %FExtraReturnType.as.I.impl.F.type: type = fn_type @FExtraReturnType.as.I.impl.F [concrete] // CHECK:STDOUT: %FExtraReturnType.as.I.impl.F: %FExtraReturnType.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet.1ed: %I.type = facet_value %FExtraReturnType, (%I.impl_witness.247) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.cd5: type = fn_type @I.WithSelf.F, @I(%I.facet.1ed) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.aee: %I.WithSelf.F.type.cd5 = struct_value () [concrete] // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self.8a1: %J.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %.d29: Core.Form = init_form bool, call_param2 [concrete] -// CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete] -// CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J(%Self.8a1) [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.5fd: %J.assoc_type = assoc_entity element0, @J.%J.F.decl [concrete] +// CHECK:STDOUT: %assoc0.481: %J.assoc_type = assoc_entity element0, @J.%J.WithSelf.F.decl [concrete] // CHECK:STDOUT: %FMissingParam: type = class_type @FMissingParam [concrete] // CHECK:STDOUT: %J.impl_witness.5e2: = impl_witness @FMissingParam.as.J.impl.%J.impl_witness_table [concrete] // CHECK:STDOUT: %.fff: Core.Form = init_form bool, call_param1 [concrete] // CHECK:STDOUT: %FMissingParam.as.J.impl.F.type.0f71d8.1: type = fn_type @FMissingParam.as.J.impl.F.loc117_31.1 [concrete] // CHECK:STDOUT: %FMissingParam.as.J.impl.F.7540f6.1: %FMissingParam.as.J.impl.F.type.0f71d8.1 = struct_value () [concrete] // CHECK:STDOUT: %J.facet.567: %J.type = facet_value %FMissingParam, (%J.impl_witness.5e2) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.54f: type = fn_type @J.WithSelf.F, @J(%J.facet.567) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.7e8: %J.WithSelf.F.type.54f = struct_value () [concrete] // CHECK:STDOUT: %FMissingParam.as.J.impl.F.type.0f71d8.2: type = fn_type @FMissingParam.as.J.impl.F.loc117_31.2 [concrete] // CHECK:STDOUT: %FMissingParam.as.J.impl.F.7540f6.2: %FMissingParam.as.J.impl.F.type.0f71d8.2 = struct_value () [concrete] // CHECK:STDOUT: %FMissingImplicitParam: type = class_type @FMissingImplicitParam [concrete] @@ -305,6 +322,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %FMissingImplicitParam.as.J.impl.F.type.80a56b.1: type = fn_type @FMissingImplicitParam.as.J.impl.F.loc130_26.1 [concrete] // CHECK:STDOUT: %FMissingImplicitParam.as.J.impl.F.c6a0b7.1: %FMissingImplicitParam.as.J.impl.F.type.80a56b.1 = struct_value () [concrete] // CHECK:STDOUT: %J.facet.266: %J.type = facet_value %FMissingImplicitParam, (%J.impl_witness.1e4) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.56e: type = fn_type @J.WithSelf.F, @J(%J.facet.266) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.d17: %J.WithSelf.F.type.56e = struct_value () [concrete] // CHECK:STDOUT: %FMissingImplicitParam.as.J.impl.F.type.80a56b.2: type = fn_type @FMissingImplicitParam.as.J.impl.F.loc130_26.2 [concrete] // CHECK:STDOUT: %FMissingImplicitParam.as.J.impl.F.c6a0b7.2: %FMissingImplicitParam.as.J.impl.F.type.80a56b.2 = struct_value () [concrete] // CHECK:STDOUT: %FMissingReturnType: type = class_type @FMissingReturnType [concrete] @@ -312,6 +331,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %FMissingReturnType.as.J.impl.F.type.ce0d21.1: type = fn_type @FMissingReturnType.as.J.impl.F.loc152_30.1 [concrete] // CHECK:STDOUT: %FMissingReturnType.as.J.impl.F.5b613a.1: %FMissingReturnType.as.J.impl.F.type.ce0d21.1 = struct_value () [concrete] // CHECK:STDOUT: %J.facet.a9e: %J.type = facet_value %FMissingReturnType, (%J.impl_witness.7c7) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.8be: type = fn_type @J.WithSelf.F, @J(%J.facet.a9e) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.2a5: %J.WithSelf.F.type.8be = struct_value () [concrete] // CHECK:STDOUT: %FMissingReturnType.as.J.impl.F.type.ce0d21.2: type = fn_type @FMissingReturnType.as.J.impl.F.loc152_30.2 [concrete] // CHECK:STDOUT: %FMissingReturnType.as.J.impl.F.5b613a.2: %FMissingReturnType.as.J.impl.F.type.ce0d21.2 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] @@ -322,6 +343,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %FDifferentParamType.as.J.impl.F.type.10926d.1: type = fn_type @FDifferentParamType.as.J.impl.F.loc171_38.1 [concrete] // CHECK:STDOUT: %FDifferentParamType.as.J.impl.F.f1245a.1: %FDifferentParamType.as.J.impl.F.type.10926d.1 = struct_value () [concrete] // CHECK:STDOUT: %J.facet.bd2: %J.type = facet_value %FDifferentParamType, (%J.impl_witness.cd7) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.06a: type = fn_type @J.WithSelf.F, @J(%J.facet.bd2) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.cad: %J.WithSelf.F.type.06a = struct_value () [concrete] // CHECK:STDOUT: %FDifferentParamType.as.J.impl.F.type.10926d.2: type = fn_type @FDifferentParamType.as.J.impl.F.loc171_38.2 [concrete] // CHECK:STDOUT: %FDifferentParamType.as.J.impl.F.f1245a.2: %FDifferentParamType.as.J.impl.F.type.10926d.2 = struct_value () [concrete] // CHECK:STDOUT: %FDifferentImplicitParamType: type = class_type @FDifferentImplicitParamType [concrete] @@ -330,6 +353,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %FDifferentImplicitParamType.as.J.impl.F.type.955391.1: type = fn_type @FDifferentImplicitParamType.as.J.impl.F.loc184_38.1 [concrete] // CHECK:STDOUT: %FDifferentImplicitParamType.as.J.impl.F.a9ece4.1: %FDifferentImplicitParamType.as.J.impl.F.type.955391.1 = struct_value () [concrete] // CHECK:STDOUT: %J.facet.030: %J.type = facet_value %FDifferentImplicitParamType, (%J.impl_witness.4d2) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.f29: type = fn_type @J.WithSelf.F, @J(%J.facet.030) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.5b7: %J.WithSelf.F.type.f29 = struct_value () [concrete] // CHECK:STDOUT: %FDifferentImplicitParamType.as.J.impl.F.type.955391.2: type = fn_type @FDifferentImplicitParamType.as.J.impl.F.loc184_38.2 [concrete] // CHECK:STDOUT: %FDifferentImplicitParamType.as.J.impl.F.a9ece4.2: %FDifferentImplicitParamType.as.J.impl.F.type.955391.2 = struct_value () [concrete] // CHECK:STDOUT: %FDifferentReturnType: type = class_type @FDifferentReturnType [concrete] @@ -339,6 +364,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %FDifferentReturnType.as.J.impl.F.type.7bcb67.1: type = fn_type @FDifferentReturnType.as.J.impl.F.loc200_38.1 [concrete] // CHECK:STDOUT: %FDifferentReturnType.as.J.impl.F.a709b1.1: %FDifferentReturnType.as.J.impl.F.type.7bcb67.1 = struct_value () [concrete] // CHECK:STDOUT: %J.facet.4a1: %J.type = facet_value %FDifferentReturnType, (%J.impl_witness.a49) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.8e3: type = fn_type @J.WithSelf.F, @J(%J.facet.4a1) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.182: %J.WithSelf.F.type.8e3 = struct_value () [concrete] // CHECK:STDOUT: %FDifferentReturnType.as.J.impl.F.type.7bcb67.2: type = fn_type @FDifferentReturnType.as.J.impl.F.loc200_38.2 [concrete] // CHECK:STDOUT: %FDifferentReturnType.as.J.impl.F.a709b1.2: %FDifferentReturnType.as.J.impl.F.type.7bcb67.2 = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [concrete] @@ -358,10 +385,10 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %array_type.eba: type = array_type %int_4, %Self.binding.as_type.07b [symbolic] // CHECK:STDOUT: %.746: Core.Form = init_form %array_type.eba, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.dfe: type = pattern_type %array_type.eba [symbolic] -// CHECK:STDOUT: %SelfNested.F.type: type = fn_type @SelfNested.F [concrete] -// CHECK:STDOUT: %SelfNested.F: %SelfNested.F.type = struct_value () [concrete] +// CHECK:STDOUT: %SelfNested.WithSelf.F.type.430: type = fn_type @SelfNested.WithSelf.F, @SelfNested(%Self.aed) [symbolic] +// CHECK:STDOUT: %SelfNested.WithSelf.F.257: %SelfNested.WithSelf.F.type.430 = struct_value () [symbolic] // CHECK:STDOUT: %SelfNested.assoc_type: type = assoc_entity_type @SelfNested [concrete] -// CHECK:STDOUT: %assoc0.92f: %SelfNested.assoc_type = assoc_entity element0, @SelfNested.%SelfNested.F.decl [concrete] +// CHECK:STDOUT: %assoc0.da4: %SelfNested.assoc_type = assoc_entity element0, @SelfNested.%SelfNested.WithSelf.F.decl [concrete] // CHECK:STDOUT: %SelfNestedBadParam: type = class_type @SelfNestedBadParam [concrete] // CHECK:STDOUT: %SelfNested.impl_witness.7e8: = impl_witness @SelfNestedBadParam.as.SelfNested.impl.%SelfNested.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.cf2: type = ptr_type %SelfNestedBadParam [concrete] @@ -375,6 +402,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.type.789632.1: type = fn_type @SelfNestedBadParam.as.SelfNested.impl.F.loc223_87.1 [concrete] // CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.6e1661.1: %SelfNestedBadParam.as.SelfNested.impl.F.type.789632.1 = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.facet.b9f: %SelfNested.type = facet_value %SelfNestedBadParam, (%SelfNested.impl_witness.7e8) [concrete] +// CHECK:STDOUT: %SelfNested.WithSelf.F.type.4de: type = fn_type @SelfNested.WithSelf.F, @SelfNested(%SelfNested.facet.b9f) [concrete] +// CHECK:STDOUT: %SelfNested.WithSelf.F.5e9: %SelfNested.WithSelf.F.type.4de = struct_value () [concrete] // CHECK:STDOUT: %struct_type.x.y.62a: type = struct_type {.x: %SelfNestedBadParam, .y: %i32} [concrete] // CHECK:STDOUT: %tuple.73b: %tuple.type.24b = tuple_value (%ptr.cf2, %struct_type.x.y.62a) [concrete] // CHECK:STDOUT: %tuple.type.7ea: type = tuple_type (%ptr.cf2, %struct_type.x.y.62a) [concrete] @@ -391,6 +420,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.type.75d128.1: type = fn_type @SelfNestedBadReturnType.as.SelfNested.impl.F.loc239_112.1 [concrete] // CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.587f77.1: %SelfNestedBadReturnType.as.SelfNested.impl.F.type.75d128.1 = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.facet.23f: %SelfNested.type = facet_value %SelfNestedBadReturnType, (%SelfNested.impl_witness.d9c) [concrete] +// CHECK:STDOUT: %SelfNested.WithSelf.F.type.156: type = fn_type @SelfNested.WithSelf.F, @SelfNested(%SelfNested.facet.23f) [concrete] +// CHECK:STDOUT: %SelfNested.WithSelf.F.edc: %SelfNested.WithSelf.F.type.156 = struct_value () [concrete] // CHECK:STDOUT: %array_type.31b: type = array_type %int_4, %SelfNestedBadReturnType [concrete] // CHECK:STDOUT: %.07a: Core.Form = init_form %array_type.31b, call_param1 [concrete] // CHECK:STDOUT: %pattern_type.1fd: type = pattern_type %array_type.31b [concrete] @@ -455,21 +486,27 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] {} {} -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0.524] +// CHECK:STDOUT: %Self.loc15_13: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.705)] {} {} +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0.18e] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15_13 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.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.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] { +// CHECK:STDOUT: %Self.loc103_13: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: interface_with_self_decl @J [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %J.WithSelf.F.decl: @J.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete] @@ -498,55 +535,58 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param call_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.F.decl [concrete = constants.%assoc0.5fd] +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.WithSelf.F.decl [concrete = constants.%assoc0.481] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc103_13 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%J.F.decl) +// CHECK:STDOUT: witness = (%J.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @SelfNested { -// CHECK:STDOUT: %Self: %SelfNested.type = symbolic_binding Self, 0 [symbolic = constants.%Self.aed] -// CHECK:STDOUT: %SelfNested.F.decl: %SelfNested.F.type = fn_decl @SelfNested.F [concrete = constants.%SelfNested.F] { -// CHECK:STDOUT: %x.patt: @SelfNested.F.%pattern_type.loc211_8 (%pattern_type.37a) = value_binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @SelfNested.F.%pattern_type.loc211_8 (%pattern_type.37a) = value_param_pattern %x.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @SelfNested.F.%pattern_type.loc211_41 (%pattern_type.dfe) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @SelfNested.F.%pattern_type.loc211_41 (%pattern_type.dfe) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %Self.loc204: %SelfNested.type = symbolic_binding Self, 0 [symbolic = constants.%Self.aed] +// CHECK:STDOUT: interface_with_self_decl @SelfNested [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %SelfNested.WithSelf.F.decl: @SelfNested.%SelfNested.WithSelf.F.type (%SelfNested.WithSelf.F.type.430) = fn_decl @SelfNested.WithSelf.F [symbolic = @SelfNested.%SelfNested.WithSelf.F (constants.%SelfNested.WithSelf.F.257)] { +// CHECK:STDOUT: %x.patt: @SelfNested.WithSelf.F.%pattern_type.loc211_8 (%pattern_type.37a) = value_binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @SelfNested.WithSelf.F.%pattern_type.loc211_8 (%pattern_type.37a) = value_param_pattern %x.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @SelfNested.WithSelf.F.%pattern_type.loc211_41 (%pattern_type.dfe) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @SelfNested.WithSelf.F.%pattern_type.loc211_41 (%pattern_type.dfe) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc211_50: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.aed)] +// CHECK:STDOUT: %Self.ref.loc211_50: %SelfNested.type = name_ref Self, @SelfNested.%Self.loc204 [symbolic = %Self (constants.%Self.aed)] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %Self.as_type.loc211_50: type = facet_access_type %Self.ref.loc211_50 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] // CHECK:STDOUT: %.loc211_50: type = converted %Self.ref.loc211_50, %Self.as_type.loc211_50 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] // CHECK:STDOUT: %array_type.loc211_57.2: type = array_type %int_4, %.loc211_50 [symbolic = %array_type.loc211_57.1 (constants.%array_type.eba)] // CHECK:STDOUT: %.loc211_57.2: Core.Form = init_form %array_type.loc211_57.2, call_param1 [symbolic = %.loc211_57.1 (constants.%.746)] -// CHECK:STDOUT: %x.param: @SelfNested.F.%tuple.type (%tuple.type.9cf) = value_param call_param0 +// CHECK:STDOUT: %x.param: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.9cf) = value_param call_param0 // CHECK:STDOUT: %.loc211_38.1: type = splice_block %.loc211_38.3 [symbolic = %tuple.type (constants.%tuple.type.9cf)] { -// CHECK:STDOUT: %Self.ref.loc211_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.aed)] +// CHECK:STDOUT: %Self.ref.loc211_12: %SelfNested.type = name_ref Self, @SelfNested.%Self.loc204 [symbolic = %Self (constants.%Self.aed)] // CHECK:STDOUT: %Self.as_type.loc211_16: type = facet_access_type %Self.ref.loc211_12 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] // CHECK:STDOUT: %.loc211_16: type = converted %Self.ref.loc211_12, %Self.as_type.loc211_16 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] // CHECK:STDOUT: %ptr.loc211_16.2: type = ptr_type %.loc211_16 [symbolic = %ptr.loc211_16.1 (constants.%ptr.d99)] -// CHECK:STDOUT: %Self.ref.loc211_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.aed)] +// CHECK:STDOUT: %Self.ref.loc211_24: %SelfNested.type = name_ref Self, @SelfNested.%Self.loc204 [symbolic = %Self (constants.%Self.aed)] // CHECK:STDOUT: %Self.as_type.loc211_24: type = facet_access_type %Self.ref.loc211_24 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] // CHECK:STDOUT: %.loc211_24: type = converted %Self.ref.loc211_24, %Self.as_type.loc211_24 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %struct_type.x.y.loc211_37.2: type = struct_type {.x: @SelfNested.F.%Self.binding.as_type (%Self.binding.as_type.07b), .y: %i32} [symbolic = %struct_type.x.y.loc211_37.1 (constants.%struct_type.x.y.e05)] +// CHECK:STDOUT: %struct_type.x.y.loc211_37.2: type = struct_type {.x: @SelfNested.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.07b), .y: %i32} [symbolic = %struct_type.x.y.loc211_37.1 (constants.%struct_type.x.y.e05)] // CHECK:STDOUT: %.loc211_38.2: %tuple.type.24b = tuple_literal (%ptr.loc211_16.2, %struct_type.x.y.loc211_37.2) [symbolic = %tuple (constants.%tuple.179)] // CHECK:STDOUT: %.loc211_38.3: type = converted %.loc211_38.2, constants.%tuple.type.9cf [symbolic = %tuple.type (constants.%tuple.type.9cf)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @SelfNested.F.%tuple.type (%tuple.type.9cf) = value_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @SelfNested.F.%array_type.loc211_57.1 (%array_type.eba) = out_param call_param1 -// CHECK:STDOUT: %return: ref @SelfNested.F.%array_type.loc211_57.1 (%array_type.eba) = return_slot %return.param +// CHECK:STDOUT: %x: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.9cf) = value_binding x, %x.param +// CHECK:STDOUT: %return.param: ref @SelfNested.WithSelf.F.%array_type.loc211_57.1 (%array_type.eba) = out_param call_param1 +// CHECK:STDOUT: %return: ref @SelfNested.WithSelf.F.%array_type.loc211_57.1 (%array_type.eba) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %SelfNested.assoc_type = assoc_entity element0, %SelfNested.F.decl [concrete = constants.%assoc0.92f] +// CHECK:STDOUT: %assoc0: %SelfNested.assoc_type = assoc_entity element0, %SelfNested.WithSelf.F.decl [concrete = constants.%assoc0.da4] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc204 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%SelfNested.F.decl) +// CHECK:STDOUT: witness = (%SelfNested.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -663,8 +703,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param call_param1 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc103_44.1: type = specific_constant @J.F.%.loc103_44.2, @J.F(constants.%J.facet.567) [concrete = bool] -// CHECK:STDOUT: %.loc103_44.2: type = specific_constant @J.F.%.loc103_44.3, @J.F(constants.%J.facet.567) [concrete = constants.%.d29] +// CHECK:STDOUT: %.loc103_44.1: type = specific_constant @J.WithSelf.F.%.loc103_44.2, @J.WithSelf.F(constants.%J.facet.567) [concrete = bool] +// CHECK:STDOUT: %.loc103_44.2: type = specific_constant @J.WithSelf.F.%.loc103_44.3, @J.WithSelf.F(constants.%J.facet.567) [concrete = constants.%.d29] // CHECK:STDOUT: %FMissingParam.as.J.impl.F.decl.loc117_31.2: %FMissingParam.as.J.impl.F.type.0f71d8.2 = fn_decl @FMissingParam.as.J.impl.F.loc117_31.2 [concrete = constants.%FMissingParam.as.J.impl.F.7540f6.2] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] @@ -709,8 +749,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param call_param1 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc103_44.1: type = specific_constant @J.F.%.loc103_44.2, @J.F(constants.%J.facet.266) [concrete = bool] -// CHECK:STDOUT: %.loc103_44.2: type = specific_constant @J.F.%.loc103_44.3, @J.F(constants.%J.facet.266) [concrete = constants.%.d29] +// CHECK:STDOUT: %.loc103_44.1: type = specific_constant @J.WithSelf.F.%.loc103_44.2, @J.WithSelf.F(constants.%J.facet.266) [concrete = bool] +// CHECK:STDOUT: %.loc103_44.2: type = specific_constant @J.WithSelf.F.%.loc103_44.3, @J.WithSelf.F(constants.%J.facet.266) [concrete = constants.%.d29] // CHECK:STDOUT: %FMissingImplicitParam.as.J.impl.F.decl.loc130_26.2: %FMissingImplicitParam.as.J.impl.F.type.80a56b.2 = fn_decl @FMissingImplicitParam.as.J.impl.F.loc130_26.2 [concrete = constants.%FMissingImplicitParam.as.J.impl.F.c6a0b7.2] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] @@ -756,8 +796,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = value_binding b, %b.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc103_44.1: type = specific_constant @J.F.%.loc103_44.2, @J.F(constants.%J.facet.a9e) [concrete = bool] -// CHECK:STDOUT: %.loc103_44.2: type = specific_constant @J.F.%.loc103_44.3, @J.F(constants.%J.facet.a9e) [concrete = constants.%.d29] +// CHECK:STDOUT: %.loc103_44.1: type = specific_constant @J.WithSelf.F.%.loc103_44.2, @J.WithSelf.F(constants.%J.facet.a9e) [concrete = bool] +// CHECK:STDOUT: %.loc103_44.2: type = specific_constant @J.WithSelf.F.%.loc103_44.3, @J.WithSelf.F(constants.%J.facet.a9e) [concrete = constants.%.d29] // CHECK:STDOUT: %FMissingReturnType.as.J.impl.F.decl.loc152_30.2: %FMissingReturnType.as.J.impl.F.type.ce0d21.2 = fn_decl @FMissingReturnType.as.J.impl.F.loc152_30.2 [concrete = constants.%FMissingReturnType.as.J.impl.F.5b613a.2] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] @@ -807,8 +847,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param call_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc103_44.1: type = specific_constant @J.F.%.loc103_44.2, @J.F(constants.%J.facet.bd2) [concrete = bool] -// CHECK:STDOUT: %.loc103_44.2: type = specific_constant @J.F.%.loc103_44.3, @J.F(constants.%J.facet.bd2) [concrete = constants.%.d29] +// CHECK:STDOUT: %.loc103_44.1: type = specific_constant @J.WithSelf.F.%.loc103_44.2, @J.WithSelf.F(constants.%J.facet.bd2) [concrete = bool] +// CHECK:STDOUT: %.loc103_44.2: type = specific_constant @J.WithSelf.F.%.loc103_44.3, @J.WithSelf.F(constants.%J.facet.bd2) [concrete = constants.%.d29] // CHECK:STDOUT: %FDifferentParamType.as.J.impl.F.decl.loc171_38.2: %FDifferentParamType.as.J.impl.F.type.10926d.2 = fn_decl @FDifferentParamType.as.J.impl.F.loc171_38.2 [concrete = constants.%FDifferentParamType.as.J.impl.F.f1245a.2] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] @@ -858,8 +898,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param call_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc103_44.1: type = specific_constant @J.F.%.loc103_44.2, @J.F(constants.%J.facet.030) [concrete = bool] -// CHECK:STDOUT: %.loc103_44.2: type = specific_constant @J.F.%.loc103_44.3, @J.F(constants.%J.facet.030) [concrete = constants.%.d29] +// CHECK:STDOUT: %.loc103_44.1: type = specific_constant @J.WithSelf.F.%.loc103_44.2, @J.WithSelf.F(constants.%J.facet.030) [concrete = bool] +// CHECK:STDOUT: %.loc103_44.2: type = specific_constant @J.WithSelf.F.%.loc103_44.3, @J.WithSelf.F(constants.%J.facet.030) [concrete = constants.%.d29] // CHECK:STDOUT: %FDifferentImplicitParamType.as.J.impl.F.decl.loc184_38.2: %FDifferentImplicitParamType.as.J.impl.F.type.955391.2 = fn_decl @FDifferentImplicitParamType.as.J.impl.F.loc184_38.2 [concrete = constants.%FDifferentImplicitParamType.as.J.impl.F.a9ece4.2] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] @@ -911,8 +951,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref %FDifferentReturnType = out_param call_param2 // CHECK:STDOUT: %return: ref %FDifferentReturnType = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc103_44.1: type = specific_constant @J.F.%.loc103_44.2, @J.F(constants.%J.facet.4a1) [concrete = bool] -// CHECK:STDOUT: %.loc103_44.2: type = specific_constant @J.F.%.loc103_44.3, @J.F(constants.%J.facet.4a1) [concrete = constants.%.d29] +// CHECK:STDOUT: %.loc103_44.1: type = specific_constant @J.WithSelf.F.%.loc103_44.2, @J.WithSelf.F(constants.%J.facet.4a1) [concrete = bool] +// CHECK:STDOUT: %.loc103_44.2: type = specific_constant @J.WithSelf.F.%.loc103_44.3, @J.WithSelf.F(constants.%J.facet.4a1) [concrete = constants.%.d29] // CHECK:STDOUT: %FDifferentReturnType.as.J.impl.F.decl.loc200_38.2: %FDifferentReturnType.as.J.impl.F.type.7bcb67.2 = fn_decl @FDifferentReturnType.as.J.impl.F.loc200_38.2 [concrete = constants.%FDifferentReturnType.as.J.impl.F.a709b1.2] { // CHECK:STDOUT: %self.patt: %pattern_type.831 = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.831 = value_param_pattern %self.patt, call_param0 [concrete] @@ -963,8 +1003,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref %array_type.388 = out_param call_param1 // CHECK:STDOUT: %return: ref %array_type.388 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc211_57.1: type = specific_constant @SelfNested.F.%array_type.loc211_57.2, @SelfNested.F(constants.%SelfNested.facet.b9f) [concrete = constants.%array_type.388] -// CHECK:STDOUT: %.loc211_57.2: type = specific_constant @SelfNested.F.%.loc211_57.2, @SelfNested.F(constants.%SelfNested.facet.b9f) [concrete = constants.%.edc] +// CHECK:STDOUT: %.loc211_57.1: type = specific_constant @SelfNested.WithSelf.F.%array_type.loc211_57.2, @SelfNested.WithSelf.F(constants.%SelfNested.facet.b9f) [concrete = constants.%array_type.388] +// CHECK:STDOUT: %.loc211_57.2: type = specific_constant @SelfNested.WithSelf.F.%.loc211_57.2, @SelfNested.WithSelf.F(constants.%SelfNested.facet.b9f) [concrete = constants.%.edc] // CHECK:STDOUT: %SelfNestedBadParam.as.SelfNested.impl.F.decl.loc223_87.2: %SelfNestedBadParam.as.SelfNested.impl.F.type.789632.2 = fn_decl @SelfNestedBadParam.as.SelfNested.impl.F.loc223_87.2 [concrete = constants.%SelfNestedBadParam.as.SelfNested.impl.F.6e1661.2] { // CHECK:STDOUT: %x.patt: %pattern_type.8d7 = value_binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type.8d7 = value_param_pattern %x.patt, call_param0 [concrete] @@ -1011,8 +1051,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref %array_type.388 = out_param call_param1 // CHECK:STDOUT: %return: ref %array_type.388 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc211_57.1: type = specific_constant @SelfNested.F.%array_type.loc211_57.2, @SelfNested.F(constants.%SelfNested.facet.23f) [concrete = constants.%array_type.31b] -// CHECK:STDOUT: %.loc211_57.2: type = specific_constant @SelfNested.F.%.loc211_57.2, @SelfNested.F(constants.%SelfNested.facet.23f) [concrete = constants.%.07a] +// CHECK:STDOUT: %.loc211_57.1: type = specific_constant @SelfNested.WithSelf.F.%array_type.loc211_57.2, @SelfNested.WithSelf.F(constants.%SelfNested.facet.23f) [concrete = constants.%array_type.31b] +// CHECK:STDOUT: %.loc211_57.2: type = specific_constant @SelfNested.WithSelf.F.%.loc211_57.2, @SelfNested.WithSelf.F(constants.%SelfNested.facet.23f) [concrete = constants.%.07a] // CHECK:STDOUT: %SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc239_112.2: %SelfNestedBadReturnType.as.SelfNested.impl.F.type.75d128.2 = fn_decl @SelfNestedBadReturnType.as.SelfNested.impl.F.loc239_112.2 [concrete = constants.%SelfNestedBadReturnType.as.SelfNested.impl.F.587f77.2] { // CHECK:STDOUT: %x.patt: %pattern_type.1f1 = value_binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type.1f1 = value_param_pattern %x.patt, call_param0 [concrete] @@ -1222,7 +1262,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: .SelfNestedBadParam = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc15_13: %I.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1247,7 +1287,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: fn @FExtraReturnType.as.I.impl.F() -> out %return.param: bool; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self.loc103_13: %J.type) { // CHECK:STDOUT: fn(%self.param: bool, %b.param: bool) -> out %return.param: bool; // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1332,11 +1372,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @SelfNested.F(@SelfNested.%Self: %SelfNested.type) { +// CHECK:STDOUT: generic fn @SelfNested.WithSelf.F(@SelfNested.%Self.loc204: %SelfNested.type) { // CHECK:STDOUT: %Self: %SelfNested.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.aed)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] // CHECK:STDOUT: %ptr.loc211_16.1: type = ptr_type %Self.binding.as_type [symbolic = %ptr.loc211_16.1 (constants.%ptr.d99)] -// CHECK:STDOUT: %struct_type.x.y.loc211_37.1: type = struct_type {.x: @SelfNested.F.%Self.binding.as_type (%Self.binding.as_type.07b), .y: %i32} [symbolic = %struct_type.x.y.loc211_37.1 (constants.%struct_type.x.y.e05)] +// CHECK:STDOUT: %struct_type.x.y.loc211_37.1: type = struct_type {.x: @SelfNested.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.07b), .y: %i32} [symbolic = %struct_type.x.y.loc211_37.1 (constants.%struct_type.x.y.e05)] // CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%ptr.loc211_16.1, %struct_type.x.y.loc211_37.1) [symbolic = %tuple (constants.%tuple.179)] // CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc211_16.1, %struct_type.x.y.loc211_37.1) [symbolic = %tuple.type (constants.%tuple.type.9cf)] // CHECK:STDOUT: %pattern_type.loc211_8: type = pattern_type %tuple.type [symbolic = %pattern_type.loc211_8 (constants.%pattern_type.37a)] @@ -1344,7 +1384,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc211_57.1: Core.Form = init_form %array_type.loc211_57.1, call_param1 [symbolic = %.loc211_57.1 (constants.%.746)] // CHECK:STDOUT: %pattern_type.loc211_41: type = pattern_type %array_type.loc211_57.1 [symbolic = %pattern_type.loc211_41 (constants.%pattern_type.dfe)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @SelfNested.F.%tuple.type (%tuple.type.9cf)) -> out %return.param: @SelfNested.F.%array_type.loc211_57.1 (%array_type.eba); +// CHECK:STDOUT: fn(%x.param: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.9cf)) -> out %return.param: @SelfNested.WithSelf.F.%array_type.loc211_57.1 (%array_type.eba); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @SelfNestedBadParam.as.SelfNested.impl.F.loc223_87.1(%x.param: %tuple.type.70f) -> out %return.param: %array_type.388; @@ -1376,29 +1416,134 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: return to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.ab9) {} +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc15_21 => 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.F(constants.%I.facet.b53) {} +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.ab9) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet.5a5) {} +// CHECK:STDOUT: specific @I(constants.%I.facet.fc8) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc15_21 => constants.%I.facet.fc8 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.cec +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.733 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet.1ed) {} +// CHECK:STDOUT: specific @I(constants.%I.facet.c1a) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc15_21 => constants.%I.facet.c1a +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.1b8 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.7e3 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%Self.8a1) {} +// CHECK:STDOUT: specific @I(constants.%I.facet.574) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc15_21 => constants.%I.facet.574 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.f26 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.5e6 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%J.facet.567) {} +// CHECK:STDOUT: specific @I(constants.%I.facet.b53) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc15_21 => constants.%I.facet.b53 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.99d +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.eab +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%J.facet.266) {} +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet.b53) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%J.facet.a9e) {} +// CHECK:STDOUT: specific @I(constants.%I.facet.5a5) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc15_21 => constants.%I.facet.5a5 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.e46 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.5bc +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%J.facet.bd2) {} +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet.5a5) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%J.facet.030) {} +// CHECK:STDOUT: specific @I(constants.%I.facet.1ed) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc15_21 => constants.%I.facet.1ed +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.cd5 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.aee +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%J.facet.4a1) {} +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet.1ed) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @SelfNested.F(constants.%Self.aed) { +// CHECK:STDOUT: specific @J(constants.%Self.8a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc103_48 => 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: +// CHECK:STDOUT: specific @J(constants.%J.facet.567) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc103_48 => constants.%J.facet.567 +// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.54f +// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.7e8 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet.567) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%J.facet.266) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc103_48 => constants.%J.facet.266 +// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.56e +// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.d17 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet.266) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%J.facet.a9e) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc103_48 => constants.%J.facet.a9e +// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.8be +// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.2a5 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet.a9e) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%J.facet.bd2) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc103_48 => constants.%J.facet.bd2 +// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.06a +// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.cad +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet.bd2) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%J.facet.030) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc103_48 => constants.%J.facet.030 +// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.f29 +// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.5b7 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet.030) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%J.facet.4a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc103_48 => constants.%J.facet.4a1 +// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.8e3 +// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.182 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet.4a1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @SelfNested(constants.%Self.aed) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc211 => constants.%Self.aed +// CHECK:STDOUT: %SelfNested.WithSelf.F.type => constants.%SelfNested.WithSelf.F.type.430 +// CHECK:STDOUT: %SelfNested.WithSelf.F => constants.%SelfNested.WithSelf.F.257 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @SelfNested.WithSelf.F(constants.%Self.aed) { // CHECK:STDOUT: %Self => constants.%Self.aed // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.07b // CHECK:STDOUT: %ptr.loc211_16.1 => constants.%ptr.d99 @@ -1411,7 +1556,14 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %pattern_type.loc211_41 => constants.%pattern_type.dfe // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SelfNested.F(constants.%SelfNested.facet.b9f) { +// CHECK:STDOUT: specific @SelfNested(constants.%SelfNested.facet.b9f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc211 => constants.%SelfNested.facet.b9f +// CHECK:STDOUT: %SelfNested.WithSelf.F.type => constants.%SelfNested.WithSelf.F.type.4de +// CHECK:STDOUT: %SelfNested.WithSelf.F => constants.%SelfNested.WithSelf.F.5e9 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @SelfNested.WithSelf.F(constants.%SelfNested.facet.b9f) { // CHECK:STDOUT: %Self => constants.%SelfNested.facet.b9f // CHECK:STDOUT: %Self.binding.as_type => constants.%SelfNestedBadParam // CHECK:STDOUT: %ptr.loc211_16.1 => constants.%ptr.cf2 @@ -1424,7 +1576,14 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %pattern_type.loc211_41 => constants.%pattern_type.ec1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SelfNested.F(constants.%SelfNested.facet.23f) { +// CHECK:STDOUT: specific @SelfNested(constants.%SelfNested.facet.23f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc211 => constants.%SelfNested.facet.23f +// CHECK:STDOUT: %SelfNested.WithSelf.F.type => constants.%SelfNested.WithSelf.F.type.156 +// CHECK:STDOUT: %SelfNested.WithSelf.F => constants.%SelfNested.WithSelf.F.edc +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @SelfNested.WithSelf.F(constants.%SelfNested.facet.23f) { // CHECK:STDOUT: %Self => constants.%SelfNested.facet.23f // CHECK:STDOUT: %Self.binding.as_type => constants.%SelfNestedBadReturnType // CHECK:STDOUT: %ptr.loc211_16.1 => constants.%ptr.cbe diff --git a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon index 98def892bb8a..79a806a66993 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon @@ -218,6 +218,7 @@ impl {.a: bool} as type where .Self impls I {} // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -231,3 +232,5 @@ impl {.a: bool} as type where .Self impls I {} // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) {} +// 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 4ab1a718c0b0..438f4936f445 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_type.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_type.carbon @@ -58,6 +58,7 @@ impl true as I {} // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -71,3 +72,5 @@ impl true as I {} // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self.ab9) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_redefinition.carbon b/toolchain/check/testdata/impl/fail_redefinition.carbon index bacb305aa01a..3106824da6c0 100644 --- a/toolchain/check/testdata/impl/fail_redefinition.carbon +++ b/toolchain/check/testdata/impl/fail_redefinition.carbon @@ -35,6 +35,7 @@ impl i32 as I {} // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @i32.as.I.impl.a9e516.1.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,6 +68,7 @@ impl i32 as I {} // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -88,3 +90,11 @@ impl i32 as I {} // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// 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 6940526dfeb0..b6ac7116ed04 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -63,10 +63,10 @@ impl i32 as I { // CHECK:STDOUT: %pattern_type.9d9: type = pattern_type %I.type [concrete] // CHECK:STDOUT: %C.eab: type = class_type @C, @C(%I.type, %Self.ab9) [symbolic] // CHECK:STDOUT: %pattern_type.a8e: type = pattern_type %C.eab [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I(%Self.ab9) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.705: %I.WithSelf.F.type.08c = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.524: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0.18e: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] // CHECK:STDOUT: %I.impl_witness.f69: = impl_witness @bool.as.I.impl.%I.impl_witness_table [concrete] @@ -75,6 +75,8 @@ impl i32 as I { // CHECK:STDOUT: %pattern_type.212: type = pattern_type %C.60c [concrete] // CHECK:STDOUT: %bool.as.I.impl.F.type: type = fn_type @bool.as.I.impl.F [concrete] // CHECK:STDOUT: %bool.as.I.impl.F: %bool.as.I.impl.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.347: type = fn_type @I.WithSelf.F, @I(%I.facet.e45) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.04c: %I.WithSelf.F.type.347 = struct_value () [concrete] // 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] @@ -85,6 +87,8 @@ impl i32 as I { // CHECK:STDOUT: %i32.as.I.impl.F.type.6c53e7.1: type = fn_type @i32.as.I.impl.F.loc43_18.1 [concrete] // CHECK:STDOUT: %i32.as.I.impl.F.7f652f.1: %i32.as.I.impl.F.type.6c53e7.1 = struct_value () [concrete] // CHECK:STDOUT: %I.facet.20f: %I.type = facet_value %i32, (%I.impl_witness.37a) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.f37: type = fn_type @I.WithSelf.F, @I(%I.facet.20f) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.b05: %I.WithSelf.F.type.f37 = struct_value () [concrete] // CHECK:STDOUT: %C.719: type = class_type @C, @C(%I.type, %I.facet.20f) [concrete] // CHECK:STDOUT: %pattern_type.54c: type = pattern_type %C.719 [concrete] // CHECK:STDOUT: %i32.as.I.impl.F.type.6c53e7.2: type = fn_type @i32.as.I.impl.F.loc43_18.2 [concrete] @@ -140,26 +144,30 @@ impl i32 as I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { -// CHECK:STDOUT: %c.patt: @I.F.%pattern_type (%pattern_type.a8e) = value_binding_pattern c [concrete] -// CHECK:STDOUT: %c.param_patt: @I.F.%pattern_type (%pattern_type.a8e) = value_param_pattern %c.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc17: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.705)] { +// CHECK:STDOUT: %c.patt: @I.WithSelf.F.%pattern_type (%pattern_type.a8e) = value_binding_pattern c [concrete] +// CHECK:STDOUT: %c.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.a8e) = value_param_pattern %c.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %c.param: @I.F.%C.loc25_17.1 (%C.eab) = value_param call_param0 +// CHECK:STDOUT: %c.param: @I.WithSelf.F.%C.loc25_17.1 (%C.eab) = value_param call_param0 // CHECK:STDOUT: %.loc25: type = splice_block %C.loc25_17.2 [symbolic = %C.loc25_17.1 (constants.%C.eab)] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self.loc17 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %C.loc25_17.2: type = class_type @C, @C(constants.%I.type, constants.%Self.ab9) [symbolic = %C.loc25_17.1 (constants.%C.eab)] // CHECK:STDOUT: } -// CHECK:STDOUT: %c: @I.F.%C.loc25_17.1 (%C.eab) = value_binding c, %c.param +// CHECK:STDOUT: %c: @I.WithSelf.F.%C.loc25_17.1 (%C.eab) = value_binding c, %c.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0.524] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0.18e] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc17 +// CHECK:STDOUT: .C = // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -236,12 +244,12 @@ impl i32 as I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc17: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %C.loc25_17.1: type = class_type @C, @C(constants.%I.type, %Self) [symbolic = %C.loc25_17.1 (constants.%C.eab)] // CHECK:STDOUT: %pattern_type: type = pattern_type %C.loc25_17.1 [symbolic = %pattern_type (constants.%pattern_type.a8e)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%c.param: @I.F.%C.loc25_17.1 (%C.eab)); +// CHECK:STDOUT: fn(%c.param: @I.WithSelf.F.%C.loc25_17.1 (%C.eab)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @bool.as.I.impl.F(%c.param: %C.60c); @@ -263,13 +271,20 @@ impl i32 as I { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d1c4.1 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc25 => 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 @C(constants.%I.type, constants.%Self.ab9) { // CHECK:STDOUT: %T.loc15_9.1 => constants.%I.type // CHECK:STDOUT: %X.loc15_19.1 => constants.%Self.ab9 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9d9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.ab9) { +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.ab9) { // CHECK:STDOUT: %Self => constants.%Self.ab9 // CHECK:STDOUT: %C.loc25_17.1 => constants.%C.eab // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a8e @@ -281,7 +296,14 @@ impl i32 as I { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9d9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet.e45) { +// CHECK:STDOUT: specific @I(constants.%I.facet.e45) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc25 => constants.%I.facet.e45 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.347 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.04c +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet.e45) { // CHECK:STDOUT: %Self => constants.%I.facet.e45 // CHECK:STDOUT: %C.loc25_17.1 => constants.%C.60c // CHECK:STDOUT: %pattern_type => constants.%pattern_type.212 @@ -295,7 +317,14 @@ impl i32 as I { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet.20f) { +// CHECK:STDOUT: specific @I(constants.%I.facet.20f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc25 => constants.%I.facet.20f +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.f37 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.b05 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet.20f) { // CHECK:STDOUT: %Self => constants.%I.facet.20f // CHECK:STDOUT: %C.loc25_17.1 => constants.%C.719 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.54c diff --git a/toolchain/check/testdata/impl/forward_decls.carbon b/toolchain/check/testdata/impl/forward_decls.carbon index bbe7a4a5c949..35ffd2ce69fe 100644 --- a/toolchain/check/testdata/impl/forward_decls.carbon +++ b/toolchain/check/testdata/impl/forward_decls.carbon @@ -120,7 +120,7 @@ impl D as I where .T = C; interface I {} class C {} -// CHECK:STDERR: fail_associated_const_before_interface_definition.carbon:[[@LINE+4]]:19: error: member name `T` not found in `I` [MemberNameNotFoundInInstScope] +// CHECK:STDERR: fail_associated_const_before_interface_definition.carbon:[[@LINE+4]]:19: error: member name `T` not found in `I` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: impl D as I where .T = C {} // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -287,6 +287,7 @@ interface I { // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @empty_struct_type.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_struct_type, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -318,6 +319,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -334,6 +336,14 @@ interface I { // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- method.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -342,13 +352,15 @@ interface I { // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @empty_struct_type.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %I.G.type: type = fn_type @I.G [concrete] -// CHECK:STDOUT: %I.G: %I.G.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.G.type.047: type = fn_type @I.WithSelf.G, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.G.8c4: %I.WithSelf.G.type.047 = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.G.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.G.decl [concrete] // CHECK:STDOUT: %empty_struct_type.as.I.impl.G.type: type = fn_type @empty_struct_type.as.I.impl.G [concrete] // CHECK:STDOUT: %empty_struct_type.as.I.impl.G: %empty_struct_type.as.I.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_struct_type, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %I.WithSelf.G.type.ed6: type = fn_type @I.WithSelf.G, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.G.42b: %I.WithSelf.G.type.ed6 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -379,14 +391,17 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.G.decl: %I.G.type = fn_decl @I.G [concrete = constants.%I.G] {} {} -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.G.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc6: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.G.decl: @I.%I.WithSelf.G.type (%I.WithSelf.G.type.047) = fn_decl @I.WithSelf.G [symbolic = @I.%I.WithSelf.G (constants.%I.WithSelf.G.8c4)] {} {} +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.G.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc6 // CHECK:STDOUT: .G = %assoc0 -// CHECK:STDOUT: witness = (%I.G.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -401,7 +416,7 @@ interface I { // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.G(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.G(@I.%Self.loc6: %I.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -410,9 +425,23 @@ interface I { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.G(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc7 => constants.%Self +// CHECK:STDOUT: %I.WithSelf.G.type => constants.%I.WithSelf.G.type.047 +// CHECK:STDOUT: %I.WithSelf.G => constants.%I.WithSelf.G.8c4 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.G(constants.%I.facet) {} +// CHECK:STDOUT: specific @I.WithSelf.G(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc7 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.G.type => constants.%I.WithSelf.G.type.ed6 +// CHECK:STDOUT: %I.WithSelf.G => constants.%I.WithSelf.G.42b +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.G(constants.%I.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- combine.carbon // CHECK:STDOUT: @@ -423,15 +452,16 @@ interface I { // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %I.type, %type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @empty_struct_type.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_struct_type, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -459,7 +489,7 @@ interface I { // CHECK:STDOUT: %.loc4_7.2: type = converted %.loc4_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref.loc4_12: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] // CHECK:STDOUT: %I.ref.loc4_16: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] -// CHECK:STDOUT: %impl.elem0.loc4: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc4: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc4: = bound_method %I.ref.loc4_12, %impl.elem0.loc4 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc4: init type = call %bound_method.loc4(%I.ref.loc4_12, %I.ref.loc4_16) [concrete = constants.%I.type] // CHECK:STDOUT: } @@ -471,7 +501,7 @@ interface I { // CHECK:STDOUT: %.loc7_7.2: type = converted %.loc7_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref.loc7_12: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] // CHECK:STDOUT: %I.ref.loc7_16: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] -// CHECK:STDOUT: %impl.elem0.loc7: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc7: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc7: = bound_method %I.ref.loc7_12, %impl.elem0.loc7 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc7: init type = call %bound_method.loc7(%I.ref.loc7_12, %I.ref.loc7_16) [concrete = constants.%I.type] // CHECK:STDOUT: } @@ -479,6 +509,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -495,6 +526,14 @@ interface I { // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- associated_const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -512,6 +551,7 @@ interface I { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @empty_struct_type.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_struct_type, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -566,6 +606,9 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -578,10 +621,6 @@ interface I { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @empty_struct_type.as.I.impl: %.loc6_7.2 as %.loc6_14 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @empty_struct_type.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] @@ -591,9 +630,17 @@ interface I { // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- associated_const_compound_member_access.carbon // CHECK:STDOUT: @@ -684,6 +731,9 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -696,10 +746,6 @@ interface I { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C.as.I.impl: %C.ref.loc7 as %.loc7_13 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @C.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] @@ -723,11 +769,17 @@ interface I { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%I.facet) {} +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- associated_const_of_facet.carbon // CHECK:STDOUT: @@ -820,6 +872,9 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -832,10 +887,6 @@ interface I { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C.as.I.impl: %C.ref.loc7 as %.loc7_13 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @C.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] @@ -859,11 +910,17 @@ interface I { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%I.facet) {} +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_unset_associated_const.carbon // CHECK:STDOUT: @@ -924,6 +981,9 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -936,10 +996,6 @@ interface I { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C.as.I.impl: %C.ref.loc7 as %I.ref.loc7 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] @@ -962,9 +1018,13 @@ interface I { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%I.facet) {} +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_associated_const_before_interface_definition.carbon // CHECK:STDOUT: @@ -1031,6 +1091,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -1061,6 +1122,14 @@ interface I { // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- associated_const_of_parameterized.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1073,7 +1142,7 @@ interface I { // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%U)> [symbolic] // CHECK:STDOUT: %Self.fdb: %I.type.1ab = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %I.assoc_type.76c: type = assoc_entity_type @I, @I(%U) [symbolic] -// CHECK:STDOUT: %assoc0.3c3: %I.assoc_type.76c = assoc_entity element0, @I.%T [symbolic] +// CHECK:STDOUT: %assoc0.eea: %I.assoc_type.76c = assoc_entity element0, @I.%T [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -1082,12 +1151,13 @@ interface I { // CHECK:STDOUT: %.Self.9dc: %I.type.807 = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Self.b60: %I.type.807 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %I.assoc_type.2e0: type = assoc_entity_type @I, @I(%C) [concrete] -// CHECK:STDOUT: %assoc0.9f3: %I.assoc_type.2e0 = assoc_entity element0, @I.%T [concrete] +// CHECK:STDOUT: %assoc0.501: %I.assoc_type.2e0 = assoc_entity element0, @I.%T [concrete] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.9dc [symbolic_self] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self.9dc, @I, @I(%C) [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I, @I(%C) where %impl.elem0 = %C> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @D.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type.807 = facet_value %D, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1122,8 +1192,8 @@ interface I { // CHECK:STDOUT: %.Self.ref.loc8: %I.type.807 = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.9dc] // CHECK:STDOUT: %.Self.as_type.loc8: type = facet_access_type %.Self.ref.loc8 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc8_22.1: type = converted %.Self.ref.loc8, %.Self.as_type.loc8 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %.loc8_22.2: %I.assoc_type.2e0 = specific_constant @T.%assoc0, @I(constants.%C) [concrete = constants.%assoc0.9f3] -// CHECK:STDOUT: %T.ref.loc8: %I.assoc_type.2e0 = name_ref T, %.loc8_22.2 [concrete = constants.%assoc0.9f3] +// CHECK:STDOUT: %.loc8_22.2: %I.assoc_type.2e0 = specific_constant @T.%assoc0, @I(constants.%C, constants.%.Self.9dc) [concrete = constants.%assoc0.501] +// CHECK:STDOUT: %T.ref.loc8: %I.assoc_type.2e0 = name_ref T, %.loc8_22.2 [concrete = constants.%assoc0.501] // CHECK:STDOUT: %impl.elem0.loc8: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %C.ref.loc8_27: type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C] // CHECK:STDOUT: %.loc8_16: type = where_expr %.Self.2 [concrete = constants.%I_where.type] { @@ -1141,8 +1211,8 @@ interface I { // CHECK:STDOUT: %.Self.ref.loc11: %I.type.807 = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.9dc] // CHECK:STDOUT: %.Self.as_type.loc11: type = facet_access_type %.Self.ref.loc11 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc11_22.1: type = converted %.Self.ref.loc11, %.Self.as_type.loc11 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %.loc11_22.2: %I.assoc_type.2e0 = specific_constant @T.%assoc0, @I(constants.%C) [concrete = constants.%assoc0.9f3] -// CHECK:STDOUT: %T.ref.loc11: %I.assoc_type.2e0 = name_ref T, %.loc11_22.2 [concrete = constants.%assoc0.9f3] +// CHECK:STDOUT: %.loc11_22.2: %I.assoc_type.2e0 = specific_constant @T.%assoc0, @I(constants.%C, constants.%.Self.9dc) [concrete = constants.%assoc0.501] +// CHECK:STDOUT: %T.ref.loc11: %I.assoc_type.2e0 = name_ref T, %.loc11_22.2 [concrete = constants.%assoc0.501] // CHECK:STDOUT: %impl.elem0.loc11: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %C.ref.loc11_27: type = name_ref C, file.%C.decl.loc6 [concrete = constants.%C] // CHECK:STDOUT: %.loc11_16: type = where_expr %.Self.1 [concrete = constants.%I_where.type] { @@ -1158,13 +1228,14 @@ interface I { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%U.loc3_13.1)> [symbolic = %I.type (constants.%I.type.1ab)] // CHECK:STDOUT: %Self.loc3_23.2: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.fdb)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%U.loc3_13.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.76c)] -// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, %T [symbolic = %assoc0 (constants.%assoc0.3c3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc3_23.1: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.fdb)] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { -// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, @I.%T [symbolic = @I.%assoc0 (constants.%assoc0.3c3)] +// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, @I.%T [symbolic = @I.%assoc0 (constants.%assoc0.eea)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -1176,10 +1247,6 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%U.loc3_13.2: type, @I.%Self.loc3_23.1: @I.%I.type (%I.type.1ab)) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @D.as.I.impl: %D.ref.loc8 as %.loc8_16 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @D.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] @@ -1209,7 +1276,7 @@ interface I { // CHECK:STDOUT: %U.loc3_13.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%U, constants.%Self.fdb) {} +// CHECK:STDOUT: specific @I(constants.%U, constants.%Self.fdb) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%C) { // CHECK:STDOUT: %U.loc3_13.1 => constants.%C @@ -1217,11 +1284,28 @@ interface I { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.807 // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.b60 -// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.2e0 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.9f3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%C, constants.%.Self.9dc) {} +// CHECK:STDOUT: specific @I(constants.%C, constants.%Self.fdb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %U.loc4 => constants.%C +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.2e0 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.501 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%C, constants.%.Self.9dc) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %U.loc4 => constants.%C +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.2e0 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.501 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%C, constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %U.loc4 => constants.%C +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.2e0 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.501 +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- find_incomplete_impl.carbon // CHECK:STDOUT: @@ -1323,6 +1407,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -1376,6 +1461,14 @@ interface I { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_two_interfaces.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1386,10 +1479,10 @@ interface I { // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %I.type, %type.as.BitAndWith.impl.Op [concrete] @@ -1425,7 +1518,7 @@ interface I { // CHECK:STDOUT: %.loc10_7.2: type = converted %.loc10_7.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl.loc3 [concrete = constants.%I.type] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl.loc4 [concrete = constants.%J.type] -// CHECK:STDOUT: %impl.elem0: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %I.ref, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%I.ref, %J.ref) [concrete = constants.%facet_type] // CHECK:STDOUT: } @@ -1435,6 +1528,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -1445,6 +1539,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @J { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: interface_with_self_decl @J [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -1455,6 +1550,10 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_struct_type.as..impl: %.loc10_7.2 as file.%.loc10_14.2; // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self.ab9) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%Self.8a1) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_never_assigned_associated_const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1474,6 +1573,7 @@ interface I { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1528,6 +1628,9 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -1544,14 +1647,6 @@ interface I { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @U(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const U:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C.as.I.impl: %C.ref.loc9 as %.loc9_13 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant, ), @C.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] @@ -1569,11 +1664,17 @@ interface I { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- example_from_proposal_5168.carbon // CHECK:STDOUT: @@ -1605,6 +1706,7 @@ interface I { // CHECK:STDOUT: %Self.162: %Y.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %U.binding.as_type [symbolic] // CHECK:STDOUT: %Y.impl_witness: = impl_witness @C.as.Y.impl.%Y.impl_witness_table [concrete] +// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %C, (%Y.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1713,6 +1815,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @X { // CHECK:STDOUT: %Self: %X.type = symbolic_binding Self, 0 [symbolic = constants.%Self.e52] +// CHECK:STDOUT: interface_with_self_decl @X [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -1723,6 +1826,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @Y { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = constants.%Self.162] +// CHECK:STDOUT: interface_with_self_decl @Y [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -1809,6 +1913,10 @@ interface I { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b36 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @X(constants.%Self.e52) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%X.facet) { // CHECK:STDOUT: %U.loc6_6.1 => constants.%X.facet // CHECK:STDOUT: @@ -1824,19 +1932,34 @@ interface I { // CHECK:STDOUT: %require_complete => constants.%complete_type // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%Self.162) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @X(constants.%X.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%Y.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_impl_in_interface_definition.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.705: %I.WithSelf.F.type.08c = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table, @C.as.I.impl(%Self) [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.5dd: type = fn_type @I.WithSelf.F, @I(%I.facet) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.f5e: %I.WithSelf.F.type.5dd = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1856,20 +1979,24 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] {} {} -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc4: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.705)] {} {} +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 +// CHECK:STDOUT: .I = // CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: .I = -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @C.as.I.impl(@I.%Self: %I.type) { +// CHECK:STDOUT: generic impl @C.as.I.impl(@I.%Self.loc4: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C)] // CHECK:STDOUT: %I.impl_witness.loc11_16.2: = impl_witness %I.impl_witness_table, @C.as.I.impl(%Self) [symbolic = %I.impl_witness.loc11_16.2 (constants.%I.impl_witness)] @@ -1886,7 +2013,7 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(@I.%Self: %I.type) { +// CHECK:STDOUT: generic class @C(@I.%Self.loc4: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { @@ -1898,27 +2025,34 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc4: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.decl: type = class_decl @C [symbolic = @I.F.%C (constants.%C)] {} {} +// CHECK:STDOUT: %C.decl: type = class_decl @C [symbolic = @I.WithSelf.F.%C (constants.%C)] {} {} // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} { -// CHECK:STDOUT: %C.ref.loc11: type = name_ref C, @I.F.%C.decl [symbolic = %C (constants.%C)] +// CHECK:STDOUT: %C.ref.loc11: type = name_ref C, @I.WithSelf.F.%C.decl [symbolic = %C (constants.%C)] // CHECK:STDOUT: %I.ref.loc11: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} { -// CHECK:STDOUT: %C.ref.loc20: type = name_ref C, @I.F.%C.decl [symbolic = %C (constants.%C)] +// CHECK:STDOUT: %C.ref.loc20: type = name_ref C, @I.WithSelf.F.%C.decl [symbolic = %C (constants.%C)] // CHECK:STDOUT: %I.ref.loc20: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%Self +// 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) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%Self) {} // CHECK:STDOUT: @@ -1928,6 +2062,13 @@ interface I { // CHECK:STDOUT: %I.impl_witness.loc11_16.2 => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.5dd +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.f5e +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_impl_in_interface_definition_with_associated.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1935,19 +2076,24 @@ interface I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%U [concrete] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I(%Self) [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.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [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(%.Self) [symbolic_self] +// CHECK:STDOUT: %I.WithSelf.F.8ec: %I.WithSelf.F.type.29d = struct_value () [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %C> [symbolic] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table, @C.as.I.impl(%Self) [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %I_where.type [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.000: type = fn_type @I.WithSelf.F, @I(%I.facet) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.a8c: %I.WithSelf.F.type.000 = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1967,28 +2113,28 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self.loc4: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%U [concrete = constants.%assoc0] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] {} {} -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %I.F.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.705)] {} {} +// 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: .Self = %Self.loc4 +// CHECK:STDOUT: .I = // CHECK:STDOUT: .U = @U.%assoc0 // CHECK:STDOUT: .F = %assoc1 // CHECK:STDOUT: .I = -// CHECK:STDOUT: witness = (%U, %I.F.decl) +// CHECK:STDOUT: witness = (%U, %I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @U(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const U:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic impl @C.as.I.impl(@I.%Self: %I.type) { +// CHECK:STDOUT: generic impl @C.as.I.impl(@I.%Self.loc4: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C)] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where constants.%impl.elem0 = %C> [symbolic = %I_where.type (constants.%I_where.type)] @@ -2008,7 +2154,7 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(@I.%Self: %I.type) { +// CHECK:STDOUT: generic class @C(@I.%Self.loc4: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { @@ -2020,16 +2166,16 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc4: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.decl: type = class_decl @C [symbolic = @I.F.%C (constants.%C)] {} {} +// CHECK:STDOUT: %C.decl: type = class_decl @C [symbolic = @I.WithSelf.F.%C (constants.%C)] {} {} // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} { -// CHECK:STDOUT: %C.ref.loc12_10: type = name_ref C, @I.F.%C.decl [symbolic = %C (constants.%C)] +// CHECK:STDOUT: %C.ref.loc12_10: type = name_ref C, @I.WithSelf.F.%C.decl [symbolic = %C (constants.%C)] // CHECK:STDOUT: %I.ref.loc12: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %.Self.2: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.ref.loc12: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] @@ -2037,14 +2183,14 @@ interface I { // CHECK:STDOUT: %.loc12_23: type = converted %.Self.ref.loc12, %.Self.as_type.loc12 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %U.ref.loc12: %I.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc12: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] -// CHECK:STDOUT: %C.ref.loc12_28: type = name_ref C, @I.F.%C.decl [symbolic = %C (constants.%C)] +// CHECK:STDOUT: %C.ref.loc12_28: type = name_ref C, @I.WithSelf.F.%C.decl [symbolic = %C (constants.%C)] // CHECK:STDOUT: %.loc12_17: type = where_expr %.Self.2 [symbolic = %I_where.type (constants.%I_where.type)] { // CHECK:STDOUT: requirement_base_facet_type constants.%I.type // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc12, %C.ref.loc12_28 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @C.as.I.impl [concrete] {} { -// CHECK:STDOUT: %C.ref.loc21_10: type = name_ref C, @I.F.%C.decl [symbolic = %C (constants.%C)] +// CHECK:STDOUT: %C.ref.loc21_10: type = name_ref C, @I.WithSelf.F.%C.decl [symbolic = %C (constants.%C)] // CHECK:STDOUT: %I.ref.loc21: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %.Self.1: %I.type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.ref.loc21: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self] @@ -2052,7 +2198,7 @@ interface I { // CHECK:STDOUT: %.loc21_23: type = converted %.Self.ref.loc21, %.Self.as_type.loc21 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %U.ref.loc21: %I.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc21: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] -// CHECK:STDOUT: %C.ref.loc21_28: type = name_ref C, @I.F.%C.decl [symbolic = %C (constants.%C)] +// CHECK:STDOUT: %C.ref.loc21_28: type = name_ref C, @I.WithSelf.F.%C.decl [symbolic = %C (constants.%C)] // CHECK:STDOUT: %.loc21_17: type = where_expr %.Self.1 [symbolic = %I_where.type (constants.%I_where.type)] { // CHECK:STDOUT: requirement_base_facet_type constants.%I.type // CHECK:STDOUT: requirement_rewrite %impl.elem0.loc21, %C.ref.loc21_28 @@ -2062,13 +2208,23 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc10 => constants.%Self +// 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.F(constants.%Self) {} +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc10 => 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 @C.as.I.impl(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self @@ -2077,3 +2233,10 @@ interface I { // CHECK:STDOUT: %I.impl_witness.loc12_29.2 => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc10 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.000 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.a8c +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/generic_redeclaration.carbon b/toolchain/check/testdata/impl/generic_redeclaration.carbon index 334f42fce16f..0f31db9804ec 100644 --- a/toolchain/check/testdata/impl/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/generic_redeclaration.carbon @@ -149,6 +149,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %pattern_type.88f: type = pattern_type %L.type [concrete] // CHECK:STDOUT: %T.binding.as_type.29d: type = symbolic_binding_type T, 0, %T.0fc [symbolic] // CHECK:STDOUT: %Interface.impl_witness.8e9: = impl_witness @T.binding.as_type.as.Interface.impl.410.%Interface.impl_witness_table, @T.binding.as_type.as.Interface.impl.410(%T.0fc) [symbolic] +// CHECK:STDOUT: %Interface.facet.9bb: %Interface.type = facet_value %T.binding.as_type.3af, (%Interface.impl_witness.779) [symbolic] +// CHECK:STDOUT: %Interface.facet.08d: %Interface.type = facet_value %T.binding.as_type.50b, (%Interface.impl_witness.8e2) [symbolic] +// CHECK:STDOUT: %Interface.facet.842: %Interface.type = facet_value %T.binding.as_type.bec, (%Interface.impl_witness.84e) [symbolic] +// CHECK:STDOUT: %Interface.facet.f9d: %Interface.type = facet_value %T.binding.as_type.29d, (%Interface.impl_witness.8e9) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -281,6 +285,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self.887] +// CHECK:STDOUT: interface_with_self_decl @Interface [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -291,6 +296,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -301,6 +307,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: interface @J { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: interface_with_self_decl @J [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -311,6 +318,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: interface @K { // CHECK:STDOUT: %Self: %K.type = symbolic_binding Self, 0 [symbolic = constants.%Self.44d] +// CHECK:STDOUT: interface_with_self_decl @K [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -321,6 +329,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: interface @L { // CHECK:STDOUT: %Self: %L.type = symbolic_binding Self, 0 [symbolic = constants.%Self.cbc] +// CHECK:STDOUT: interface_with_self_decl @L [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -393,6 +402,26 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface(constants.%Self.887) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%Self.8a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @K(constants.%Self.44d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @L(constants.%Self.cbc) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @T.binding.as_type.as.Interface.impl.973(constants.%T.651) { // CHECK:STDOUT: %T.loc12_14.2 => constants.%T.651 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type.3af @@ -417,6 +446,22 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %Interface.impl_witness.loc15_35.2 => constants.%Interface.impl_witness.8e9 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface(constants.%Interface.facet.9bb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface(constants.%Interface.facet.08d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface(constants.%Interface.facet.842) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface(constants.%Interface.facet.f9d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_same_self_and_interface_redefined.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -430,6 +475,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %pattern_type: type = pattern_type %I.type [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] // CHECK:STDOUT: %J.impl_witness: = impl_witness @T.binding.as_type.as.J.impl.c4ee06.1.%J.impl_witness_table, @T.binding.as_type.as.J.impl.c4ee06.1(%T) [symbolic] +// CHECK:STDOUT: %J.facet: %J.type = facet_value %T.binding.as_type, (%J.impl_witness) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -478,6 +524,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -488,6 +535,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: interface @J { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: interface_with_self_decl @J [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -524,12 +572,24 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%Self.8a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @T.binding.as_type.as.J.impl.c4ee06.1(constants.%T) { // CHECK:STDOUT: %T.loc7_14.2 => constants.%T // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %J.impl_witness.loc7_28.2 => constants.%J.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%J.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @T.binding.as_type.as.J.impl.c4ee06.2(constants.%T) { // CHECK:STDOUT: %T.loc15_14.2 => constants.%T // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type @@ -542,10 +602,12 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %I.impl_witness.6465e0.1: = impl_witness @C.as.I.impl.e47215.1.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet.f94759.1: %I.type = facet_value %C, (%I.impl_witness.6465e0.1) [concrete] // CHECK:STDOUT: %tuple.type: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%C, %C) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %I.impl_witness.6465e0.2: = impl_witness @C.as.I.impl.e47215.2.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet.f94759.2: %I.type = facet_value %C, (%I.impl_witness.6465e0.2) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -582,6 +644,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -608,6 +671,18 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: class @C; // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet.f94759.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet.f94759.2) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_redefinition_generic_regions.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -621,6 +696,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: %T.as.I.impl.A.type: type = fn_type @T.as.I.impl.A, @T.as.I.impl.f7b5a3.1(%T) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %T.as.I.impl.A: %T.as.I.impl.A.type = struct_value () [symbolic] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %T, (%I.impl_witness) [symbolic] // CHECK:STDOUT: %T.as.I.impl.B.type: type = fn_type @T.as.I.impl.B, @T.as.I.impl.f7b5a3.2(%T) [symbolic] // CHECK:STDOUT: %T.as.I.impl.B: %T.as.I.impl.B.type = struct_value () [symbolic] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] @@ -667,6 +743,7 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -783,6 +860,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.I.impl.f7b5a3.1(constants.%T) { // CHECK:STDOUT: %T.loc4_14.1 => constants.%T // CHECK:STDOUT: %I.impl_witness.loc4_31.2 => constants.%I.impl_witness @@ -794,6 +875,10 @@ impl forall [T:! type] T as I { // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.I.impl.A(constants.%T) {} // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.I.impl.f7b5a3.2(constants.%T) { // CHECK:STDOUT: %T.loc15_14.1 => constants.%T // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 15524d68cea4..2985f0e5e733 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -30,16 +30,18 @@ class C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple> [concrete] // CHECK:STDOUT: %Self.af2: %Simple.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Simple.F.type: type = fn_type @Simple.F [concrete] +// CHECK:STDOUT: %Simple.WithSelf.F.type.75b: type = fn_type @Simple.WithSelf.F, @Simple(%Self.af2) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Simple.F: %Simple.F.type = struct_value () [concrete] +// CHECK:STDOUT: %Simple.WithSelf.F.58c: %Simple.WithSelf.F.type.75b = struct_value () [symbolic] // CHECK:STDOUT: %Simple.assoc_type: type = assoc_entity_type @Simple [concrete] -// CHECK:STDOUT: %assoc0.e8d: %Simple.assoc_type = assoc_entity element0, @Simple.%Simple.F.decl [concrete] +// CHECK:STDOUT: %assoc0.db6: %Simple.assoc_type = assoc_entity element0, @Simple.%Simple.WithSelf.F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %Simple.impl_witness: = impl_witness @C.as.Simple.impl.%Simple.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.Simple.impl.F.type: type = fn_type @C.as.Simple.impl.F [concrete] // CHECK:STDOUT: %C.as.Simple.impl.F: %C.as.Simple.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %C, (%Simple.impl_witness) [concrete] +// CHECK:STDOUT: %Simple.WithSelf.F.type.839: type = fn_type @Simple.WithSelf.F, @Simple(%Simple.facet) [concrete] +// CHECK:STDOUT: %Simple.WithSelf.F.79e: %Simple.WithSelf.F.type.839 = 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: %pattern_type.7c7: type = pattern_type %C [concrete] @@ -71,14 +73,17 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: %Simple.type = symbolic_binding Self, 0 [symbolic = constants.%Self.af2] -// CHECK:STDOUT: %Simple.F.decl: %Simple.F.type = fn_decl @Simple.F [concrete = constants.%Simple.F] {} {} -// CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, %Simple.F.decl [concrete = constants.%assoc0.e8d] +// CHECK:STDOUT: %Self.loc15: %Simple.type = symbolic_binding Self, 0 [symbolic = constants.%Self.af2] +// CHECK:STDOUT: interface_with_self_decl @Simple [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Simple.WithSelf.F.decl: @Simple.%Simple.WithSelf.F.type (%Simple.WithSelf.F.type.75b) = fn_decl @Simple.WithSelf.F [symbolic = @Simple.%Simple.WithSelf.F (constants.%Simple.WithSelf.F.58c)] {} {} +// CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, %Simple.WithSelf.F.decl [concrete = constants.%assoc0.db6] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%Simple.F.decl) +// CHECK:STDOUT: witness = (%Simple.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -108,7 +113,7 @@ class C { // CHECK:STDOUT: .C = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Simple.F(@Simple.%Self: %Simple.type) { +// CHECK:STDOUT: generic fn @Simple.WithSelf.F(@Simple.%Self.loc15: %Simple.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -132,7 +137,21 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @Simple.F(constants.%Self.af2) {} +// CHECK:STDOUT: specific @Simple(constants.%Self.af2) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Self.af2 +// CHECK:STDOUT: %Simple.WithSelf.F.type => constants.%Simple.WithSelf.F.type.75b +// CHECK:STDOUT: %Simple.WithSelf.F => constants.%Simple.WithSelf.F.58c +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Simple.F(constants.%Simple.facet) {} +// CHECK:STDOUT: specific @Simple.WithSelf.F(constants.%Self.af2) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Simple(constants.%Simple.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Simple.facet +// CHECK:STDOUT: %Simple.WithSelf.F.type => constants.%Simple.WithSelf.F.type.839 +// CHECK:STDOUT: %Simple.WithSelf.F => constants.%Simple.WithSelf.F.79e +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Simple.WithSelf.F(constants.%Simple.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_as_named_constraint.carbon b/toolchain/check/testdata/impl/impl_as_named_constraint.carbon index 7190f2276027..ecdc6ea86106 100644 --- a/toolchain/check/testdata/impl/impl_as_named_constraint.carbon +++ b/toolchain/check/testdata/impl/impl_as_named_constraint.carbon @@ -193,11 +193,14 @@ impl () as B(1) {} // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: %Self: = symbolic_binding Self, 1 [concrete = ] +// CHECK:STDOUT: constraint_with_self_decl @B [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .A = // CHECK:STDOUT: .X = +// CHECK:STDOUT: .A = +// CHECK:STDOUT: .X = // CHECK:STDOUT: has_error // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -206,3 +209,5 @@ impl () as B(1) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @B() {} // CHECK:STDOUT: +// CHECK:STDOUT: specific @B(, ) {} +// 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 b6556466fef2..77e7e9790082 100644 --- a/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon +++ b/toolchain/check/testdata/impl/impl_assoc_const_with_prelude.carbon @@ -47,7 +47,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %tuple.type.d07: type = tuple_type (%i32, %i32) [concrete] // CHECK:STDOUT: %struct_type.a.b.fe2: type = struct_type {.a: bool, .b: %tuple.type.d07} [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.a48: %I.assoc_type = assoc_entity element0, @I.%X [concrete] +// CHECK:STDOUT: %assoc0.be0: %I.assoc_type = assoc_entity element0, @I.%X [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %.Self.1dc: %I.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.1dc [symbolic_self] @@ -63,7 +63,6 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -71,7 +70,8 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -86,10 +86,10 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %SubWith.type.378: type = generic_interface_type @SubWith [concrete] // CHECK:STDOUT: %SubWith.generic: %SubWith.type.378 = struct_value () [concrete] // CHECK:STDOUT: %SubWith.type.a89: type = facet_type <@SubWith, @SubWith(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %SubWith.Op.type.95d: type = fn_type @SubWith.Op, @SubWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %SubWith.impl_witness: = impl_witness imports.%SubWith.impl_witness_table [concrete] // CHECK:STDOUT: %SubWith.facet: %SubWith.type.a89 = facet_value Core.IntLiteral, (%SubWith.impl_witness) [concrete] -// CHECK:STDOUT: %.f58: type = fn_type_with_self_type %SubWith.Op.type.95d, %SubWith.facet [concrete] +// CHECK:STDOUT: %SubWith.WithSelf.Op.type.7ed: type = fn_type @SubWith.WithSelf.Op, @SubWith(Core.IntLiteral, %SubWith.facet) [concrete] +// CHECK:STDOUT: %.24b: type = fn_type_with_self_type %SubWith.WithSelf.Op.type.7ed, %SubWith.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.SubWith.impl.Op.type: type = fn_type @Core.IntLiteral.as.SubWith.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.SubWith.impl.Op: %Core.IntLiteral.as.SubWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.SubWith.impl.Op.bound: = bound_method %int_3, %Core.IntLiteral.as.SubWith.impl.Op [concrete] @@ -97,15 +97,16 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %DivWith.type.fc9: type = generic_interface_type @DivWith [concrete] // CHECK:STDOUT: %DivWith.generic: %DivWith.type.fc9 = struct_value () [concrete] // CHECK:STDOUT: %DivWith.type.234: type = facet_type <@DivWith, @DivWith(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %DivWith.Op.type.c64: type = fn_type @DivWith.Op, @DivWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %DivWith.impl_witness: = impl_witness imports.%DivWith.impl_witness_table [concrete] // CHECK:STDOUT: %DivWith.facet: %DivWith.type.234 = facet_value Core.IntLiteral, (%DivWith.impl_witness) [concrete] -// CHECK:STDOUT: %.1a8: type = fn_type_with_self_type %DivWith.Op.type.c64, %DivWith.facet [concrete] +// CHECK:STDOUT: %DivWith.WithSelf.Op.type.04d: type = fn_type @DivWith.WithSelf.Op, @DivWith(Core.IntLiteral, %DivWith.facet) [concrete] +// CHECK:STDOUT: %.d00: type = fn_type_with_self_type %DivWith.WithSelf.Op.type.04d, %DivWith.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.DivWith.impl.Op.type: type = fn_type @Core.IntLiteral.as.DivWith.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.DivWith.impl.Op: %Core.IntLiteral.as.DivWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.DivWith.impl.Op.bound: = bound_method %int_4, %Core.IntLiteral.as.DivWith.impl.Op [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0.358da = %struct.682> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @empty_tuple.type.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -148,21 +149,21 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.Self.ref.loc6_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.1dc] // CHECK:STDOUT: %.Self.as_type.loc6_20: type = facet_access_type %.Self.ref.loc6_20 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6_20, %.Self.as_type.loc6_20 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %X.ref.loc6_20: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.a48] +// CHECK:STDOUT: %X.ref.loc6_20: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.be0] // CHECK:STDOUT: %impl.elem0.loc6_20: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.358da] // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc6_46: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc6_47.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2.loc6_46) [concrete = constants.%tuple.ad8] // CHECK:STDOUT: %.loc6_48.1: %struct_type.a.b.aa4 = struct_literal (%true, %.loc6_47.1) [concrete = constants.%struct.e57] -// CHECK:STDOUT: %impl.elem0.loc6_47.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6_47.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_47.1: = bound_method %int_1, %impl.elem0.loc6_47.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc6_47.1: = specific_function %impl.elem0.loc6_47.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_47.2: = bound_method %int_1, %specific_fn.loc6_47.1 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_47.1: init %i32 = call %bound_method.loc6_47.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_47.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_47.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_47.3: %i32 = converted %int_1, %.loc6_47.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc6_47.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6_47.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_47.3: = bound_method %int_2.loc6_46, %impl.elem0.loc6_47.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc6_47.2: = specific_function %impl.elem0.loc6_47.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_47.4: = bound_method %int_2.loc6_46, %specific_fn.loc6_47.2 [concrete = constants.%bound_method.646] @@ -176,24 +177,24 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.Self.ref.loc6_54: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self.1dc] // CHECK:STDOUT: %.Self.as_type.loc6_54: type = facet_access_type %.Self.ref.loc6_54 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc6_54: type = converted %.Self.ref.loc6_54, %.Self.as_type.loc6_54 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %X.ref.loc6_54: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.a48] +// CHECK:STDOUT: %X.ref.loc6_54: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.be0] // CHECK:STDOUT: %impl.elem0.loc6_54: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.358da] // CHECK:STDOUT: %impl.elem0.subst: %struct_type.a.b.fe2 = impl_witness_access_substituted %impl.elem0.loc6_54, %.loc6_48.3 [concrete = constants.%struct.682] // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: %.loc6_65: bool = not %false [concrete = constants.%true] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] // CHECK:STDOUT: %int_2.loc6_86: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem1.loc6_84: %.f58 = impl_witness_access constants.%SubWith.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.SubWith.impl.Op] +// CHECK:STDOUT: %impl.elem1.loc6_84: %.24b = impl_witness_access constants.%SubWith.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.SubWith.impl.Op] // CHECK:STDOUT: %bound_method.loc6_84: = bound_method %int_3, %impl.elem1.loc6_84 [concrete = constants.%Core.IntLiteral.as.SubWith.impl.Op.bound] // CHECK:STDOUT: %Core.IntLiteral.as.SubWith.impl.Op.call: init Core.IntLiteral = call %bound_method.loc6_84(%int_3, %int_2.loc6_86) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %int_2.loc6_93: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem1.loc6_91: %.1a8 = impl_witness_access constants.%DivWith.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.DivWith.impl.Op] +// CHECK:STDOUT: %impl.elem1.loc6_91: %.d00 = impl_witness_access constants.%DivWith.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.DivWith.impl.Op] // CHECK:STDOUT: %bound_method.loc6_91: = bound_method %int_4, %impl.elem1.loc6_91 [concrete = constants.%Core.IntLiteral.as.DivWith.impl.Op.bound] // CHECK:STDOUT: %Core.IntLiteral.as.DivWith.impl.Op.call: init Core.IntLiteral = call %bound_method.loc6_91(%int_4, %int_2.loc6_93) [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc6_94.1: %tuple.type.f94 = tuple_literal (%Core.IntLiteral.as.SubWith.impl.Op.call, %Core.IntLiteral.as.DivWith.impl.Op.call) [concrete = constants.%tuple.ad8] // CHECK:STDOUT: %.loc6_95.1: %struct_type.a.b.aa4 = struct_literal (%.loc6_65, %.loc6_94.1) [concrete = constants.%struct.e57] -// CHECK:STDOUT: %impl.elem0.loc6_94.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6_94.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_94.1: = bound_method %Core.IntLiteral.as.SubWith.impl.Op.call, %impl.elem0.loc6_94.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc6_94.1: = specific_function %impl.elem0.loc6_94.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_94.2: = bound_method %Core.IntLiteral.as.SubWith.impl.Op.call, %specific_fn.loc6_94.1 [concrete = constants.%bound_method.38b] @@ -202,7 +203,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_94.1: init %i32 = call %bound_method.loc6_94.2(%.loc6_84.2) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_94.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_94.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc6_94.3: %i32 = converted %Core.IntLiteral.as.SubWith.impl.Op.call, %.loc6_94.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc6_94.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6_94.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_94.3: = bound_method %Core.IntLiteral.as.DivWith.impl.Op.call, %impl.elem0.loc6_94.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc6_94.2: = specific_function %impl.elem0.loc6_94.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_94.4: = bound_method %Core.IntLiteral.as.DivWith.impl.Op.call, %specific_fn.loc6_94.2 [concrete = constants.%bound_method.646] @@ -225,8 +226,11 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %X: %struct_type.a.b.fe2 = assoc_const_decl @X [concrete] { -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%X [concrete = constants.%assoc0.a48] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%X [concrete = constants.%assoc0.be0] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -237,10 +241,6 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @X(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const X:! %struct_type.a.b.fe2; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.I.impl: %.loc6_7.2 as %.loc6_14 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @empty_tuple.type.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] @@ -250,9 +250,17 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%Self.ab9) {} +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%.Self.1dc) {} +// CHECK:STDOUT: specific @I(constants.%.Self.1dc) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_two_different_non_type.carbon // CHECK:STDOUT: @@ -269,7 +277,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %tuple.type.d07: type = tuple_type (%i32, %i32) [concrete] // CHECK:STDOUT: %struct_type.a.b.fe2: type = struct_type {.a: bool, .b: %tuple.type.d07} [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.a48: %I.assoc_type = assoc_entity element0, @I.%X [concrete] +// CHECK:STDOUT: %assoc0.be0: %I.assoc_type = assoc_entity element0, @I.%X [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] @@ -285,7 +293,6 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -293,7 +300,8 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -348,21 +356,21 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.Self.ref.loc10_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %X.ref.loc10_20: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.a48] +// CHECK:STDOUT: %X.ref.loc10_20: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.be0] // CHECK:STDOUT: %impl.elem0.loc10_20: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.358] // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc10_47.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2) [concrete = constants.%tuple.ad8] // CHECK:STDOUT: %.loc10_48.1: %struct_type.a.b.aa4 = struct_literal (%true, %.loc10_47.1) [concrete = constants.%struct.e57] -// CHECK:STDOUT: %impl.elem0.loc10_47.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_47.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_47.1: = bound_method %int_1, %impl.elem0.loc10_47.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc10_47.1: = specific_function %impl.elem0.loc10_47.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_47.2: = bound_method %int_1, %specific_fn.loc10_47.1 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_47.1: init %i32 = call %bound_method.loc10_47.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_47.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_47.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_47.3: %i32 = converted %int_1, %.loc10_47.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc10_47.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_47.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_47.3: = bound_method %int_2, %impl.elem0.loc10_47.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc10_47.2: = specific_function %impl.elem0.loc10_47.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_47.4: = bound_method %int_2, %specific_fn.loc10_47.2 [concrete = constants.%bound_method.646] @@ -376,7 +384,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %.Self.ref.loc10_54: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc10_54: type = facet_access_type %.Self.ref.loc10_54 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc10_54: type = converted %.Self.ref.loc10_54, %.Self.as_type.loc10_54 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %X.ref.loc10_54: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.a48] +// CHECK:STDOUT: %X.ref.loc10_54: %I.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.be0] // CHECK:STDOUT: %impl.elem0.loc10_54: %struct_type.a.b.fe2 = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.358] // CHECK:STDOUT: %impl.elem0.subst: %struct_type.a.b.fe2 = impl_witness_access_substituted %impl.elem0.loc10_54, %.loc10_48.3 [concrete = constants.%struct.682] // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] @@ -384,14 +392,14 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc10_82.1: %tuple.type.f94 = tuple_literal (%int_3, %int_4) [concrete = constants.%tuple.302] // CHECK:STDOUT: %.loc10_83.1: %struct_type.a.b.aa4 = struct_literal (%false, %.loc10_82.1) [concrete = constants.%struct.1ec] -// CHECK:STDOUT: %impl.elem0.loc10_82.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_82.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_82.1: = bound_method %int_3, %impl.elem0.loc10_82.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc10_82.1: = specific_function %impl.elem0.loc10_82.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_82.2: = bound_method %int_3, %specific_fn.loc10_82.1 [concrete = constants.%bound_method.fa7] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_82.1: init %i32 = call %bound_method.loc10_82.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc10_82.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_82.1 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc10_82.3: %i32 = converted %int_3, %.loc10_82.2 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc10_82.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_82.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_82.3: = bound_method %int_4, %impl.elem0.loc10_82.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc10_82.2: = specific_function %impl.elem0.loc10_82.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_82.4: = bound_method %int_4, %specific_fn.loc10_82.2 [concrete = constants.%bound_method.6d7] @@ -412,8 +420,11 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %X: %struct_type.a.b.fe2 = assoc_const_decl @X [concrete] { -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%X [concrete = constants.%assoc0.a48] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%X [concrete = constants.%assoc0.be0] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -424,16 +435,16 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3, // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @X(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const X:! %struct_type.a.b.fe2; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as..impl: %.loc10_7.2 as %.loc10_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%Self.ab9) {} +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index 8c8c32b4656b..b01227dfaca6 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -25,10 +25,10 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple> [concrete] // CHECK:STDOUT: %Self: %Simple.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Simple.F.type: type = fn_type @Simple.F [concrete] -// CHECK:STDOUT: %Simple.F: %Simple.F.type = struct_value () [concrete] +// CHECK:STDOUT: %Simple.WithSelf.F.type.75b: type = fn_type @Simple.WithSelf.F, @Simple(%Self) [symbolic] +// CHECK:STDOUT: %Simple.WithSelf.F.58c: %Simple.WithSelf.F.type.75b = struct_value () [symbolic] // CHECK:STDOUT: %Simple.assoc_type: type = assoc_entity_type @Simple [concrete] -// CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, @Simple.%Simple.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, @Simple.%Simple.WithSelf.F.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] @@ -37,6 +37,8 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: %T.as.Simple.impl.F.type: type = fn_type @T.as.Simple.impl.F, @T.as.Simple.impl(%T) [symbolic] // CHECK:STDOUT: %T.as.Simple.impl.F: %T.as.Simple.impl.F.type = struct_value () [symbolic] // CHECK:STDOUT: %Simple.facet: %Simple.type = facet_value %T, (%Simple.impl_witness) [symbolic] +// CHECK:STDOUT: %Simple.WithSelf.F.type.b56: type = fn_type @Simple.WithSelf.F, @Simple(%Simple.facet) [symbolic] +// CHECK:STDOUT: %Simple.WithSelf.F.2ed: %Simple.WithSelf.F.type.b56 = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -55,14 +57,17 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Simple { -// CHECK:STDOUT: %Self: %Simple.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Simple.F.decl: %Simple.F.type = fn_decl @Simple.F [concrete = constants.%Simple.F] {} {} -// CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, %Simple.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc15: %Simple.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Simple [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Simple.WithSelf.F.decl: @Simple.%Simple.WithSelf.F.type (%Simple.WithSelf.F.type.75b) = fn_decl @Simple.WithSelf.F [symbolic = @Simple.%Simple.WithSelf.F (constants.%Simple.WithSelf.F.58c)] {} {} +// CHECK:STDOUT: %assoc0: %Simple.assoc_type = assoc_entity element0, %Simple.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%Simple.F.decl) +// CHECK:STDOUT: witness = (%Simple.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -86,7 +91,7 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Simple.F(@Simple.%Self: %Simple.type) { +// CHECK:STDOUT: generic fn @Simple.WithSelf.F(@Simple.%Self.loc15: %Simple.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -99,7 +104,14 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Simple.F(constants.%Self) {} +// CHECK:STDOUT: specific @Simple(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Self +// CHECK:STDOUT: %Simple.WithSelf.F.type => constants.%Simple.WithSelf.F.type.75b +// CHECK:STDOUT: %Simple.WithSelf.F => constants.%Simple.WithSelf.F.58c +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Simple.WithSelf.F(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.Simple.impl(constants.%T) { // CHECK:STDOUT: %T.loc19_14.1 => constants.%T @@ -112,5 +124,12 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.Simple.impl.F(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Simple.F(constants.%Simple.facet) {} +// CHECK:STDOUT: specific @Simple(constants.%Simple.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Simple.facet +// CHECK:STDOUT: %Simple.WithSelf.F.type => constants.%Simple.WithSelf.F.type.b56 +// CHECK:STDOUT: %Simple.WithSelf.F => constants.%Simple.WithSelf.F.2ed +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Simple.WithSelf.F(constants.%Simple.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_thunk.carbon b/toolchain/check/testdata/impl/impl_thunk.carbon index 9f43f724816a..aedf2cdbf211 100644 --- a/toolchain/check/testdata/impl/impl_thunk.carbon +++ b/toolchain/check/testdata/impl/impl_thunk.carbon @@ -432,7 +432,6 @@ impl () as I({}) { // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.2: type = fn_type @B.as.X.impl.F.loc14_37.2 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.2: %B.as.X.impl.F.type.421a66.2 = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -440,7 +439,8 @@ impl () as I({}) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.0fc: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%B) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.20b: %ptr.as.Copy.impl.Op.type.0fc = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.27c, (%Copy.impl_witness.672) [concrete] -// CHECK:STDOUT: %.116: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d34: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.cc8: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d34, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.20b, @ptr.as.Copy.impl.Op(%B) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -503,7 +503,7 @@ impl () as I({}) { // CHECK:STDOUT: %.loc14_37.4: ref %B = class_element_access %.loc14_37.3, element0 // CHECK:STDOUT: %addr.loc14: %ptr.27c = addr_of %.loc14_37.4 // CHECK:STDOUT: %.loc14_37.5: %ptr.27c = converted %B.as.X.impl.F.call, %addr.loc14 -// CHECK:STDOUT: %impl.elem0: %.116 = impl_witness_access constants.%Copy.impl_witness.672, element0 [concrete = constants.%ptr.as.Copy.impl.Op.20b] +// CHECK:STDOUT: %impl.elem0: %.cc8 = impl_witness_access constants.%Copy.impl_witness.672, element0 [concrete = constants.%ptr.as.Copy.impl.Op.20b] // CHECK:STDOUT: %bound_method.loc14_37.1: = bound_method %.loc14_37.5, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%B) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_37.2: = bound_method %.loc14_37.5, %specific_fn @@ -584,7 +584,6 @@ impl () as I({}) { // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.2: type = fn_type @B.as.X.impl.F.loc14_37.2 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.2: %B.as.X.impl.F.type.421a66.2 = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -592,7 +591,8 @@ impl () as I({}) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.0fc: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%B) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.20b: %ptr.as.Copy.impl.Op.type.0fc = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.27c, (%Copy.impl_witness.672) [concrete] -// CHECK:STDOUT: %.116: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d34: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.cc8: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d34, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.20b, @ptr.as.Copy.impl.Op(%B) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -655,7 +655,7 @@ impl () as I({}) { // CHECK:STDOUT: %.loc14_37.4: ref %B = class_element_access %.loc14_37.3, element0 // CHECK:STDOUT: %addr.loc14: %ptr.27c = addr_of %.loc14_37.4 // CHECK:STDOUT: %.loc14_37.5: %ptr.27c = converted %B.as.X.impl.F.call, %addr.loc14 -// CHECK:STDOUT: %impl.elem0: %.116 = impl_witness_access constants.%Copy.impl_witness.672, element0 [concrete = constants.%ptr.as.Copy.impl.Op.20b] +// CHECK:STDOUT: %impl.elem0: %.cc8 = impl_witness_access constants.%Copy.impl_witness.672, element0 [concrete = constants.%ptr.as.Copy.impl.Op.20b] // CHECK:STDOUT: %bound_method.loc14_37.1: = bound_method %.loc14_37.5, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%B) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_37.2: = bound_method %.loc14_37.5, %specific_fn @@ -681,7 +681,6 @@ impl () as I({}) { // CHECK:STDOUT: %B.as.X.impl.F.type.421a66.2: type = fn_type @B.as.X.impl.F.loc14_37.2 [concrete] // CHECK:STDOUT: %B.as.X.impl.F.8ec460.2: %B.as.X.impl.F.type.421a66.2 = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -689,7 +688,8 @@ impl () as I({}) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.0fc: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%B) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.20b: %ptr.as.Copy.impl.Op.type.0fc = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.27c, (%Copy.impl_witness.672) [concrete] -// CHECK:STDOUT: %.116: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d34: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.cc8: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d34, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.20b, @ptr.as.Copy.impl.Op(%B) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -752,7 +752,7 @@ impl () as I({}) { // CHECK:STDOUT: %.loc14_37.4: ref %B = class_element_access %.loc14_37.3, element0 // CHECK:STDOUT: %addr.loc14: %ptr.27c = addr_of %.loc14_37.4 // CHECK:STDOUT: %.loc14_37.5: %ptr.27c = converted %B.as.X.impl.F.call, %addr.loc14 -// CHECK:STDOUT: %impl.elem0: %.116 = impl_witness_access constants.%Copy.impl_witness.672, element0 [concrete = constants.%ptr.as.Copy.impl.Op.20b] +// CHECK:STDOUT: %impl.elem0: %.cc8 = impl_witness_access constants.%Copy.impl_witness.672, element0 [concrete = constants.%ptr.as.Copy.impl.Op.20b] // CHECK:STDOUT: %bound_method.loc14_37.1: = bound_method %.loc14_37.5, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%B) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_37.2: = bound_method %.loc14_37.5, %specific_fn @@ -829,8 +829,8 @@ impl () as I({}) { // CHECK:STDOUT: %U.035: %Copy.type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.ce2: type = pattern_type %Copy.type [concrete] // CHECK:STDOUT: %U.binding.as_type.14b: type = symbolic_binding_type U, 0, %U.035 [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %U.binding.as_type.14b [symbolic] -// CHECK:STDOUT: %.6c815b.1: Core.Form = init_form %U.binding.as_type.14b, call_param1 [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %U.binding.as_type.14b [symbolic] +// CHECK:STDOUT: %.6c815b.2: Core.Form = init_form %U.binding.as_type.14b, call_param1 [symbolic] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.19e4b8.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_34.1 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.8be29b.1: %empty_tuple.type.as.I.impl.F.type.19e4b8.1 = struct_value () [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] @@ -840,19 +840,20 @@ impl () as I({}) { // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.19e4b8.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_34.2 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.8be29b.2: %empty_tuple.type.as.I.impl.F.type.19e4b8.2 = struct_value () [concrete] // CHECK:STDOUT: %require_complete.67ca8d.1: = require_complete_type %U.binding.as_type.14b [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %require_complete.ef1: = require_complete_type %ptr.e8f [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.58dce0.2: = lookup_impl_witness %U.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e61c.2: type = fn_type_with_self_type %Copy.Op.type, %U.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b224.2: %.72e61c.2 = impl_witness_access %Copy.lookup_impl_witness.58dce0.2, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9874.2: = specific_impl_function %impl.elem0.07b224.2, @Copy.Op(%U.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.3: type = fn_type @Copy.WithSelf.Op, @Copy(%U.035) [symbolic] +// CHECK:STDOUT: %.023143.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.3, %U.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594c59.2: %.023143.2 = impl_witness_access %Copy.lookup_impl_witness.58dce0.2, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdce5c.2: = specific_impl_function %impl.elem0.594c59.2, @Copy.WithSelf.Op(%U.035) [symbolic] // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: = lookup_impl_witness %ptr.e8f, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e8f, (%Copy.lookup_impl_witness.2e6) [symbolic] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn: = specific_function %empty_tuple.type.as.I.impl.F.8be29b.1, @empty_tuple.type.as.I.impl.F.loc10_34.1(%Copy.facet) [symbolic] -// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b84: = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic] +// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.366: = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -867,15 +868,15 @@ impl () as I({}) { // CHECK:STDOUT: impl @empty_tuple.type.as.I.impl: %.loc8_7.2 as %I.ref { // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.decl.loc10_34.1: %empty_tuple.type.as.I.impl.F.type.19e4b8.1 = fn_decl @empty_tuple.type.as.I.impl.F.loc10_34.1 [concrete = constants.%empty_tuple.type.as.I.impl.F.8be29b.1] { // CHECK:STDOUT: %U.patt: %pattern_type.ce2 = symbolic_binding_pattern U, 0 [concrete] -// CHECK:STDOUT: %x.patt: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.9b9f0c.1) = value_binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.9b9f0c.1) = value_param_pattern %x.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %x.patt: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.9b9f0c.2) = value_binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.9b9f0c.2) = value_param_pattern %x.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @empty_tuple.type.as.I.impl.F.loc10_34.1.%pattern_type (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref.loc10_32: %Copy.type = name_ref U, %U.loc10_8.2 [symbolic = %U.loc10_8.1 (constants.%U.035)] // CHECK:STDOUT: %U.as_type.loc10_32: type = facet_access_type %U.ref.loc10_32 [symbolic = %U.binding.as_type (constants.%U.binding.as_type.14b)] // CHECK:STDOUT: %.loc10_32.3: type = converted %U.ref.loc10_32, %U.as_type.loc10_32 [symbolic = %U.binding.as_type (constants.%U.binding.as_type.14b)] -// CHECK:STDOUT: %.loc10_32.4: Core.Form = init_form %.loc10_32.3, call_param1 [symbolic = %.loc10_32.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %.loc10_32.4: Core.Form = init_form %.loc10_32.3, call_param1 [symbolic = %.loc10_32.2 (constants.%.6c815b.2)] // CHECK:STDOUT: %.loc10_16: type = splice_block %Copy.ref [concrete = constants.%Copy.type] { // CHECK:STDOUT: // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [concrete = imports.%Core] @@ -908,26 +909,27 @@ impl () as I({}) { // CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_34.1(%U.loc10_8.2: %Copy.type) { // CHECK:STDOUT: %U.loc10_8.1: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc10_8.1 (constants.%U.035)] // CHECK:STDOUT: %U.binding.as_type: type = symbolic_binding_type U, 0, %U.loc10_8.1 [symbolic = %U.binding.as_type (constants.%U.binding.as_type.14b)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.1)] -// CHECK:STDOUT: %.loc10_32.2: Core.Form = init_form %U.binding.as_type, call_param1 [symbolic = %.loc10_32.2 (constants.%.6c815b.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.2)] +// CHECK:STDOUT: %.loc10_32.2: Core.Form = init_form %U.binding.as_type, call_param1 [symbolic = %.loc10_32.2 (constants.%.6c815b.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %U.binding.as_type [symbolic = %require_complete (constants.%require_complete.67ca8d.1)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %U.loc10_8.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58dce0.2)] -// CHECK:STDOUT: %.loc10_43: type = fn_type_with_self_type constants.%Copy.Op.type, %U.loc10_8.1 [symbolic = %.loc10_43 (constants.%.72e61c.2)] -// CHECK:STDOUT: %impl.elem0.loc10_43.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%.loc10_43 (%.72e61c.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_43.2 (constants.%impl.elem0.07b224.2)] -// CHECK:STDOUT: %specific_impl_fn.loc10_43.2: = specific_impl_function %impl.elem0.loc10_43.2, @Copy.Op(%U.loc10_8.1) [symbolic = %specific_impl_fn.loc10_43.2 (constants.%specific_impl_fn.2c9874.2)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%U.loc10_8.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.3)] +// CHECK:STDOUT: %.loc10_43: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc10_8.1 [symbolic = %.loc10_43 (constants.%.023143.2)] +// CHECK:STDOUT: %impl.elem0.loc10_43.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%.loc10_43 (%.023143.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_43.2 (constants.%impl.elem0.594c59.2)] +// CHECK:STDOUT: %specific_impl_fn.loc10_43.2: = specific_impl_function %impl.elem0.loc10_43.2, @Copy.WithSelf.Op(%U.loc10_8.1) [symbolic = %specific_impl_fn.loc10_43.2 (constants.%specific_impl_fn.bdce5c.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.binding.as_type (%U.binding.as_type.14b)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.binding.as_type (%U.binding.as_type.14b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.binding.as_type (%U.binding.as_type.14b) = name_ref x, %x -// CHECK:STDOUT: %impl.elem0.loc10_43.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%.loc10_43 (%.72e61c.2) = impl_witness_access constants.%Copy.lookup_impl_witness.58dce0.2, element0 [symbolic = %impl.elem0.loc10_43.2 (constants.%impl.elem0.07b224.2)] +// CHECK:STDOUT: %impl.elem0.loc10_43.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%.loc10_43 (%.023143.2) = impl_witness_access constants.%Copy.lookup_impl_witness.58dce0.2, element0 [symbolic = %impl.elem0.loc10_43.2 (constants.%impl.elem0.594c59.2)] // CHECK:STDOUT: %bound_method.loc10_43.1: = bound_method %x.ref, %impl.elem0.loc10_43.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_43.1: = specific_impl_function %impl.elem0.loc10_43.1, @Copy.Op(constants.%U.035) [symbolic = %specific_impl_fn.loc10_43.2 (constants.%specific_impl_fn.2c9874.2)] +// CHECK:STDOUT: %specific_impl_fn.loc10_43.1: = specific_impl_function %impl.elem0.loc10_43.1, @Copy.WithSelf.Op(constants.%U.035) [symbolic = %specific_impl_fn.loc10_43.2 (constants.%specific_impl_fn.bdce5c.2)] // CHECK:STDOUT: %bound_method.loc10_43.2: = bound_method %x.ref, %specific_impl_fn.loc10_43.1 // CHECK:STDOUT: %.loc10_32.1: ref @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.binding.as_type (%U.binding.as_type.14b) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.binding.as_type (%U.binding.as_type.14b) to %.loc10_32.1 = call %bound_method.loc10_43.2(%x.ref) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.binding.as_type (%U.binding.as_type.14b) to %.loc10_32.1 = call %bound_method.loc10_43.2(%x.ref) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -958,8 +960,8 @@ impl () as I({}) { // CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_34.1(constants.%U.035) { // CHECK:STDOUT: %U.loc10_8.1 => constants.%U.035 // CHECK:STDOUT: %U.binding.as_type => constants.%U.binding.as_type.14b -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1 -// CHECK:STDOUT: %.loc10_32.2 => constants.%.6c815b.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2 +// CHECK:STDOUT: %.loc10_32.2 => constants.%.6c815b.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_34.2(constants.%T.67d) { @@ -978,9 +980,10 @@ impl () as I({}) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.2e6 -// CHECK:STDOUT: %.loc10_43 => constants.%.b46 -// CHECK:STDOUT: %impl.elem0.loc10_43.2 => constants.%impl.elem0.201 -// CHECK:STDOUT: %specific_impl_fn.loc10_43.2 => constants.%specific_impl_fn.b84 +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.d82 +// CHECK:STDOUT: %.loc10_43 => constants.%.299 +// CHECK:STDOUT: %impl.elem0.loc10_43.2 => constants.%impl.elem0.1c7 +// CHECK:STDOUT: %specific_impl_fn.loc10_43.2 => constants.%specific_impl_fn.366 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- generic_method.carbon @@ -993,7 +996,7 @@ impl () as I({}) { // CHECK:STDOUT: %U.035: %Copy.type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %pattern_type.ce2: type = pattern_type %Copy.type [concrete] // CHECK:STDOUT: %U.binding.as_type.14b: type = symbolic_binding_type U, 0, %U.035 [symbolic] -// CHECK:STDOUT: %pattern_type.9b9f0c.1: type = pattern_type %U.binding.as_type.14b [symbolic] +// CHECK:STDOUT: %pattern_type.9b9f0c.2: type = pattern_type %U.binding.as_type.14b [symbolic] // CHECK:STDOUT: %.0e8: Core.Form = init_form %U.binding.as_type.14b, call_param2 [symbolic] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.19e4b8.1: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_44.1 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.8be29b.1: %empty_tuple.type.as.I.impl.F.type.19e4b8.1 = struct_value () [concrete] @@ -1004,19 +1007,20 @@ impl () as I({}) { // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.type.19e4b8.2: type = fn_type @empty_tuple.type.as.I.impl.F.loc10_44.2 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.8be29b.2: %empty_tuple.type.as.I.impl.F.type.19e4b8.2 = struct_value () [concrete] // CHECK:STDOUT: %require_complete.67ca8d.1: = require_complete_type %U.binding.as_type.14b [symbolic] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %require_complete.ef1: = require_complete_type %ptr.e8f [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.58dce0.2: = lookup_impl_witness %U.035, @Copy [symbolic] -// CHECK:STDOUT: %.72e61c.2: type = fn_type_with_self_type %Copy.Op.type, %U.035 [symbolic] -// CHECK:STDOUT: %impl.elem0.07b224.2: %.72e61c.2 = impl_witness_access %Copy.lookup_impl_witness.58dce0.2, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2c9874.2: = specific_impl_function %impl.elem0.07b224.2, @Copy.Op(%U.035) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.735e75.3: type = fn_type @Copy.WithSelf.Op, @Copy(%U.035) [symbolic] +// CHECK:STDOUT: %.023143.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.735e75.3, %U.035 [symbolic] +// CHECK:STDOUT: %impl.elem0.594c59.2: %.023143.2 = impl_witness_access %Copy.lookup_impl_witness.58dce0.2, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.bdce5c.2: = specific_impl_function %impl.elem0.594c59.2, @Copy.WithSelf.Op(%U.035) [symbolic] // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: = lookup_impl_witness %ptr.e8f, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e8f, (%Copy.lookup_impl_witness.2e6) [symbolic] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.F.specific_fn: = specific_function %empty_tuple.type.as.I.impl.F.8be29b.1, @empty_tuple.type.as.I.impl.F.loc10_44.1(%Copy.facet) [symbolic] -// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b84: = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic] +// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.366: = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1033,10 +1037,10 @@ impl () as I({}) { // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %U.patt: %pattern_type.ce2 = symbolic_binding_pattern U, 0 [concrete] -// CHECK:STDOUT: %x.patt: @empty_tuple.type.as.I.impl.F.loc10_44.1.%pattern_type (%pattern_type.9b9f0c.1) = value_binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @empty_tuple.type.as.I.impl.F.loc10_44.1.%pattern_type (%pattern_type.9b9f0c.1) = value_param_pattern %x.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @empty_tuple.type.as.I.impl.F.loc10_44.1.%pattern_type (%pattern_type.9b9f0c.1) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @empty_tuple.type.as.I.impl.F.loc10_44.1.%pattern_type (%pattern_type.9b9f0c.1) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %x.patt: @empty_tuple.type.as.I.impl.F.loc10_44.1.%pattern_type (%pattern_type.9b9f0c.2) = value_binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @empty_tuple.type.as.I.impl.F.loc10_44.1.%pattern_type (%pattern_type.9b9f0c.2) = value_param_pattern %x.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @empty_tuple.type.as.I.impl.F.loc10_44.1.%pattern_type (%pattern_type.9b9f0c.2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @empty_tuple.type.as.I.impl.F.loc10_44.1.%pattern_type (%pattern_type.9b9f0c.2) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref.loc10_42: %Copy.type = name_ref U, %U.loc10_18.2 [symbolic = %U.loc10_18.1 (constants.%U.035)] // CHECK:STDOUT: %U.as_type.loc10_42: type = facet_access_type %U.ref.loc10_42 [symbolic = %U.binding.as_type (constants.%U.binding.as_type.14b)] @@ -1080,26 +1084,27 @@ impl () as I({}) { // CHECK:STDOUT: generic fn @empty_tuple.type.as.I.impl.F.loc10_44.1(%U.loc10_18.2: %Copy.type) { // CHECK:STDOUT: %U.loc10_18.1: %Copy.type = symbolic_binding U, 0 [symbolic = %U.loc10_18.1 (constants.%U.035)] // CHECK:STDOUT: %U.binding.as_type: type = symbolic_binding_type U, 0, %U.loc10_18.1 [symbolic = %U.binding.as_type (constants.%U.binding.as_type.14b)] -// CHECK:STDOUT: %pattern_type: type = pattern_type %U.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.1)] +// CHECK:STDOUT: %pattern_type: type = pattern_type %U.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9b9f0c.2)] // CHECK:STDOUT: %.loc10_42.2: Core.Form = init_form %U.binding.as_type, call_param2 [symbolic = %.loc10_42.2 (constants.%.0e8)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %U.binding.as_type [symbolic = %require_complete (constants.%require_complete.67ca8d.1)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %U.loc10_18.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.58dce0.2)] -// CHECK:STDOUT: %.loc10_53: type = fn_type_with_self_type constants.%Copy.Op.type, %U.loc10_18.1 [symbolic = %.loc10_53 (constants.%.72e61c.2)] -// CHECK:STDOUT: %impl.elem0.loc10_53.2: @empty_tuple.type.as.I.impl.F.loc10_44.1.%.loc10_53 (%.72e61c.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_53.2 (constants.%impl.elem0.07b224.2)] -// CHECK:STDOUT: %specific_impl_fn.loc10_53.2: = specific_impl_function %impl.elem0.loc10_53.2, @Copy.Op(%U.loc10_18.1) [symbolic = %specific_impl_fn.loc10_53.2 (constants.%specific_impl_fn.2c9874.2)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%U.loc10_18.1) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.735e75.3)] +// CHECK:STDOUT: %.loc10_53: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %U.loc10_18.1 [symbolic = %.loc10_53 (constants.%.023143.2)] +// CHECK:STDOUT: %impl.elem0.loc10_53.2: @empty_tuple.type.as.I.impl.F.loc10_44.1.%.loc10_53 (%.023143.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_53.2 (constants.%impl.elem0.594c59.2)] +// CHECK:STDOUT: %specific_impl_fn.loc10_53.2: = specific_impl_function %impl.elem0.loc10_53.2, @Copy.WithSelf.Op(%U.loc10_18.1) [symbolic = %specific_impl_fn.loc10_53.2 (constants.%specific_impl_fn.bdce5c.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: %empty_tuple.type, %x.param: @empty_tuple.type.as.I.impl.F.loc10_44.1.%U.binding.as_type (%U.binding.as_type.14b)) -> out %return.param: @empty_tuple.type.as.I.impl.F.loc10_44.1.%U.binding.as_type (%U.binding.as_type.14b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @empty_tuple.type.as.I.impl.F.loc10_44.1.%U.binding.as_type (%U.binding.as_type.14b) = name_ref x, %x -// CHECK:STDOUT: %impl.elem0.loc10_53.1: @empty_tuple.type.as.I.impl.F.loc10_44.1.%.loc10_53 (%.72e61c.2) = impl_witness_access constants.%Copy.lookup_impl_witness.58dce0.2, element0 [symbolic = %impl.elem0.loc10_53.2 (constants.%impl.elem0.07b224.2)] +// CHECK:STDOUT: %impl.elem0.loc10_53.1: @empty_tuple.type.as.I.impl.F.loc10_44.1.%.loc10_53 (%.023143.2) = impl_witness_access constants.%Copy.lookup_impl_witness.58dce0.2, element0 [symbolic = %impl.elem0.loc10_53.2 (constants.%impl.elem0.594c59.2)] // CHECK:STDOUT: %bound_method.loc10_53.1: = bound_method %x.ref, %impl.elem0.loc10_53.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_53.1: = specific_impl_function %impl.elem0.loc10_53.1, @Copy.Op(constants.%U.035) [symbolic = %specific_impl_fn.loc10_53.2 (constants.%specific_impl_fn.2c9874.2)] +// CHECK:STDOUT: %specific_impl_fn.loc10_53.1: = specific_impl_function %impl.elem0.loc10_53.1, @Copy.WithSelf.Op(constants.%U.035) [symbolic = %specific_impl_fn.loc10_53.2 (constants.%specific_impl_fn.bdce5c.2)] // CHECK:STDOUT: %bound_method.loc10_53.2: = bound_method %x.ref, %specific_impl_fn.loc10_53.1 // CHECK:STDOUT: %.loc10_42.1: ref @empty_tuple.type.as.I.impl.F.loc10_44.1.%U.binding.as_type (%U.binding.as_type.14b) = splice_block %return.param {} -// CHECK:STDOUT: %Copy.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_44.1.%U.binding.as_type (%U.binding.as_type.14b) to %.loc10_42.1 = call %bound_method.loc10_53.2(%x.ref) -// CHECK:STDOUT: return %Copy.Op.call to %return.param +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_44.1.%U.binding.as_type (%U.binding.as_type.14b) to %.loc10_42.1 = call %bound_method.loc10_53.2(%x.ref) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1132,7 +1137,7 @@ impl () as I({}) { // CHECK:STDOUT: specific @empty_tuple.type.as.I.impl.F.loc10_44.1(constants.%U.035) { // CHECK:STDOUT: %U.loc10_18.1 => constants.%U.035 // CHECK:STDOUT: %U.binding.as_type => constants.%U.binding.as_type.14b -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.1 +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b9f0c.2 // CHECK:STDOUT: %.loc10_42.2 => constants.%.0e8 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1152,9 +1157,10 @@ impl () as I({}) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.2e6 -// CHECK:STDOUT: %.loc10_53 => constants.%.b46 -// CHECK:STDOUT: %impl.elem0.loc10_53.2 => constants.%impl.elem0.201 -// CHECK:STDOUT: %specific_impl_fn.loc10_53.2 => constants.%specific_impl_fn.b84 +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.d82 +// CHECK:STDOUT: %.loc10_53 => constants.%.299 +// CHECK:STDOUT: %impl.elem0.loc10_53.2 => constants.%impl.elem0.1c7 +// CHECK:STDOUT: %specific_impl_fn.loc10_53.2 => constants.%specific_impl_fn.366 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- generic_interface.carbon diff --git a/toolchain/check/testdata/impl/impl_thunk_min_prelude.carbon b/toolchain/check/testdata/impl/impl_thunk_min_prelude.carbon index 18aa055e2772..d1430f7d8e29 100644 --- a/toolchain/check/testdata/impl/impl_thunk_min_prelude.carbon +++ b/toolchain/check/testdata/impl/impl_thunk_min_prelude.carbon @@ -108,7 +108,6 @@ fn Call() -> i32 { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -116,7 +115,8 @@ fn Call() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %i32.as.Add.impl.Op.type.73828b.1: type = fn_type @i32.as.Add.impl.Op.loc8_35.1, @i32.as.Add.impl(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %i32.as.Add.impl.Op.0aa775.1: %i32.as.Add.impl.Op.type.73828b.1 = struct_value () [concrete] @@ -144,7 +144,7 @@ fn Call() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: %.loc18_14.3: %i32.as.Add.impl.Op.type.73828b.1 = specific_constant @i32.as.Add.impl.%i32.as.Add.impl.Op.decl.loc8_35.1, @i32.as.Add.impl(constants.%ImplicitAs.facet) [concrete = constants.%i32.as.Add.impl.Op.0aa775.1] // CHECK:STDOUT: %Op.ref.loc18: %i32.as.Add.impl.Op.type.73828b.1 = name_ref Op, %.loc18_14.3 [concrete = constants.%i32.as.Add.impl.Op.0aa775.1] -// CHECK:STDOUT: %impl.elem0.loc18_14: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_14: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_14.1: = bound_method %int_2, %impl.elem0.loc18_14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc18_14: = specific_function %impl.elem0.loc18_14, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_14.2: = bound_method %int_2, %specific_fn.loc18_14 [concrete = constants.%bound_method.646] @@ -152,7 +152,7 @@ fn Call() -> i32 { // CHECK:STDOUT: %.loc18_14.4: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_14 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc18_14.5: %i32 = converted %int_2, %.loc18_14.4 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %i32.as.Add.impl.Op.specific_fn: = specific_function %Op.ref.loc18, @i32.as.Add.impl.Op.loc8_35.1(constants.%ImplicitAs.facet) [concrete = constants.%i32.as.Add.impl.Op.specific_fn.0f6a75.2] -// CHECK:STDOUT: %impl.elem0.loc18_13: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_13: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_13.1: = bound_method %int_2, %impl.elem0.loc18_13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc18_13: = specific_function %impl.elem0.loc18_13, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_13.2: = bound_method %int_2, %specific_fn.loc18_13 [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/impl/import_builtin_call.carbon b/toolchain/check/testdata/impl/import_builtin_call.carbon index ececaf870922..6c28f5a422d9 100644 --- a/toolchain/check/testdata/impl/import_builtin_call.carbon +++ b/toolchain/check/testdata/impl/import_builtin_call.carbon @@ -82,10 +82,10 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.f75: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.0ec: Core.Form = init_form %Self.binding.as_type, call_param2 [symbolic] -// CHECK:STDOUT: %Add.Op.type: type = fn_type @Add.Op [concrete] -// CHECK:STDOUT: %Add.Op: %Add.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %Add.WithSelf.Op.type.f48: type = fn_type @Add.WithSelf.Op, @Add(%Self) [symbolic] +// CHECK:STDOUT: %Add.WithSelf.Op.060: %Add.WithSelf.Op.type.f48 = struct_value () [symbolic] // CHECK:STDOUT: %Add.assoc_type: type = assoc_entity_type @Add [concrete] -// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, @Add.%Add.Op.decl [concrete] +// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, @Add.%Add.WithSelf.Op.decl [concrete] // CHECK:STDOUT: %.824: Core.Form = init_form type, call_param0 [concrete] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete] @@ -110,15 +110,19 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %MyInt.as.Add.impl.Op: %MyInt.as.Add.impl.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.9fa: = require_complete_type %MyInt [symbolic] // CHECK:STDOUT: %Add.facet.fbb: %Add.type = facet_value %MyInt, (%Add.impl_witness) [symbolic] +// CHECK:STDOUT: %Add.WithSelf.Op.type.6d2: type = fn_type @Add.WithSelf.Op, @Add(%Add.facet.fbb) [symbolic] +// CHECK:STDOUT: %Add.WithSelf.Op.935: %Add.WithSelf.Op.type.6d2 = struct_value () [symbolic] // CHECK:STDOUT: %.b65: Core.Form = init_form %MyInt, call_param1 [symbolic] // CHECK:STDOUT: %Double.type: type = fn_type @Double [concrete] // CHECK:STDOUT: %Double: %Double.type = struct_value () [concrete] // CHECK:STDOUT: %.c60: require_specific_def_type = require_specific_def @MyInt.as.Add.impl(%N) [symbolic] // CHECK:STDOUT: %Add.lookup_impl_witness: = lookup_impl_witness %MyInt, @Add [symbolic] // CHECK:STDOUT: %Add.facet.9ab: %Add.type = facet_value %MyInt, (%Add.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.932: type = fn_type_with_self_type %Add.Op.type, %Add.facet.9ab [symbolic] -// CHECK:STDOUT: %impl.elem0: %.932 = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Add.Op(%Add.facet.9ab) [symbolic] +// CHECK:STDOUT: %Add.WithSelf.Op.type.3e8: type = fn_type @Add.WithSelf.Op, @Add(%Add.facet.9ab) [symbolic] +// CHECK:STDOUT: %Add.WithSelf.Op.451: %Add.WithSelf.Op.type.3e8 = struct_value () [symbolic] +// CHECK:STDOUT: %.d02: type = fn_type_with_self_type %Add.WithSelf.Op.type.3e8, %Add.facet.9ab [symbolic] +// CHECK:STDOUT: %impl.elem0: %.d02 = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Add.WithSelf.Op(%Add.facet.9ab) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -216,42 +220,45 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Add { -// CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Add.Op.decl: %Add.Op.type = fn_decl @Add.Op [concrete = constants.%Add.Op] { -// CHECK:STDOUT: %self.patt: @Add.Op.%pattern_type (%pattern_type.f75) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Add.Op.%pattern_type (%pattern_type.f75) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: @Add.Op.%pattern_type (%pattern_type.f75) = value_binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: @Add.Op.%pattern_type (%pattern_type.f75) = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @Add.Op.%pattern_type (%pattern_type.f75) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Add.Op.%pattern_type (%pattern_type.f75) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %Self.loc4: %Add.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Add [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Add.WithSelf.Op.decl: @Add.%Add.WithSelf.Op.type (%Add.WithSelf.Op.type.f48) = fn_decl @Add.WithSelf.Op [symbolic = @Add.%Add.WithSelf.Op (constants.%Add.WithSelf.Op.060)] { +// CHECK:STDOUT: %self.patt: @Add.WithSelf.Op.%pattern_type (%pattern_type.f75) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Add.WithSelf.Op.%pattern_type (%pattern_type.f75) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %other.patt: @Add.WithSelf.Op.%pattern_type (%pattern_type.f75) = value_binding_pattern other [concrete] +// CHECK:STDOUT: %other.param_patt: @Add.WithSelf.Op.%pattern_type (%pattern_type.f75) = value_param_pattern %other.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @Add.WithSelf.Op.%pattern_type (%pattern_type.f75) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Add.WithSelf.Op.%pattern_type (%pattern_type.f75) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc5_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc5_37: %Add.type = name_ref Self, @Add.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc5_37: type = facet_access_type %Self.ref.loc5_37 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_37.2: type = converted %Self.ref.loc5_37, %Self.as_type.loc5_37 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_37.3: Core.Form = init_form %.loc5_37.2, call_param2 [symbolic = %.loc5_37.1 (constants.%.0ec)] -// CHECK:STDOUT: %self.param: @Add.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref.loc5_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc5_15: %Add.type = name_ref Self, @Add.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc5_15: type = facet_access_type %Self.ref.loc5_15 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref.loc5_15, %Self.as_type.loc5_15 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Add.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param -// CHECK:STDOUT: %other.param: @Add.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param1 +// CHECK:STDOUT: %self: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %other.param: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param1 // CHECK:STDOUT: %.loc5_28.1: type = splice_block %.loc5_28.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref.loc5_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc5_28: %Add.type = name_ref Self, @Add.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc5_28: type = facet_access_type %Self.ref.loc5_28 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_28.2: type = converted %Self.ref.loc5_28, %Self.as_type.loc5_28 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %other: @Add.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding other, %other.param -// CHECK:STDOUT: %return.param: ref @Add.Op.%Self.binding.as_type (%Self.binding.as_type) = out_param call_param2 -// CHECK:STDOUT: %return: ref @Add.Op.%Self.binding.as_type (%Self.binding.as_type) = return_slot %return.param +// CHECK:STDOUT: %other: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding other, %other.param +// CHECK:STDOUT: %return.param: ref @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = out_param call_param2 +// CHECK:STDOUT: %return: ref @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, %Add.Op.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, %Add.WithSelf.Op.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .Op = %assoc0 -// CHECK:STDOUT: witness = (%Add.Op.decl) +// CHECK:STDOUT: witness = (%Add.WithSelf.Op.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -320,13 +327,13 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Add.Op(@Add.%Self: %Add.type) { +// CHECK:STDOUT: generic fn @Add.WithSelf.Op(@Add.%Self.loc4: %Add.type) { // CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.f75)] // CHECK:STDOUT: %.loc5_37.1: Core.Form = init_form %Self.binding.as_type, call_param2 [symbolic = %.loc5_37.1 (constants.%.0ec)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Add.Op.%Self.binding.as_type (%Self.binding.as_type), %other.param: @Add.Op.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @Add.Op.%Self.binding.as_type (%Self.binding.as_type); +// CHECK:STDOUT: fn(%self.param: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type), %other.param: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @IntLiteral() -> out %return.param: type = "int_literal.make_type"; @@ -355,30 +362,38 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %.loc20_11.1: require_specific_def_type = require_specific_def @MyInt.as.Add.impl(%N.loc19_11.1) [symbolic = %.loc20_11.1 (constants.%.c60)] // CHECK:STDOUT: %Add.lookup_impl_witness: = lookup_impl_witness %MyInt.loc19_39.1, @Add [symbolic = %Add.lookup_impl_witness (constants.%Add.lookup_impl_witness)] // CHECK:STDOUT: %Add.facet.loc20_11: %Add.type = facet_value %MyInt.loc19_39.1, (%Add.lookup_impl_witness) [symbolic = %Add.facet.loc20_11 (constants.%Add.facet.9ab)] -// CHECK:STDOUT: %.loc20_11.2: type = fn_type_with_self_type constants.%Add.Op.type, %Add.facet.loc20_11 [symbolic = %.loc20_11.2 (constants.%.932)] -// CHECK:STDOUT: %impl.elem0.loc20_11.2: @Double.%.loc20_11.2 (%.932) = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_11.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc20_11.2: = specific_impl_function %impl.elem0.loc20_11.2, @Add.Op(%Add.facet.loc20_11) [symbolic = %specific_impl_fn.loc20_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Add.WithSelf.Op.type: type = fn_type @Add.WithSelf.Op, @Add(%Add.facet.loc20_11) [symbolic = %Add.WithSelf.Op.type (constants.%Add.WithSelf.Op.type.3e8)] +// CHECK:STDOUT: %.loc20_11.2: type = fn_type_with_self_type %Add.WithSelf.Op.type, %Add.facet.loc20_11 [symbolic = %.loc20_11.2 (constants.%.d02)] +// CHECK:STDOUT: %impl.elem0.loc20_11.2: @Double.%.loc20_11.2 (%.d02) = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_11.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc20_11.2: = specific_impl_function %impl.elem0.loc20_11.2, @Add.WithSelf.Op(%Add.facet.loc20_11) [symbolic = %specific_impl_fn.loc20_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Double.%MyInt.loc19_39.1 (%MyInt)) -> out %return.param: @Double.%MyInt.loc19_39.1 (%MyInt) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref.loc20_10: @Double.%MyInt.loc19_39.1 (%MyInt) = name_ref x, %x // CHECK:STDOUT: %Add.ref: type = name_ref Add, file.%Add.decl [concrete = constants.%Add.type] // CHECK:STDOUT: %Op.ref: %Add.assoc_type = name_ref Op, @Add.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc20_11.1: @Double.%.loc20_11.2 (%.932) = impl_witness_access constants.%Add.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_11.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc20_11.1: @Double.%.loc20_11.2 (%.d02) = impl_witness_access constants.%Add.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_11.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc20_11: = bound_method %x.ref.loc20_10, %impl.elem0.loc20_11.1 // CHECK:STDOUT: %x.ref.loc20_21: @Double.%MyInt.loc19_39.1 (%MyInt) = name_ref x, %x // CHECK:STDOUT: %Add.facet.loc20_22.1: %Add.type = facet_value constants.%MyInt, (constants.%Add.lookup_impl_witness) [symbolic = %Add.facet.loc20_11 (constants.%Add.facet.9ab)] // CHECK:STDOUT: %.loc20_22.1: %Add.type = converted constants.%MyInt, %Add.facet.loc20_22.1 [symbolic = %Add.facet.loc20_11 (constants.%Add.facet.9ab)] // CHECK:STDOUT: %Add.facet.loc20_22.2: %Add.type = facet_value constants.%MyInt, (constants.%Add.lookup_impl_witness) [symbolic = %Add.facet.loc20_11 (constants.%Add.facet.9ab)] // CHECK:STDOUT: %.loc20_22.2: %Add.type = converted constants.%MyInt, %Add.facet.loc20_22.2 [symbolic = %Add.facet.loc20_11 (constants.%Add.facet.9ab)] -// CHECK:STDOUT: %specific_impl_fn.loc20_11.1: = specific_impl_function %impl.elem0.loc20_11.1, @Add.Op(constants.%Add.facet.9ab) [symbolic = %specific_impl_fn.loc20_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc20_11.1: = specific_impl_function %impl.elem0.loc20_11.1, @Add.WithSelf.Op(constants.%Add.facet.9ab) [symbolic = %specific_impl_fn.loc20_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc20_22: = bound_method %x.ref.loc20_10, %specific_impl_fn.loc20_11.1 -// CHECK:STDOUT: %Add.Op.call: init @Double.%MyInt.loc19_39.1 (%MyInt) = call %bound_method.loc20_22(%x.ref.loc20_10, %x.ref.loc20_21) -// CHECK:STDOUT: return %Add.Op.call +// CHECK:STDOUT: %Add.WithSelf.Op.call: init @Double.%MyInt.loc19_39.1 (%MyInt) = call %bound_method.loc20_22(%x.ref.loc20_10, %x.ref.loc20_21) +// CHECK:STDOUT: return %Add.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Add.Op(constants.%Self) { +// CHECK:STDOUT: specific @Add(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self +// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.f48 +// CHECK:STDOUT: %Add.WithSelf.Op => constants.%Add.WithSelf.Op.060 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f75 @@ -412,7 +427,14 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %.loc16_37.1 => constants.%.d8e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Add.Op(constants.%Add.facet.fbb) { +// CHECK:STDOUT: specific @Add(constants.%Add.facet.fbb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Add.facet.fbb +// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.6d2 +// CHECK:STDOUT: %Add.WithSelf.Op => constants.%Add.WithSelf.Op.935 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Add.facet.fbb) { // CHECK:STDOUT: %Self => constants.%Add.facet.fbb // CHECK:STDOUT: %Self.binding.as_type => constants.%MyInt // CHECK:STDOUT: %pattern_type => constants.%pattern_type.1a3 @@ -426,7 +448,14 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %.loc19_52.1 => constants.%.b65 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Add.Op(constants.%Add.facet.9ab) { +// CHECK:STDOUT: specific @Add(constants.%Add.facet.9ab) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Add.facet.9ab +// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.3e8 +// CHECK:STDOUT: %Add.WithSelf.Op => constants.%Add.WithSelf.Op.451 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Add.facet.9ab) { // CHECK:STDOUT: %Self => constants.%Add.facet.9ab // CHECK:STDOUT: %Self.binding.as_type => constants.%MyInt // CHECK:STDOUT: %pattern_type => constants.%pattern_type.1a3 @@ -457,15 +486,18 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %.b65: Core.Form = init_form %MyInt.396, call_param1 [symbolic] // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] // CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Add.lookup_impl_witness: = lookup_impl_witness %MyInt.396, @Add [symbolic] -// CHECK:STDOUT: %Add.facet.9ab: %Add.type = facet_value %MyInt.396, (%Add.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %Add.Op.type: type = fn_type @Add.Op [concrete] +// CHECK:STDOUT: %Add.WithSelf.Op.type.099: type = fn_type @Add.WithSelf.Op, @Add(%Self) [symbolic] +// CHECK:STDOUT: %Add.WithSelf.Op.99a: %Add.WithSelf.Op.type.099 = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.5af: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.14a: Core.Form = init_form %Self.binding.as_type, call_param2 [symbolic] -// CHECK:STDOUT: %.932: type = fn_type_with_self_type %Add.Op.type, %Add.facet.9ab [symbolic] -// CHECK:STDOUT: %impl.elem0: %.932 = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Add.Op(%Add.facet.9ab) [symbolic] +// CHECK:STDOUT: %Add.lookup_impl_witness: = lookup_impl_witness %MyInt.396, @Add [symbolic] +// CHECK:STDOUT: %Add.facet.9ab: %Add.type = facet_value %MyInt.396, (%Add.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %Add.WithSelf.Op.type.3e8: type = fn_type @Add.WithSelf.Op, @Add(%Add.facet.9ab) [symbolic] +// CHECK:STDOUT: %Add.WithSelf.Op.451: %Add.WithSelf.Op.type.3e8 = struct_value () [symbolic] +// CHECK:STDOUT: %.d02: type = fn_type_with_self_type %Add.WithSelf.Op.type.3e8, %Add.facet.9ab [symbolic] +// CHECK:STDOUT: %impl.elem0: %.d02 = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Add.WithSelf.Op(%Add.facet.9ab) [symbolic] // CHECK:STDOUT: %.d8e: Core.Form = init_form %MyInt.396, call_param2 [symbolic] // CHECK:STDOUT: %Add.impl_witness.a35: = impl_witness imports.%Add.impl_witness_table, @MyInt.as.Add.impl(%N) [symbolic] // CHECK:STDOUT: %require_complete.9fa: = require_complete_type %MyInt.396 [symbolic] @@ -478,7 +510,8 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %MyInt.as.Add.impl.Op.ab3: %MyInt.as.Add.impl.Op.type.1d4 = struct_value () [concrete] // CHECK:STDOUT: %.3de: require_specific_def_type = require_specific_def @MyInt.as.Add.impl(%int_64) [concrete] // CHECK:STDOUT: %Add.facet.1f9: %Add.type = facet_value %MyInt.f9e, (%Add.impl_witness.868) [concrete] -// CHECK:STDOUT: %.368: type = fn_type_with_self_type %Add.Op.type, %Add.facet.1f9 [concrete] +// CHECK:STDOUT: %Add.WithSelf.Op.type.626: type = fn_type @Add.WithSelf.Op, @Add(%Add.facet.1f9) [concrete] +// CHECK:STDOUT: %.166: type = fn_type_with_self_type %Add.WithSelf.Op.type.626, %Add.facet.1f9 [concrete] // CHECK:STDOUT: %.4f5: Core.Form = init_form %MyInt.f9e, call_param2 [concrete] // CHECK:STDOUT: %MyInt.as.Add.impl.Op.specific_fn: = specific_function %MyInt.as.Add.impl.Op.ab3, @MyInt.as.Add.impl.Op(%int_64) [concrete] // CHECK:STDOUT: } @@ -493,10 +526,10 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %Main.import_ref.1ae = import_ref Main//generic_impl, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.6b552a.1: Core.IntLiteral = import_ref Main//generic_impl, loc11_13, loaded [symbolic = @MyInt.%N (constants.%N)] // CHECK:STDOUT: %Main.import_ref.6b552a.2: Core.IntLiteral = import_ref Main//generic_impl, loc19_11, loaded [symbolic = @Double.%N (constants.%N)] -// CHECK:STDOUT: %Main.import_ref.17c = import_ref Main//generic_impl, loc4_15, unloaded -// CHECK:STDOUT: %Main.import_ref.40e = import_ref Main//generic_impl, loc5_41, unloaded +// CHECK:STDOUT: %Main.import_ref.9ec = import_ref Main//generic_impl, loc5_41, unloaded // CHECK:STDOUT: %Main.Op = import_ref Main//generic_impl, Op, unloaded -// CHECK:STDOUT: %Main.import_ref.bb0: %Add.type = import_ref Main//generic_impl, loc4_15, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.bb084d.2: %Add.type = import_ref Main//generic_impl, loc4_15, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.17c = import_ref Main//generic_impl, loc4_15, unloaded // CHECK:STDOUT: %Main.import_ref.9c7: = import_ref Main//generic_impl, loc15_48, loaded [symbolic = @MyInt.as.Add.impl.%Add.impl_witness (constants.%Add.impl_witness.a35)] // CHECK:STDOUT: %Main.import_ref.078: @MyInt.as.Add.impl.%MyInt.as.Add.impl.Op.type (%MyInt.as.Add.impl.Op.type.ca5) = import_ref Main//generic_impl, loc16_42, loaded [symbolic = @MyInt.as.Add.impl.%MyInt.as.Add.impl.Op (constants.%MyInt.as.Add.impl.Op.d3e)] // CHECK:STDOUT: %Add.impl_witness_table = impl_witness_table (%Main.import_ref.078), @MyInt.as.Add.impl [concrete] @@ -541,7 +574,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: interface @Add [from "generic_impl.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.17c -// CHECK:STDOUT: .Op = imports.%Main.import_ref.40e +// CHECK:STDOUT: .Op = imports.%Main.import_ref.9ec // CHECK:STDOUT: witness = (imports.%Main.Op) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -599,14 +632,15 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %.2: require_specific_def_type = require_specific_def @MyInt.as.Add.impl(%N) [symbolic = %.2 (constants.%.c60)] // CHECK:STDOUT: %Add.lookup_impl_witness: = lookup_impl_witness %MyInt, @Add [symbolic = %Add.lookup_impl_witness (constants.%Add.lookup_impl_witness)] // CHECK:STDOUT: %Add.facet: %Add.type = facet_value %MyInt, (%Add.lookup_impl_witness) [symbolic = %Add.facet (constants.%Add.facet.9ab)] -// CHECK:STDOUT: %.3: type = fn_type_with_self_type constants.%Add.Op.type, %Add.facet [symbolic = %.3 (constants.%.932)] -// CHECK:STDOUT: %impl.elem0: @Double.%.3 (%.932) = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic = %impl.elem0 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Add.Op(%Add.facet) [symbolic = %specific_impl_fn (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Add.WithSelf.Op.type: type = fn_type @Add.WithSelf.Op, @Add(%Add.facet) [symbolic = %Add.WithSelf.Op.type (constants.%Add.WithSelf.Op.type.3e8)] +// CHECK:STDOUT: %.3: type = fn_type_with_self_type %Add.WithSelf.Op.type, %Add.facet [symbolic = %.3 (constants.%.d02)] +// CHECK:STDOUT: %impl.elem0: @Double.%.3 (%.d02) = impl_witness_access %Add.lookup_impl_witness, element0 [symbolic = %impl.elem0 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Add.WithSelf.Op(%Add.facet) [symbolic = %specific_impl_fn (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Add.Op(imports.%Main.import_ref.bb0: %Add.type) [from "generic_impl.carbon"] { +// CHECK:STDOUT: generic fn @Add.WithSelf.Op(imports.%Main.import_ref.bb084d.2: %Add.type) [from "generic_impl.carbon"] { // CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.5af)] @@ -644,14 +678,28 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %complete_type => constants.%complete_type.4a1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Add.Op(constants.%Self) { +// CHECK:STDOUT: specific @Add(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.099 +// CHECK:STDOUT: %Add.WithSelf.Op => constants.%Add.WithSelf.Op.99a +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.5af // CHECK:STDOUT: %.1 => constants.%.14a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Add.Op(constants.%Add.facet.9ab) { +// CHECK:STDOUT: specific @Add(constants.%Add.facet.9ab) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Add.facet.9ab +// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.3e8 +// CHECK:STDOUT: %Add.WithSelf.Op => constants.%Add.WithSelf.Op.451 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Add.facet.9ab) { // CHECK:STDOUT: %Self => constants.%Add.facet.9ab // CHECK:STDOUT: %Self.binding.as_type => constants.%MyInt.396 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.1a3 @@ -694,7 +742,8 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %.2 => constants.%.3de // CHECK:STDOUT: %Add.lookup_impl_witness => constants.%Add.impl_witness.868 // CHECK:STDOUT: %Add.facet => constants.%Add.facet.1f9 -// CHECK:STDOUT: %.3 => constants.%.368 +// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.626 +// CHECK:STDOUT: %.3 => constants.%.166 // CHECK:STDOUT: %impl.elem0 => constants.%MyInt.as.Add.impl.Op.ab3 // CHECK:STDOUT: %specific_impl_fn => constants.%MyInt.as.Add.impl.Op.specific_fn // CHECK:STDOUT: } @@ -710,7 +759,9 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %require_complete => constants.%complete_type.4a1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Add.Op(constants.%Add.facet.1f9) { +// CHECK:STDOUT: specific @Add(constants.%Add.facet.1f9) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Add.facet.1f9) { // CHECK:STDOUT: %Self => constants.%Add.facet.1f9 // CHECK:STDOUT: %Self.binding.as_type => constants.%MyInt.f9e // CHECK:STDOUT: %pattern_type => constants.%pattern_type.48d diff --git a/toolchain/check/testdata/impl/import_compound.carbon b/toolchain/check/testdata/impl/import_compound.carbon index 0f4dbf0def64..c81ca368cf99 100644 --- a/toolchain/check/testdata/impl/import_compound.carbon +++ b/toolchain/check/testdata/impl/import_compound.carbon @@ -103,30 +103,34 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %NonInstance.type: type = facet_type <@NonInstance> [concrete] // CHECK:STDOUT: %Self.dde: %NonInstance.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %NonInstance.F.type: type = fn_type @NonInstance.F [concrete] +// CHECK:STDOUT: %NonInstance.WithSelf.F.type.8c3: type = fn_type @NonInstance.WithSelf.F, @NonInstance(%Self.dde) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %NonInstance.F: %NonInstance.F.type = struct_value () [concrete] +// CHECK:STDOUT: %NonInstance.WithSelf.F.af0: %NonInstance.WithSelf.F.type.8c3 = struct_value () [symbolic] // CHECK:STDOUT: %NonInstance.assoc_type: type = assoc_entity_type @NonInstance [concrete] -// CHECK:STDOUT: %assoc0.8b2: %NonInstance.assoc_type = assoc_entity element0, @NonInstance.%NonInstance.F.decl [concrete] +// CHECK:STDOUT: %assoc0.d22: %NonInstance.assoc_type = assoc_entity element0, @NonInstance.%NonInstance.WithSelf.F.decl [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %empty_tuple.type} [concrete] // CHECK:STDOUT: %NonInstance.impl_witness: = impl_witness @struct_type.i.as.NonInstance.impl.%NonInstance.impl_witness_table [concrete] // CHECK:STDOUT: %struct_type.i.as.NonInstance.impl.F.type: type = fn_type @struct_type.i.as.NonInstance.impl.F [concrete] // CHECK:STDOUT: %struct_type.i.as.NonInstance.impl.F: %struct_type.i.as.NonInstance.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %NonInstance.facet: %NonInstance.type = facet_value %struct_type.i, (%NonInstance.impl_witness) [concrete] +// CHECK:STDOUT: %NonInstance.WithSelf.F.type.d4e: type = fn_type @NonInstance.WithSelf.F, @NonInstance(%NonInstance.facet) [concrete] +// CHECK:STDOUT: %NonInstance.WithSelf.F.899: %NonInstance.WithSelf.F.type.d4e = struct_value () [concrete] // CHECK:STDOUT: %Instance.type: type = facet_type <@Instance> [concrete] // CHECK:STDOUT: %Self.8af: %Instance.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.8af [symbolic] // CHECK:STDOUT: %pattern_type.7f8: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %Instance.G.type: type = fn_type @Instance.G [concrete] -// CHECK:STDOUT: %Instance.G: %Instance.G.type = struct_value () [concrete] +// CHECK:STDOUT: %Instance.WithSelf.G.type.332: type = fn_type @Instance.WithSelf.G, @Instance(%Self.8af) [symbolic] +// CHECK:STDOUT: %Instance.WithSelf.G.cc9: %Instance.WithSelf.G.type.332 = struct_value () [symbolic] // CHECK:STDOUT: %Instance.assoc_type: type = assoc_entity_type @Instance [concrete] -// CHECK:STDOUT: %assoc0.2e5: %Instance.assoc_type = assoc_entity element0, @Instance.%Instance.G.decl [concrete] +// CHECK:STDOUT: %assoc0.048: %Instance.assoc_type = assoc_entity element0, @Instance.%Instance.WithSelf.G.decl [concrete] // CHECK:STDOUT: %Instance.impl_witness: = impl_witness @struct_type.i.as.Instance.impl.%Instance.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.9b2: type = pattern_type %struct_type.i [concrete] // CHECK:STDOUT: %struct_type.i.as.Instance.impl.G.type: type = fn_type @struct_type.i.as.Instance.impl.G [concrete] // CHECK:STDOUT: %struct_type.i.as.Instance.impl.G: %struct_type.i.as.Instance.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: %Instance.facet: %Instance.type = facet_value %struct_type.i, (%Instance.impl_witness) [concrete] +// CHECK:STDOUT: %Instance.WithSelf.G.type.1b1: type = fn_type @Instance.WithSelf.G, @Instance(%Instance.facet) [concrete] +// CHECK:STDOUT: %Instance.WithSelf.G.4c5: %Instance.WithSelf.G.type.1b1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -160,38 +164,44 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @NonInstance { -// CHECK:STDOUT: %Self: %NonInstance.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dde] -// CHECK:STDOUT: %NonInstance.F.decl: %NonInstance.F.type = fn_decl @NonInstance.F [concrete = constants.%NonInstance.F] {} {} -// CHECK:STDOUT: %assoc0: %NonInstance.assoc_type = assoc_entity element0, %NonInstance.F.decl [concrete = constants.%assoc0.8b2] +// CHECK:STDOUT: %Self.loc3: %NonInstance.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dde] +// CHECK:STDOUT: interface_with_self_decl @NonInstance [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %NonInstance.WithSelf.F.decl: @NonInstance.%NonInstance.WithSelf.F.type (%NonInstance.WithSelf.F.type.8c3) = fn_decl @NonInstance.WithSelf.F [symbolic = @NonInstance.%NonInstance.WithSelf.F (constants.%NonInstance.WithSelf.F.af0)] {} {} +// CHECK:STDOUT: %assoc0: %NonInstance.assoc_type = assoc_entity element0, %NonInstance.WithSelf.F.decl [concrete = constants.%assoc0.d22] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%NonInstance.F.decl) +// CHECK:STDOUT: witness = (%NonInstance.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Instance { -// CHECK:STDOUT: %Self: %Instance.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8af] -// CHECK:STDOUT: %Instance.G.decl: %Instance.G.type = fn_decl @Instance.G [concrete = constants.%Instance.G] { -// CHECK:STDOUT: %self.patt: @Instance.G.%pattern_type (%pattern_type.7f8) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Instance.G.%pattern_type (%pattern_type.7f8) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc11: %Instance.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8af] +// CHECK:STDOUT: interface_with_self_decl @Instance [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Instance.WithSelf.G.decl: @Instance.%Instance.WithSelf.G.type (%Instance.WithSelf.G.type.332) = fn_decl @Instance.WithSelf.G [symbolic = @Instance.%Instance.WithSelf.G (constants.%Instance.WithSelf.G.cc9)] { +// CHECK:STDOUT: %self.patt: @Instance.WithSelf.G.%pattern_type (%pattern_type.7f8) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Instance.WithSelf.G.%pattern_type (%pattern_type.7f8) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @Instance.G.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Instance.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc12_14.1: type = splice_block %.loc12_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %Instance.type = name_ref Self, @Instance.%Self [symbolic = %Self (constants.%Self.8af)] +// CHECK:STDOUT: %Self.ref: %Instance.type = name_ref Self, @Instance.%Self.loc11 [symbolic = %Self (constants.%Self.8af)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Instance.G.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @Instance.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %Instance.assoc_type = assoc_entity element0, %Instance.G.decl [concrete = constants.%assoc0.2e5] +// CHECK:STDOUT: %assoc0: %Instance.assoc_type = assoc_entity element0, %Instance.WithSelf.G.decl [concrete = constants.%assoc0.048] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc11 // CHECK:STDOUT: .G = %assoc0 -// CHECK:STDOUT: witness = (%Instance.G.decl) +// CHECK:STDOUT: witness = (%Instance.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -223,7 +233,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: witness = %Instance.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NonInstance.F(@NonInstance.%Self: %NonInstance.type) { +// CHECK:STDOUT: generic fn @NonInstance.WithSelf.F(@NonInstance.%Self.loc3: %NonInstance.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -232,12 +242,12 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Instance.G(@Instance.%Self: %Instance.type) { +// CHECK:STDOUT: generic fn @Instance.WithSelf.G(@Instance.%Self.loc11: %Instance.type) { // CHECK:STDOUT: %Self: %Instance.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8af)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.7f8)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Instance.G.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @Instance.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @struct_type.i.as.Instance.impl.G(%self.param: %struct_type.i) { @@ -245,17 +255,45 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @NonInstance.F(constants.%Self.dde) {} +// CHECK:STDOUT: specific @NonInstance(constants.%Self.dde) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Self.dde +// CHECK:STDOUT: %NonInstance.WithSelf.F.type => constants.%NonInstance.WithSelf.F.type.8c3 +// CHECK:STDOUT: %NonInstance.WithSelf.F => constants.%NonInstance.WithSelf.F.af0 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @NonInstance.F(constants.%NonInstance.facet) {} +// CHECK:STDOUT: specific @NonInstance.WithSelf.F(constants.%Self.dde) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Instance.G(constants.%Self.8af) { +// CHECK:STDOUT: specific @NonInstance(constants.%NonInstance.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%NonInstance.facet +// CHECK:STDOUT: %NonInstance.WithSelf.F.type => constants.%NonInstance.WithSelf.F.type.d4e +// CHECK:STDOUT: %NonInstance.WithSelf.F => constants.%NonInstance.WithSelf.F.899 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NonInstance.WithSelf.F(constants.%NonInstance.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Instance(constants.%Self.8af) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc12 => constants.%Self.8af +// CHECK:STDOUT: %Instance.WithSelf.G.type => constants.%Instance.WithSelf.G.type.332 +// CHECK:STDOUT: %Instance.WithSelf.G => constants.%Instance.WithSelf.G.cc9 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Instance.WithSelf.G(constants.%Self.8af) { // CHECK:STDOUT: %Self => constants.%Self.8af // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7f8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Instance.G(constants.%Instance.facet) { +// CHECK:STDOUT: specific @Instance(constants.%Instance.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc12 => constants.%Instance.facet +// CHECK:STDOUT: %Instance.WithSelf.G.type => constants.%Instance.WithSelf.G.type.1b1 +// CHECK:STDOUT: %Instance.WithSelf.G => constants.%Instance.WithSelf.G.4c5 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Instance.WithSelf.G(constants.%Instance.facet) { // CHECK:STDOUT: %Self => constants.%Instance.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%struct_type.i // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9b2 @@ -271,13 +309,15 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %empty_tuple.type} [concrete] // CHECK:STDOUT: %NonInstance.type: type = facet_type <@NonInstance> [concrete] // CHECK:STDOUT: %Self: %NonInstance.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %NonInstance.WithSelf.F.type.324: type = fn_type @NonInstance.WithSelf.F, @NonInstance(%Self) [symbolic] +// CHECK:STDOUT: %NonInstance.WithSelf.F.742: %NonInstance.WithSelf.F.type.324 = struct_value () [symbolic] // CHECK:STDOUT: %NonInstance.assoc_type: type = assoc_entity_type @NonInstance [concrete] -// CHECK:STDOUT: %assoc0: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.497 [concrete] -// CHECK:STDOUT: %NonInstance.F.type: type = fn_type @NonInstance.F [concrete] -// CHECK:STDOUT: %NonInstance.F: %NonInstance.F.type = struct_value () [concrete] +// CHECK:STDOUT: %assoc0: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.7a9 [concrete] // CHECK:STDOUT: %NonInstance.impl_witness: = impl_witness imports.%NonInstance.impl_witness_table [concrete] // CHECK:STDOUT: %NonInstance.facet: %NonInstance.type = facet_value %struct_type.i, (%NonInstance.impl_witness) [concrete] -// CHECK:STDOUT: %.e66: type = fn_type_with_self_type %NonInstance.F.type, %NonInstance.facet [concrete] +// CHECK:STDOUT: %NonInstance.WithSelf.F.type.0c7: type = fn_type @NonInstance.WithSelf.F, @NonInstance(%NonInstance.facet) [concrete] +// CHECK:STDOUT: %NonInstance.WithSelf.F.06c: %NonInstance.WithSelf.F.type.0c7 = struct_value () [concrete] +// CHECK:STDOUT: %.cff: type = fn_type_with_self_type %NonInstance.WithSelf.F.type.0c7, %NonInstance.facet [concrete] // CHECK:STDOUT: %struct_type.i.as.NonInstance.impl.F.type: type = fn_type @struct_type.i.as.NonInstance.impl.F [concrete] // CHECK:STDOUT: %struct_type.i.as.NonInstance.impl.F: %struct_type.i.as.NonInstance.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -289,11 +329,11 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.d2e = import_ref Main//lib, loc3_23, unloaded -// CHECK:STDOUT: %Main.import_ref.a6a: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.598: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded -// CHECK:STDOUT: %Main.import_ref.497: %NonInstance.F.type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%NonInstance.F] -// CHECK:STDOUT: %Main.import_ref.ac5: %NonInstance.type = import_ref Main//lib, loc3_23, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.ac5555.2: %NonInstance.type = import_ref Main//lib, loc3_23, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.d2e = import_ref Main//lib, loc3_23, unloaded +// CHECK:STDOUT: %Main.import_ref.7a9: @NonInstance.%NonInstance.WithSelf.F.type (%NonInstance.WithSelf.F.type.324) = import_ref Main//lib, loc4_9, loaded [symbolic = @NonInstance.%NonInstance.WithSelf.F (constants.%NonInstance.WithSelf.F.742)] // CHECK:STDOUT: %Main.import_ref.3e8: = import_ref Main//lib, loc7_30, loaded [concrete = constants.%NonInstance.impl_witness] // CHECK:STDOUT: %Main.import_ref.c9a: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.bf9: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type] @@ -316,7 +356,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: interface @NonInstance [from "lib.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.d2e -// CHECK:STDOUT: .F = imports.%Main.import_ref.a6a +// CHECK:STDOUT: .F = imports.%Main.import_ref.598 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -333,21 +373,35 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %empty_tuple.type} [concrete = constants.%struct_type.i] // CHECK:STDOUT: %NonInstance.ref: type = name_ref NonInstance, imports.%Main.NonInstance [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.a6a [concrete = constants.%assoc0] +// CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.598 [concrete = constants.%assoc0] // CHECK:STDOUT: %NonInstance.facet: %NonInstance.type = facet_value %struct_type.i, (constants.%NonInstance.impl_witness) [concrete = constants.%NonInstance.facet] // CHECK:STDOUT: %.loc6_11: %NonInstance.type = converted %struct_type.i, %NonInstance.facet [concrete = constants.%NonInstance.facet] -// CHECK:STDOUT: %impl.elem0: %.e66 = impl_witness_access constants.%NonInstance.impl_witness, element0 [concrete = constants.%struct_type.i.as.NonInstance.impl.F] +// CHECK:STDOUT: %impl.elem0: %.cff = impl_witness_access constants.%NonInstance.impl_witness, element0 [concrete = constants.%struct_type.i.as.NonInstance.impl.F] // CHECK:STDOUT: %struct_type.i.as.NonInstance.impl.F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NonInstance.F(imports.%Main.import_ref.ac5: %NonInstance.type) [from "lib.carbon"] { +// CHECK:STDOUT: generic fn @NonInstance.WithSelf.F(imports.%Main.import_ref.ac5555.2: %NonInstance.type) [from "lib.carbon"] { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @struct_type.i.as.NonInstance.impl.F [from "lib.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: specific @NonInstance.F(constants.%Self) {} +// CHECK:STDOUT: specific @NonInstance(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %NonInstance.WithSelf.F.type => constants.%NonInstance.WithSelf.F.type.324 +// CHECK:STDOUT: %NonInstance.WithSelf.F => constants.%NonInstance.WithSelf.F.742 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NonInstance.WithSelf.F(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NonInstance(constants.%NonInstance.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%NonInstance.facet +// CHECK:STDOUT: %NonInstance.WithSelf.F.type => constants.%NonInstance.WithSelf.F.type.0c7 +// CHECK:STDOUT: %NonInstance.WithSelf.F => constants.%NonInstance.WithSelf.F.06c +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_import_non-instance.carbon // CHECK:STDOUT: @@ -360,10 +414,10 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %NonInstanceCallImportFail: %NonInstanceCallImportFail.type = struct_value () [concrete] // CHECK:STDOUT: %NonInstance.type: type = facet_type <@NonInstance> [concrete] // CHECK:STDOUT: %Self.fcb: %NonInstance.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %NonInstance.WithSelf.F.type: type = fn_type @NonInstance.WithSelf.F, @NonInstance(%Self.fcb) [symbolic] +// CHECK:STDOUT: %NonInstance.WithSelf.F: %NonInstance.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %NonInstance.assoc_type: type = assoc_entity_type @NonInstance [concrete] -// CHECK:STDOUT: %assoc0.cf2: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.497 [concrete] -// CHECK:STDOUT: %NonInstance.F.type: type = fn_type @NonInstance.F [concrete] -// CHECK:STDOUT: %NonInstance.F: %NonInstance.F.type = struct_value () [concrete] +// CHECK:STDOUT: %assoc0.c68: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.7a9 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: } @@ -376,11 +430,11 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.d2e = import_ref Main//lib, loc3_23, unloaded -// CHECK:STDOUT: %Main.import_ref.a6a: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0.cf2] +// CHECK:STDOUT: %Main.import_ref.598: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0.c68] // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded -// CHECK:STDOUT: %Main.import_ref.497: %NonInstance.F.type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%NonInstance.F] -// CHECK:STDOUT: %Main.import_ref.ac5: %NonInstance.type = import_ref Main//lib, loc3_23, loaded [symbolic = constants.%Self.fcb] +// CHECK:STDOUT: %Main.import_ref.ac5555.2: %NonInstance.type = import_ref Main//lib, loc3_23, loaded [symbolic = constants.%Self.fcb] +// CHECK:STDOUT: %Main.import_ref.d2e = import_ref Main//lib, loc3_23, unloaded +// CHECK:STDOUT: %Main.import_ref.7a9: @NonInstance.%NonInstance.WithSelf.F.type (%NonInstance.WithSelf.F.type) = import_ref Main//lib, loc4_9, loaded [symbolic = @NonInstance.%NonInstance.WithSelf.F (constants.%NonInstance.WithSelf.F)] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -410,7 +464,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: interface @NonInstance [from "lib.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.d2e -// CHECK:STDOUT: .F = imports.%Main.import_ref.a6a +// CHECK:STDOUT: .F = imports.%Main.import_ref.598 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -420,16 +474,23 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %struct_type.i = name_ref n, %n // CHECK:STDOUT: %NonInstance.ref: type = name_ref NonInstance, imports.%Main.NonInstance [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.a6a [concrete = constants.%assoc0.cf2] +// CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.598 [concrete = constants.%assoc0.c68] // CHECK:STDOUT: %.loc13: %NonInstance.type = converted %n.ref, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NonInstance.F(imports.%Main.import_ref.ac5: %NonInstance.type) [from "lib.carbon"] { +// CHECK:STDOUT: generic fn @NonInstance.WithSelf.F(imports.%Main.import_ref.ac5555.2: %NonInstance.type) [from "lib.carbon"] { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @NonInstance.F(constants.%Self.fcb) {} +// CHECK:STDOUT: specific @NonInstance(constants.%Self.fcb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.fcb +// CHECK:STDOUT: %NonInstance.WithSelf.F.type => constants.%NonInstance.WithSelf.F.type +// CHECK:STDOUT: %NonInstance.WithSelf.F => constants.%NonInstance.WithSelf.F +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NonInstance.WithSelf.F(constants.%Self.fcb) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_import_non-instance_indirect.carbon // CHECK:STDOUT: @@ -443,10 +504,10 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %NonInstanceCallIndirectImport: %NonInstanceCallIndirectImport.type = struct_value () [concrete] // CHECK:STDOUT: %NonInstance.type: type = facet_type <@NonInstance> [concrete] // CHECK:STDOUT: %Self.fcb: %NonInstance.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %NonInstance.WithSelf.F.type: type = fn_type @NonInstance.WithSelf.F, @NonInstance(%Self.fcb) [symbolic] +// CHECK:STDOUT: %NonInstance.WithSelf.F: %NonInstance.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %NonInstance.assoc_type: type = assoc_entity_type @NonInstance [concrete] -// CHECK:STDOUT: %assoc0.cf2: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.497 [concrete] -// CHECK:STDOUT: %NonInstance.F.type: type = fn_type @NonInstance.F [concrete] -// CHECK:STDOUT: %NonInstance.F: %NonInstance.F.type = struct_value () [concrete] +// CHECK:STDOUT: %assoc0.c68: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.7a9 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: } @@ -459,11 +520,11 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.d2e = import_ref Main//lib, loc3_23, unloaded -// CHECK:STDOUT: %Main.import_ref.a6a: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0.cf2] +// CHECK:STDOUT: %Main.import_ref.598: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0.c68] // CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded -// CHECK:STDOUT: %Main.import_ref.497: %NonInstance.F.type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%NonInstance.F] -// CHECK:STDOUT: %Main.import_ref.ac5: %NonInstance.type = import_ref Main//lib, loc3_23, loaded [symbolic = constants.%Self.fcb] +// CHECK:STDOUT: %Main.import_ref.ac5555.2: %NonInstance.type = import_ref Main//lib, loc3_23, loaded [symbolic = constants.%Self.fcb] +// CHECK:STDOUT: %Main.import_ref.d2e = import_ref Main//lib, loc3_23, unloaded +// CHECK:STDOUT: %Main.import_ref.7a9: @NonInstance.%NonInstance.WithSelf.F.type (%NonInstance.WithSelf.F.type) = import_ref Main//lib, loc4_9, loaded [symbolic = @NonInstance.%NonInstance.WithSelf.F (constants.%NonInstance.WithSelf.F)] // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -494,7 +555,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: interface @NonInstance [from "lib.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.d2e -// CHECK:STDOUT: .F = imports.%Main.import_ref.a6a +// CHECK:STDOUT: .F = imports.%Main.import_ref.598 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -504,17 +565,24 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p // CHECK:STDOUT: %NonInstance.ref: type = name_ref NonInstance, imports.%Main.NonInstance [concrete = constants.%NonInstance.type] -// CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.a6a [concrete = constants.%assoc0.cf2] +// CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.598 [concrete = constants.%assoc0.c68] // CHECK:STDOUT: %.loc13_4.1: ref %struct_type.i = deref %p.ref // CHECK:STDOUT: %.loc13_4.2: %NonInstance.type = converted %.loc13_4.1, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @NonInstance.F(imports.%Main.import_ref.ac5: %NonInstance.type) [from "lib.carbon"] { +// CHECK:STDOUT: generic fn @NonInstance.WithSelf.F(imports.%Main.import_ref.ac5555.2: %NonInstance.type) [from "lib.carbon"] { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @NonInstance.F(constants.%Self.fcb) {} +// CHECK:STDOUT: specific @NonInstance(constants.%Self.fcb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.fcb +// CHECK:STDOUT: %NonInstance.WithSelf.F.type => constants.%NonInstance.WithSelf.F.type +// CHECK:STDOUT: %NonInstance.WithSelf.F => constants.%NonInstance.WithSelf.F +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NonInstance.WithSelf.F(constants.%Self.fcb) {} // CHECK:STDOUT: // CHECK:STDOUT: --- import_instance_success.carbon // CHECK:STDOUT: @@ -527,15 +595,17 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %InstanceCallImport: %InstanceCallImport.type = struct_value () [concrete] // CHECK:STDOUT: %Instance.type: type = facet_type <@Instance> [concrete] // CHECK:STDOUT: %Self: %Instance.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Instance.assoc_type: type = assoc_entity_type @Instance [concrete] -// CHECK:STDOUT: %assoc0: %Instance.assoc_type = assoc_entity element0, imports.%Main.import_ref.cba [concrete] -// CHECK:STDOUT: %Instance.G.type: type = fn_type @Instance.G [concrete] -// CHECK:STDOUT: %Instance.G: %Instance.G.type = struct_value () [concrete] +// CHECK:STDOUT: %Instance.WithSelf.G.type.ce7: type = fn_type @Instance.WithSelf.G, @Instance(%Self) [symbolic] +// CHECK:STDOUT: %Instance.WithSelf.G.f53: %Instance.WithSelf.G.type.ce7 = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.4db: type = pattern_type %Self.binding.as_type [symbolic] +// CHECK:STDOUT: %Instance.assoc_type: type = assoc_entity_type @Instance [concrete] +// CHECK:STDOUT: %assoc0: %Instance.assoc_type = assoc_entity element0, imports.%Main.import_ref.8c1 [concrete] // CHECK:STDOUT: %Instance.impl_witness: = impl_witness imports.%Instance.impl_witness_table [concrete] // CHECK:STDOUT: %Instance.facet: %Instance.type = facet_value %struct_type.i, (%Instance.impl_witness) [concrete] -// CHECK:STDOUT: %.355: type = fn_type_with_self_type %Instance.G.type, %Instance.facet [concrete] +// CHECK:STDOUT: %Instance.WithSelf.G.type.fe3: type = fn_type @Instance.WithSelf.G, @Instance(%Instance.facet) [concrete] +// CHECK:STDOUT: %Instance.WithSelf.G.404: %Instance.WithSelf.G.type.fe3 = struct_value () [concrete] +// CHECK:STDOUT: %.f0d: type = fn_type_with_self_type %Instance.WithSelf.G.type.fe3, %Instance.facet [concrete] // CHECK:STDOUT: %struct_type.i.as.Instance.impl.G.type: type = fn_type @struct_type.i.as.Instance.impl.G [concrete] // CHECK:STDOUT: %struct_type.i.as.Instance.impl.G: %struct_type.i.as.Instance.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: %ptr: type = ptr_type %struct_type.i [concrete] @@ -552,11 +622,11 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.639 = import_ref Main//lib, loc11_20, unloaded -// CHECK:STDOUT: %Main.import_ref.449: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.0ce: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded -// CHECK:STDOUT: %Main.import_ref.cba: %Instance.G.type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%Instance.G] -// CHECK:STDOUT: %Main.import_ref.7a5: %Instance.type = import_ref Main//lib, loc11_20, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.7a53e1.2: %Instance.type = import_ref Main//lib, loc11_20, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.639 = import_ref Main//lib, loc11_20, unloaded +// CHECK:STDOUT: %Main.import_ref.8c1: @Instance.%Instance.WithSelf.G.type (%Instance.WithSelf.G.type.ce7) = import_ref Main//lib, loc12_21, loaded [symbolic = @Instance.%Instance.WithSelf.G (constants.%Instance.WithSelf.G.f53)] // CHECK:STDOUT: %Main.import_ref.344: = import_ref Main//lib, loc15_27, loaded [concrete = constants.%Instance.impl_witness] // CHECK:STDOUT: %Main.import_ref.c9a: type = import_ref Main//lib, loc15_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.2f8: type = import_ref Main//lib, loc15_18, loaded [concrete = constants.%Instance.type] @@ -604,7 +674,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: interface @Instance [from "lib.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.639 -// CHECK:STDOUT: .G = imports.%Main.import_ref.449 +// CHECK:STDOUT: .G = imports.%Main.import_ref.0ce // CHECK:STDOUT: witness = (imports.%Main.G) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -619,14 +689,14 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %struct_type.i = name_ref n, %n // CHECK:STDOUT: %Instance.ref: type = name_ref Instance, imports.%Main.Instance [concrete = constants.%Instance.type] -// CHECK:STDOUT: %G.ref: %Instance.assoc_type = name_ref G, imports.%Main.import_ref.449 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.355 = impl_witness_access constants.%Instance.impl_witness, element0 [concrete = constants.%struct_type.i.as.Instance.impl.G] +// CHECK:STDOUT: %G.ref: %Instance.assoc_type = name_ref G, imports.%Main.import_ref.0ce [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %.f0d = impl_witness_access constants.%Instance.impl_witness, element0 [concrete = constants.%struct_type.i.as.Instance.impl.G] // CHECK:STDOUT: %bound_method: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %struct_type.i.as.Instance.impl.G.call: init %empty_tuple.type = call %bound_method(%n.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Instance.G(imports.%Main.import_ref.7a5: %Instance.type) [from "lib.carbon"] { +// CHECK:STDOUT: generic fn @Instance.WithSelf.G(imports.%Main.import_ref.7a53e1.2: %Instance.type) [from "lib.carbon"] { // CHECK:STDOUT: %Self: %Instance.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.4db)] @@ -640,9 +710,9 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p // CHECK:STDOUT: %Instance.ref: type = name_ref Instance, imports.%Main.Instance [concrete = constants.%Instance.type] -// CHECK:STDOUT: %G.ref: %Instance.assoc_type = name_ref G, imports.%Main.import_ref.449 [concrete = constants.%assoc0] +// CHECK:STDOUT: %G.ref: %Instance.assoc_type = name_ref G, imports.%Main.import_ref.0ce [concrete = constants.%assoc0] // CHECK:STDOUT: %.loc10_4.1: ref %struct_type.i = deref %p.ref -// CHECK:STDOUT: %impl.elem0: %.355 = impl_witness_access constants.%Instance.impl_witness, element0 [concrete = constants.%struct_type.i.as.Instance.impl.G] +// CHECK:STDOUT: %impl.elem0: %.f0d = impl_witness_access constants.%Instance.impl_witness, element0 [concrete = constants.%struct_type.i.as.Instance.impl.G] // CHECK:STDOUT: %bound_method: = bound_method %.loc10_4.1, %impl.elem0 // CHECK:STDOUT: %.loc10_4.2: ref %empty_tuple.type = struct_access %.loc10_4.1, element0 // CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] @@ -653,12 +723,26 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Instance.G(constants.%Self) { +// CHECK:STDOUT: specific @Instance(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %Instance.WithSelf.G.type => constants.%Instance.WithSelf.G.type.ce7 +// CHECK:STDOUT: %Instance.WithSelf.G => constants.%Instance.WithSelf.G.f53 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Instance.WithSelf.G(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4db // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Instance(constants.%Instance.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Instance.facet +// CHECK:STDOUT: %Instance.WithSelf.G.type => constants.%Instance.WithSelf.G.type.fe3 +// CHECK:STDOUT: %Instance.WithSelf.G => constants.%Instance.WithSelf.G.404 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_import_instance.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -669,12 +753,12 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %empty_tuple.type} [concrete] // CHECK:STDOUT: %Instance.type: type = facet_type <@Instance> [concrete] // CHECK:STDOUT: %Self: %Instance.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Instance.assoc_type: type = assoc_entity_type @Instance [concrete] -// CHECK:STDOUT: %assoc0: %Instance.assoc_type = assoc_entity element0, imports.%Main.import_ref.cba [concrete] -// CHECK:STDOUT: %Instance.G.type: type = fn_type @Instance.G [concrete] -// CHECK:STDOUT: %Instance.G: %Instance.G.type = struct_value () [concrete] +// CHECK:STDOUT: %Instance.WithSelf.G.type: type = fn_type @Instance.WithSelf.G, @Instance(%Self) [symbolic] +// CHECK:STDOUT: %Instance.WithSelf.G: %Instance.WithSelf.G.type = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic] +// CHECK:STDOUT: %Instance.assoc_type: type = assoc_entity_type @Instance [concrete] +// CHECK:STDOUT: %assoc0: %Instance.assoc_type = assoc_entity element0, imports.%Main.import_ref.8c1 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -684,11 +768,11 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %Main.import_ref.639 = import_ref Main//lib, loc11_20, unloaded -// CHECK:STDOUT: %Main.import_ref.449: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.0ce: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded -// CHECK:STDOUT: %Main.import_ref.cba: %Instance.G.type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%Instance.G] -// CHECK:STDOUT: %Main.import_ref.7a5: %Instance.type = import_ref Main//lib, loc11_20, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.7a53e1.2: %Instance.type = import_ref Main//lib, loc11_20, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.639 = import_ref Main//lib, loc11_20, unloaded +// CHECK:STDOUT: %Main.import_ref.8c1: @Instance.%Instance.WithSelf.G.type (%Instance.WithSelf.G.type) = import_ref Main//lib, loc12_21, loaded [symbolic = @Instance.%Instance.WithSelf.G (constants.%Instance.WithSelf.G)] // CHECK:STDOUT: %Main.import_ref.8c0 = import_ref Main//lib, loc15_27, unloaded // CHECK:STDOUT: %Main.import_ref.c9a: type = import_ref Main//lib, loc15_13, loaded [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Main.import_ref.2f8: type = import_ref Main//lib, loc15_18, loaded [concrete = constants.%Instance.type] @@ -709,7 +793,7 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: interface @Instance [from "lib.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.639 -// CHECK:STDOUT: .G = imports.%Main.import_ref.449 +// CHECK:STDOUT: .G = imports.%Main.import_ref.0ce // CHECK:STDOUT: witness = (imports.%Main.G) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -726,11 +810,11 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %struct_type.i: type = struct_type {.i: %empty_tuple.type} [concrete = constants.%struct_type.i] // CHECK:STDOUT: %Instance.ref: type = name_ref Instance, imports.%Main.Instance [concrete = constants.%Instance.type] -// CHECK:STDOUT: %G.ref: %Instance.assoc_type = name_ref G, imports.%Main.import_ref.449 [concrete = constants.%assoc0] +// CHECK:STDOUT: %G.ref: %Instance.assoc_type = name_ref G, imports.%Main.import_ref.0ce [concrete = constants.%assoc0] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Instance.G(imports.%Main.import_ref.7a5: %Instance.type) [from "lib.carbon"] { +// CHECK:STDOUT: generic fn @Instance.WithSelf.G(imports.%Main.import_ref.7a53e1.2: %Instance.type) [from "lib.carbon"] { // CHECK:STDOUT: %Self: %Instance.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type)] @@ -738,7 +822,14 @@ fn InstanceCallImportFail() { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Instance.G(constants.%Self) { +// CHECK:STDOUT: specific @Instance(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %Instance.WithSelf.G.type => constants.%Instance.WithSelf.G.type +// CHECK:STDOUT: %Instance.WithSelf.G => constants.%Instance.WithSelf.G +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Instance.WithSelf.G(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type diff --git a/toolchain/check/testdata/impl/import_extend_impl.carbon b/toolchain/check/testdata/impl/import_extend_impl.carbon index 3d13eabfef7e..fb9c6de568a8 100644 --- a/toolchain/check/testdata/impl/import_extend_impl.carbon +++ b/toolchain/check/testdata/impl/import_extend_impl.carbon @@ -42,15 +42,17 @@ fn G(c: C) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.705: %I.WithSelf.F.type.08c = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.ba3: type = fn_type @I.WithSelf.F, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.0e5: %I.WithSelf.F.type.ba3 = 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: } @@ -65,14 +67,17 @@ fn G(c: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] {} {} -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc4: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.705)] {} {} +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -101,7 +106,7 @@ fn G(c: C) { // CHECK:STDOUT: extend @C.as.I.impl.%I.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc4: %I.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -110,9 +115,23 @@ fn G(c: C) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self +// 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.F(constants.%I.facet) {} +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.ba3 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.0e5 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- use_imported_class_extend_impl.carbon // CHECK:STDOUT: @@ -126,13 +145,19 @@ fn G(c: C) { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.a1f: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.cc3: %I.WithSelf.F.type.a1f = struct_value () [symbolic] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.b59: type = fn_type @I.WithSelf.F, @I(%C.type.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.521: %I.WithSelf.F.type.b59 = struct_value () [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.b58 [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.972 [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] -// CHECK:STDOUT: %.97d: type = fn_type_with_self_type %I.F.type, %I.facet [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.7f9: type = fn_type @I.WithSelf.F, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.c5a: %I.WithSelf.F.type.7f9 = struct_value () [concrete] +// CHECK:STDOUT: %.a40: type = fn_type_with_self_type %I.WithSelf.F.type.7f9, %I.facet [concrete] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -143,16 +168,16 @@ fn G(c: C) { // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//extend_impl_library, loc12_1, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.743 = import_ref Main//extend_impl_library, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.72a4a5.1: type = import_ref Main//extend_impl_library, loc9_18, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//extend_impl_library, loc4_13, unloaded -// CHECK:STDOUT: %Main.import_ref.ce7: %I.assoc_type = import_ref Main//extend_impl_library, loc5_9, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.a54: %I.assoc_type = import_ref Main//extend_impl_library, loc5_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F = import_ref Main//extend_impl_library, F, unloaded -// CHECK:STDOUT: %Main.import_ref.b58: %I.F.type = import_ref Main//extend_impl_library, loc5_9, loaded [concrete = constants.%I.F] +// CHECK:STDOUT: %Main.import_ref.2362f8.2: %I.type = import_ref Main//extend_impl_library, loc4_13, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//extend_impl_library, loc4_13, unloaded +// CHECK:STDOUT: %Main.import_ref.972: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.a1f) = import_ref Main//extend_impl_library, loc5_9, loaded [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.cc3)] // CHECK:STDOUT: %Main.import_ref.a3d: = import_ref Main//extend_impl_library, loc9_20, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.569: type = import_ref Main//extend_impl_library, loc9_15, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.72a4a5.2: type = import_ref Main//extend_impl_library, loc9_18, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.import_ref.d12: %C.as.I.impl.F.type = import_ref Main//extend_impl_library, loc10_12, loaded [concrete = constants.%C.as.I.impl.F] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.d12), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//extend_impl_library, loc4_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -175,7 +200,7 @@ fn G(c: C) { // CHECK:STDOUT: interface @I [from "extend_impl_library.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .F = imports.%Main.import_ref.ce7 +// CHECK:STDOUT: .F = imports.%Main.import_ref.a54 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -198,21 +223,42 @@ fn G(c: C) { // CHECK:STDOUT: fn @G(%c.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc7: type = name_ref C, imports.%Main.C [concrete = constants.%C] -// CHECK:STDOUT: %F.ref.loc7: %I.assoc_type = name_ref F, imports.%Main.import_ref.ce7 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc7: %.97d = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F] +// CHECK:STDOUT: %F.ref.loc7: %I.assoc_type = name_ref F, imports.%Main.import_ref.a54 [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc7: %.a40 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F] // CHECK:STDOUT: %C.as.I.impl.F.call.loc7: init %empty_tuple.type = call %impl.elem0.loc7() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc8: %I.assoc_type = name_ref F, imports.%Main.import_ref.ce7 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc8: %.97d = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F] +// CHECK:STDOUT: %F.ref.loc8: %I.assoc_type = name_ref F, imports.%Main.import_ref.a54 [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.loc8: %.a40 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F] // CHECK:STDOUT: %C.as.I.impl.F.call.loc8: init %empty_tuple.type = call %impl.elem0.loc8() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.236: %I.type) [from "extend_impl_library.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.F(imports.%Main.import_ref.2362f8.2: %I.type) [from "extend_impl_library.carbon"] { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.I.impl.F [from "extend_impl_library.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.a1f +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.cc3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%C.type.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.b59 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.521 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.7f9 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.c5a +// CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_generic.carbon b/toolchain/check/testdata/impl/import_generic.carbon index 13a8f7ea8d6d..6d53b2a71347 100644 --- a/toolchain/check/testdata/impl/import_generic.carbon +++ b/toolchain/check/testdata/impl/import_generic.carbon @@ -201,7 +201,6 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %J.type.04e: type = facet_type <@J, @J(%T)> [symbolic] // CHECK:STDOUT: %Self.a60: %J.type.04e = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.a60 [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.1ab [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -232,6 +231,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc3_23.1: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.fdb)] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc3_23.1 @@ -247,12 +247,13 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc4_13.1)> [symbolic = %J.type (constants.%J.type.04e)] // CHECK:STDOUT: %Self.loc4_23.2: @J.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.a60)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc4_13.1)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc4_23.1: @J.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self.a60)] -// CHECK:STDOUT: %J.Self.binding.as_type.impls.I.type.require.decl = require_decl @J.Self.binding.as_type.impls.I.type.require [concrete] { +// CHECK:STDOUT: interface_with_self_decl @J [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %J.WithSelf.Self.binding.as_type.impls.I.type.require.decl = require_decl @J.WithSelf.Self.binding.as_type.impls.I.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %I.type.loc5_27.1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @J.%Self.loc4_23.1 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -260,26 +261,28 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %T.ref: type = name_ref T, @J.%T.loc4_13.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type.loc5_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc5_27.2 (constants.%I.type.1ab)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5: type = specific_constant @J.Self.binding.as_type.impls.I.type.require.%I.type.loc5_27.1, @J.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.a60) [symbolic = %I.type (constants.%I.type.1ab)] +// CHECK:STDOUT: %.loc5: type = specific_constant @J.WithSelf.Self.binding.as_type.impls.I.type.require.%I.type.loc5_27.1, @J.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.a60) [symbolic = %I.type (constants.%I.type.1ab)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_23.1 // CHECK:STDOUT: .I = // CHECK:STDOUT: .T = +// CHECK:STDOUT: .I = +// CHECK:STDOUT: .T = // CHECK:STDOUT: extend %.loc5 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @J.Self.binding.as_type.impls.I.type.require { -// CHECK:STDOUT: require @J.Self.binding.as_type.impls.I.type.require.%Self.as_type impls @J.Self.binding.as_type.impls.I.type.require.%I.type.loc5_27.1 +// CHECK:STDOUT: @J.WithSelf.Self.binding.as_type.impls.I.type.require { +// CHECK:STDOUT: require @J.WithSelf.Self.binding.as_type.impls.I.type.require.%Self.as_type impls @J.WithSelf.Self.binding.as_type.impls.I.type.require.%I.type.loc5_27.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @J.Self.binding.as_type.impls.I.type.require(@J.%T.loc4_13.2: type, @J.%Self.loc4_23.1: @J.%J.type (%J.type.04e)) { +// CHECK:STDOUT: generic require @J.WithSelf.Self.binding.as_type.impls.I.type.require(@J.%T.loc4_13.2: type, @J.%Self.loc4_23.1: @J.%J.type (%J.type.04e)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)] -// CHECK:STDOUT: %Self: @J.Self.binding.as_type.impls.I.type.require.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.a60)] +// CHECK:STDOUT: %Self: @J.WithSelf.Self.binding.as_type.impls.I.type.require.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.a60)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %I.type.loc5_27.2: type = facet_type <@I, @I(%T)> [symbolic = %I.type.loc5_27.2 (constants.%I.type.1ab)] // CHECK:STDOUT: } @@ -292,11 +295,17 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.fdb // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.fdb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @J(constants.%T) { // CHECK:STDOUT: %T.loc4_13.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.a60) { +// CHECK:STDOUT: specific @J(constants.%T, constants.%Self.a60) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.a60) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %J.type => constants.%J.type.04e // CHECK:STDOUT: %Self => constants.%Self.a60 @@ -319,32 +328,33 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.type.ab5: type = facet_type <@I, @I(%empty_struct_type)> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Self.025: %I.type.ab5 = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %I.facet: %I.type.ab5 = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %J.type.885: type = generic_interface_type @J [concrete] // CHECK:STDOUT: %J.generic: %J.type.885 = struct_value () [concrete] // CHECK:STDOUT: %J.type.04e: type = facet_type <@J, @J(%T)> [symbolic] // CHECK:STDOUT: %Self.c25: %J.type.04e = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.c25 [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.1ab [symbolic] // CHECK:STDOUT: %J.type.d6f: type = facet_type <@J, @J(%empty_struct_type)> [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness @C.as.J.impl.%J.impl_witness_table [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] -// CHECK:STDOUT: %Self.9e4: %J.type.d6f = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %complete_type.5b1: = complete_type_witness %I.type.ab5 [concrete] +// CHECK:STDOUT: %Self.9e4: %J.type.d6f = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %J.facet: %J.type.d6f = facet_value %C, (%J.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: %I.type.609 = import_ref Main//basic_import_generic_interface, I, loaded [concrete = constants.%I.generic] // CHECK:STDOUT: %Main.J: %J.type.885 = import_ref Main//basic_import_generic_interface, J, loaded [concrete = constants.%J.generic] // CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//basic_import_generic_interface, loc3_23, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//basic_import_generic_interface, loc3_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.2ff: type = import_ref Main//basic_import_generic_interface, loc5_18, loaded [symbolic = @J.Self.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)] -// CHECK:STDOUT: %Main.import_ref.358: type = import_ref Main//basic_import_generic_interface, loc5_27, loaded [symbolic = @J.Self.binding.as_type.impls.I.type.require.%I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//basic_import_generic_interface, loc4_13, loaded [symbolic = @J.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.99f: @J.%J.type (%J.type.04e) = import_ref Main//basic_import_generic_interface, loc4_23, loaded [symbolic = @J.%Self (constants.%Self.c25)] -// CHECK:STDOUT: %Main.import_ref.e9be38.1 = import_ref Main//basic_import_generic_interface, loc4_23, unloaded -// CHECK:STDOUT: %Main.import_ref.b55 = import_ref Main//basic_import_generic_interface, loc5_28, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//basic_import_generic_interface, loc4_13, loaded [symbolic = @J.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//basic_import_generic_interface, loc3_13, loaded [symbolic = @I.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.7bf = import_ref Main//basic_import_generic_interface, loc5_28, unloaded +// CHECK:STDOUT: %Main.import_ref.2ff: type = import_ref Main//basic_import_generic_interface, loc5_18, loaded [symbolic = @J.WithSelf.Self.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)] +// CHECK:STDOUT: %Main.import_ref.358: type = import_ref Main//basic_import_generic_interface, loc5_27, loaded [symbolic = @J.WithSelf.Self.binding.as_type.impls.I.type.require.%I.type (constants.%I.type.1ab)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//basic_import_generic_interface, loc4_13, loaded [symbolic = @J.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.99f327.2: @J.%J.type (%J.type.04e) = import_ref Main//basic_import_generic_interface, loc4_23, loaded [symbolic = @J.%Self (constants.%Self.c25)] +// CHECK:STDOUT: %Main.import_ref.e9b = import_ref Main//basic_import_generic_interface, loc4_23, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.5: type = import_ref Main//basic_import_generic_interface, loc4_13, loaded [symbolic = @J.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -372,7 +382,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.1: type) [from "basic_import_generic_interface.carbon"] { +// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.2: type) [from "basic_import_generic_interface.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -388,32 +398,30 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @J(imports.%Main.import_ref.b3bc94.3: type) [from "basic_import_generic_interface.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @J(imports.%Main.import_ref.b3bc94.5: type) [from "basic_import_generic_interface.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)] +// CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.1)> [symbolic = %J.type (constants.%J.type.04e)] // CHECK:STDOUT: %Self: @J.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c25)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Main.import_ref.e9be38.1 -// CHECK:STDOUT: extend imports.%Main.import_ref.b55 +// CHECK:STDOUT: .Self = imports.%Main.import_ref.e9b +// CHECK:STDOUT: extend imports.%Main.import_ref.7bf // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @J.Self.binding.as_type.impls.I.type.require { +// CHECK:STDOUT: @J.WithSelf.Self.binding.as_type.impls.I.type.require { // CHECK:STDOUT: require imports.%Main.import_ref.2ff impls imports.%Main.import_ref.358 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @J.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.99f: @J.%J.type (%J.type.04e)) [from "basic_import_generic_interface.carbon"] { +// CHECK:STDOUT: generic require @J.WithSelf.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.b3bc94.4: type, imports.%Main.import_ref.99f327.2: @J.%J.type (%J.type.04e)) [from "basic_import_generic_interface.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)] -// CHECK:STDOUT: %Self: @J.Self.binding.as_type.impls.I.type.require.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c25)] +// CHECK:STDOUT: %Self: @J.WithSelf.Self.binding.as_type.impls.I.type.require.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c25)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] // CHECK:STDOUT: } @@ -450,6 +458,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self => constants.%Self.c1b // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.c1b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%empty_struct_type) { // CHECK:STDOUT: %T => constants.%empty_struct_type // CHECK:STDOUT: @@ -458,11 +470,21 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self => constants.%Self.025 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%Self.c1b) { +// CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.c25) { +// CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%T) { +// CHECK:STDOUT: %T.1 => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%T, constants.%Self.c25) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.c25) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %J.type => constants.%J.type.04e // CHECK:STDOUT: %Self => constants.%Self.c25 @@ -471,16 +493,21 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J(constants.%empty_struct_type) { -// CHECK:STDOUT: %T => constants.%empty_struct_type +// CHECK:STDOUT: %T.1 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %J.type => constants.%J.type.d6f // CHECK:STDOUT: %Self => constants.%Self.9e4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%empty_struct_type, constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%empty_struct_type // CHECK:STDOUT: %I.type => constants.%I.type.ab5 // CHECK:STDOUT: %require_complete => constants.%complete_type.5b1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.Self.binding.as_type.impls.I.type.require(constants.%empty_struct_type, constants.%C.type.facet) { +// CHECK:STDOUT: specific @J.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%empty_struct_type, constants.%C.type.facet) { // CHECK:STDOUT: %T => constants.%empty_struct_type // CHECK:STDOUT: %J.type => constants.%J.type.d6f // CHECK:STDOUT: %Self => constants.%C.type.facet @@ -488,6 +515,20 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.type => constants.%I.type.ab5 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%empty_struct_type, constants.%Self.c25) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%empty_struct_type +// CHECK:STDOUT: %I.type => constants.%I.type.ab5 +// CHECK:STDOUT: %require_complete => constants.%complete_type.5b1 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%empty_struct_type, constants.%J.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%empty_struct_type +// CHECK:STDOUT: %I.type => constants.%I.type.ab5 +// CHECK:STDOUT: %require_complete => constants.%complete_type.5b1 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- basic_import_generic_constraint.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -504,7 +545,6 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %J.type.d68: type = facet_type <@J, @J(%T)> [symbolic] // CHECK:STDOUT: %Self.31c: %J.type.d68 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.31c [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.1ab [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -535,6 +575,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc3_23.1: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.fdb)] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc3_23.1 @@ -550,12 +591,13 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc4_14.1)> [symbolic = %J.type (constants.%J.type.d68)] // CHECK:STDOUT: %Self.loc4_24.2: @J.%J.type (%J.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_24.2 (constants.%Self.31c)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc4_14.1)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: %Self.loc4_24.1: @J.%J.type (%J.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_24.2 (constants.%Self.31c)] -// CHECK:STDOUT: %J.Self.binding.as_type.impls.I.type.require.decl = require_decl @J.Self.binding.as_type.impls.I.type.require [concrete] { +// CHECK:STDOUT: constraint_with_self_decl @J [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %J.WithSelf.Self.binding.as_type.impls.I.type.require.decl = require_decl @J.WithSelf.Self.binding.as_type.impls.I.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %I.type.loc5_27.1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @J.%Self.loc4_24.1 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -563,25 +605,27 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %T.ref: type = name_ref T, @J.%T.loc4_14.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type.loc5_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc5_27.2 (constants.%I.type.1ab)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5: type = specific_constant @J.Self.binding.as_type.impls.I.type.require.%I.type.loc5_27.1, @J.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) [symbolic = %I.type (constants.%I.type.1ab)] +// CHECK:STDOUT: %.loc5: type = specific_constant @J.WithSelf.Self.binding.as_type.impls.I.type.require.%I.type.loc5_27.1, @J.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) [symbolic = %I.type (constants.%I.type.1ab)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_24.1 // CHECK:STDOUT: .I = // CHECK:STDOUT: .T = +// CHECK:STDOUT: .I = +// CHECK:STDOUT: .T = // CHECK:STDOUT: extend %.loc5 // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @J.Self.binding.as_type.impls.I.type.require { -// CHECK:STDOUT: require @J.Self.binding.as_type.impls.I.type.require.%Self.as_type impls @J.Self.binding.as_type.impls.I.type.require.%I.type.loc5_27.1 +// CHECK:STDOUT: @J.WithSelf.Self.binding.as_type.impls.I.type.require { +// CHECK:STDOUT: require @J.WithSelf.Self.binding.as_type.impls.I.type.require.%Self.as_type impls @J.WithSelf.Self.binding.as_type.impls.I.type.require.%I.type.loc5_27.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @J.Self.binding.as_type.impls.I.type.require(@J.%T.loc4_14.2: type, @J.%Self.loc4_24.1: @J.%J.type (%J.type.d68)) { +// CHECK:STDOUT: generic require @J.WithSelf.Self.binding.as_type.impls.I.type.require(@J.%T.loc4_14.2: type, @J.%Self.loc4_24.1: @J.%J.type (%J.type.d68)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.d68)] -// CHECK:STDOUT: %Self: @J.Self.binding.as_type.impls.I.type.require.%J.type (%J.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.31c)] +// CHECK:STDOUT: %Self: @J.WithSelf.Self.binding.as_type.impls.I.type.require.%J.type (%J.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.31c)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %I.type.loc5_27.2: type = facet_type <@I, @I(%T)> [symbolic = %I.type.loc5_27.2 (constants.%I.type.1ab)] // CHECK:STDOUT: } @@ -594,11 +638,17 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.fdb // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.fdb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @J(constants.%T) { // CHECK:STDOUT: %T.loc4_14.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) { +// CHECK:STDOUT: specific @J(constants.%T, constants.%Self.31c) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %J.type => constants.%J.type.d68 // CHECK:STDOUT: %Self => constants.%Self.31c @@ -620,30 +670,30 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self.c1b: %I.type.1ab = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.e1f642.1 [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type.1ab [symbolic] // CHECK:STDOUT: %empty_struct.a40: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %J.type.d682d6.2: type = facet_type <@J, @J(%empty_struct_type)> [concrete] -// CHECK:STDOUT: %type: type = facet_type [concrete] -// CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] -// CHECK:STDOUT: %I.type.ab5: type = facet_type <@I, @I(%empty_struct_type)> [concrete] -// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Self.e1f642.2: %J.type.d682d6.2 = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %I.type.ab5: type = facet_type <@I, @I(%empty_struct_type)> [concrete] // CHECK:STDOUT: %Self.025: %I.type.ab5 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %complete_type.5b1: = complete_type_witness %I.type.ab5 [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type.ab5 = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I = import_ref Main//basic_import_generic_constraint, I, unloaded // CHECK:STDOUT: %Main.J: %J.type.d08 = import_ref Main//basic_import_generic_constraint, J, loaded [concrete = constants.%empty_struct.d2a] +// CHECK:STDOUT: %Main.import_ref.7b1 = import_ref Main//basic_import_generic_constraint, loc5_28, unloaded // CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//basic_import_generic_constraint, loc3_23, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//basic_import_generic_constraint, loc3_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//basic_import_generic_constraint, loc5_18, loaded [symbolic = @J.Self.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)] -// CHECK:STDOUT: %Main.import_ref.358: type = import_ref Main//basic_import_generic_constraint, loc5_27, loaded [symbolic = @J.Self.binding.as_type.impls.I.type.require.%I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//basic_import_generic_constraint, loc4_14, loaded [symbolic = @J.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.2fc: @J.%J.type (%J.type.d682d6.1) = import_ref Main//basic_import_generic_constraint, loc4_24, loaded [symbolic = @J.%Self (constants.%Self.e1f642.1)] -// CHECK:STDOUT: %Main.import_ref.830896.1 = import_ref Main//basic_import_generic_constraint, loc4_24, unloaded -// CHECK:STDOUT: %Main.import_ref.b41 = import_ref Main//basic_import_generic_constraint, loc5_28, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//basic_import_generic_constraint, loc4_14, loaded [symbolic = @J.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//basic_import_generic_constraint, loc3_13, loaded [symbolic = @I.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//basic_import_generic_constraint, loc5_18, loaded [symbolic = @J.WithSelf.Self.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)] +// CHECK:STDOUT: %Main.import_ref.358: type = import_ref Main//basic_import_generic_constraint, loc5_27, loaded [symbolic = @J.WithSelf.Self.binding.as_type.impls.I.type.require.%I.type (constants.%I.type.1ab)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//basic_import_generic_constraint, loc4_14, loaded [symbolic = @J.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.2fc394.2: @J.%J.type (%J.type.d682d6.1) = import_ref Main//basic_import_generic_constraint, loc4_24, loaded [symbolic = @J.%Self (constants.%Self.e1f642.1)] +// CHECK:STDOUT: %Main.import_ref.830 = import_ref Main//basic_import_generic_constraint, loc4_24, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.5: type = import_ref Main//basic_import_generic_constraint, loc4_14, loaded [symbolic = @J.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -664,7 +714,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.1: type) [from "basic_import_generic_constraint.carbon"] { +// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.3: type) [from "basic_import_generic_constraint.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -680,31 +730,29 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic constraint @J(imports.%Main.import_ref.b3bc94.3: type) [from "basic_import_generic_constraint.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic constraint @J(imports.%Main.import_ref.b3bc94.5: type) [from "basic_import_generic_constraint.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.d682d6.1)] +// CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.1)> [symbolic = %J.type (constants.%J.type.d682d6.1)] // CHECK:STDOUT: %Self: @J.%J.type (%J.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Main.import_ref.830896.1 -// CHECK:STDOUT: extend imports.%Main.import_ref.b41 +// CHECK:STDOUT: .Self = imports.%Main.import_ref.830 +// CHECK:STDOUT: extend imports.%Main.import_ref.7b1 // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @J.Self.binding.as_type.impls.I.type.require { +// CHECK:STDOUT: @J.WithSelf.Self.binding.as_type.impls.I.type.require { // CHECK:STDOUT: require imports.%Main.import_ref.213 impls imports.%Main.import_ref.358 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @J.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.2fc: @J.%J.type (%J.type.d682d6.1)) [from "basic_import_generic_constraint.carbon"] { +// CHECK:STDOUT: generic require @J.WithSelf.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.b3bc94.4: type, imports.%Main.import_ref.2fc394.2: @J.%J.type (%J.type.d682d6.1)) [from "basic_import_generic_constraint.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.d682d6.1)] -// CHECK:STDOUT: %Self: @J.Self.binding.as_type.impls.I.type.require.%J.type (%J.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)] +// CHECK:STDOUT: %Self: @J.WithSelf.Self.binding.as_type.impls.I.type.require.%J.type (%J.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] // CHECK:STDOUT: } @@ -726,7 +774,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T) { @@ -737,7 +785,13 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self => constants.%Self.c1b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.e1f642.1) { +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.c1b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%T, constants.%Self.e1f642.1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.e1f642.1) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %J.type => constants.%J.type.d682d6.1 // CHECK:STDOUT: %Self => constants.%Self.e1f642.1 @@ -746,21 +800,18 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @J(constants.%empty_struct_type) { -// CHECK:STDOUT: %T => constants.%empty_struct_type +// CHECK:STDOUT: %T.1 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %J.type => constants.%J.type.d682d6.2 // CHECK:STDOUT: %Self => constants.%Self.e1f642.2 -// CHECK:STDOUT: %I.type => constants.%I.type.ab5 -// CHECK:STDOUT: %require_complete => constants.%complete_type.5b1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.Self.binding.as_type.impls.I.type.require(constants.%empty_struct_type, constants.%C.type.facet) { -// CHECK:STDOUT: %T => constants.%empty_struct_type -// CHECK:STDOUT: %J.type => constants.%J.type.d682d6.2 -// CHECK:STDOUT: %Self => constants.%C.type.facet -// CHECK:STDOUT: %Self.binding.as_type => constants.%C +// CHECK:STDOUT: specific @J(constants.%empty_struct_type, constants.%Self.e1f642.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%empty_struct_type // CHECK:STDOUT: %I.type => constants.%I.type.ab5 +// CHECK:STDOUT: %require_complete => constants.%complete_type.5b1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%empty_struct_type) { @@ -771,6 +822,29 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self => constants.%Self.025 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%Self.c1b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%empty_struct_type, constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%empty_struct_type +// CHECK:STDOUT: %I.type => constants.%I.type.ab5 +// CHECK:STDOUT: %require_complete => constants.%complete_type.5b1 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%empty_struct_type, constants.%C.type.facet) { +// CHECK:STDOUT: %T => constants.%empty_struct_type +// CHECK:STDOUT: %J.type => constants.%J.type.d682d6.2 +// CHECK:STDOUT: %Self => constants.%C.type.facet +// CHECK:STDOUT: %Self.binding.as_type => constants.%C +// CHECK:STDOUT: %I.type => constants.%I.type.ab5 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- import_generic.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -787,11 +861,13 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self.fdb: %I.type.1ab = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %I.impl_witness.9f5: = impl_witness @C.as.I.impl.431.%I.impl_witness_table, @C.as.I.impl.431(%T) [symbolic] // CHECK:STDOUT: %require_complete.e36: = require_complete_type %I.type.1ab [symbolic] +// CHECK:STDOUT: %I.facet.b43: %I.type.1ab = facet_value %C, (%I.impl_witness.9f5) [symbolic] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: %I.type.e19: type = facet_type <@I, @I(%ptr)> [symbolic] // CHECK:STDOUT: %I.impl_witness.18a: = impl_witness @C.as.I.impl.815.%I.impl_witness_table, @C.as.I.impl.815(%T) [symbolic] // CHECK:STDOUT: %Self.eff: %I.type.e19 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %require_complete.ffd: = require_complete_type %I.type.e19 [symbolic] +// CHECK:STDOUT: %I.facet.064: %I.type.e19 = facet_value %C, (%I.impl_witness.18a) [symbolic] // CHECK:STDOUT: %N.type.b47: type = generic_named_constaint_type @N [concrete] // CHECK:STDOUT: %empty_struct: %N.type.b47 = struct_value () [concrete] // CHECK:STDOUT: %N.type.d68: type = facet_type <@N, @N(%T)> [symbolic] @@ -860,6 +936,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc5_23.1: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.fdb)] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc5_23.1 @@ -875,12 +952,13 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T.loc14_14.1)> [symbolic = %N.type (constants.%N.type.d68)] // CHECK:STDOUT: %Self.loc14_24.2: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self.31c)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc14_14.1)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.e36)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: %Self.loc14_24.1: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self.31c)] -// CHECK:STDOUT: %N.Self.binding.as_type.impls.I.type.require.decl = require_decl @N.Self.binding.as_type.impls.I.type.require [concrete] { +// CHECK:STDOUT: constraint_with_self_decl @N [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %N.WithSelf.Self.binding.as_type.impls.I.type.require.decl = require_decl @N.WithSelf.Self.binding.as_type.impls.I.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %I.type.loc15_27.1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @N.%Self.loc14_24.1 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -888,25 +966,27 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %T.ref: type = name_ref T, @N.%T.loc14_14.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type.loc15_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc15_27.2 (constants.%I.type.1ab)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: type = specific_constant @N.Self.binding.as_type.impls.I.type.require.%I.type.loc15_27.1, @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) [symbolic = %I.type (constants.%I.type.1ab)] +// CHECK:STDOUT: %.loc15: type = specific_constant @N.WithSelf.Self.binding.as_type.impls.I.type.require.%I.type.loc15_27.1, @N.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) [symbolic = %I.type (constants.%I.type.1ab)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc14_24.1 // CHECK:STDOUT: .I = // CHECK:STDOUT: .T = +// CHECK:STDOUT: .I = +// CHECK:STDOUT: .T = // CHECK:STDOUT: extend %.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @N.Self.binding.as_type.impls.I.type.require { -// CHECK:STDOUT: require @N.Self.binding.as_type.impls.I.type.require.%Self.as_type impls @N.Self.binding.as_type.impls.I.type.require.%I.type.loc15_27.1 +// CHECK:STDOUT: @N.WithSelf.Self.binding.as_type.impls.I.type.require { +// CHECK:STDOUT: require @N.WithSelf.Self.binding.as_type.impls.I.type.require.%Self.as_type impls @N.WithSelf.Self.binding.as_type.impls.I.type.require.%I.type.loc15_27.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @N.Self.binding.as_type.impls.I.type.require(@N.%T.loc14_14.2: type, @N.%Self.loc14_24.1: @N.%N.type (%N.type.d68)) { +// CHECK:STDOUT: generic require @N.WithSelf.Self.binding.as_type.impls.I.type.require(@N.%T.loc14_14.2: type, @N.%Self.loc14_24.1: @N.%N.type (%N.type.d68)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d68)] -// CHECK:STDOUT: %Self: @N.Self.binding.as_type.impls.I.type.require.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.31c)] +// CHECK:STDOUT: %Self: @N.WithSelf.Self.binding.as_type.impls.I.type.require.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.31c)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %I.type.loc15_27.2: type = facet_type <@I, @I(%T)> [symbolic = %I.type.loc15_27.2 (constants.%I.type.1ab)] // CHECK:STDOUT: } @@ -962,12 +1042,20 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.fdb // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.fdb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.431(constants.%T) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %I.type.loc8_32.2 => constants.%I.type.1ab // CHECK:STDOUT: %I.impl_witness.loc8_33.2 => constants.%I.impl_witness.9f5 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T, constants.%I.facet.b43) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%ptr) { // CHECK:STDOUT: %T.loc5_13.1 => constants.%ptr // CHECK:STDOUT: @@ -983,11 +1071,21 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness.loc12_35.2 => constants.%I.impl_witness.18a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%ptr, constants.%Self.fdb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%ptr, constants.%I.facet.064) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%T) { // CHECK:STDOUT: %T.loc14_14.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) { +// CHECK:STDOUT: specific @N(constants.%T, constants.%Self.31c) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %N.type => constants.%N.type.d68 // CHECK:STDOUT: %Self => constants.%Self.31c @@ -1019,10 +1117,11 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %N.type.b47: type = generic_named_constaint_type @N [concrete] // CHECK:STDOUT: %empty_struct: %N.type.b47 = struct_value () [concrete] // CHECK:STDOUT: %N.type.d682d6.1: type = facet_type <@N, @N(%T)> [symbolic] -// CHECK:STDOUT: %Self.e1f: %N.type.d682d6.1 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.e1f [symbolic] +// CHECK:STDOUT: %Self.e1f642.1: %N.type.d682d6.1 = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.e1f642.1 [symbolic] // CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] // CHECK:STDOUT: %N.type.d682d6.2: type = facet_type <@N, @N(%ptr)> [symbolic] +// CHECK:STDOUT: %Self.e1f642.2: %N.type.d682d6.2 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1030,26 +1129,26 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Main.I: %I.type.609 = import_ref Main//import_generic, I, loaded [concrete = constants.%I.generic] // CHECK:STDOUT: %Main.N: %N.type.b47 = import_ref Main//import_generic, N, loaded [concrete = constants.%empty_struct] // CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//import_generic, loc5_23, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//import_generic, loc5_13, loaded [symbolic = @I.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic, loc5_13, loaded [symbolic = @I.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.e08 = import_ref Main//import_generic, loc8_33, unloaded // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic, loc4_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.743 = import_ref Main//import_generic, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %I.impl_witness_table.2ac = impl_witness_table (), @C.as.I.impl.431d5e.1 [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.431d5e.1.%I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic, loc8_14, loaded [symbolic = @C.as.I.impl.431d5e.1.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic, loc8_14, loaded [symbolic = @C.as.I.impl.431d5e.1.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.2c7 = import_ref Main//import_generic, loc12_35, unloaded // CHECK:STDOUT: %I.impl_witness_table.a23 = impl_witness_table (), @C.as.I.impl.8159c7.1 [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.8159c7.1.%I.type (constants.%I.type.e19)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic, loc12_14, loaded [symbolic = @C.as.I.impl.8159c7.1.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//import_generic, loc15_18, loaded [symbolic = @N.Self.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)] -// CHECK:STDOUT: %Main.import_ref.3582b1.2: type = import_ref Main//import_generic, loc15_27, loaded [symbolic = @N.Self.binding.as_type.impls.I.type.require.%I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//import_generic, loc14_14, loaded [symbolic = @N.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.2fc: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic, loc14_24, loaded [symbolic = @N.%Self (constants.%Self.e1f)] -// CHECK:STDOUT: %Main.import_ref.830896.1 = import_ref Main//import_generic, loc14_24, unloaded -// CHECK:STDOUT: %Main.import_ref.b41 = import_ref Main//import_generic, loc15_28, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.5: type = import_ref Main//import_generic, loc14_14, loaded [symbolic = @N.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//import_generic, loc12_14, loaded [symbolic = @C.as.I.impl.8159c7.1.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.a5e = 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.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)] +// CHECK:STDOUT: %Main.import_ref.3582b1.2: type = import_ref Main//import_generic, loc15_27, loaded [symbolic = @N.WithSelf.Self.binding.as_type.impls.I.type.require.%I.type (constants.%I.type.1ab)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.6: type = import_ref Main//import_generic, loc14_14, loaded [symbolic = @N.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.2fc394.2: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic, loc14_24, loaded [symbolic = @N.%Self (constants.%Self.e1f642.1)] +// CHECK:STDOUT: %Main.import_ref.830 = import_ref Main//import_generic, loc14_24, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.7: type = import_ref Main//import_generic, loc14_14, loaded [symbolic = @N.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1125,7 +1224,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.1: type) [from "import_generic.carbon"] { +// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.2: type) [from "import_generic.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1141,36 +1240,34 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic constraint @N(imports.%Main.import_ref.b3bc94.5: type) [from "import_generic.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic constraint @N(imports.%Main.import_ref.b3bc94.7: type) [from "import_generic.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d682d6.1)] -// CHECK:STDOUT: %Self: @N.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.e36)] +// CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T.1)> [symbolic = %N.type (constants.%N.type.d682d6.1)] +// CHECK:STDOUT: %Self: @N.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Main.import_ref.830896.1 -// CHECK:STDOUT: extend imports.%Main.import_ref.b41 +// CHECK:STDOUT: .Self = imports.%Main.import_ref.830 +// CHECK:STDOUT: extend imports.%Main.import_ref.a5e // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @N.Self.binding.as_type.impls.I.type.require { +// CHECK:STDOUT: @N.WithSelf.Self.binding.as_type.impls.I.type.require { // CHECK:STDOUT: require imports.%Main.import_ref.213 impls imports.%Main.import_ref.3582b1.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @N.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.b3bc94.4: type, imports.%Main.import_ref.2fc: @N.%N.type (%N.type.d682d6.1)) [from "import_generic.carbon"] { +// CHECK:STDOUT: generic require @N.WithSelf.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.b3bc94.6: type, imports.%Main.import_ref.2fc394.2: @N.%N.type (%N.type.d682d6.1)) [from "import_generic.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d682d6.1)] -// CHECK:STDOUT: %Self: @N.Self.binding.as_type.impls.I.type.require.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f)] +// CHECK:STDOUT: %Self: @N.WithSelf.Self.binding.as_type.impls.I.type.require.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @C.as.I.impl.431d5e.1(imports.%Main.import_ref.b3bc94.2: type) [from "import_generic.carbon"] { +// CHECK:STDOUT: generic impl @C.as.I.impl.431d5e.1(imports.%Main.import_ref.b3bc94.3: type) [from "import_generic.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table.2ac, @C.as.I.impl.431d5e.1(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness.9f5)] @@ -1184,7 +1281,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @C.as.I.impl.8159c7.1(imports.%Main.import_ref.b3bc94.3: type) [from "import_generic.carbon"] { +// CHECK:STDOUT: generic impl @C.as.I.impl.8159c7.1(imports.%Main.import_ref.b3bc94.4: type) [from "import_generic.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%ptr)> [symbolic = %I.type (constants.%I.type.e19)] @@ -1269,6 +1366,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self => constants.%Self.c1b // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.c1b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.431d5e.1(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.1ab @@ -1313,18 +1414,36 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %N.type => constants.%N.type.d682d6.1 +// CHECK:STDOUT: %Self => constants.%Self.e1f642.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.e1f) { +// CHECK:STDOUT: specific @N(constants.%T, constants.%Self.e1f642.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%T +// CHECK:STDOUT: %I.type => constants.%I.type.1ab +// CHECK:STDOUT: %require_complete => constants.%require_complete.e36 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.e1f642.1) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.1 -// CHECK:STDOUT: %Self => constants.%Self.e1f +// CHECK:STDOUT: %Self => constants.%Self.e1f642.1 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %I.type => constants.%I.type.1ab // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%C.type.facet) { +// CHECK:STDOUT: specific @N(constants.%T, constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%T +// CHECK:STDOUT: %I.type => constants.%I.type.1ab +// CHECK:STDOUT: %require_complete => constants.%require_complete.e36 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%C.type.facet) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.1 // CHECK:STDOUT: %Self => constants.%C.type.facet @@ -1338,10 +1457,28 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%ptr) { -// CHECK:STDOUT: %T => constants.%ptr +// CHECK:STDOUT: %T.1 => constants.%ptr +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %N.type => constants.%N.type.d682d6.2 +// CHECK:STDOUT: %Self => constants.%Self.e1f642.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%ptr, constants.%C.type.facet) { +// CHECK:STDOUT: specific @N(constants.%ptr, constants.%Self.e1f642.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%ptr +// CHECK:STDOUT: %I.type => constants.%I.type.e19 +// CHECK:STDOUT: %require_complete => constants.%require_complete.ffd +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N(constants.%ptr, constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%ptr +// CHECK:STDOUT: %I.type => constants.%I.type.e19 +// CHECK:STDOUT: %require_complete => constants.%require_complete.ffd +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%ptr, constants.%C.type.facet) { // CHECK:STDOUT: %T => constants.%ptr // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.2 // CHECK:STDOUT: %Self => constants.%C.type.facet @@ -1371,6 +1508,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self.fdb: %I.type.1ab = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table, @C.as.I.impl(%T) [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %I.type.1ab [symbolic] +// CHECK:STDOUT: %I.facet: %I.type.1ab = facet_value %C, (%I.impl_witness) [symbolic] // CHECK:STDOUT: %N.type.b47: type = generic_named_constaint_type @N [concrete] // CHECK:STDOUT: %empty_struct: %N.type.b47 = struct_value () [concrete] // CHECK:STDOUT: %N.type.d68: type = facet_type <@N, @N(%T)> [symbolic] @@ -1418,6 +1556,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc5_23.1: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.fdb)] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc5_23.1 @@ -1433,12 +1572,13 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T.loc9_14.1)> [symbolic = %N.type (constants.%N.type.d68)] // CHECK:STDOUT: %Self.loc9_24.2: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc9_24.2 (constants.%Self.31c)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc9_14.1)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: %Self.loc9_24.1: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc9_24.2 (constants.%Self.31c)] -// CHECK:STDOUT: %N.Self.binding.as_type.impls.I.type.require.decl = require_decl @N.Self.binding.as_type.impls.I.type.require [concrete] { +// CHECK:STDOUT: constraint_with_self_decl @N [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %N.WithSelf.Self.binding.as_type.impls.I.type.require.decl = require_decl @N.WithSelf.Self.binding.as_type.impls.I.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %I.type.loc10_27.1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @N.%Self.loc9_24.1 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -1446,25 +1586,27 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %T.ref: type = name_ref T, @N.%T.loc9_14.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type.loc10_27.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc10_27.2 (constants.%I.type.1ab)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10: type = specific_constant @N.Self.binding.as_type.impls.I.type.require.%I.type.loc10_27.1, @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) [symbolic = %I.type (constants.%I.type.1ab)] +// CHECK:STDOUT: %.loc10: type = specific_constant @N.WithSelf.Self.binding.as_type.impls.I.type.require.%I.type.loc10_27.1, @N.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) [symbolic = %I.type (constants.%I.type.1ab)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc9_24.1 // CHECK:STDOUT: .I = // CHECK:STDOUT: .T = +// CHECK:STDOUT: .I = +// CHECK:STDOUT: .T = // CHECK:STDOUT: extend %.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @N.Self.binding.as_type.impls.I.type.require { -// CHECK:STDOUT: require @N.Self.binding.as_type.impls.I.type.require.%Self.as_type impls @N.Self.binding.as_type.impls.I.type.require.%I.type.loc10_27.1 +// CHECK:STDOUT: @N.WithSelf.Self.binding.as_type.impls.I.type.require { +// CHECK:STDOUT: require @N.WithSelf.Self.binding.as_type.impls.I.type.require.%Self.as_type impls @N.WithSelf.Self.binding.as_type.impls.I.type.require.%I.type.loc10_27.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @N.Self.binding.as_type.impls.I.type.require(@N.%T.loc9_14.2: type, @N.%Self.loc9_24.1: @N.%N.type (%N.type.d68)) { +// CHECK:STDOUT: generic require @N.WithSelf.Self.binding.as_type.impls.I.type.require(@N.%T.loc9_14.2: type, @N.%Self.loc9_24.1: @N.%N.type (%N.type.d68)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d68)] -// CHECK:STDOUT: %Self: @N.Self.binding.as_type.impls.I.type.require.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.31c)] +// CHECK:STDOUT: %Self: @N.WithSelf.Self.binding.as_type.impls.I.type.require.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.31c)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %I.type.loc10_27.2: type = facet_type <@I, @I(%T)> [symbolic = %I.type.loc10_27.2 (constants.%I.type.1ab)] // CHECK:STDOUT: } @@ -1502,17 +1644,27 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.fdb // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.fdb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl(constants.%T) { // CHECK:STDOUT: %T.loc7_14.2 => constants.%T // CHECK:STDOUT: %I.type.loc7_32.2 => constants.%I.type.1ab // CHECK:STDOUT: %I.impl_witness.loc7_34.2 => constants.%I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T, constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%T) { // CHECK:STDOUT: %T.loc9_14.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) { +// CHECK:STDOUT: specific @N(constants.%T, constants.%Self.31c) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.31c) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %N.type => constants.%N.type.d68 // CHECK:STDOUT: %Self => constants.%Self.31c @@ -1541,6 +1693,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness.18a: = impl_witness @C.as.I.impl.815.%I.impl_witness_table, @C.as.I.impl.815(%T) [symbolic] // CHECK:STDOUT: %Self.dda: %I.type.e19 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %require_complete.ffd: = require_complete_type %I.type.e19 [symbolic] +// CHECK:STDOUT: %I.facet.064: %I.type.e19 = facet_value %C, (%I.impl_witness.18a) [symbolic] // CHECK:STDOUT: %N.type.b47: type = generic_named_constaint_type @N [concrete] // CHECK:STDOUT: %empty_struct: %N.type.b47 = struct_value () [concrete] // CHECK:STDOUT: %N.type.d682d6.1: type = facet_type <@N, @N(%T)> [symbolic] @@ -1548,12 +1701,13 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.e1f642.1 [symbolic] // CHECK:STDOUT: %ptr.125: type = ptr_type %ptr.e8f [symbolic] // CHECK:STDOUT: %N.type.d682d6.2: type = facet_type <@N, @N(%ptr.125)> [symbolic] -// CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] -// CHECK:STDOUT: %I.type.08a: type = facet_type <@I, @I(%ptr.125)> [symbolic] -// CHECK:STDOUT: %I.impl_witness.d57: = impl_witness @C.as.I.impl.c93.%I.impl_witness_table, @C.as.I.impl.c93(%T) [symbolic] // CHECK:STDOUT: %Self.e1f642.2: %N.type.d682d6.2 = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %I.type.08a: type = facet_type <@I, @I(%ptr.125)> [symbolic] // CHECK:STDOUT: %require_complete.ea6: = require_complete_type %I.type.08a [symbolic] +// CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] +// CHECK:STDOUT: %I.impl_witness.d57: = impl_witness @C.as.I.impl.c93.%I.impl_witness_table, @C.as.I.impl.c93(%T) [symbolic] // CHECK:STDOUT: %require_complete.533: = require_complete_type %N.type.d682d6.2 [symbolic] +// CHECK:STDOUT: %I.facet.3e9: %I.type.08a = facet_value %C, (%I.impl_witness.d57) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1561,21 +1715,21 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Main.I: %I.type.609 = import_ref Main//import_generic_with_different_specific, I, loaded [concrete = constants.%I.generic] // CHECK:STDOUT: %Main.N: %N.type.b47 = import_ref Main//import_generic_with_different_specific, N, loaded [concrete = constants.%empty_struct] // CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//import_generic_with_different_specific, loc5_23, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//import_generic_with_different_specific, loc5_13, loaded [symbolic = @I.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic_with_different_specific, loc5_13, loaded [symbolic = @I.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.e08 = import_ref Main//import_generic_with_different_specific, loc7_34, unloaded // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic_with_different_specific, loc4_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.743 = import_ref Main//import_generic_with_different_specific, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.431 [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.431.%I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic_with_different_specific, loc7_14, loaded [symbolic = @C.as.I.impl.431.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//import_generic_with_different_specific, loc10_18, loaded [symbolic = @N.Self.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)] -// CHECK:STDOUT: %Main.import_ref.3582b1.2: type = import_ref Main//import_generic_with_different_specific, loc10_27, loaded [symbolic = @N.Self.binding.as_type.impls.I.type.require.%I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic_with_different_specific, loc9_14, loaded [symbolic = @N.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.2fc: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic_with_different_specific, loc9_24, loaded [symbolic = @N.%Self (constants.%Self.e1f642.1)] -// CHECK:STDOUT: %Main.import_ref.830896.1 = import_ref Main//import_generic_with_different_specific, loc9_24, unloaded -// CHECK:STDOUT: %Main.import_ref.b41 = import_ref Main//import_generic_with_different_specific, loc10_28, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//import_generic_with_different_specific, loc9_14, loaded [symbolic = @N.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic_with_different_specific, loc7_14, loaded [symbolic = @C.as.I.impl.431.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.a5e = 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.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)] +// CHECK:STDOUT: %Main.import_ref.3582b1.2: type = import_ref Main//import_generic_with_different_specific, loc10_27, loaded [symbolic = @N.WithSelf.Self.binding.as_type.impls.I.type.require.%I.type (constants.%I.type.1ab)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.5: type = import_ref Main//import_generic_with_different_specific, loc9_14, loaded [symbolic = @N.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.2fc394.2: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic_with_different_specific, loc9_24, loaded [symbolic = @N.%Self (constants.%Self.e1f642.1)] +// CHECK:STDOUT: %Main.import_ref.830 = import_ref Main//import_generic_with_different_specific, loc9_24, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.6: type = import_ref Main//import_generic_with_different_specific, loc9_14, loaded [symbolic = @N.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1611,7 +1765,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.1: type) [from "import_generic_with_different_specific.carbon"] { +// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.2: type) [from "import_generic_with_different_specific.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1627,36 +1781,34 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic constraint @N(imports.%Main.import_ref.b3bc94.4: type) [from "import_generic_with_different_specific.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic constraint @N(imports.%Main.import_ref.b3bc94.6: type) [from "import_generic_with_different_specific.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d682d6.1)] +// CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T.1)> [symbolic = %N.type (constants.%N.type.d682d6.1)] // CHECK:STDOUT: %Self: @N.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %require_complete: = require_complete_type %I.type [symbolic = %require_complete (constants.%require_complete.e36)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Main.import_ref.830896.1 -// CHECK:STDOUT: extend imports.%Main.import_ref.b41 +// CHECK:STDOUT: .Self = imports.%Main.import_ref.830 +// CHECK:STDOUT: extend imports.%Main.import_ref.a5e // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @N.Self.binding.as_type.impls.I.type.require { +// CHECK:STDOUT: @N.WithSelf.Self.binding.as_type.impls.I.type.require { // CHECK:STDOUT: require imports.%Main.import_ref.213 impls imports.%Main.import_ref.3582b1.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @N.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.b3bc94.3: type, imports.%Main.import_ref.2fc: @N.%N.type (%N.type.d682d6.1)) [from "import_generic_with_different_specific.carbon"] { +// CHECK:STDOUT: generic require @N.WithSelf.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.b3bc94.5: type, imports.%Main.import_ref.2fc394.2: @N.%N.type (%N.type.d682d6.1)) [from "import_generic_with_different_specific.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d682d6.1)] -// CHECK:STDOUT: %Self: @N.Self.binding.as_type.impls.I.type.require.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)] +// CHECK:STDOUT: %Self: @N.WithSelf.Self.binding.as_type.impls.I.type.require.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @C.as.I.impl.431(imports.%Main.import_ref.b3bc94.2: type) [from "import_generic_with_different_specific.carbon"] { +// CHECK:STDOUT: generic impl @C.as.I.impl.431(imports.%Main.import_ref.b3bc94.3: type) [from "import_generic_with_different_specific.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table, @C.as.I.impl.431(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness.9f5)] @@ -1722,6 +1874,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self => constants.%Self.c1b // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.c1b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.431(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.1ab @@ -1743,11 +1899,21 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness.loc5_35.2 => constants.%I.impl_witness.18a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: specific @I(constants.%ptr.e8f, constants.%Self.c1b) { +// CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.e1f642.1) { +// CHECK:STDOUT: specific @I(constants.%ptr.e8f, constants.%I.facet.064) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N(constants.%T) { +// CHECK:STDOUT: %T.1 => constants.%T +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N(constants.%T, constants.%Self.e1f642.1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%T, constants.%Self.e1f642.1) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.1 // CHECK:STDOUT: %Self => constants.%Self.e1f642.1 @@ -1756,16 +1922,32 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%ptr.125) { -// CHECK:STDOUT: %T => constants.%ptr.125 +// CHECK:STDOUT: %T.1 => constants.%ptr.125 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.2 // CHECK:STDOUT: %Self => constants.%Self.e1f642.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N(constants.%ptr.125, constants.%Self.e1f642.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%ptr.125 // CHECK:STDOUT: %I.type => constants.%I.type.08a // CHECK:STDOUT: %require_complete => constants.%require_complete.ea6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.Self.binding.as_type.impls.I.type.require(constants.%ptr.125, constants.%C.type.facet) { +// CHECK:STDOUT: specific @I(constants.%ptr.125) { +// CHECK:STDOUT: %T => constants.%ptr.125 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N(constants.%ptr.125, constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%ptr.125 +// CHECK:STDOUT: %I.type => constants.%I.type.08a +// CHECK:STDOUT: %require_complete => constants.%require_complete.ea6 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%ptr.125, constants.%C.type.facet) { // CHECK:STDOUT: %T => constants.%ptr.125 // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.2 // CHECK:STDOUT: %Self => constants.%C.type.facet @@ -1773,10 +1955,6 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.type => constants.%I.type.08a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%ptr.125) { -// CHECK:STDOUT: %T => constants.%ptr.125 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.c93(constants.%T) { // CHECK:STDOUT: %T.loc6_14.2 => constants.%T // CHECK:STDOUT: %ptr.loc6_32.2 => constants.%ptr.e8f @@ -1785,6 +1963,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %I.impl_witness.loc6_36.2 => constants.%I.impl_witness.d57 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%ptr.125, constants.%I.facet.3e9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_import_generic_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1804,7 +1986,6 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %N.type.d68: type = facet_type <@N, @N(%T)> [symbolic] // CHECK:STDOUT: %Self.31c: %N.type.d68 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.31c [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %J.type.04e [symbolic] // CHECK:STDOUT: %J.impl_witness.861: = impl_witness @D.as.J.impl.b25.%J.impl_witness_table, @D.as.J.impl.b25(%T) [symbolic] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] // CHECK:STDOUT: %J.type.80f: type = facet_type <@J, @J(%ptr)> [symbolic] @@ -1862,6 +2043,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc5_23.1: @J.%J.type (%J.type.04e) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.a60)] +// CHECK:STDOUT: interface_with_self_decl @J [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc5_23.1 @@ -1877,12 +2059,13 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T.loc7_14.1)> [symbolic = %N.type (constants.%N.type.d68)] // CHECK:STDOUT: %Self.loc7_24.2: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_24.2 (constants.%Self.31c)] -// CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T.loc7_14.1)> [symbolic = %J.type (constants.%J.type.04e)] -// CHECK:STDOUT: %require_complete: = require_complete_type %J.type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: %Self.loc7_24.1: @N.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_24.2 (constants.%Self.31c)] -// CHECK:STDOUT: %N.Self.binding.as_type.impls.J.type.require.decl = require_decl @N.Self.binding.as_type.impls.J.type.require [concrete] { +// CHECK:STDOUT: constraint_with_self_decl @N [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %N.WithSelf.Self.binding.as_type.impls.J.type.require.decl = require_decl @N.WithSelf.Self.binding.as_type.impls.J.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %J.type.loc8_27.1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @N.%Self.loc7_24.1 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -1890,25 +2073,27 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %T.ref: type = name_ref T, @N.%T.loc7_14.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %J.type.loc8_27.1: type = facet_type <@J, @J(constants.%T)> [symbolic = %J.type.loc8_27.2 (constants.%J.type.04e)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: type = specific_constant @N.Self.binding.as_type.impls.J.type.require.%J.type.loc8_27.1, @N.Self.binding.as_type.impls.J.type.require(constants.%T, constants.%Self.31c) [symbolic = %J.type (constants.%J.type.04e)] +// CHECK:STDOUT: %.loc8: type = specific_constant @N.WithSelf.Self.binding.as_type.impls.J.type.require.%J.type.loc8_27.1, @N.WithSelf.Self.binding.as_type.impls.J.type.require(constants.%T, constants.%Self.31c) [symbolic = %J.type (constants.%J.type.04e)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc7_24.1 // CHECK:STDOUT: .J = // CHECK:STDOUT: .T = +// CHECK:STDOUT: .J = +// CHECK:STDOUT: .T = // CHECK:STDOUT: extend %.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @N.Self.binding.as_type.impls.J.type.require { -// CHECK:STDOUT: require @N.Self.binding.as_type.impls.J.type.require.%Self.as_type impls @N.Self.binding.as_type.impls.J.type.require.%J.type.loc8_27.1 +// CHECK:STDOUT: @N.WithSelf.Self.binding.as_type.impls.J.type.require { +// CHECK:STDOUT: require @N.WithSelf.Self.binding.as_type.impls.J.type.require.%Self.as_type impls @N.WithSelf.Self.binding.as_type.impls.J.type.require.%J.type.loc8_27.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @N.Self.binding.as_type.impls.J.type.require(@N.%T.loc7_14.2: type, @N.%Self.loc7_24.1: @N.%N.type (%N.type.d68)) { +// CHECK:STDOUT: generic require @N.WithSelf.Self.binding.as_type.impls.J.type.require(@N.%T.loc7_14.2: type, @N.%Self.loc7_24.1: @N.%N.type (%N.type.d68)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d68)] -// CHECK:STDOUT: %Self: @N.Self.binding.as_type.impls.J.type.require.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.31c)] +// CHECK:STDOUT: %Self: @N.WithSelf.Self.binding.as_type.impls.J.type.require.%N.type (%N.type.d68) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.31c)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %J.type.loc8_27.2: type = facet_type <@J, @J(%T)> [symbolic = %J.type.loc8_27.2 (constants.%J.type.04e)] // CHECK:STDOUT: } @@ -1946,11 +2131,17 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.a60 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%T, constants.%Self.a60) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%T) { // CHECK:STDOUT: %T.loc7_14.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.Self.binding.as_type.impls.J.type.require(constants.%T, constants.%Self.31c) { +// CHECK:STDOUT: specific @N(constants.%T, constants.%Self.31c) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N.WithSelf.Self.binding.as_type.impls.J.type.require(constants.%T, constants.%Self.31c) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %N.type => constants.%N.type.d68 // CHECK:STDOUT: %Self => constants.%Self.31c @@ -1996,11 +2187,13 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %N.type.b47: type = generic_named_constaint_type @N [concrete] // CHECK:STDOUT: %empty_struct: %N.type.b47 = struct_value () [concrete] // CHECK:STDOUT: %N.type.d682d6.1: type = facet_type <@N, @N(%T)> [symbolic] -// CHECK:STDOUT: %Self.e1f: %N.type.d682d6.1 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.e1f [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %J.type.04e [symbolic] +// CHECK:STDOUT: %Self.e1f642.1: %N.type.d682d6.1 = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %require_complete.cc6: = require_complete_type %J.type.04e [symbolic] +// CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.e1f642.1 [symbolic] // CHECK:STDOUT: %D.type.facet: %type = facet_value %D, () [concrete] // CHECK:STDOUT: %N.type.d682d6.2: type = facet_type <@N, @N(%ptr)> [symbolic] +// CHECK:STDOUT: %Self.e1f642.2: %N.type.d682d6.2 = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %require_complete.19b: = require_complete_type %J.type.80f [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2008,24 +2201,24 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Main.J: %J.type.885 = import_ref Main//import_generic_decl, J, loaded [concrete = constants.%J.generic] // CHECK:STDOUT: %Main.N: %N.type.b47 = import_ref Main//import_generic_decl, N, loaded [concrete = constants.%empty_struct] // CHECK:STDOUT: %Main.import_ref.e9b = import_ref Main//import_generic_decl, loc5_23, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//import_generic_decl, loc5_13, loaded [symbolic = @J.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic_decl, loc5_13, loaded [symbolic = @J.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic_decl, loc4_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.1d5 = import_ref Main//import_generic_decl, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %J.impl_witness_table.50b = impl_witness_table (), @D.as.J.impl.b25a4e.1 [concrete] // CHECK:STDOUT: %Main.import_ref.4ae308.1: type = import_ref Main//import_generic_decl, loc15_24, loaded [concrete = constants.%D] // CHECK:STDOUT: %Main.import_ref.f2a55c.1: type = import_ref Main//import_generic_decl, loc15_32, loaded [symbolic = @D.as.J.impl.b25a4e.1.%J.type (constants.%J.type.04e)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//import_generic_decl, loc15_14, loaded [symbolic = @D.as.J.impl.b25a4e.1.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic_decl, loc15_14, loaded [symbolic = @D.as.J.impl.b25a4e.1.%T (constants.%T)] // CHECK:STDOUT: %J.impl_witness_table.a37 = impl_witness_table (), @D.as.J.impl.f050b9.1 [concrete] // CHECK:STDOUT: %Main.import_ref.4ae308.2: type = import_ref Main//import_generic_decl, loc21_24, loaded [concrete = constants.%D] // CHECK:STDOUT: %Main.import_ref.739: type = import_ref Main//import_generic_decl, loc21_33, loaded [symbolic = @D.as.J.impl.f050b9.1.%J.type (constants.%J.type.80f)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic_decl, loc21_14, loaded [symbolic = @D.as.J.impl.f050b9.1.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//import_generic_decl, loc8_18, loaded [symbolic = @N.Self.binding.as_type.impls.J.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)] -// CHECK:STDOUT: %Main.import_ref.f2a55c.2: type = import_ref Main//import_generic_decl, loc8_27, loaded [symbolic = @N.Self.binding.as_type.impls.J.type.require.%J.type (constants.%J.type.04e)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//import_generic_decl, loc7_14, loaded [symbolic = @N.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.2fc: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic_decl, loc7_24, loaded [symbolic = @N.%Self (constants.%Self.e1f)] -// CHECK:STDOUT: %Main.import_ref.830896.1 = import_ref Main//import_generic_decl, loc7_24, unloaded -// CHECK:STDOUT: %Main.import_ref.105 = import_ref Main//import_generic_decl, loc8_28, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.5: type = import_ref Main//import_generic_decl, loc7_14, loaded [symbolic = @N.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//import_generic_decl, loc21_14, loaded [symbolic = @D.as.J.impl.f050b9.1.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.9d6 = import_ref Main//import_generic_decl, loc8_28, unloaded +// CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//import_generic_decl, loc8_18, loaded [symbolic = @N.WithSelf.Self.binding.as_type.impls.J.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)] +// CHECK:STDOUT: %Main.import_ref.f2a55c.2: type = import_ref Main//import_generic_decl, loc8_27, loaded [symbolic = @N.WithSelf.Self.binding.as_type.impls.J.type.require.%J.type (constants.%J.type.04e)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.6: type = import_ref Main//import_generic_decl, loc7_14, loaded [symbolic = @N.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.2fc394.2: @N.%N.type (%N.type.d682d6.1) = import_ref Main//import_generic_decl, loc7_24, loaded [symbolic = @N.%Self (constants.%Self.e1f642.1)] +// CHECK:STDOUT: %Main.import_ref.830 = import_ref Main//import_generic_decl, loc7_24, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.7: type = import_ref Main//import_generic_decl, loc7_14, loaded [symbolic = @N.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -2101,7 +2294,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @J(imports.%Main.import_ref.b3bc94.1: type) [from "fail_import_generic_decl.carbon"] { +// CHECK:STDOUT: generic interface @J(imports.%Main.import_ref.b3bc94.2: type) [from "fail_import_generic_decl.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2117,36 +2310,34 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic constraint @N(imports.%Main.import_ref.b3bc94.5: type) [from "fail_import_generic_decl.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic constraint @N(imports.%Main.import_ref.b3bc94.7: type) [from "fail_import_generic_decl.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d682d6.1)] -// CHECK:STDOUT: %Self: @N.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f)] -// CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)] -// CHECK:STDOUT: %require_complete: = require_complete_type %J.type [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T.1)> [symbolic = %N.type (constants.%N.type.d682d6.1)] +// CHECK:STDOUT: %Self: @N.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)] // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Main.import_ref.830896.1 -// CHECK:STDOUT: extend imports.%Main.import_ref.105 +// CHECK:STDOUT: .Self = imports.%Main.import_ref.830 +// CHECK:STDOUT: extend imports.%Main.import_ref.9d6 // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @N.Self.binding.as_type.impls.J.type.require { +// CHECK:STDOUT: @N.WithSelf.Self.binding.as_type.impls.J.type.require { // CHECK:STDOUT: require imports.%Main.import_ref.213 impls imports.%Main.import_ref.f2a55c.2 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @N.Self.binding.as_type.impls.J.type.require(imports.%Main.import_ref.b3bc94.4: type, imports.%Main.import_ref.2fc: @N.%N.type (%N.type.d682d6.1)) [from "fail_import_generic_decl.carbon"] { +// CHECK:STDOUT: generic require @N.WithSelf.Self.binding.as_type.impls.J.type.require(imports.%Main.import_ref.b3bc94.6: type, imports.%Main.import_ref.2fc394.2: @N.%N.type (%N.type.d682d6.1)) [from "fail_import_generic_decl.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %N.type: type = facet_type <@N, @N(%T)> [symbolic = %N.type (constants.%N.type.d682d6.1)] -// CHECK:STDOUT: %Self: @N.Self.binding.as_type.impls.J.type.require.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f)] +// CHECK:STDOUT: %Self: @N.WithSelf.Self.binding.as_type.impls.J.type.require.%N.type (%N.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e1f642.1)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @D.as.J.impl.b25a4e.1(imports.%Main.import_ref.b3bc94.2: type) [from "fail_import_generic_decl.carbon"] { +// CHECK:STDOUT: generic impl @D.as.J.impl.b25a4e.1(imports.%Main.import_ref.b3bc94.3: type) [from "fail_import_generic_decl.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%T)> [symbolic = %J.type (constants.%J.type.04e)] // CHECK:STDOUT: %J.impl_witness: = impl_witness imports.%J.impl_witness_table.50b, @D.as.J.impl.b25a4e.1(%T) [symbolic = %J.impl_witness (constants.%J.impl_witness.861)] @@ -2154,7 +2345,7 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: impl: imports.%Main.import_ref.4ae308.1 as imports.%Main.import_ref.f2a55c.1; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @D.as.J.impl.f050b9.1(imports.%Main.import_ref.b3bc94.3: type) [from "fail_import_generic_decl.carbon"] { +// CHECK:STDOUT: generic impl @D.as.J.impl.f050b9.1(imports.%Main.import_ref.b3bc94.4: type) [from "fail_import_generic_decl.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)] // CHECK:STDOUT: %J.type: type = facet_type <@J, @J(%ptr)> [symbolic = %J.type (constants.%J.type.80f)] @@ -2243,6 +2434,10 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: %Self => constants.%Self.c25 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%T, constants.%Self.c25) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @D.as.J.impl.b25a4e.1(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %J.type => constants.%J.type.04e @@ -2283,18 +2478,36 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %N.type => constants.%N.type.d682d6.1 +// CHECK:STDOUT: %Self => constants.%Self.e1f642.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.Self.binding.as_type.impls.J.type.require(constants.%T, constants.%Self.e1f) { +// CHECK:STDOUT: specific @N(constants.%T, constants.%Self.e1f642.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%T +// CHECK:STDOUT: %J.type => constants.%J.type.04e +// CHECK:STDOUT: %require_complete => constants.%require_complete.cc6 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N.WithSelf.Self.binding.as_type.impls.J.type.require(constants.%T, constants.%Self.e1f642.1) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.1 -// CHECK:STDOUT: %Self => constants.%Self.e1f +// CHECK:STDOUT: %Self => constants.%Self.e1f642.1 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %J.type => constants.%J.type.04e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.Self.binding.as_type.impls.J.type.require(constants.%T, constants.%D.type.facet) { +// CHECK:STDOUT: specific @N(constants.%T, constants.%D.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%T +// CHECK:STDOUT: %J.type => constants.%J.type.04e +// CHECK:STDOUT: %require_complete => constants.%require_complete.cc6 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N.WithSelf.Self.binding.as_type.impls.J.type.require(constants.%T, constants.%D.type.facet) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.1 // CHECK:STDOUT: %Self => constants.%D.type.facet @@ -2308,10 +2521,28 @@ impl forall [T:! type] D as N(T*) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @N(constants.%ptr) { -// CHECK:STDOUT: %T => constants.%ptr +// CHECK:STDOUT: %T.1 => constants.%ptr +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %N.type => constants.%N.type.d682d6.2 +// CHECK:STDOUT: %Self => constants.%Self.e1f642.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.Self.binding.as_type.impls.J.type.require(constants.%ptr, constants.%D.type.facet) { +// CHECK:STDOUT: specific @N(constants.%ptr, constants.%Self.e1f642.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%ptr +// CHECK:STDOUT: %J.type => constants.%J.type.80f +// CHECK:STDOUT: %require_complete => constants.%require_complete.19b +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N(constants.%ptr, constants.%D.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%ptr +// CHECK:STDOUT: %J.type => constants.%J.type.80f +// CHECK:STDOUT: %require_complete => constants.%require_complete.19b +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @N.WithSelf.Self.binding.as_type.impls.J.type.require(constants.%ptr, constants.%D.type.facet) { // CHECK:STDOUT: %T => constants.%ptr // CHECK:STDOUT: %N.type => constants.%N.type.d682d6.2 // CHECK:STDOUT: %Self => constants.%D.type.facet diff --git a/toolchain/check/testdata/impl/import_interface_assoc_const.carbon b/toolchain/check/testdata/impl/import_interface_assoc_const.carbon index 583a7f4172fd..9d30df02cb76 100644 --- a/toolchain/check/testdata/impl/import_interface_assoc_const.carbon +++ b/toolchain/check/testdata/impl/import_interface_assoc_const.carbon @@ -208,11 +208,11 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.e06: %I.assoc_type = assoc_entity element0, @I.%T [concrete] +// CHECK:STDOUT: %assoc0.2e7: %I.assoc_type = assoc_entity element0, @I.%T [concrete] // CHECK:STDOUT: %I3.type: type = facet_type <@I3> [concrete] // CHECK:STDOUT: %Self.70b: %I3.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %I3.assoc_type: type = assoc_entity_type @I3 [concrete] -// CHECK:STDOUT: %assoc0.236: %I3.assoc_type = assoc_entity element0, @I3.%T1 [concrete] +// CHECK:STDOUT: %assoc0.0d5: %I3.assoc_type = assoc_entity element0, @I3.%T1 [concrete] // CHECK:STDOUT: %assoc1: %I3.assoc_type = assoc_entity element1, @I3.%T2 [concrete] // CHECK:STDOUT: %assoc2: %I3.assoc_type = assoc_entity element2, @I3.%T3 [concrete] // CHECK:STDOUT: %NonType.type: type = facet_type <@NonType> [concrete] @@ -220,7 +220,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_struct_type} [concrete] // CHECK:STDOUT: %NonType.assoc_type: type = assoc_entity_type @NonType [concrete] -// CHECK:STDOUT: %assoc0.b16: %NonType.assoc_type = assoc_entity element0, @NonType.%Y [concrete] +// CHECK:STDOUT: %assoc0.0f3: %NonType.assoc_type = assoc_entity element0, @NonType.%Y [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -236,8 +236,11 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.e06] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.2e7] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -250,8 +253,11 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: interface @I3 { // CHECK:STDOUT: %Self: %I3.type = symbolic_binding Self, 0 [symbolic = constants.%Self.70b] +// CHECK:STDOUT: interface_with_self_decl @I3 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T1: type = assoc_const_decl @T1 [concrete] { -// CHECK:STDOUT: %assoc0: %I3.assoc_type = assoc_entity element0, @I3.%T1 [concrete = constants.%assoc0.236] +// CHECK:STDOUT: %assoc0: %I3.assoc_type = assoc_entity element0, @I3.%T1 [concrete = constants.%assoc0.0d5] // CHECK:STDOUT: } // CHECK:STDOUT: %T2: type = assoc_const_decl @T2 [concrete] { // CHECK:STDOUT: %assoc1: %I3.assoc_type = assoc_entity element1, @I3.%T2 [concrete = constants.%assoc1] @@ -272,8 +278,11 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: // CHECK:STDOUT: interface @NonType { // CHECK:STDOUT: %Self: %NonType.type = symbolic_binding Self, 0 [symbolic = constants.%Self.13f] +// CHECK:STDOUT: interface_with_self_decl @NonType [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %Y: %struct_type.a = assoc_const_decl @Y [concrete] { -// CHECK:STDOUT: %assoc0: %NonType.assoc_type = assoc_entity element0, @NonType.%Y [concrete = constants.%assoc0.b16] +// CHECK:STDOUT: %assoc0: %NonType.assoc_type = assoc_entity element0, @NonType.%Y [concrete = constants.%assoc0.0f3] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -284,35 +293,11 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } +// CHECK:STDOUT: specific @I(constants.%Self.ab9) {} // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T1(@I3.%Self: %I3.type) { -// CHECK:STDOUT: assoc_const T1:! type; -// CHECK:STDOUT: } +// CHECK:STDOUT: specific @I3(constants.%Self.70b) {} // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T2(@I3.%Self: %I3.type) { -// CHECK:STDOUT: assoc_const T2:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T3(@I3.%Self: %I3.type) { -// CHECK:STDOUT: assoc_const T3:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @Y(@NonType.%Self: %NonType.type) { -// CHECK:STDOUT: assoc_const Y:! %struct_type.a; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self.ab9) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T1(constants.%Self.70b) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T2(constants.%Self.70b) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T3(constants.%Self.70b) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Y(constants.%Self.13f) {} +// CHECK:STDOUT: specific @NonType(constants.%Self.13f) {} // CHECK:STDOUT: // CHECK:STDOUT: --- basic.carbon // CHECK:STDOUT: @@ -325,24 +310,24 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.be8 [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C1.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C1, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded -// CHECK:STDOUT: %Main.import_ref.873: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T] -// CHECK:STDOUT: %Main.import_ref.be8: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded +// CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//interface, loc3_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -361,7 +346,7 @@ impl CD as IF where .F = 0 { // 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.binding.as_type] // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] @@ -375,16 +360,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @I [from "interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .T = imports.%Main.import_ref.873 +// CHECK:STDOUT: .T = imports.%Main.import_ref.8ef // CHECK:STDOUT: witness = (imports.%Main.T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(imports.%Main.import_ref.236: %I.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C1.as.I.impl: %C1.ref as %.loc5_14 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @C1.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] @@ -402,9 +383,17 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%C1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- redecl.carbon // CHECK:STDOUT: @@ -417,24 +406,24 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.be8 [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C2.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C2, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded -// CHECK:STDOUT: %Main.import_ref.873: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T] -// CHECK:STDOUT: %Main.import_ref.be8: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded +// CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//interface, loc3_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -453,7 +442,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref.loc5: %I.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc5: type = facet_access_type %.Self.ref.loc5 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref.loc5, %.Self.as_type.loc5 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref.loc5: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref.loc5: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc5: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] @@ -469,7 +458,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref.loc6: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc6: type = facet_access_type %.Self.ref.loc6 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6, %.Self.as_type.loc6 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref.loc6: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref.loc6: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc6: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc6_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc6_26.2: type = converted %.loc6_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] @@ -483,16 +472,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @I [from "interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .T = imports.%Main.import_ref.873 +// CHECK:STDOUT: .T = imports.%Main.import_ref.8ef // CHECK:STDOUT: witness = (imports.%Main.T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(imports.%Main.import_ref.236: %I.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C2.as.I.impl: %C2.ref.loc5 as %.loc5_14 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @C2.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] @@ -510,9 +495,17 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%C2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_redecl_adds_rewrites.carbon // CHECK:STDOUT: @@ -525,24 +518,24 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.be8 [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] // CHECK:STDOUT: %I.impl_witness.721: = impl_witness @C3.as.I.impl.b9a.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C3, (%I.impl_witness.721) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded -// CHECK:STDOUT: %Main.import_ref.873: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T] -// CHECK:STDOUT: %Main.import_ref.be8: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded +// CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//interface, loc3_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -565,7 +558,7 @@ impl CD as IF where .F = 0 { // 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.binding.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] @@ -579,16 +572,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @I [from "interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .T = imports.%Main.import_ref.873 +// CHECK:STDOUT: .T = imports.%Main.import_ref.8ef // CHECK:STDOUT: witness = (imports.%Main.T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(imports.%Main.import_ref.236: %I.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C3.as.I.impl.4fb: %C3.ref as %I.ref; // CHECK:STDOUT: // CHECK:STDOUT: impl @C3.as.I.impl.b9a: %C3.ref as %.loc10_14 { @@ -608,9 +597,17 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%C3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_mismatch.carbon // CHECK:STDOUT: @@ -624,7 +621,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.be8 [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -632,18 +629,18 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %I_where.type.0f9: type = facet_type <@I where %impl.elem0 = %empty_tuple.type> [concrete] // CHECK:STDOUT: %I.impl_witness.68c: = impl_witness @C4.as.I.impl.95c.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C4, (%I.impl_witness.68c) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded -// CHECK:STDOUT: %Main.import_ref.873: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T] -// CHECK:STDOUT: %Main.import_ref.be8: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded +// CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//interface, loc3_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -662,7 +659,7 @@ impl CD as IF where .F = 0 { // 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.binding.as_type] // CHECK:STDOUT: %.loc9_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc9_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc9_26.2: type = converted %.loc9_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] @@ -678,7 +675,7 @@ impl CD as IF where .F = 0 { // 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.binding.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_26.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -692,16 +689,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @I [from "interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .T = imports.%Main.import_ref.873 +// CHECK:STDOUT: .T = imports.%Main.import_ref.8ef // CHECK:STDOUT: witness = (imports.%Main.T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(imports.%Main.import_ref.236: %I.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C4.as.I.impl.2eb: %C4.ref as %.loc9_14; // CHECK:STDOUT: // CHECK:STDOUT: impl @C4.as.I.impl.95c: %C4.ref as %.loc10_14 { @@ -721,9 +714,17 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%C4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_mismatch_bad_value.carbon // CHECK:STDOUT: @@ -736,14 +737,14 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self: %I3.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I3.assoc_type: type = assoc_entity_type @I3 [concrete] -// CHECK:STDOUT: %assoc0: %I3.assoc_type = assoc_entity element0, imports.%Main.import_ref.922 [concrete] +// CHECK:STDOUT: %assoc0: %I3.assoc_type = assoc_entity element0, imports.%Main.import_ref.889 [concrete] // CHECK:STDOUT: %I3.lookup_impl_witness: = lookup_impl_witness %.Self, @I3 [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I3.lookup_impl_witness, element0 [symbolic_self] -// CHECK:STDOUT: %assoc1: %I3.assoc_type = assoc_entity element1, imports.%Main.import_ref.8d8 [concrete] +// CHECK:STDOUT: %assoc1: %I3.assoc_type = assoc_entity element1, imports.%Main.import_ref.fa1 [concrete] // CHECK:STDOUT: %impl.elem1: type = impl_witness_access %I3.lookup_impl_witness, element1 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_struct_type} [concrete] -// CHECK:STDOUT: %assoc2: %I3.assoc_type = assoc_entity element2, imports.%Main.import_ref.b42 [concrete] +// CHECK:STDOUT: %assoc2: %I3.assoc_type = assoc_entity element2, imports.%Main.import_ref.c77 [concrete] // CHECK:STDOUT: %impl.elem2: type = impl_witness_access %I3.lookup_impl_witness, element2 [symbolic_self] // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %empty_struct_type} [concrete] // CHECK:STDOUT: } @@ -752,22 +753,19 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I = import_ref Main//interface, I, unloaded // CHECK:STDOUT: %Main.I3: type = import_ref Main//interface, I3, loaded [concrete = constants.%I3.type] // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.6d9 = import_ref Main//interface, loc5_14, unloaded -// CHECK:STDOUT: %Main.import_ref.264: %I3.assoc_type = import_ref Main//interface, loc6_9, loaded [concrete = constants.%assoc0] -// CHECK:STDOUT: %Main.import_ref.242: %I3.assoc_type = import_ref Main//interface, loc7_9, loaded [concrete = constants.%assoc1] -// CHECK:STDOUT: %Main.import_ref.9b6: %I3.assoc_type = import_ref Main//interface, loc8_9, loaded [concrete = constants.%assoc2] +// CHECK:STDOUT: %Main.import_ref.454: %I3.assoc_type = import_ref Main//interface, loc6_9, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.d88: %I3.assoc_type = import_ref Main//interface, loc7_9, loaded [concrete = constants.%assoc1] +// CHECK:STDOUT: %Main.import_ref.4cd: %I3.assoc_type = import_ref Main//interface, loc8_9, loaded [concrete = constants.%assoc2] // CHECK:STDOUT: %Main.T1 = import_ref Main//interface, T1, unloaded // CHECK:STDOUT: %Main.T2 = import_ref Main//interface, T2, unloaded // CHECK:STDOUT: %Main.T3 = import_ref Main//interface, T3, unloaded -// CHECK:STDOUT: %Main.import_ref.922: type = import_ref Main//interface, loc6_9, loaded [concrete = %T1] +// CHECK:STDOUT: %Main.import_ref.6d9 = import_ref Main//interface, loc5_14, unloaded +// CHECK:STDOUT: %Main.import_ref.889: type = import_ref Main//interface, loc6_9, loaded [concrete = %T1] // CHECK:STDOUT: %T1: type = assoc_const_decl @T1 [concrete] {} -// CHECK:STDOUT: %Main.import_ref.e58186.1: %I3.type = import_ref Main//interface, loc5_14, loaded [symbolic = constants.%Self] -// CHECK:STDOUT: %Main.import_ref.8d8: type = import_ref Main//interface, loc7_9, loaded [concrete = %T2] +// CHECK:STDOUT: %Main.import_ref.fa1: type = import_ref Main//interface, loc7_9, loaded [concrete = %T2] // CHECK:STDOUT: %T2: type = assoc_const_decl @T2 [concrete] {} -// CHECK:STDOUT: %Main.import_ref.e58186.2: %I3.type = import_ref Main//interface, loc5_14, loaded [symbolic = constants.%Self] -// CHECK:STDOUT: %Main.import_ref.b42: type = import_ref Main//interface, loc8_9, loaded [concrete = %T3] +// CHECK:STDOUT: %Main.import_ref.c77: type = import_ref Main//interface, loc8_9, loaded [concrete = %T3] // CHECK:STDOUT: %T3: type = assoc_const_decl @T3 [concrete] {} -// CHECK:STDOUT: %Main.import_ref.e58186.3: %I3.type = import_ref Main//interface, loc5_14, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -790,13 +788,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref.loc17_21: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc17_21: type = facet_access_type %.Self.ref.loc17_21 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc17_21: type = converted %.Self.ref.loc17_21, %.Self.as_type.loc17_21 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T1.ref: %I3.assoc_type = name_ref T1, imports.%Main.import_ref.264 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T1.ref: %I3.assoc_type = name_ref T1, imports.%Main.import_ref.454 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I3.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD1.ref: = name_ref BAD1, [concrete = ] // CHECK:STDOUT: %.Self.ref.loc17_36: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc17_36: type = facet_access_type %.Self.ref.loc17_36 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc17_36: type = converted %.Self.ref.loc17_36, %.Self.as_type.loc17_36 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T2.ref: %I3.assoc_type = name_ref T2, imports.%Main.import_ref.242 [concrete = constants.%assoc1] +// CHECK:STDOUT: %T2.ref: %I3.assoc_type = name_ref T2, imports.%Main.import_ref.d88 [concrete = constants.%assoc1] // CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%I3.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] // CHECK:STDOUT: %.loc17_48.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc17_48.2: type = converted %.loc17_48.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] @@ -804,7 +802,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref.loc17_55: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc17_55: type = facet_access_type %.Self.ref.loc17_55 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc17_55: type = converted %.Self.ref.loc17_55, %.Self.as_type.loc17_55 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T3.ref: %I3.assoc_type = name_ref T3, imports.%Main.import_ref.9b6 [concrete = constants.%assoc2] +// CHECK:STDOUT: %T3.ref: %I3.assoc_type = name_ref T3, imports.%Main.import_ref.4cd [concrete = constants.%assoc2] // CHECK:STDOUT: %impl.elem2: type = impl_witness_access constants.%I3.lookup_impl_witness, element2 [symbolic_self = constants.%impl.elem2] // CHECK:STDOUT: %BAD2.ref: = name_ref BAD2, [concrete = ] // CHECK:STDOUT: %.loc17_15: type = where_expr %.Self [concrete = ] { @@ -821,7 +819,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref.loc27_21: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc27_21: type = facet_access_type %.Self.ref.loc27_21 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc27_21: type = converted %.Self.ref.loc27_21, %.Self.as_type.loc27_21 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T1.ref: %I3.assoc_type = name_ref T1, imports.%Main.import_ref.264 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T1.ref: %I3.assoc_type = name_ref T1, imports.%Main.import_ref.454 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I3.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc27_33.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc27_33.2: type = converted %.loc27_33.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] @@ -829,13 +827,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref.loc27_40: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc27_40: type = facet_access_type %.Self.ref.loc27_40 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc27_40: type = converted %.Self.ref.loc27_40, %.Self.as_type.loc27_40 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T2.ref: %I3.assoc_type = name_ref T2, imports.%Main.import_ref.242 [concrete = constants.%assoc1] +// CHECK:STDOUT: %T2.ref: %I3.assoc_type = name_ref T2, imports.%Main.import_ref.d88 [concrete = constants.%assoc1] // CHECK:STDOUT: %impl.elem1: type = impl_witness_access constants.%I3.lookup_impl_witness, element1 [symbolic_self = constants.%impl.elem1] // CHECK:STDOUT: %BAD3.ref: = name_ref BAD3, [concrete = ] // CHECK:STDOUT: %.Self.ref.loc27_55: %I3.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc27_55: type = facet_access_type %.Self.ref.loc27_55 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc27_55: type = converted %.Self.ref.loc27_55, %.Self.as_type.loc27_55 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T3.ref: %I3.assoc_type = name_ref T3, imports.%Main.import_ref.9b6 [concrete = constants.%assoc2] +// CHECK:STDOUT: %T3.ref: %I3.assoc_type = name_ref T3, imports.%Main.import_ref.4cd [concrete = constants.%assoc2] // CHECK:STDOUT: %impl.elem2: type = impl_witness_access constants.%I3.lookup_impl_witness, element2 [symbolic_self = constants.%impl.elem2] // CHECK:STDOUT: %BAD4.ref: = name_ref BAD4, [concrete = ] // CHECK:STDOUT: %.loc27_15: type = where_expr %.Self [concrete = ] { @@ -850,26 +848,14 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @I3 [from "interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.6d9 -// CHECK:STDOUT: .T1 = imports.%Main.import_ref.264 -// CHECK:STDOUT: .T2 = imports.%Main.import_ref.242 -// CHECK:STDOUT: .T3 = imports.%Main.import_ref.9b6 +// CHECK:STDOUT: .T1 = imports.%Main.import_ref.454 +// CHECK:STDOUT: .T2 = imports.%Main.import_ref.d88 +// CHECK:STDOUT: .T3 = imports.%Main.import_ref.4cd // CHECK:STDOUT: witness = (imports.%Main.T1, imports.%Main.T2, imports.%Main.T3) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T1(imports.%Main.import_ref.e58186.1: %I3.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T1:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T2(imports.%Main.import_ref.e58186.2: %I3.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T2:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T3(imports.%Main.import_ref.e58186.3: %I3.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T3:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C5.as..impl.bcbfb8.1: %C5.ref as %.loc17_15; // CHECK:STDOUT: // CHECK:STDOUT: impl @C5.as..impl.bcbfb8.2: %C5.ref as %.loc27_15 { @@ -885,17 +871,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%C5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T1(constants.%Self) {} +// CHECK:STDOUT: specific @I3(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T1(constants.%.Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T2(constants.%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T2(constants.%.Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T3(constants.%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T3(constants.%.Self) {} +// CHECK:STDOUT: specific @I3(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_missing_on_definition.carbon // CHECK:STDOUT: @@ -908,24 +890,24 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.be8 [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] // CHECK:STDOUT: %I.impl_witness.9dc: = impl_witness @C6.as.I.impl.27c.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C6, (%I.impl_witness.9dc) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded -// CHECK:STDOUT: %Main.import_ref.873: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T] -// CHECK:STDOUT: %Main.import_ref.be8: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded +// CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//interface, loc3_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -944,7 +926,7 @@ impl CD as IF where .F = 0 { // 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.binding.as_type] // CHECK:STDOUT: %.loc5_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc5_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc5_26.2: type = converted %.loc5_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] @@ -962,16 +944,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @I [from "interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .T = imports.%Main.import_ref.873 +// CHECK:STDOUT: .T = imports.%Main.import_ref.8ef // CHECK:STDOUT: witness = (imports.%Main.T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(imports.%Main.import_ref.236: %I.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C6.as.I.impl.756: %C6.ref as %.loc5_14; // CHECK:STDOUT: // CHECK:STDOUT: impl @C6.as.I.impl.27c: %C6.ref as %I.ref { @@ -990,9 +968,17 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%C6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_two_different.carbon // CHECK:STDOUT: @@ -1006,7 +992,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.be8 [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -1017,12 +1003,11 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded -// CHECK:STDOUT: %Main.import_ref.873: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T = import_ref Main//interface, T, unloaded -// CHECK:STDOUT: %Main.import_ref.be8: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded +// CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//interface, loc3_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1041,14 +1026,14 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref.loc10_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref.loc10_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref.loc10_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc10_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.Self.ref.loc10_32: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc10_32: type = facet_access_type %.Self.ref.loc10_32 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc10_32: type = converted %.Self.ref.loc10_32, %.Self.as_type.loc10_32 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref.loc10_32: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref.loc10_32: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc10_32: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc10_32, %.loc10_26.2 [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc10_38.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] @@ -1064,16 +1049,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @I [from "interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .T = imports.%Main.import_ref.873 +// CHECK:STDOUT: .T = imports.%Main.import_ref.8ef // CHECK:STDOUT: witness = (imports.%Main.T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(imports.%Main.import_ref.236: %I.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C7.as..impl: %C7.ref as %.loc10_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = @@ -1087,9 +1068,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%C7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_two_different_first_bad.carbon // CHECK:STDOUT: @@ -1103,7 +1088,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.be8 [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] @@ -1113,12 +1098,11 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded -// CHECK:STDOUT: %Main.import_ref.873: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T = import_ref Main//interface, T, unloaded -// CHECK:STDOUT: %Main.import_ref.be8: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded +// CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//interface, loc3_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1138,13 +1122,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref.loc10_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref.loc10_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref.loc10_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc10_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD5.ref: = name_ref BAD5, [concrete = ] // CHECK:STDOUT: %.Self.ref.loc10_34: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc10_34: type = facet_access_type %.Self.ref.loc10_34 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc10_34: type = converted %.Self.ref.loc10_34, %.Self.as_type.loc10_34 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref.loc10_34: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref.loc10_34: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc10_34: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc10_34, [concrete = ] // CHECK:STDOUT: %.loc10_40.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] @@ -1160,16 +1144,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @I [from "interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .T = imports.%Main.import_ref.873 +// CHECK:STDOUT: .T = imports.%Main.import_ref.8ef // CHECK:STDOUT: witness = (imports.%Main.T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(imports.%Main.import_ref.236: %I.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C8.as..impl: %C8.ref as %.loc10_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = @@ -1183,9 +1163,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%C8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_two_different_second_bad.carbon // CHECK:STDOUT: @@ -1198,7 +1182,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.be8 [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -1208,12 +1192,11 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded -// CHECK:STDOUT: %Main.import_ref.873: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T = import_ref Main//interface, T, unloaded -// CHECK:STDOUT: %Main.import_ref.be8: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded +// CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//interface, loc3_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1233,14 +1216,14 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref.loc10_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc10_20: type = facet_access_type %.Self.ref.loc10_20 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc10_20: type = converted %.Self.ref.loc10_20, %.Self.as_type.loc10_20 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref.loc10_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref.loc10_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc10_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc10_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc10_26.2: type = converted %.loc10_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.Self.ref.loc10_32: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc10_32: type = facet_access_type %.Self.ref.loc10_32 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc10_32: type = converted %.Self.ref.loc10_32, %.Self.as_type.loc10_32 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref.loc10_32: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref.loc10_32: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc10_32: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc10_32, %.loc10_26.2 [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %BAD6.ref: = name_ref BAD6, [concrete = ] @@ -1255,16 +1238,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @I [from "interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .T = imports.%Main.import_ref.873 +// CHECK:STDOUT: .T = imports.%Main.import_ref.8ef // CHECK:STDOUT: witness = (imports.%Main.T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(imports.%Main.import_ref.236: %I.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C9.as..impl: %C9.ref as %.loc10_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = @@ -1278,9 +1257,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%C9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_two_different_both_bad.carbon // CHECK:STDOUT: @@ -1293,7 +1276,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.be8 [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: } @@ -1302,12 +1285,11 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded -// CHECK:STDOUT: %Main.import_ref.873: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T = import_ref Main//interface, T, unloaded -// CHECK:STDOUT: %Main.import_ref.be8: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded +// CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//interface, loc3_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1328,13 +1310,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref.loc14_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc14_20: type = facet_access_type %.Self.ref.loc14_20 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc14_20: type = converted %.Self.ref.loc14_20, %.Self.as_type.loc14_20 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref.loc14_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref.loc14_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc14_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %BAD7.ref: = name_ref BAD7, [concrete = ] // CHECK:STDOUT: %.Self.ref.loc14_34: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc14_34: type = facet_access_type %.Self.ref.loc14_34 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc14_34: type = converted %.Self.ref.loc14_34, %.Self.as_type.loc14_34 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref.loc14_34: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref.loc14_34: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc14_34: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc14_34, [concrete = ] // CHECK:STDOUT: %BAD8.ref: = name_ref BAD8, [concrete = ] @@ -1349,16 +1331,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @I [from "interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .T = imports.%Main.import_ref.873 +// CHECK:STDOUT: .T = imports.%Main.import_ref.8ef // CHECK:STDOUT: witness = (imports.%Main.T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(imports.%Main.import_ref.236: %I.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @CA.as..impl: %CA.ref as %.loc14_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = @@ -1372,9 +1350,13 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%CA // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- repeated.carbon // CHECK:STDOUT: @@ -1387,24 +1369,24 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self: %I.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.be8 [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.9c9 [concrete] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %.Self, @I [symbolic_self] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct_type> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @CB.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %CB, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//interface, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType = import_ref Main//interface, NonType, unloaded -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded -// CHECK:STDOUT: %Main.import_ref.873: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.8ef: %I.assoc_type = import_ref Main//interface, loc3_20, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.T: type = import_ref Main//interface, T, loaded [concrete = %T] -// CHECK:STDOUT: %Main.import_ref.be8: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//interface, loc3_13, unloaded +// CHECK:STDOUT: %Main.import_ref.9c9: type = import_ref Main//interface, loc3_20, loaded [concrete = %T] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {} -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//interface, loc3_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1423,14 +1405,14 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref.loc6_20: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc6_20: type = facet_access_type %.Self.ref.loc6_20 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc6_20: type = converted %.Self.ref.loc6_20, %.Self.as_type.loc6_20 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref.loc6_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref.loc6_20: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc6_20: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc6_26.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc6_26.2: type = converted %.loc6_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.Self.ref.loc6_32: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type.loc6_32: type = facet_access_type %.Self.ref.loc6_32 [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc6_32: type = converted %.Self.ref.loc6_32, %.Self.as_type.loc6_32 [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T.ref.loc6_32: %I.assoc_type = name_ref T, imports.%Main.import_ref.873 [concrete = constants.%assoc0] +// CHECK:STDOUT: %T.ref.loc6_32: %I.assoc_type = name_ref T, imports.%Main.import_ref.8ef [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0.loc6_32: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %impl.elem0.subst: type = impl_witness_access_substituted %impl.elem0.loc6_32, %.loc6_26.2 [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %.loc6_38.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] @@ -1446,16 +1428,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @I [from "interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .T = imports.%Main.import_ref.873 +// CHECK:STDOUT: .T = imports.%Main.import_ref.8ef // CHECK:STDOUT: witness = (imports.%Main.T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(imports.%Main.import_ref.236: %I.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @CB.as.I.impl: %CB.ref as %.loc6_14 { // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @CB.as.I.impl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness] @@ -1473,9 +1451,17 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%CB // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- non-type.carbon // CHECK:STDOUT: @@ -1488,7 +1474,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self: %NonType.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %NonType.assoc_type: type = assoc_entity_type @NonType [concrete] -// CHECK:STDOUT: %assoc0: %NonType.assoc_type = assoc_entity element0, imports.%Main.import_ref.074 [concrete] +// CHECK:STDOUT: %assoc0: %NonType.assoc_type = assoc_entity element0, imports.%Main.import_ref.e29 [concrete] // CHECK:STDOUT: %NonType.lookup_impl_witness: = lookup_impl_witness %.Self, @NonType [symbolic_self] // CHECK:STDOUT: %struct_type.a.225: type = struct_type {.a: %empty_struct_type} [concrete] // CHECK:STDOUT: %impl.elem0: %struct_type.a.225 = impl_witness_access %NonType.lookup_impl_witness, element0 [symbolic_self] @@ -1496,18 +1482,18 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %struct: %struct_type.a.225 = struct_value (%empty_struct) [concrete] // CHECK:STDOUT: %NonType_where.type: type = facet_type <@NonType where %impl.elem0 = %struct> [concrete] // CHECK:STDOUT: %NonType.impl_witness: = impl_witness @CC.as.NonType.impl.%NonType.impl_witness_table [concrete] +// CHECK:STDOUT: %NonType.facet: %NonType.type = facet_value %CC, (%NonType.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I = import_ref Main//interface, I, unloaded // CHECK:STDOUT: %Main.I3 = import_ref Main//interface, I3, unloaded // CHECK:STDOUT: %Main.NonType: type = import_ref Main//interface, NonType, loaded [concrete = constants.%NonType.type] -// CHECK:STDOUT: %Main.import_ref.e7e = import_ref Main//interface, loc11_19, unloaded -// CHECK:STDOUT: %Main.import_ref.048: %NonType.assoc_type = import_ref Main//interface, loc12_8, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.fe0: %NonType.assoc_type = import_ref Main//interface, loc12_8, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.Y: %struct_type.a.225 = import_ref Main//interface, Y, loaded [concrete = %Y] -// CHECK:STDOUT: %Main.import_ref.074: %struct_type.a.225 = import_ref Main//interface, loc12_8, loaded [concrete = %Y] +// CHECK:STDOUT: %Main.import_ref.e7e = import_ref Main//interface, loc11_19, unloaded +// CHECK:STDOUT: %Main.import_ref.e29: %struct_type.a.225 = import_ref Main//interface, loc12_8, loaded [concrete = %Y] // CHECK:STDOUT: %Y: %struct_type.a.225 = assoc_const_decl @Y [concrete] {} -// CHECK:STDOUT: %Main.import_ref.a24: %NonType.type = import_ref Main//interface, loc11_19, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1526,7 +1512,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref: %NonType.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc6_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %Y.ref: %NonType.assoc_type = name_ref Y, imports.%Main.import_ref.048 [concrete = constants.%assoc0] +// CHECK:STDOUT: %Y.ref: %NonType.assoc_type = name_ref Y, imports.%Main.import_ref.fe0 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: %struct_type.a.225 = impl_witness_access constants.%NonType.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %.loc6_38: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc6_39.1: %struct_type.a.225 = struct_literal (%.loc6_38) [concrete = constants.%struct] @@ -1544,16 +1530,12 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @NonType [from "interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.e7e -// CHECK:STDOUT: .Y = imports.%Main.import_ref.048 +// CHECK:STDOUT: .Y = imports.%Main.import_ref.fe0 // CHECK:STDOUT: witness = (imports.%Main.Y) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @Y(imports.%Main.import_ref.a24: %NonType.type) [from "interface.carbon"] { -// CHECK:STDOUT: assoc_const Y:! %struct_type.a.225; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @CC.as.NonType.impl: %CC.ref as %.loc6_20 { // CHECK:STDOUT: %NonType.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @CC.as.NonType.impl [concrete] // CHECK:STDOUT: %NonType.impl_witness: = impl_witness %NonType.impl_witness_table [concrete = constants.%NonType.impl_witness] @@ -1571,19 +1553,27 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%CC // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Y(constants.%Self) {} +// CHECK:STDOUT: specific @NonType(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Y(constants.%.Self) {} +// CHECK:STDOUT: specific @NonType(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NonType(constants.%NonType.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- interface_with_function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %IF.type: type = facet_type <@IF> [concrete] // CHECK:STDOUT: %Self: %IF.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %IF.F.type: type = fn_type @IF.F [concrete] -// CHECK:STDOUT: %IF.F: %IF.F.type = struct_value () [concrete] +// CHECK:STDOUT: %IF.WithSelf.F.type: type = fn_type @IF.WithSelf.F, @IF(%Self) [symbolic] +// CHECK:STDOUT: %IF.WithSelf.F: %IF.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %IF.assoc_type: type = assoc_entity_type @IF [concrete] -// CHECK:STDOUT: %assoc0: %IF.assoc_type = assoc_entity element0, @IF.%IF.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %IF.assoc_type = assoc_entity element0, @IF.%IF.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1594,23 +1584,28 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @IF { -// CHECK:STDOUT: %Self: %IF.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %IF.F.decl: %IF.F.type = fn_decl @IF.F [concrete = constants.%IF.F] {} {} -// CHECK:STDOUT: %assoc0: %IF.assoc_type = assoc_entity element0, %IF.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc3_14: %IF.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @IF [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %IF.WithSelf.F.decl: @IF.%IF.WithSelf.F.type (%IF.WithSelf.F.type) = fn_decl @IF.WithSelf.F [symbolic = @IF.%IF.WithSelf.F (constants.%IF.WithSelf.F)] {} {} +// CHECK:STDOUT: %assoc0: %IF.assoc_type = assoc_entity element0, %IF.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3_14 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%IF.F.decl) +// CHECK:STDOUT: witness = (%IF.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @IF.F(@IF.%Self: %IF.type) { +// CHECK:STDOUT: generic fn @IF.WithSelf.F(@IF.%Self.loc3_14: %IF.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @IF.F(constants.%Self) {} +// CHECK:STDOUT: specific @IF(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @IF.WithSelf.F(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_where_rewrite_function.carbon // CHECK:STDOUT: @@ -1620,30 +1615,34 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %IF.type: type = facet_type <@IF> [concrete] // CHECK:STDOUT: %Self: %IF.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %IF.WithSelf.F.type.1d1: type = fn_type @IF.WithSelf.F, @IF(%Self) [symbolic] +// CHECK:STDOUT: %IF.WithSelf.F.d78: %IF.WithSelf.F.type.1d1 = struct_value () [symbolic] // CHECK:STDOUT: %.Self: %IF.type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %IF.WithSelf.F.type.923: type = fn_type @IF.WithSelf.F, @IF(%.Self) [symbolic_self] +// CHECK:STDOUT: %IF.WithSelf.F.7ce: %IF.WithSelf.F.type.923 = struct_value () [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %IF.assoc_type: type = assoc_entity_type @IF [concrete] -// CHECK:STDOUT: %assoc0: %IF.assoc_type = assoc_entity element0, imports.%Main.import_ref.a87 [concrete] +// CHECK:STDOUT: %assoc0: %IF.assoc_type = assoc_entity element0, imports.%Main.import_ref.ae5 [concrete] // CHECK:STDOUT: %IF.lookup_impl_witness: = lookup_impl_witness %.Self, @IF [symbolic_self] -// CHECK:STDOUT: %IF.F.type: type = fn_type @IF.F [concrete] -// CHECK:STDOUT: %IF.F: %IF.F.type = struct_value () [concrete] -// CHECK:STDOUT: %.f6e: type = fn_type_with_self_type %IF.F.type, %.Self [symbolic_self] -// CHECK:STDOUT: %impl.elem0: %.f6e = impl_witness_access %IF.lookup_impl_witness, element0 [symbolic_self] +// CHECK:STDOUT: %.8a4: type = fn_type_with_self_type %IF.WithSelf.F.type.923, %.Self [symbolic_self] +// CHECK:STDOUT: %impl.elem0: %.8a4 = impl_witness_access %IF.lookup_impl_witness, element0 [symbolic_self] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %IF_where.type: type = facet_type <@IF where %impl.elem0 = %int_0> [concrete] // CHECK:STDOUT: %IF.impl_witness: = impl_witness @CD.as.IF.impl.%IF.impl_witness_table [concrete] // CHECK:STDOUT: %CD.as.IF.impl.F.type: type = fn_type @CD.as.IF.impl.F [concrete] // CHECK:STDOUT: %CD.as.IF.impl.F: %CD.as.IF.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %IF.facet: %IF.type = facet_value %CD, (%IF.impl_witness) [concrete] +// CHECK:STDOUT: %IF.WithSelf.F.type.1b7: type = fn_type @IF.WithSelf.F, @IF(%IF.facet) [concrete] +// CHECK:STDOUT: %IF.WithSelf.F.0bc: %IF.WithSelf.F.type.1b7 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.IF: type = import_ref Main//interface_with_function, IF, loaded [concrete = constants.%IF.type] +// CHECK:STDOUT: %Main.import_ref.82a: %IF.assoc_type = import_ref Main//interface_with_function, loc3_22, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.F: @IF.%IF.WithSelf.F.type (%IF.WithSelf.F.type.1d1) = import_ref Main//interface_with_function, F, loaded [symbolic = @IF.%IF.WithSelf.F (constants.%IF.WithSelf.F.d78)] +// CHECK:STDOUT: %Main.import_ref.e88a3c.2: %IF.type = import_ref Main//interface_with_function, loc3_14, loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.b9e = import_ref Main//interface_with_function, loc3_14, unloaded -// CHECK:STDOUT: %Main.import_ref.9af: %IF.assoc_type = import_ref Main//interface_with_function, loc3_22, loaded [concrete = constants.%assoc0] -// CHECK:STDOUT: %Main.F: %IF.F.type = import_ref Main//interface_with_function, F, loaded [concrete = constants.%IF.F] -// CHECK:STDOUT: %Main.import_ref.a87: %IF.F.type = import_ref Main//interface_with_function, loc3_22, loaded [concrete = constants.%IF.F] -// CHECK:STDOUT: %Main.import_ref.e88: %IF.type = import_ref Main//interface_with_function, loc3_14, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.ae5: @IF.%IF.WithSelf.F.type (%IF.WithSelf.F.type.1d1) = import_ref Main//interface_with_function, loc3_22, loaded [symbolic = @IF.%IF.WithSelf.F (constants.%IF.WithSelf.F.d78)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1660,8 +1659,8 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: %.Self.ref: %IF.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc10_21: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %F.ref: %IF.assoc_type = name_ref F, imports.%Main.import_ref.9af [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.f6e = impl_witness_access constants.%IF.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] +// CHECK:STDOUT: %F.ref: %IF.assoc_type = name_ref F, imports.%Main.import_ref.82a [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %.8a4 = impl_witness_access constants.%IF.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc10_15: type = where_expr %.Self [concrete = constants.%IF_where.type] { // CHECK:STDOUT: requirement_base_facet_type constants.%IF.type @@ -1673,7 +1672,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: interface @IF [from "interface_with_function.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.b9e -// CHECK:STDOUT: .F = imports.%Main.import_ref.9af +// CHECK:STDOUT: .F = imports.%Main.import_ref.82a // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1697,7 +1696,7 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: .Self = constants.%CD // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @IF.F(imports.%Main.import_ref.e88: %IF.type) [from "interface_with_function.carbon"] { +// CHECK:STDOUT: generic fn @IF.WithSelf.F(imports.%Main.import_ref.e88a3c.2: %IF.type) [from "interface_with_function.carbon"] { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1706,7 +1705,28 @@ impl CD as IF where .F = 0 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @IF.F(constants.%Self) {} +// CHECK:STDOUT: specific @IF(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %IF.WithSelf.F.type => constants.%IF.WithSelf.F.type.1d1 +// CHECK:STDOUT: %IF.WithSelf.F => constants.%IF.WithSelf.F.d78 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @IF.F(constants.%IF.facet) {} +// CHECK:STDOUT: specific @IF.WithSelf.F(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @IF(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%.Self +// CHECK:STDOUT: %IF.WithSelf.F.type => constants.%IF.WithSelf.F.type.923 +// CHECK:STDOUT: %IF.WithSelf.F => constants.%IF.WithSelf.F.7ce +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @IF(constants.%IF.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%IF.facet +// CHECK:STDOUT: %IF.WithSelf.F.type => constants.%IF.WithSelf.F.type.1b7 +// CHECK:STDOUT: %IF.WithSelf.F => constants.%IF.WithSelf.F.0bc +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @IF.WithSelf.F(constants.%IF.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/import_self.carbon b/toolchain/check/testdata/impl/import_self.carbon index 82a1a7754c64..0c4574e6c563 100644 --- a/toolchain/check/testdata/impl/import_self.carbon +++ b/toolchain/check/testdata/impl/import_self.carbon @@ -44,10 +44,10 @@ fn F(x: C, y: C) -> C { // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.0ec: Core.Form = init_form %Self.binding.as_type, call_param2 [symbolic] -// CHECK:STDOUT: %Add.Op.type: type = fn_type @Add.Op [concrete] -// CHECK:STDOUT: %Add.Op: %Add.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %Add.WithSelf.Op.type: type = fn_type @Add.WithSelf.Op, @Add(%Self) [symbolic] +// CHECK:STDOUT: %Add.WithSelf.Op: %Add.WithSelf.Op.type = struct_value () [symbolic] // CHECK:STDOUT: %Add.assoc_type: type = assoc_entity_type @Add [concrete] -// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, @Add.%Add.Op.decl [concrete] +// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, @Add.%Add.WithSelf.Op.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,56 +67,61 @@ fn F(x: C, y: C) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Add { -// CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Add.Op.decl: %Add.Op.type = fn_decl @Add.Op [concrete = constants.%Add.Op] { -// CHECK:STDOUT: %self.patt: @Add.Op.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Add.Op.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %other.patt: @Add.Op.%pattern_type (%pattern_type) = value_binding_pattern other [concrete] -// CHECK:STDOUT: %other.param_patt: @Add.Op.%pattern_type (%pattern_type) = value_param_pattern %other.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @Add.Op.%pattern_type (%pattern_type) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Add.Op.%pattern_type (%pattern_type) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %Self.loc4: %Add.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Add [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Add.WithSelf.Op.decl: @Add.%Add.WithSelf.Op.type (%Add.WithSelf.Op.type) = fn_decl @Add.WithSelf.Op [symbolic = @Add.%Add.WithSelf.Op (constants.%Add.WithSelf.Op)] { +// CHECK:STDOUT: %self.patt: @Add.WithSelf.Op.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Add.WithSelf.Op.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %other.patt: @Add.WithSelf.Op.%pattern_type (%pattern_type) = value_binding_pattern other [concrete] +// CHECK:STDOUT: %other.param_patt: @Add.WithSelf.Op.%pattern_type (%pattern_type) = value_param_pattern %other.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @Add.WithSelf.Op.%pattern_type (%pattern_type) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Add.WithSelf.Op.%pattern_type (%pattern_type) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc5_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc5_37: %Add.type = name_ref Self, @Add.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc5_37: type = facet_access_type %Self.ref.loc5_37 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_37.2: type = converted %Self.ref.loc5_37, %Self.as_type.loc5_37 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_37.3: Core.Form = init_form %.loc5_37.2, call_param2 [symbolic = %.loc5_37.1 (constants.%.0ec)] -// CHECK:STDOUT: %self.param: @Add.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref.loc5_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc5_15: %Add.type = name_ref Self, @Add.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc5_15: type = facet_access_type %Self.ref.loc5_15 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref.loc5_15, %Self.as_type.loc5_15 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Add.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param -// CHECK:STDOUT: %other.param: @Add.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param1 +// CHECK:STDOUT: %self: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %other.param: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param1 // CHECK:STDOUT: %.loc5_28.1: type = splice_block %.loc5_28.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref.loc5_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc5_28: %Add.type = name_ref Self, @Add.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc5_28: type = facet_access_type %Self.ref.loc5_28 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_28.2: type = converted %Self.ref.loc5_28, %Self.as_type.loc5_28 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %other: @Add.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding other, %other.param -// CHECK:STDOUT: %return.param: ref @Add.Op.%Self.binding.as_type (%Self.binding.as_type) = out_param call_param2 -// CHECK:STDOUT: %return: ref @Add.Op.%Self.binding.as_type (%Self.binding.as_type) = return_slot %return.param +// CHECK:STDOUT: %other: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding other, %other.param +// CHECK:STDOUT: %return.param: ref @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = out_param call_param2 +// CHECK:STDOUT: %return: ref @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, %Add.Op.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, %Add.WithSelf.Op.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .Op = %assoc0 -// CHECK:STDOUT: witness = (%Add.Op.decl) +// CHECK:STDOUT: witness = (%Add.WithSelf.Op.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Add.Op(@Add.%Self: %Add.type) { +// CHECK:STDOUT: generic fn @Add.WithSelf.Op(@Add.%Self.loc4: %Add.type) { // CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type)] // CHECK:STDOUT: %.loc5_37.1: Core.Form = init_form %Self.binding.as_type, call_param2 [symbolic = %.loc5_37.1 (constants.%.0ec)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Add.Op.%Self.binding.as_type (%Self.binding.as_type), %other.param: @Add.Op.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @Add.Op.%Self.binding.as_type (%Self.binding.as_type); +// CHECK:STDOUT: fn(%self.param: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type), %other.param: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @Add.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Add.Op(constants.%Self) { +// CHECK:STDOUT: specific @Add(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type @@ -132,23 +137,25 @@ fn F(x: C, y: C) -> C { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_tuple.type [concrete] // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [concrete] // CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Add.impl_witness: = impl_witness @C.as.Add.impl.%Add.impl_witness_table [concrete] -// CHECK:STDOUT: %Add.Op.type: type = fn_type @Add.Op [concrete] -// CHECK:STDOUT: %Add.Op: %Add.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %Add.WithSelf.Op.type.099: type = fn_type @Add.WithSelf.Op, @Add(%Self) [symbolic] +// CHECK:STDOUT: %Add.WithSelf.Op.99a: %Add.WithSelf.Op.type.099 = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.5af: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.14a: Core.Form = init_form %Self.binding.as_type, call_param2 [symbolic] +// CHECK:STDOUT: %Add.impl_witness: = impl_witness @C.as.Add.impl.%Add.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] // CHECK:STDOUT: %.92f: Core.Form = init_form %C, call_param2 [concrete] // CHECK:STDOUT: %C.as.Add.impl.Op.type: type = fn_type @C.as.Add.impl.Op [concrete] // CHECK:STDOUT: %C.as.Add.impl.Op: %C.as.Add.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Add.facet: %Add.type = facet_value %C, (%Add.impl_witness) [concrete] +// CHECK:STDOUT: %Add.WithSelf.Op.type.3ed: type = fn_type @Add.WithSelf.Op, @Add(%Add.facet) [concrete] +// CHECK:STDOUT: %Add.WithSelf.Op.5d9: %Add.WithSelf.Op.type.3ed = struct_value () [concrete] // CHECK:STDOUT: %empty_tuple.bfb: %C = tuple_value () [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Add.assoc_type: type = assoc_entity_type @Add [concrete] -// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, imports.%Main.import_ref.4b6 [concrete] -// CHECK:STDOUT: %.b2f: type = fn_type_with_self_type %Add.Op.type, %Add.facet [concrete] +// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, imports.%Main.import_ref.dad [concrete] +// CHECK:STDOUT: %.c75: type = fn_type_with_self_type %Add.WithSelf.Op.type.3ed, %Add.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -157,11 +164,11 @@ fn F(x: C, y: C) -> C { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } +// CHECK:STDOUT: %Main.import_ref.a96: %Add.assoc_type = import_ref Main//a, loc5_41, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.Op: @Add.%Add.WithSelf.Op.type (%Add.WithSelf.Op.type.099) = import_ref Main//a, Op, loaded [symbolic = @Add.%Add.WithSelf.Op (constants.%Add.WithSelf.Op.99a)] +// CHECK:STDOUT: %Main.import_ref.bb084d.2: %Add.type = import_ref Main//a, loc4_15, loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.17c = import_ref Main//a, loc4_15, unloaded -// CHECK:STDOUT: %Main.import_ref.f0e: %Add.assoc_type = import_ref Main//a, loc5_41, loaded [concrete = constants.%assoc0] -// CHECK:STDOUT: %Main.Op: %Add.Op.type = import_ref Main//a, Op, loaded [concrete = constants.%Add.Op] -// CHECK:STDOUT: %Main.import_ref.bb0: %Add.type = import_ref Main//a, loc4_15, loaded [symbolic = constants.%Self] -// CHECK:STDOUT: %Main.import_ref.4b6: %Add.Op.type = import_ref Main//a, loc5_41, loaded [concrete = constants.%Add.Op] +// CHECK:STDOUT: %Main.import_ref.dad: @Add.%Add.WithSelf.Op.type (%Add.WithSelf.Op.type.099) = import_ref Main//a, loc5_41, loaded [symbolic = @Add.%Add.WithSelf.Op (constants.%Add.WithSelf.Op.99a)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -202,7 +209,7 @@ fn F(x: C, y: C) -> C { // CHECK:STDOUT: interface @Add [from "a.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.17c -// CHECK:STDOUT: .Op = imports.%Main.import_ref.f0e +// CHECK:STDOUT: .Op = imports.%Main.import_ref.a96 // CHECK:STDOUT: witness = (imports.%Main.Op) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -248,7 +255,7 @@ fn F(x: C, y: C) -> C { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Add.Op(imports.%Main.import_ref.bb0: %Add.type) [from "a.carbon"] { +// CHECK:STDOUT: generic fn @Add.WithSelf.Op(imports.%Main.import_ref.bb084d.2: %Add.type) [from "a.carbon"] { // CHECK:STDOUT: %Self: %Add.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.5af)] @@ -275,22 +282,36 @@ fn F(x: C, y: C) -> C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %C = name_ref x, %x // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%Main.Add [concrete = constants.%Add.type] -// CHECK:STDOUT: %Op.ref: %Add.assoc_type = name_ref Op, imports.%Main.import_ref.f0e [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.b2f = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%C.as.Add.impl.Op] +// CHECK:STDOUT: %Op.ref: %Add.assoc_type = name_ref Op, imports.%Main.import_ref.a96 [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %.c75 = impl_witness_access constants.%Add.impl_witness, element0 [concrete = constants.%C.as.Add.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %y.ref: %C = name_ref y, %y // CHECK:STDOUT: %C.as.Add.impl.Op.call: init %C = call %bound_method(%x.ref, %y.ref) // CHECK:STDOUT: return %C.as.Add.impl.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Add.Op(constants.%Self) { +// CHECK:STDOUT: specific @Add(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.099 +// CHECK:STDOUT: %Add.WithSelf.Op => constants.%Add.WithSelf.Op.99a +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.5af // CHECK:STDOUT: %.1 => constants.%.14a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Add.Op(constants.%Add.facet) { +// CHECK:STDOUT: specific @Add(constants.%Add.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Add.facet +// CHECK:STDOUT: %Add.WithSelf.Op.type => constants.%Add.WithSelf.Op.type.3ed +// CHECK:STDOUT: %Add.WithSelf.Op => constants.%Add.WithSelf.Op.5d9 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Add.WithSelf.Op(constants.%Add.facet) { // CHECK:STDOUT: %Self => constants.%Add.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7c7 diff --git a/toolchain/check/testdata/impl/import_self_specific.carbon b/toolchain/check/testdata/impl/import_self_specific.carbon index f7c0aab48eab..367c5023b42b 100644 --- a/toolchain/check/testdata/impl/import_self_specific.carbon +++ b/toolchain/check/testdata/impl/import_self_specific.carbon @@ -72,10 +72,12 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Y.impl_witness: = impl_witness @T.as.Y.impl.%Y.impl_witness_table, @T.as.Y.impl(%T) [symbolic] +// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %T, (%Y.impl_witness) [symbolic] // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] // CHECK:STDOUT: %Self.c59: %Z.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %Z.impl_witness.856: = impl_witness @U.as.Z.impl.%Z.impl_witness_table, @U.as.Z.impl(%U) [symbolic] +// CHECK:STDOUT: %Z.facet.f2d: %Z.type = facet_value %U, (%Z.impl_witness.856) [symbolic] // CHECK:STDOUT: %V: %Z.type = symbolic_binding V, 0 [symbolic] // CHECK:STDOUT: %pattern_type.22b: type = pattern_type %Z.type [concrete] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] @@ -94,12 +96,12 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %Z.impl_witness.64d: = impl_witness @U.as.Z.impl.%Z.impl_witness_table, @U.as.Z.impl(%as_type) [symbolic] // CHECK:STDOUT: %.bf4: require_specific_def_type = require_specific_def @U.as.Z.impl(%as_type) [symbolic] // CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %impl.elem0, @Z [symbolic] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %as_type, (%Z.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %C.6ff: type = class_type @C, @C(%Z.facet) [symbolic] +// CHECK:STDOUT: %Z.facet.05b: %Z.type = facet_value %as_type, (%Z.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %C.6ff: type = class_type @C, @C(%Z.facet.05b) [symbolic] // CHECK:STDOUT: %pattern_type.850: type = pattern_type %C.6ff [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%Self.ab9) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F: %I.WithSelf.F.type = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -141,6 +143,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: // CHECK:STDOUT: interface @Y { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = constants.%Self.162] +// CHECK:STDOUT: interface_with_self_decl @Y [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -151,6 +154,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -160,43 +164,44 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: %Self.loc15: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %Assoc: %Y.type = assoc_const_decl @Assoc [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%Assoc [concrete = constants.%assoc0] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { -// CHECK:STDOUT: %c.patt: @I.F.%pattern_type (%pattern_type.850) = value_binding_pattern c [concrete] -// CHECK:STDOUT: %c.param_patt: @I.F.%pattern_type (%pattern_type.850) = value_param_pattern %c.patt, call_param0 [concrete] +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F)] { +// CHECK:STDOUT: %c.patt: @I.WithSelf.F.%pattern_type (%pattern_type.850) = value_binding_pattern c [concrete] +// CHECK:STDOUT: %c.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.850) = value_param_pattern %c.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %c.param: @I.F.%C.loc24_18.1 (%C.6ff) = value_param call_param0 +// CHECK:STDOUT: %c.param: @I.WithSelf.F.%C.loc24_18.1 (%C.6ff) = value_param call_param0 // CHECK:STDOUT: %.loc24_18.2: type = splice_block %C.loc24_18.2 [symbolic = %C.loc24_18.1 (constants.%C.6ff)] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %impl.elem0.loc24_13.2: %Y.type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc24_13.1 (constants.%impl.elem0)] // CHECK:STDOUT: %Assoc.ref: %Y.type = name_ref Assoc, %impl.elem0.loc24_13.2 [symbolic = %impl.elem0.loc24_13.1 (constants.%impl.elem0)] // CHECK:STDOUT: %Assoc.as_type: type = facet_access_type %Assoc.ref [symbolic = %as_type (constants.%as_type)] -// CHECK:STDOUT: %Z.facet.loc24_18.2: %Z.type = facet_value %Assoc.as_type, (constants.%Z.lookup_impl_witness) [symbolic = %Z.facet.loc24_18.1 (constants.%Z.facet)] -// CHECK:STDOUT: %.loc24_18.3: %Z.type = converted %Assoc.ref, %Z.facet.loc24_18.2 [symbolic = %Z.facet.loc24_18.1 (constants.%Z.facet)] -// CHECK:STDOUT: %C.loc24_18.2: type = class_type @C, @C(constants.%Z.facet) [symbolic = %C.loc24_18.1 (constants.%C.6ff)] +// CHECK:STDOUT: %Z.facet.loc24_18.2: %Z.type = facet_value %Assoc.as_type, (constants.%Z.lookup_impl_witness) [symbolic = %Z.facet.loc24_18.1 (constants.%Z.facet.05b)] +// CHECK:STDOUT: %.loc24_18.3: %Z.type = converted %Assoc.ref, %Z.facet.loc24_18.2 [symbolic = %Z.facet.loc24_18.1 (constants.%Z.facet.05b)] +// CHECK:STDOUT: %C.loc24_18.2: type = class_type @C, @C(constants.%Z.facet.05b) [symbolic = %C.loc24_18.1 (constants.%C.6ff)] // CHECK:STDOUT: } -// CHECK:STDOUT: %c: @I.F.%C.loc24_18.1 (%C.6ff) = value_binding c, %c.param +// CHECK:STDOUT: %c: @I.WithSelf.F.%C.loc24_18.1 (%C.6ff) = value_binding c, %c.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %I.F.decl [concrete = constants.%assoc1] +// 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: .Self = %Self.loc15 +// CHECK:STDOUT: .Y = +// CHECK:STDOUT: .C = // CHECK:STDOUT: .Y = // CHECK:STDOUT: .Assoc = @Assoc.%assoc0 // CHECK:STDOUT: .C = // CHECK:STDOUT: .F = %assoc1 -// CHECK:STDOUT: witness = (%Assoc, %I.F.decl) +// CHECK:STDOUT: witness = (%Assoc, %I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @Assoc(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const Assoc:! %Y.type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic impl @T.as.Y.impl(%T.loc5_14.1: type) { // CHECK:STDOUT: %T.loc5_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc5_14.2 (constants.%T)] // CHECK:STDOUT: %Y.impl_witness.loc5_31.2: = impl_witness %Y.impl_witness_table, @T.as.Y.impl(%T.loc5_14.2) [symbolic = %Y.impl_witness.loc5_31.2 (constants.%Y.impl_witness)] @@ -244,18 +249,22 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc15: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc24_13.1: %Y.type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc24_13.1 (constants.%impl.elem0)] // CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.loc24_13.1 [symbolic = %as_type (constants.%as_type)] // CHECK:STDOUT: %.loc24_18.1: require_specific_def_type = require_specific_def @U.as.Z.impl(%as_type) [symbolic = %.loc24_18.1 (constants.%.bf4)] // CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %impl.elem0.loc24_13.1, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] -// CHECK:STDOUT: %Z.facet.loc24_18.1: %Z.type = facet_value %as_type, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc24_18.1 (constants.%Z.facet)] +// CHECK:STDOUT: %Z.facet.loc24_18.1: %Z.type = facet_value %as_type, (%Z.lookup_impl_witness) [symbolic = %Z.facet.loc24_18.1 (constants.%Z.facet.05b)] // CHECK:STDOUT: %C.loc24_18.1: type = class_type @C, @C(%Z.facet.loc24_18.1) [symbolic = %C.loc24_18.1 (constants.%C.6ff)] // CHECK:STDOUT: %pattern_type: type = pattern_type %C.loc24_18.1 [symbolic = %pattern_type (constants.%pattern_type.850)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%c.param: @I.F.%C.loc24_18.1 (%C.6ff)); +// CHECK:STDOUT: fn(%c.param: @I.WithSelf.F.%C.loc24_18.1 (%C.6ff)); +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%Self.162) { +// CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.Y.impl(constants.%T) { @@ -263,16 +272,28 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %Y.impl_witness.loc5_31.2 => constants.%Y.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%Y.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Self.c59) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @U.as.Z.impl(constants.%U) { // CHECK:STDOUT: %U.loc9_14.2 => constants.%U // CHECK:STDOUT: %Z.impl_witness.loc9_31.2 => constants.%Z.impl_witness.856 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Z.facet.f2d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%V) { // CHECK:STDOUT: %V.loc11_9.1 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Assoc(constants.%Self.ab9) {} +// CHECK:STDOUT: specific @I(constants.%Self.ab9) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @U.as.Z.impl(constants.%as_type) { // CHECK:STDOUT: %U.loc9_14.2 => constants.%as_type @@ -281,18 +302,18 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%Z.facet) { -// CHECK:STDOUT: %V.loc11_9.1 => constants.%Z.facet +// CHECK:STDOUT: specific @C(constants.%Z.facet.05b) { +// CHECK:STDOUT: %V.loc11_9.1 => constants.%Z.facet.05b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.ab9) { +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.ab9) { // CHECK:STDOUT: %Self => constants.%Self.ab9 // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness // CHECK:STDOUT: %impl.elem0.loc24_13.1 => constants.%impl.elem0 // CHECK:STDOUT: %as_type => constants.%as_type // CHECK:STDOUT: %.loc24_18.1 => constants.%.bf4 // CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.lookup_impl_witness -// CHECK:STDOUT: %Z.facet.loc24_18.1 => constants.%Z.facet +// CHECK:STDOUT: %Z.facet.loc24_18.1 => constants.%Z.facet.05b // CHECK:STDOUT: %C.loc24_18.1 => constants.%C.6ff // CHECK:STDOUT: %pattern_type => constants.%pattern_type.850 // CHECK:STDOUT: } @@ -313,27 +334,17 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %D: type = class_type @D, @D(%N) [symbolic] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.651: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %.Self.1dc: %I.type = symbolic_binding .Self [symbolic_self] -// CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.1dc [symbolic_self] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.8ff [concrete] -// CHECK:STDOUT: %I.lookup_impl_witness.c4b: = lookup_impl_witness %.Self.1dc, @I [symbolic_self] -// CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete] -// CHECK:STDOUT: %impl.elem0.66e: %Y.type = impl_witness_access %I.lookup_impl_witness.c4b, element0 [symbolic_self] -// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] -// CHECK:STDOUT: %Y.impl_witness.d43: = impl_witness imports.%Y.impl_witness_table, @T.as.Y.impl(%T) [symbolic] -// CHECK:STDOUT: %Y.impl_witness.980: = impl_witness imports.%Y.impl_witness_table, @T.as.Y.impl(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %empty_tuple.type, (%Y.impl_witness.980) [concrete] -// CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0.66e = %Y.facet> [concrete] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.a1f: type = fn_type @I.WithSelf.F, @I(%Self.651) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.cc3: %I.WithSelf.F.type.a1f = struct_value () [symbolic] // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] +// CHECK:STDOUT: %Self.ea3: %Z.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %I.lookup_impl_witness.99c: = lookup_impl_witness %Self.651, @I [symbolic] +// CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete] +// CHECK:STDOUT: %Self.d4d: %Y.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %impl.elem0.37f: %Y.type = impl_witness_access %I.lookup_impl_witness.99c, element0 [symbolic] // CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %impl.elem0.37f, @Z [symbolic] -// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0.37f [symbolic] -// CHECK:STDOUT: %Z.facet.fd6: %Z.type = facet_value %as_type, (%Z.lookup_impl_witness) [symbolic] +// CHECK:STDOUT: %as_type.124: type = facet_access_type %impl.elem0.37f [symbolic] +// CHECK:STDOUT: %Z.facet.fd6: %Z.type = facet_value %as_type.124, (%Z.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] // CHECK:STDOUT: %complete_type.782: = complete_type_witness %empty_tuple.type [concrete] @@ -342,8 +353,25 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %pattern_type.be3: type = pattern_type %C.ffe [symbolic] // CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %Z.impl_witness.856: = impl_witness imports.%Z.impl_witness_table, @U.as.Z.impl(%U) [symbolic] -// CHECK:STDOUT: %.3cb: require_specific_def_type = require_specific_def @U.as.Z.impl(%as_type) [symbolic] -// CHECK:STDOUT: %Z.impl_witness.907: = impl_witness imports.%Z.impl_witness_table, @U.as.Z.impl(%as_type) [symbolic] +// CHECK:STDOUT: %.3cb: require_specific_def_type = require_specific_def @U.as.Z.impl(%as_type.124) [symbolic] +// CHECK:STDOUT: %Z.impl_witness.907: = impl_witness imports.%Z.impl_witness_table, @U.as.Z.impl(%as_type.124) [symbolic] +// CHECK:STDOUT: %.Self.1dc: %I.type = symbolic_binding .Self [symbolic_self] +// CHECK:STDOUT: %I.lookup_impl_witness.c4b: = lookup_impl_witness %.Self.1dc, @I [symbolic_self] +// CHECK:STDOUT: %impl.elem0.66e: %Y.type = impl_witness_access %I.lookup_impl_witness.c4b, element0 [symbolic_self] +// CHECK:STDOUT: %as_type.ad8: type = facet_access_type %impl.elem0.66e [symbolic_self] +// CHECK:STDOUT: %Z.impl_witness.619: = impl_witness imports.%Z.impl_witness_table, @U.as.Z.impl(%as_type.ad8) [symbolic_self] +// CHECK:STDOUT: %.d02: require_specific_def_type = require_specific_def @U.as.Z.impl(%as_type.ad8) [symbolic_self] +// CHECK:STDOUT: %I.WithSelf.F.type.29d: type = fn_type @I.WithSelf.F, @I(%.Self.1dc) [symbolic_self] +// CHECK:STDOUT: %I.WithSelf.F.8ec: %I.WithSelf.F.type.29d = struct_value () [symbolic_self] +// CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.1dc [symbolic_self] +// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.c8f [concrete] +// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %Y.impl_witness.d43: = impl_witness imports.%Y.impl_witness_table, @T.as.Y.impl(%T) [symbolic] +// CHECK:STDOUT: %Y.impl_witness.980: = impl_witness imports.%Y.impl_witness_table, @T.as.Y.impl(%empty_tuple.type) [concrete] +// CHECK:STDOUT: %Y.facet: %Y.type = facet_value %empty_tuple.type, (%Y.impl_witness.980) [concrete] +// CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0.66e = %Y.facet> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @D.as.I.impl.%I.impl_witness_table, @D.as.I.impl(%N) [symbolic] // CHECK:STDOUT: %Z.impl_witness.db1: = impl_witness imports.%Z.impl_witness_table, @U.as.Z.impl(%empty_tuple.type) [concrete] // CHECK:STDOUT: %.194: require_specific_def_type = require_specific_def @U.as.Z.impl(%empty_tuple.type) [concrete] @@ -353,6 +381,8 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %D.as.I.impl.F.type: type = fn_type @D.as.I.impl.F, @D.as.I.impl(%N) [symbolic] // CHECK:STDOUT: %D.as.I.impl.F: %D.as.I.impl.F.type = struct_value () [symbolic] // CHECK:STDOUT: %I.facet: %I.type = facet_value %D, (%I.impl_witness) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.a33: type = fn_type @I.WithSelf.F, @I(%I.facet) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.b0f: %I.WithSelf.F.type.a33 = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -360,21 +390,12 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %Main.Z = import_ref Main//impl_def, Z, unloaded // CHECK:STDOUT: %Main.C: %C.type = import_ref Main//impl_def, C, loaded [concrete = constants.%C.generic] // CHECK:STDOUT: %Main.I: type = import_ref Main//impl_def, I, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//impl_def, loc15_13, unloaded -// CHECK:STDOUT: %Main.import_ref.32d: %I.assoc_type = import_ref Main//impl_def, loc16_12, loaded [concrete = constants.%assoc0] -// CHECK:STDOUT: %Main.import_ref.8d4 = import_ref Main//impl_def, loc24_20, unloaded +// CHECK:STDOUT: %Main.import_ref.414: %I.assoc_type = import_ref Main//impl_def, loc16_12, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.d7f = import_ref Main//impl_def, loc24_20, unloaded // CHECK:STDOUT: %Main.Assoc: %Y.type = import_ref Main//impl_def, Assoc, loaded [concrete = %Assoc] -// CHECK:STDOUT: %Main.F: %I.F.type = import_ref Main//impl_def, F, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %Main.import_ref.8ff: %Y.type = import_ref Main//impl_def, loc16_12, loaded [concrete = %Assoc] -// CHECK:STDOUT: %Main.import_ref.3e2 = import_ref Main//impl_def, loc4_13, unloaded -// CHECK:STDOUT: %Assoc: %Y.type = assoc_const_decl @Assoc [concrete] {} -// CHECK:STDOUT: %Main.import_ref.2362f8.1: %I.type = import_ref Main//impl_def, loc15_13, loaded [symbolic = constants.%Self.651] -// CHECK:STDOUT: %Main.import_ref.d1e: = import_ref Main//impl_def, loc5_31, loaded [symbolic = @T.as.Y.impl.%Y.impl_witness (constants.%Y.impl_witness.d43)] -// CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (), @T.as.Y.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.68d: type = import_ref Main//impl_def, loc5_24, loaded [symbolic = @T.as.Y.impl.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.87e: type = import_ref Main//impl_def, loc5_29, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//impl_def, loc5_14, loaded [symbolic = @T.as.Y.impl.%T (constants.%T)] +// CHECK:STDOUT: %Main.F: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.a1f) = import_ref Main//impl_def, F, loaded [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.cc3)] // CHECK:STDOUT: %Main.import_ref.69e = import_ref Main//impl_def, loc8_13, unloaded +// CHECK:STDOUT: %Main.import_ref.3e2 = import_ref Main//impl_def, loc4_13, unloaded // CHECK:STDOUT: %Main.import_ref.3fc: = import_ref Main//impl_def, loc13_1, loaded [concrete = constants.%complete_type.782] // CHECK:STDOUT: %Main.import_ref.70d = import_ref Main//impl_def, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.aa4: %Z.type = import_ref Main//impl_def, loc11_9, loaded [symbolic = @C.%V (constants.%V)] @@ -382,8 +403,16 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %Z.impl_witness_table = impl_witness_table (), @U.as.Z.impl [concrete] // CHECK:STDOUT: %Main.import_ref.b7a: type = import_ref Main//impl_def, loc9_24, loaded [symbolic = @U.as.Z.impl.%U (constants.%U)] // CHECK:STDOUT: %Main.import_ref.926: type = import_ref Main//impl_def, loc9_29, loaded [concrete = constants.%Z.type] -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//impl_def, loc9_14, loaded [symbolic = @U.as.Z.impl.%U (constants.%U)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//impl_def, loc9_14, loaded [symbolic = @U.as.Z.impl.%U (constants.%U)] // CHECK:STDOUT: %Main.import_ref.2362f8.2: %I.type = import_ref Main//impl_def, loc15_13, loaded [symbolic = constants.%Self.651] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//impl_def, loc15_13, unloaded +// CHECK:STDOUT: %Main.import_ref.c8f: %Y.type = import_ref Main//impl_def, loc16_12, loaded [concrete = %Assoc] +// CHECK:STDOUT: %Assoc: %Y.type = assoc_const_decl @Assoc [concrete] {} +// CHECK:STDOUT: %Main.import_ref.d1e: = import_ref Main//impl_def, loc5_31, loaded [symbolic = @T.as.Y.impl.%Y.impl_witness (constants.%Y.impl_witness.d43)] +// CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (), @T.as.Y.impl [concrete] +// CHECK:STDOUT: %Main.import_ref.68d: type = import_ref Main//impl_def, loc5_24, loaded [symbolic = @T.as.Y.impl.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.87e: type = import_ref Main//impl_def, loc5_29, loaded [concrete = constants.%Y.type] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//impl_def, loc5_14, loaded [symbolic = @T.as.Y.impl.%T (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -417,7 +446,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.1dc] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc20_37: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %Assoc.ref: %I.assoc_type = name_ref Assoc, imports.%Main.import_ref.32d [concrete = constants.%assoc0] +// CHECK:STDOUT: %Assoc.ref: %I.assoc_type = name_ref Assoc, imports.%Main.import_ref.414 [concrete = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: %Y.type = impl_witness_access constants.%I.lookup_impl_witness.c4b, element0 [symbolic_self = constants.%impl.elem0.66e] // CHECK:STDOUT: %.loc20_47.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %Y.facet: %Y.type = facet_value constants.%empty_tuple.type, (constants.%Y.impl_witness.980) [concrete = constants.%Y.facet] @@ -437,21 +466,13 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: interface @I [from "impl_def.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .Assoc = imports.%Main.import_ref.32d -// CHECK:STDOUT: .F = imports.%Main.import_ref.8d4 +// CHECK:STDOUT: .Assoc = imports.%Main.import_ref.414 +// CHECK:STDOUT: .F = imports.%Main.import_ref.d7f // CHECK:STDOUT: witness = (imports.%Main.Assoc, imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: interface @Y [from "impl_def.carbon"] { -// CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Main.import_ref.3e2 -// CHECK:STDOUT: witness = () -// CHECK:STDOUT: -// CHECK:STDOUT: !requires: -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: interface @Z [from "impl_def.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.69e @@ -460,23 +481,15 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @Assoc(imports.%Main.import_ref.2362f8.1: %I.type) [from "impl_def.carbon"] { -// CHECK:STDOUT: assoc_const Assoc:! %Y.type; +// CHECK:STDOUT: interface @Y [from "impl_def.carbon"] { +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = imports.%Main.import_ref.3e2 +// CHECK:STDOUT: witness = () +// CHECK:STDOUT: +// CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic impl @T.as.Y.impl(imports.%Main.import_ref.b3bc94.1: type) [from "impl_def.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Y.impl_witness: = impl_witness imports.%Y.impl_witness_table, @T.as.Y.impl(%T) [symbolic = %Y.impl_witness (constants.%Y.impl_witness.d43)] -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: -// CHECK:STDOUT: impl: imports.%Main.import_ref.68d as imports.%Main.import_ref.87e { -// CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = imports.%Main.import_ref.d1e -// CHECK:STDOUT: } -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic impl @U.as.Z.impl(imports.%Main.import_ref.b3bc94.2: type) [from "impl_def.carbon"] { +// CHECK:STDOUT: generic impl @U.as.Z.impl(imports.%Main.import_ref.b3bc94.1: type) [from "impl_def.carbon"] { // CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %Z.impl_witness: = impl_witness imports.%Z.impl_witness_table, @U.as.Z.impl(%U) [symbolic = %Z.impl_witness (constants.%Z.impl_witness.856)] // CHECK:STDOUT: @@ -488,6 +501,18 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: generic impl @T.as.Y.impl(imports.%Main.import_ref.b3bc94.2: type) [from "impl_def.carbon"] { +// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness imports.%Y.impl_witness_table, @T.as.Y.impl(%T) [symbolic = %Y.impl_witness (constants.%Y.impl_witness.d43)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: impl: imports.%Main.import_ref.68d as imports.%Main.import_ref.87e { +// CHECK:STDOUT: !members: +// CHECK:STDOUT: witness = imports.%Main.import_ref.d1e +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: generic impl @D.as.I.impl(%N.loc20_14.2: %E) { // CHECK:STDOUT: %N.loc20_14.1: %E = symbolic_binding N, 0 [symbolic = %N.loc20_14.1 (constants.%N)] // CHECK:STDOUT: %D.loc20_24.1: type = class_type @D, @D(%N.loc20_14.1) [symbolic = %D.loc20_24.1 (constants.%D)] @@ -558,11 +583,11 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.2362f8.2: %I.type) [from "impl_def.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.F(imports.%Main.import_ref.2362f8.2: %I.type) [from "impl_def.carbon"] { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.651)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness.99c)] // CHECK:STDOUT: %impl.elem0: %Y.type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0 (constants.%impl.elem0.37f)] -// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0 [symbolic = %as_type (constants.%as_type)] +// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0 [symbolic = %as_type (constants.%as_type.124)] // CHECK:STDOUT: %.1: require_specific_def_type = require_specific_def @U.as.Z.impl(%as_type) [symbolic = %.1 (constants.%.3cb)] // CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %impl.elem0, @Z [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness)] // CHECK:STDOUT: %Z.facet: %Z.type = facet_value %as_type, (%Z.lookup_impl_witness) [symbolic = %Z.facet (constants.%Z.facet.fd6)] @@ -585,9 +610,74 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %N.loc7_9.1 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Assoc(constants.%Self.651) {} +// CHECK:STDOUT: specific @I(constants.%Self.651) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.651 +// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness.99c +// CHECK:STDOUT: %impl.elem0 => constants.%impl.elem0.37f +// CHECK:STDOUT: %as_type => constants.%as_type.124 +// CHECK:STDOUT: %.1 => constants.%.3cb +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.a1f +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.cc3 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Assoc(constants.%.Self.1dc) {} +// CHECK:STDOUT: specific @Z(constants.%Self.ea3) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%Self.d4d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%V) { +// CHECK:STDOUT: %V => constants.%V +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%Z.facet.fd6) { +// CHECK:STDOUT: %V => constants.%Z.facet.fd6 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @U.as.Z.impl(constants.%U) { +// CHECK:STDOUT: %U => constants.%U +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.856 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @U.as.Z.impl(constants.%as_type.124) { +// CHECK:STDOUT: %U => constants.%as_type.124 +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.907 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.651) { +// CHECK:STDOUT: %Self => constants.%Self.651 +// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness.99c +// CHECK:STDOUT: %impl.elem0 => constants.%impl.elem0.37f +// CHECK:STDOUT: %as_type => constants.%as_type.124 +// CHECK:STDOUT: %.1 => constants.%.3cb +// CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.lookup_impl_witness +// CHECK:STDOUT: %Z.facet => constants.%Z.facet.fd6 +// CHECK:STDOUT: %C => constants.%C.ffe +// CHECK:STDOUT: %pattern_type => constants.%pattern_type.be3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%.Self.1dc) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%.Self.1dc +// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness.c4b +// CHECK:STDOUT: %impl.elem0 => constants.%impl.elem0.66e +// CHECK:STDOUT: %as_type => constants.%as_type.ad8 +// CHECK:STDOUT: %.1 => constants.%.d02 +// 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 @U.as.Z.impl(constants.%as_type.ad8) { +// CHECK:STDOUT: %U => constants.%as_type.ad8 +// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.619 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.Y.impl(constants.%T) { // CHECK:STDOUT: %T => constants.%T @@ -611,38 +701,6 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: %D.as.I.impl.F => constants.%D.as.I.impl.F // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%V) { -// CHECK:STDOUT: %V => constants.%V -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%Z.facet.fd6) { -// CHECK:STDOUT: %V => constants.%Z.facet.fd6 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @U.as.Z.impl(constants.%U) { -// CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.856 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @U.as.Z.impl(constants.%as_type) { -// CHECK:STDOUT: %U => constants.%as_type -// CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.907 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.651) { -// CHECK:STDOUT: %Self => constants.%Self.651 -// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness.99c -// CHECK:STDOUT: %impl.elem0 => constants.%impl.elem0.37f -// CHECK:STDOUT: %as_type => constants.%as_type -// CHECK:STDOUT: %.1 => constants.%.3cb -// CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.lookup_impl_witness -// CHECK:STDOUT: %Z.facet => constants.%Z.facet.fd6 -// CHECK:STDOUT: %C => constants.%C.ffe -// CHECK:STDOUT: %pattern_type => constants.%pattern_type.be3 -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: specific @U.as.Z.impl(constants.%empty_tuple.type) { // CHECK:STDOUT: %U => constants.%empty_tuple.type // CHECK:STDOUT: %Z.impl_witness => constants.%Z.impl_witness.db1 @@ -658,7 +716,18 @@ impl forall [N:! E] D(N) as I where .Assoc = () { // CHECK:STDOUT: // CHECK:STDOUT: specific @D.as.I.impl.F(constants.%N) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness +// CHECK:STDOUT: %impl.elem0 => constants.%Y.facet +// CHECK:STDOUT: %as_type => constants.%empty_tuple.type +// CHECK:STDOUT: %.1 => constants.%.194 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.a33 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.b0f +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet) { // CHECK:STDOUT: %Self => constants.%I.facet // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness // CHECK:STDOUT: %impl.elem0 => constants.%Y.facet diff --git a/toolchain/check/testdata/impl/import_thunk.carbon b/toolchain/check/testdata/impl/import_thunk.carbon index b9e4b0996150..4c7361f5a9fe 100644 --- a/toolchain/check/testdata/impl/import_thunk.carbon +++ b/toolchain/check/testdata/impl/import_thunk.carbon @@ -49,10 +49,10 @@ fn G() { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F: %I.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -72,8 +72,11 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { +// CHECK:STDOUT: %Self.loc4: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F)] { // CHECK:STDOUT: %x.patt: %pattern_type = value_binding_pattern x [concrete] // CHECK:STDOUT: %x.param_patt: %pattern_type = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { @@ -84,21 +87,23 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc4: %I.type) { // CHECK:STDOUT: fn(%x.param: %empty_struct_type); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: @@ -118,29 +123,33 @@ fn G() { // CHECK:STDOUT: %C.c8540f.2: type = class_type @C, @C(%Y) [symbolic] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.651: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table, @C.as.I.impl(%Y) [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.a1f: type = fn_type @I.WithSelf.F, @I(%Self.651) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.cc3: %I.WithSelf.F.type.a1f = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table, @C.as.I.impl(%Y) [symbolic] // CHECK:STDOUT: %pattern_type.fb2: type = pattern_type %C.c8540f.2 [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.type.cf838e.1: type = fn_type @C.as.I.impl.F.loc8_17.1, @C.as.I.impl(%Y) [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.421e41.1: %C.as.I.impl.F.type.cf838e.1 = struct_value () [symbolic] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C.c8540f.2, (%I.impl_witness) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.81b: type = fn_type @I.WithSelf.F, @I(%I.facet) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.848: %I.WithSelf.F.type.81b = struct_value () [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.type.cf838e.2: type = fn_type @C.as.I.impl.F.loc8_17.2, @C.as.I.impl(%Y) [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.421e41.2: %C.as.I.impl.F.type.cf838e.2 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %C.c8540f.2 [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.specific_fn: = specific_function %C.as.I.impl.F.421e41.1, @C.as.I.impl.F.loc8_17.1(%Y) [symbolic] // CHECK:STDOUT: %C.val: %C.c8540f.2 = struct_value () [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %Self.765: %Destroy.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.cb2: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Self.765) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.9f1: %Destroy.WithSelf.Op.type.cb2 = struct_value () [symbolic] // CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] -// CHECK:STDOUT: %assoc0: %Destroy.assoc_type = assoc_entity element0, imports.%Core.import_ref.971 [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] -// CHECK:STDOUT: %Destroy.Op: %Destroy.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %assoc0: %Destroy.assoc_type = assoc_entity element0, imports.%Core.import_ref.8bb [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %C.c8540f.2, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C.c8540f.2, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.304: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.304 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.155: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %.371: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.155, %Destroy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.371 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -150,13 +159,13 @@ fn G() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } +// CHECK:STDOUT: %Main.import_ref.7f4 = import_ref Main//a, loc5_14, unloaded +// CHECK:STDOUT: %Main.F: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.a1f) = import_ref Main//a, F, loaded [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.cc3)] +// CHECK:STDOUT: %Main.import_ref.2362f8.2: %I.type = import_ref Main//a, loc4_13, loaded [symbolic = constants.%Self.651] // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//a, loc4_13, unloaded -// CHECK:STDOUT: %Main.import_ref.ef2 = import_ref Main//a, loc5_14, unloaded -// CHECK:STDOUT: %Main.F: %I.F.type = import_ref Main//a, F, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//a, loc4_13, loaded [symbolic = constants.%Self.651] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.446: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc0] -// CHECK:STDOUT: %Core.import_ref.971: %Destroy.Op.type = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [concrete = constants.%Destroy.Op] +// CHECK:STDOUT: %Core.import_ref.06b: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Core.import_ref.8bb: @Destroy.%Destroy.WithSelf.Op.type (%Destroy.WithSelf.Op.type.cb2) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.%Destroy.WithSelf.Op (constants.%Destroy.WithSelf.Op.9f1)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -196,7 +205,7 @@ fn G() { // CHECK:STDOUT: interface @I [from "a.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .F = imports.%Main.import_ref.ef2 +// CHECK:STDOUT: .F = imports.%Main.import_ref.7f4 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -258,7 +267,7 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.236: %I.type) [from "a.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.F(imports.%Main.import_ref.2362f8.2: %I.type) [from "a.carbon"] { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: @@ -287,9 +296,10 @@ fn G() { // CHECK:STDOUT: %C.val: @C.as.I.impl.F.loc8_17.2.%C (%C.c8540f.2) = struct_value () [symbolic = %C.val (constants.%C.val)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %C, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)] -// CHECK:STDOUT: %.6: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.6 (constants.%.304)] -// CHECK:STDOUT: %impl.elem0.2: @C.as.I.impl.F.loc8_17.2.%.6 (%.304) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.2: = specific_impl_function %impl.elem0.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.155)] +// CHECK:STDOUT: %.6: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.6 (constants.%.371)] +// CHECK:STDOUT: %impl.elem0.2: @C.as.I.impl.F.loc8_17.2.%.6 (%.371) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.2: = specific_impl_function %impl.elem0.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: %empty_struct_type) [thunk @C.as.I.impl.%C.as.I.impl.F.decl.loc8_17.1] { // CHECK:STDOUT: !entry: @@ -303,12 +313,12 @@ fn G() { // CHECK:STDOUT: %.4: ref @C.as.I.impl.F.loc8_17.2.%C (%C.c8540f.2) = converted %x.ref, %.3 // CHECK:STDOUT: %.5: @C.as.I.impl.F.loc8_17.2.%C (%C.c8540f.2) = acquire_value %.4 // CHECK:STDOUT: %C.as.I.impl.F.call: init %empty_tuple.type = call %C.as.I.impl.F.specific_fn.loc8_17.1(%.5) -// CHECK:STDOUT: %Op.ref: %Destroy.assoc_type = name_ref Op, imports.%Core.import_ref.446 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.1: @C.as.I.impl.F.loc8_17.2.%.6 (%.304) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %Op.ref: %Destroy.assoc_type = name_ref Op, imports.%Core.import_ref.06b [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0.1: @C.as.I.impl.F.loc8_17.2.%.6 (%.371) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.1: = bound_method %.3, %impl.elem0.1 -// CHECK:STDOUT: %specific_impl_fn.1: = specific_impl_function %impl.elem0.1, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.1: = specific_impl_function %impl.elem0.1, @Destroy.WithSelf.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.2: = bound_method %.3, %specific_impl_fn.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.2(%.3) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.2(%.3) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -323,6 +333,15 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self.651) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.651 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.a1f +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.cc3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.651) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl(constants.%Y) { // CHECK:STDOUT: %Y.loc7_14.1 => constants.%Y // CHECK:STDOUT: %C.loc7_25.1 => constants.%C.c8540f.2 @@ -335,8 +354,6 @@ fn G() { // CHECK:STDOUT: %C.as.I.impl.F.loc8_17.2 => constants.%C.as.I.impl.F.421e41.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.651) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.F.loc8_17.1(constants.%Y) { // CHECK:STDOUT: %Y => constants.%Y // CHECK:STDOUT: %C.loc8_14.1 => constants.%C.c8540f.2 @@ -346,7 +363,14 @@ fn G() { // CHECK:STDOUT: %require_complete => constants.%require_complete // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet) {} +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.81b +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.848 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.F.loc8_17.2(constants.%Y) {} // CHECK:STDOUT: @@ -365,10 +389,10 @@ fn G() { // CHECK:STDOUT: %C.387: type = class_type @C, @C(%empty_tuple) [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.651: %I.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.a1f: type = fn_type @I.WithSelf.F, @I(%Self.651) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.cc3: %I.WithSelf.F.type.a1f = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.a72: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.b58 [concrete] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %assoc0.a42: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.972 [concrete] // CHECK:STDOUT: %Y: %empty_tuple.type = symbolic_binding Y, 0 [symbolic] // CHECK:STDOUT: %C.c8540f.2: type = class_type @C, @C(%Y) [symbolic] // CHECK:STDOUT: %I.impl_witness.a8f: = impl_witness imports.%I.impl_witness_table, @C.as.I.impl(%Y) [symbolic] @@ -377,14 +401,14 @@ fn G() { // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %C.c8540f.2, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.3bf: %Destroy.type = facet_value %C.c8540f.2, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] -// CHECK:STDOUT: %.281: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.3bf [symbolic] -// CHECK:STDOUT: %impl.elem0: %.281 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.696: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.3bf) [symbolic] +// CHECK:STDOUT: %.634: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.696, %Destroy.facet.3bf [symbolic] +// CHECK:STDOUT: %impl.elem0: %.634 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.type.cf838e.2: type = fn_type @C.as.I.impl.F.2, @C.as.I.impl(%Y) [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.421e41.2: %C.as.I.impl.F.type.cf838e.2 = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.fb2: type = pattern_type %C.c8540f.2 [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %C.c8540f.2 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet.3bf) [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet.3bf) [symbolic] // CHECK:STDOUT: %C.val.6cb: %C.c8540f.2 = struct_value () [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.specific_fn.23d: = specific_function %C.as.I.impl.F.421e41.2, @C.as.I.impl.F.2(%Y) [symbolic] // CHECK:STDOUT: %I.impl_witness.ead: = impl_witness imports.%I.impl_witness_table, @C.as.I.impl(%empty_tuple) [concrete] @@ -393,7 +417,9 @@ fn G() { // CHECK:STDOUT: %C.as.I.impl.F.type.0e1915.2: type = fn_type @C.as.I.impl.F.1, @C.as.I.impl(%empty_tuple) [concrete] // CHECK:STDOUT: %C.as.I.impl.F.fcfec4.2: %C.as.I.impl.F.type.0e1915.2 = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C.387, (%I.impl_witness.ead) [concrete] -// CHECK:STDOUT: %.243: type = fn_type_with_self_type %I.F.type, %I.facet [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.99c: type = fn_type @I.WithSelf.F, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.8d9: %I.WithSelf.F.type.99c = struct_value () [concrete] +// CHECK:STDOUT: %.e94: type = fn_type_with_self_type %I.WithSelf.F.type.99c, %I.facet [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %C.as.I.impl.F.specific_fn.a77113.1: = specific_function %C.as.I.impl.F.fcfec4.2, @C.as.I.impl.F.1(%empty_tuple) [concrete] // CHECK:STDOUT: %pattern_type.678: type = pattern_type %C.387 [concrete] @@ -403,7 +429,8 @@ fn G() { // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.854: = custom_witness (%DestroyOp), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.d0a: %Destroy.type = facet_value %C.387, (%custom_witness.854) [concrete] -// CHECK:STDOUT: %.338: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.d0a [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.7b3: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.d0a) [concrete] +// CHECK:STDOUT: %.212: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.7b3, %Destroy.facet.d0a [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -417,11 +444,11 @@ fn G() { // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//b, loc5_18, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.dbf = import_ref Main//b, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.c90e1a.1: %empty_tuple.type = import_ref Main//b, loc5_9, loaded [symbolic = @C.%X (constants.%X)] +// CHECK:STDOUT: %Main.import_ref.a54: %I.assoc_type = import_ref Main//a, loc5_14, loaded [concrete = constants.%assoc0.a42] +// CHECK:STDOUT: %Main.F.768 = import_ref Main//a, F, unloaded +// CHECK:STDOUT: %Main.import_ref.2362f8.2: %I.type = import_ref Main//a, loc4_13, loaded [symbolic = constants.%Self.651] // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//a, loc4_13, unloaded -// CHECK:STDOUT: %Main.import_ref.ce7: %I.assoc_type = import_ref Main//a, loc5_14, loaded [concrete = constants.%assoc0.a72] -// CHECK:STDOUT: %Main.F.ff3 = import_ref Main//a, F, unloaded -// CHECK:STDOUT: %Main.import_ref.b58: %I.F.type = import_ref Main//a, loc5_14, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//a, loc4_13, loaded [symbolic = constants.%Self.651] +// CHECK:STDOUT: %Main.import_ref.972: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.a1f) = import_ref Main//a, loc5_14, loaded [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.cc3)] // CHECK:STDOUT: %Main.import_ref.e97: = import_ref Main//b, loc7_32, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.a8f)] // CHECK:STDOUT: %Main.import_ref.045: @C.as.I.impl.%C.as.I.impl.F.type.2 (%C.as.I.impl.F.type.cf838e.1) = import_ref Main//b, loc8_17, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F.2 (constants.%C.as.I.impl.F.421e41.1)] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.045), @C.as.I.impl [concrete] @@ -449,8 +476,8 @@ fn G() { // CHECK:STDOUT: interface @I [from "a.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .F = imports.%Main.import_ref.ce7 -// CHECK:STDOUT: witness = (imports.%Main.F.ff3) +// CHECK:STDOUT: .F = imports.%Main.import_ref.a54 +// CHECK:STDOUT: witness = (imports.%Main.F.768) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -493,10 +520,10 @@ fn G() { // CHECK:STDOUT: %.loc7_7: %empty_tuple.type = converted %.loc7_6, %empty_tuple [concrete = constants.%empty_tuple] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_tuple) [concrete = constants.%C.387] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] -// CHECK:STDOUT: %F.ref.loc7_11: %I.assoc_type = name_ref F, imports.%Main.import_ref.ce7 [concrete = constants.%assoc0.a72] +// CHECK:STDOUT: %F.ref.loc7_11: %I.assoc_type = name_ref F, imports.%Main.import_ref.a54 [concrete = constants.%assoc0.a42] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (constants.%I.impl_witness.ead) [concrete = constants.%I.facet] // CHECK:STDOUT: %.loc7_8: %I.type = converted %C, %I.facet [concrete = constants.%I.facet] -// CHECK:STDOUT: %impl.elem0: %.243 = impl_witness_access constants.%I.impl_witness.ead, element0 [concrete = constants.%C.as.I.impl.F.fcfec4.2] +// CHECK:STDOUT: %impl.elem0: %.e94 = impl_witness_access constants.%I.impl_witness.ead, element0 [concrete = constants.%C.as.I.impl.F.fcfec4.2] // CHECK:STDOUT: %.loc7_16.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %empty_struct.loc7_16.1: %empty_struct_type = struct_value () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc7_17.1: %empty_struct_type = converted %.loc7_16.1, %empty_struct.loc7_16.1 [concrete = constants.%empty_struct] @@ -517,7 +544,7 @@ fn G() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.236: %I.type) [from "a.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.F(imports.%Main.import_ref.2362f8.2: %I.type) [from "a.carbon"] { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: @@ -532,9 +559,10 @@ fn G() { // CHECK:STDOUT: %C.val: @C.as.I.impl.F.1.%C (%C.c8540f.2) = struct_value () [symbolic = %C.val (constants.%C.val.6cb)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %C, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %C, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.3bf)] -// CHECK:STDOUT: %.1: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.1 (constants.%.281)] -// CHECK:STDOUT: %impl.elem0: @C.as.I.impl.F.1.%.1 (%.281) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.696)] +// CHECK:STDOUT: %.1: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.1 (constants.%.634)] +// CHECK:STDOUT: %impl.elem0: @C.as.I.impl.F.1.%.1 (%.634) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn [thunk imports.%Main.F.13b]; // CHECK:STDOUT: } @@ -562,7 +590,14 @@ fn G() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.651) {} +// CHECK:STDOUT: specific @I(constants.%Self.651) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.651 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.a1f +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.cc3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.651) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%Y) { // CHECK:STDOUT: %X => constants.%Y @@ -605,6 +640,13 @@ fn G() { // CHECK:STDOUT: %C.as.I.impl.F.2 => constants.%C.as.I.impl.F.fcfec4.2 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.99c +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.8d9 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.F.1(constants.%empty_tuple) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Y => constants.%empty_tuple @@ -616,7 +658,8 @@ fn G() { // CHECK:STDOUT: %C.val => constants.%C.val.135 // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.854 // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.d0a -// CHECK:STDOUT: %.1 => constants.%.338 +// CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.7b3 +// CHECK:STDOUT: %.1 => constants.%.212 // CHECK:STDOUT: %impl.elem0 => constants.%DestroyOp // CHECK:STDOUT: %specific_impl_fn => constants.%DestroyOp // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_use_generic.carbon b/toolchain/check/testdata/impl/import_use_generic.carbon index 231a4b14f69a..9b07f6e0d855 100644 --- a/toolchain/check/testdata/impl/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/import_use_generic.carbon @@ -67,14 +67,16 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.705: %I.WithSelf.F.type.08c = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table, @C.as.I.impl(%T) [symbolic] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F, @C.as.I.impl(%T) [symbolic] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [symbolic] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.c16: type = fn_type @I.WithSelf.F, @I(%I.facet) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.708: %I.WithSelf.F.type.c16 = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -102,14 +104,17 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] {} {} -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc6: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.705)] {} {} +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc6 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -148,7 +153,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc6: %I.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -165,7 +170,14 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %T.loc4_9.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc7 => constants.%Self +// 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) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl(constants.%T) { // CHECK:STDOUT: %T.loc10_14.1 => constants.%T @@ -179,7 +191,14 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.F(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet) {} +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc7 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.c16 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.708 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_use_in_fn_decl.carbon // CHECK:STDOUT: @@ -197,10 +216,10 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %C.val: %C.850 = struct_value () [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.a1f: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.cc3: %I.WithSelf.F.type.a1f = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.b58 [concrete] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.972 [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %I.impl_witness.e33: = impl_witness imports.%I.impl_witness_table, @C.as.I.impl(%T) [symbolic] @@ -210,7 +229,9 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %C.as.I.impl.F.type.b66: type = fn_type @C.as.I.impl.F, @C.as.I.impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %C.as.I.impl.F.930: %C.as.I.impl.F.type.b66 = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C.850, (%I.impl_witness.79b) [concrete] -// CHECK:STDOUT: %.7ef: type = fn_type_with_self_type %I.F.type, %I.facet [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.ca6: type = fn_type @I.WithSelf.F, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.ed7: %I.WithSelf.F.type.ca6 = struct_value () [concrete] +// CHECK:STDOUT: %.864: type = fn_type_with_self_type %I.WithSelf.F.type.ca6, %I.facet [concrete] // CHECK:STDOUT: %C.as.I.impl.F.specific_fn: = specific_function %C.as.I.impl.F.930, @C.as.I.impl.F(%empty_struct_type) [concrete] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] @@ -222,11 +243,11 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//import_generic, loc4_20, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.820 = import_ref Main//import_generic, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//import_generic, loc4_9, loaded [symbolic = @C.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//import_generic, loc6_13, unloaded -// CHECK:STDOUT: %Main.import_ref.ce7: %I.assoc_type = import_ref Main//import_generic, loc7_9, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Main.import_ref.a54: %I.assoc_type = import_ref Main//import_generic, loc7_9, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %Main.F = import_ref Main//import_generic, F, unloaded -// CHECK:STDOUT: %Main.import_ref.b58: %I.F.type = import_ref Main//import_generic, loc7_9, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//import_generic, loc6_13, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.2362f8.2: %I.type = import_ref Main//import_generic, loc6_13, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//import_generic, loc6_13, unloaded +// CHECK:STDOUT: %Main.import_ref.972: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.a1f) = import_ref Main//import_generic, loc7_9, loaded [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.cc3)] // CHECK:STDOUT: %Main.import_ref.ce3: = import_ref Main//import_generic, loc10_34, loaded [symbolic = @C.as.I.impl.%I.impl_witness (constants.%I.impl_witness.e33)] // CHECK:STDOUT: %Main.import_ref.870: @C.as.I.impl.%C.as.I.impl.F.type (%C.as.I.impl.F.type.ec1) = import_ref Main//import_generic, loc11_10, loaded [symbolic = @C.as.I.impl.%C.as.I.impl.F (constants.%C.as.I.impl.F.983)] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.870), @C.as.I.impl [concrete] @@ -260,7 +281,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {} { // CHECK:STDOUT: %c.ref: ref %C.850 = name_ref c, file.%c [concrete = file.%c.var] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] -// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%Main.import_ref.ce7 [concrete = constants.%assoc0] +// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%Main.import_ref.a54 [concrete = constants.%assoc0] // CHECK:STDOUT: %.loc16: %I.type = converted %c.ref, [concrete = ] // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [concrete = constants.%H] {} { @@ -269,10 +290,10 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %.loc25_15: type = converted %.loc25_14, 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: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] -// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%Main.import_ref.ce7 [concrete = constants.%assoc0] +// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%Main.import_ref.a54 [concrete = constants.%assoc0] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (constants.%I.impl_witness.79b) [concrete = constants.%I.facet] // CHECK:STDOUT: %.loc25_16: %I.type = converted %C, %I.facet [concrete = constants.%I.facet] -// CHECK:STDOUT: %impl.elem0: %.7ef = impl_witness_access constants.%I.impl_witness.79b, element0 [concrete = constants.%C.as.I.impl.F.930] +// CHECK:STDOUT: %impl.elem0: %.864 = impl_witness_access constants.%I.impl_witness.79b, element0 [concrete = constants.%C.as.I.impl.F.930] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @C.as.I.impl.F(constants.%empty_struct_type) [concrete = constants.%C.as.I.impl.F.specific_fn] // CHECK:STDOUT: %C.as.I.impl.F.call: init %empty_tuple.type = call %specific_fn() // CHECK:STDOUT: %.loc25_23: type = converted %C.as.I.impl.F.call, [concrete = ] @@ -282,7 +303,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: interface @I [from "import_generic.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .F = imports.%Main.import_ref.ce7 +// CHECK:STDOUT: .F = imports.%Main.import_ref.a54 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -316,7 +337,7 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.236: %I.type) [from "import_generic.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.F(imports.%Main.import_ref.2362f8.2: %I.type) [from "import_generic.carbon"] { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: @@ -353,7 +374,14 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.a1f +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.cc3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl(constants.%T) { // CHECK:STDOUT: %T => constants.%T @@ -377,6 +405,13 @@ fn H() -> C({}).(I.F)() {} // CHECK:STDOUT: %C.as.I.impl.F => constants.%C.as.I.impl.F.930 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.ca6 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.ed7 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.I.impl.F(constants.%empty_struct_type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/incomplete.carbon b/toolchain/check/testdata/impl/incomplete.carbon index ddc5ae9c86eb..bdc5bf44ae00 100644 --- a/toolchain/check/testdata/impl/incomplete.carbon +++ b/toolchain/check/testdata/impl/incomplete.carbon @@ -416,6 +416,9 @@ interface B { // CHECK:STDOUT: // CHECK:STDOUT: interface @K { // CHECK:STDOUT: %Self: %K.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @K [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %X: type = assoc_const_decl @X [concrete] { // CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, @K.%X [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -428,10 +431,6 @@ interface B { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @X(@K.%Self: %K.type) { -// CHECK:STDOUT: assoc_const X:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: class @C { // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] // CHECK:STDOUT: complete_type_witness = %complete_type @@ -440,7 +439,7 @@ interface B { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%Self) {} +// CHECK:STDOUT: specific @K(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: --- incomplete_where.carbon // CHECK:STDOUT: @@ -455,6 +454,7 @@ interface B { // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] // CHECK:STDOUT: %I_where.type: type = facet_type <@I where .Self impls @Incomplete> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -483,6 +483,7 @@ interface B { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -509,6 +510,14 @@ interface B { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- declaration_incomplete_where_rewrite.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -528,6 +537,7 @@ interface B { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %J_where.type: type = facet_type <@J where .Self impls @Incomplete and %impl.elem0 = %empty_tuple.type> [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness @C.as.J.impl.%J.impl_witness_table [concrete] +// CHECK:STDOUT: %J.facet: %J.type = facet_value %C, (%J.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -585,6 +595,9 @@ interface B { // CHECK:STDOUT: // CHECK:STDOUT: interface @J { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @J [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%T [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -599,10 +612,6 @@ interface B { // CHECK:STDOUT: // CHECK:STDOUT: interface @Incomplete; // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@J.%Self: %J.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C.as.J.impl: %C.ref.loc8 as %.loc8_13 { // CHECK:STDOUT: %J.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @C.as.J.impl [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness] @@ -620,9 +629,17 @@ interface B { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @J(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @J(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%J.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_declaration_lookup_into_incomplete.carbon // CHECK:STDOUT: @@ -639,6 +656,7 @@ interface B { // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -667,6 +685,7 @@ interface B { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -702,6 +721,14 @@ interface B { // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.I.impl.F() -> ; // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_unidentified_constraint.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -800,10 +827,13 @@ interface B { // CHECK:STDOUT: // CHECK:STDOUT: interface @X { // CHECK:STDOUT: %Self: %X.type = symbolic_binding Self, 0 [symbolic = constants.%Self.e52] +// CHECK:STDOUT: interface_with_self_decl @X [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %X1: type = assoc_const_decl @X1 [concrete] { // CHECK:STDOUT: %assoc0: %X.assoc_type = assoc_entity element0, @X.%X1 [concrete = constants.%assoc0] // CHECK:STDOUT: } -// CHECK:STDOUT: %X.Self.binding.as_type.impls.Y.type.require.decl = require_decl @X.Self.binding.as_type.impls.Y.type.require [concrete] { +// CHECK:STDOUT: %X.WithSelf.Self.binding.as_type.impls.Y.type.require.decl = require_decl @X.WithSelf.Self.binding.as_type.impls.Y.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %Y.ref // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @X.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.806)] @@ -812,19 +842,23 @@ interface B { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Y = // CHECK:STDOUT: .X1 = @X1.%assoc0 // CHECK:STDOUT: .Y = // CHECK:STDOUT: witness = (%X1) // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @X.Self.binding.as_type.impls.Y.type.require { -// CHECK:STDOUT: require @X.Self.binding.as_type.impls.Y.type.require.%Self.as_type impls @X.Self.binding.as_type.impls.Y.type.require.%Y.ref +// CHECK:STDOUT: @X.WithSelf.Self.binding.as_type.impls.Y.type.require { +// CHECK:STDOUT: require @X.WithSelf.Self.binding.as_type.impls.Y.type.require.%Self.as_type impls @X.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.ref // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: constraint @Y { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = constants.%Self.550] -// CHECK:STDOUT: %Y.Self.binding.as_type.impls.Z.type.require.decl = require_decl @Y.Self.binding.as_type.impls.Z.type.require [concrete] { +// CHECK:STDOUT: constraint_with_self_decl @Y [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Y.WithSelf.Self.binding.as_type.impls.Z.type.require.decl = require_decl @Y.WithSelf.Self.binding.as_type.impls.Z.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %Z.ref // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @Y.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.5cb)] @@ -834,27 +868,24 @@ interface B { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Z = +// CHECK:STDOUT: .Z = // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Y.Self.binding.as_type.impls.Z.type.require { -// CHECK:STDOUT: require @Y.Self.binding.as_type.impls.Z.type.require.%Self.as_type impls @Y.Self.binding.as_type.impls.Z.type.require.%Z.ref +// CHECK:STDOUT: @Y.WithSelf.Self.binding.as_type.impls.Z.type.require { +// CHECK:STDOUT: require @Y.WithSelf.Self.binding.as_type.impls.Z.type.require.%Self.as_type impls @Y.WithSelf.Self.binding.as_type.impls.Z.type.require.%Z.ref // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Y.Self.binding.as_type.impls.Z.type.require(@Y.%Self: %Y.type) { +// CHECK:STDOUT: generic require @Y.WithSelf.Self.binding.as_type.impls.Z.type.require(@Y.%Self: %Y.type) { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.550)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.5cb)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @X.Self.binding.as_type.impls.Y.type.require(@X.%Self: %X.type) { +// CHECK:STDOUT: generic require @X.WithSelf.Self.binding.as_type.impls.Y.type.require(@X.%Self: %X.type) { // CHECK:STDOUT: %Self: %X.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.e52)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.806)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @X1(@X.%Self: %X.type) { -// CHECK:STDOUT: assoc_const X1:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc16_6.2: %X_where.type) { // CHECK:STDOUT: %T.loc16_6.1: %X_where.type = symbolic_binding T, 0 [symbolic = %T.loc16_6.1 (constants.%T)] // CHECK:STDOUT: @@ -866,24 +897,36 @@ interface B { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Y.Self.binding.as_type.impls.Z.type.require(constants.%Self.550) { +// CHECK:STDOUT: specific @Y(constants.%Self.550) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y.WithSelf.Self.binding.as_type.impls.Z.type.require(constants.%Self.550) { // CHECK:STDOUT: %Self => constants.%Self.550 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.5cb // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X1(constants.%Self.e52) {} +// CHECK:STDOUT: specific @X(constants.%Self.e52) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Y.Self.binding.as_type.impls.Z.type.require(constants.%Self.e52) { +// CHECK:STDOUT: specific @Y(constants.%Self.e52) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y.WithSelf.Self.binding.as_type.impls.Z.type.require(constants.%Self.e52) { // CHECK:STDOUT: %Self => constants.%Self.e52 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.806 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X.Self.binding.as_type.impls.Y.type.require(constants.%Self.e52) { +// CHECK:STDOUT: specific @X.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.e52) { // CHECK:STDOUT: %Self => constants.%Self.e52 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.806 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X1(constants.%.Self.637) {} +// CHECK:STDOUT: specific @X(constants.%.Self.637) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc16_6.1 => constants.%T @@ -908,10 +951,12 @@ interface B { // CHECK:STDOUT: // CHECK:STDOUT: interface @B { // CHECK:STDOUT: %Self: %B.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @B [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .A = +// CHECK:STDOUT: .A = // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -919,3 +964,5 @@ interface B { // CHECK:STDOUT: // CHECK:STDOUT: constraint @A; // CHECK:STDOUT: +// CHECK:STDOUT: specific @B(constants.%Self) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/interface_args.carbon b/toolchain/check/testdata/impl/interface_args.carbon index 27d83335e1d0..868a783a2438 100644 --- a/toolchain/check/testdata/impl/interface_args.carbon +++ b/toolchain/check/testdata/impl/interface_args.carbon @@ -122,10 +122,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %pattern_type.8de: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.3cf: Core.Form = init_form %Dest, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %Dest [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert: %ImplicitAs.Convert.type = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Dest, %Self) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert: %ImplicitAs.WithSelf.Convert.type = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %assoc0: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%ImplicitAs.Convert.decl [symbolic] +// CHECK:STDOUT: %assoc0: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%ImplicitAs.WithSelf.Convert.decl [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -144,63 +144,65 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Dest.loc3_22.1: type = symbolic_binding Dest, 0 [symbolic = %Dest.loc3_22.1 (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_22.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.9fe)] -// CHECK:STDOUT: %Self.loc3_35.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] -// CHECK:STDOUT: %ImplicitAs.Convert.type: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest.loc3_22.1) [symbolic = %ImplicitAs.Convert.type (constants.%ImplicitAs.Convert.type)] -// CHECK:STDOUT: %ImplicitAs.Convert: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type) = struct_value () [symbolic = %ImplicitAs.Convert (constants.%ImplicitAs.Convert)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest.loc3_22.1) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type)] -// CHECK:STDOUT: %assoc0.loc4_35.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] +// CHECK:STDOUT: %ImplicitAs.type.loc3: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_22.1)> [symbolic = %ImplicitAs.type.loc3 (constants.%ImplicitAs.type.9fe)] +// CHECK:STDOUT: %Self.loc3_35.2: @ImplicitAs.%ImplicitAs.type.loc3 (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] -// CHECK:STDOUT: %ImplicitAs.Convert.decl: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type) = fn_decl @ImplicitAs.Convert [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert)] { -// CHECK:STDOUT: %self.patt: @ImplicitAs.Convert.%pattern_type.loc4_14 (%pattern_type.8de) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @ImplicitAs.Convert.%pattern_type.loc4_14 (%pattern_type.8de) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @ImplicitAs.Convert.%pattern_type.loc4_28 (%pattern_type.51d) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @ImplicitAs.Convert.%pattern_type.loc4_28 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type.loc3 (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @ImplicitAs [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.decl: @ImplicitAs.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type) = fn_decl @ImplicitAs.WithSelf.Convert [symbolic = @ImplicitAs.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert)] { +// CHECK:STDOUT: %self.patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_14 (%pattern_type.8de) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_14 (%pattern_type.8de) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_28 (%pattern_type.51d) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_28 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @ImplicitAs.%Dest.loc3_22.2 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %.loc4_31.2: Core.Form = init_form %Dest.ref, call_param1 [symbolic = %.loc4_31.1 (constants.%.3cf)] -// CHECK:STDOUT: %self.param: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %.loc4_20.2: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = specific_constant @ImplicitAs.%Self.loc3_35.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = name_ref Self, %.loc4_20.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc4_20.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = specific_constant @ImplicitAs.%Self.loc3_35.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = name_ref Self, %.loc4_20.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc4_20.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @ImplicitAs.Convert.%Dest (%Dest) = out_param call_param1 -// CHECK:STDOUT: %return: ref @ImplicitAs.Convert.%Dest (%Dest) = return_slot %return.param +// CHECK:STDOUT: %self: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %return.param: ref @ImplicitAs.WithSelf.Convert.%Dest (%Dest) = out_param call_param1 +// CHECK:STDOUT: %return: ref @ImplicitAs.WithSelf.Convert.%Dest (%Dest) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc4_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] +// CHECK:STDOUT: %assoc0.loc4_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc3_35.1 // CHECK:STDOUT: .Dest = +// CHECK:STDOUT: .Dest = // CHECK:STDOUT: .Convert = %assoc0.loc4_35.1 -// CHECK:STDOUT: witness = (%ImplicitAs.Convert.decl) +// CHECK:STDOUT: witness = (%ImplicitAs.WithSelf.Convert.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.Convert(@ImplicitAs.%Dest.loc3_22.2: type, @ImplicitAs.%Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe)) { +// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%Dest.loc3_22.2: type, @ImplicitAs.%Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type.loc3 (%ImplicitAs.type.9fe)) { // CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.9fe)] -// CHECK:STDOUT: %Self: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type.loc4_14: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc4_14 (constants.%pattern_type.8de)] // CHECK:STDOUT: %.loc4_31.1: Core.Form = init_form %Dest, call_param1 [symbolic = %.loc4_31.1 (constants.%.3cf)] // CHECK:STDOUT: %pattern_type.loc4_28: type = pattern_type %Dest [symbolic = %pattern_type.loc4_28 (constants.%pattern_type.51d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @ImplicitAs.Convert.%Dest (%Dest); +// CHECK:STDOUT: fn(%self.param: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @ImplicitAs.WithSelf.Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc3_22.1 => constants.%Dest // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs.Convert(constants.%Dest, constants.%Self) { +// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest, constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%Dest, constants.%Self) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9fe // CHECK:STDOUT: %Self => constants.%Self @@ -224,10 +226,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Self.e2a: %Action.type.c84 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.e2a [symbolic] // CHECK:STDOUT: %pattern_type.84c: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %Action.Op.type.0d8: type = fn_type @Action.Op, @Action(%T) [symbolic] -// CHECK:STDOUT: %Action.Op.004: %Action.Op.type.0d8 = struct_value () [symbolic] +// CHECK:STDOUT: %Action.WithSelf.Op.type.ecb: type = fn_type @Action.WithSelf.Op, @Action(%T, %Self.e2a) [symbolic] +// CHECK:STDOUT: %Action.WithSelf.Op.a8d: %Action.WithSelf.Op.type.ecb = struct_value () [symbolic] // CHECK:STDOUT: %Action.assoc_type.8f2: type = assoc_entity_type @Action, @Action(%T) [symbolic] -// CHECK:STDOUT: %assoc0.e4d: %Action.assoc_type.8f2 = assoc_entity element0, @Action.%Action.Op.decl [symbolic] +// CHECK:STDOUT: %assoc0.066: %Action.assoc_type.8f2 = assoc_entity element0, @Action.%Action.WithSelf.Op.decl [symbolic] // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -236,17 +238,19 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Action.type.879: type = facet_type <@Action, @Action(%B)> [concrete] // CHECK:STDOUT: %Action.impl_witness: = impl_witness @A.as.Action.impl.%Action.impl_witness_table [concrete] // CHECK:STDOUT: %Self.e71: %Action.type.879 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Action.Op.type.30c: type = fn_type @Action.Op, @Action(%B) [concrete] -// CHECK:STDOUT: %Action.Op.aa4: %Action.Op.type.30c = struct_value () [concrete] +// CHECK:STDOUT: %Action.WithSelf.Op.type.2b2: type = fn_type @Action.WithSelf.Op, @Action(%B, %Self.e2a) [symbolic] +// CHECK:STDOUT: %Action.WithSelf.Op.6a5: %Action.WithSelf.Op.type.2b2 = struct_value () [symbolic] // CHECK:STDOUT: %Action.assoc_type.826: type = assoc_entity_type @Action, @Action(%B) [concrete] -// CHECK:STDOUT: %assoc0.e5e: %Action.assoc_type.826 = assoc_entity element0, @Action.%Action.Op.decl [concrete] +// CHECK:STDOUT: %assoc0.d7e: %Action.assoc_type.826 = assoc_entity element0, @Action.%Action.WithSelf.Op.decl [concrete] // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete] // CHECK:STDOUT: %A.as.Action.impl.Op.type: type = fn_type @A.as.Action.impl.Op [concrete] // CHECK:STDOUT: %A.as.Action.impl.Op: %A.as.Action.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Action.facet: %Action.type.879 = facet_value %A, (%Action.impl_witness) [concrete] +// CHECK:STDOUT: %Action.WithSelf.Op.type.f8f: type = fn_type @Action.WithSelf.Op, @Action(%B, %Action.facet) [concrete] +// CHECK:STDOUT: %Action.WithSelf.Op.175: %Action.WithSelf.Op.type.f8f = struct_value () [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %.922: type = fn_type_with_self_type %Action.Op.type.30c, %Action.facet [concrete] +// CHECK:STDOUT: %.674: type = fn_type_with_self_type %Action.WithSelf.Op.type.f8f, %Action.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -295,34 +299,33 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %T.loc4_18.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_18.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(%T.loc4_18.1)> [symbolic = %Action.type (constants.%Action.type.c84)] -// CHECK:STDOUT: %Self.loc4_28.2: @Action.%Action.type (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.e2a)] -// CHECK:STDOUT: %Action.Op.type: type = fn_type @Action.Op, @Action(%T.loc4_18.1) [symbolic = %Action.Op.type (constants.%Action.Op.type.0d8)] -// CHECK:STDOUT: %Action.Op: @Action.%Action.Op.type (%Action.Op.type.0d8) = struct_value () [symbolic = %Action.Op (constants.%Action.Op.004)] -// CHECK:STDOUT: %Action.assoc_type: type = assoc_entity_type @Action, @Action(%T.loc4_18.1) [symbolic = %Action.assoc_type (constants.%Action.assoc_type.8f2)] -// CHECK:STDOUT: %assoc0.loc5_22.2: @Action.%Action.assoc_type (%Action.assoc_type.8f2) = assoc_entity element0, %Action.Op.decl [symbolic = %assoc0.loc5_22.2 (constants.%assoc0.e4d)] +// CHECK:STDOUT: %Action.type.loc4: type = facet_type <@Action, @Action(%T.loc4_18.1)> [symbolic = %Action.type.loc4 (constants.%Action.type.c84)] +// CHECK:STDOUT: %Self.loc4_28.2: @Action.%Action.type.loc4 (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.e2a)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_28.1: @Action.%Action.type (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.e2a)] -// CHECK:STDOUT: %Action.Op.decl: @Action.%Action.Op.type (%Action.Op.type.0d8) = fn_decl @Action.Op [symbolic = @Action.%Action.Op (constants.%Action.Op.004)] { -// CHECK:STDOUT: %self.patt: @Action.Op.%pattern_type (%pattern_type.84c) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Action.Op.%pattern_type (%pattern_type.84c) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4_28.1: @Action.%Action.type.loc4 (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.e2a)] +// CHECK:STDOUT: interface_with_self_decl @Action [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Action.WithSelf.Op.decl: @Action.%Action.WithSelf.Op.type (%Action.WithSelf.Op.type.ecb) = fn_decl @Action.WithSelf.Op [symbolic = @Action.%Action.WithSelf.Op (constants.%Action.WithSelf.Op.a8d)] { +// CHECK:STDOUT: %self.patt: @Action.WithSelf.Op.%pattern_type (%pattern_type.84c) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Action.WithSelf.Op.%pattern_type (%pattern_type.84c) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @Action.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Action.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %.loc5_15.2: @Action.Op.%Action.type (%Action.type.c84) = specific_constant @Action.%Self.loc4_28.1, @Action(constants.%T) [symbolic = %Self (constants.%Self.e2a)] -// CHECK:STDOUT: %Self.ref: @Action.Op.%Action.type (%Action.type.c84) = name_ref Self, %.loc5_15.2 [symbolic = %Self (constants.%Self.e2a)] +// CHECK:STDOUT: %.loc5_15.2: @Action.WithSelf.Op.%Action.type (%Action.type.c84) = specific_constant @Action.%Self.loc4_28.1, @Action(constants.%T) [symbolic = %Self (constants.%Self.e2a)] +// CHECK:STDOUT: %Self.ref: @Action.WithSelf.Op.%Action.type (%Action.type.c84) = name_ref Self, %.loc5_15.2 [symbolic = %Self (constants.%Self.e2a)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_15.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Action.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @Action.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc5_22.1: @Action.%Action.assoc_type (%Action.assoc_type.8f2) = assoc_entity element0, %Action.Op.decl [symbolic = %assoc0.loc5_22.2 (constants.%assoc0.e4d)] +// CHECK:STDOUT: %assoc0.loc5_22.1: @Action.%Action.assoc_type (%Action.assoc_type.8f2) = assoc_entity element0, %Action.WithSelf.Op.decl [symbolic = %assoc0.loc5_22.2 (constants.%assoc0.066)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_28.1 // CHECK:STDOUT: .Op = %assoc0.loc5_22.1 -// CHECK:STDOUT: witness = (%Action.Op.decl) +// CHECK:STDOUT: witness = (%Action.WithSelf.Op.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -369,14 +372,14 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Action.Op(@Action.%T.loc4_18.2: type, @Action.%Self.loc4_28.1: @Action.%Action.type (%Action.type.c84)) { +// CHECK:STDOUT: generic fn @Action.WithSelf.Op(@Action.%T.loc4_18.2: type, @Action.%Self.loc4_28.1: @Action.%Action.type.loc4 (%Action.type.c84)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(%T)> [symbolic = %Action.type (constants.%Action.type.c84)] -// CHECK:STDOUT: %Self: @Action.Op.%Action.type (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e2a)] +// CHECK:STDOUT: %Self: @Action.WithSelf.Op.%Action.type (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.e2a)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.84c)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Action.Op.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @Action.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A.as.Action.impl.Op(%self.param: %A) { @@ -390,9 +393,9 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Action.ref: %Action.type.85c = name_ref Action, file.%Action.decl [concrete = constants.%Action.generic] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(constants.%B)> [concrete = constants.%Action.type.879] -// CHECK:STDOUT: %.loc16: %Action.assoc_type.826 = specific_constant @Action.%assoc0.loc5_22.1, @Action(constants.%B) [concrete = constants.%assoc0.e5e] -// CHECK:STDOUT: %Op.ref: %Action.assoc_type.826 = name_ref Op, %.loc16 [concrete = constants.%assoc0.e5e] -// CHECK:STDOUT: %impl.elem0: %.922 = impl_witness_access constants.%Action.impl_witness, element0 [concrete = constants.%A.as.Action.impl.Op] +// CHECK:STDOUT: %.loc16: %Action.assoc_type.826 = specific_constant @Action.%assoc0.loc5_22.1, @Action(constants.%B, constants.%Self.e2a) [concrete = constants.%assoc0.d7e] +// CHECK:STDOUT: %Op.ref: %Action.assoc_type.826 = name_ref Op, %.loc16 [concrete = constants.%assoc0.d7e] +// CHECK:STDOUT: %impl.elem0: %.674 = impl_witness_access constants.%Action.impl_witness, element0 [concrete = constants.%A.as.Action.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %A.as.Action.impl.Op.call: init %empty_tuple.type = call %bound_method(%a.ref) // CHECK:STDOUT: return @@ -402,7 +405,9 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %T.loc4_18.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Action.Op(constants.%T, constants.%Self.e2a) { +// CHECK:STDOUT: specific @Action(constants.%T, constants.%Self.e2a) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Action.WithSelf.Op(constants.%T, constants.%Self.e2a) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Action.type => constants.%Action.type.c84 // CHECK:STDOUT: %Self => constants.%Self.e2a @@ -414,15 +419,33 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %T.loc4_18.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Action.type => constants.%Action.type.879 +// CHECK:STDOUT: %Action.type.loc4 => constants.%Action.type.879 // CHECK:STDOUT: %Self.loc4_28.2 => constants.%Self.e71 -// CHECK:STDOUT: %Action.Op.type => constants.%Action.Op.type.30c -// CHECK:STDOUT: %Action.Op => constants.%Action.Op.aa4 -// CHECK:STDOUT: %Action.assoc_type => constants.%Action.assoc_type.826 -// CHECK:STDOUT: %assoc0.loc5_22.2 => constants.%assoc0.e5e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Action.Op(constants.%B, constants.%Action.facet) { +// CHECK:STDOUT: specific @Action(constants.%B, constants.%Self.e2a) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%B +// CHECK:STDOUT: %Action.type.loc5 => constants.%Action.type.879 +// CHECK:STDOUT: %Self.loc5 => constants.%Self.e2a +// CHECK:STDOUT: %Action.WithSelf.Op.type => constants.%Action.WithSelf.Op.type.2b2 +// CHECK:STDOUT: %Action.WithSelf.Op => constants.%Action.WithSelf.Op.6a5 +// CHECK:STDOUT: %Action.assoc_type => constants.%Action.assoc_type.826 +// CHECK:STDOUT: %assoc0.loc5_22.2 => constants.%assoc0.d7e +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Action(constants.%B, constants.%Action.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%B +// CHECK:STDOUT: %Action.type.loc5 => constants.%Action.type.879 +// CHECK:STDOUT: %Self.loc5 => constants.%Action.facet +// CHECK:STDOUT: %Action.WithSelf.Op.type => constants.%Action.WithSelf.Op.type.f8f +// CHECK:STDOUT: %Action.WithSelf.Op => constants.%Action.WithSelf.Op.175 +// CHECK:STDOUT: %Action.assoc_type => constants.%Action.assoc_type.826 +// CHECK:STDOUT: %assoc0.loc5_22.2 => constants.%assoc0.d7e +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Action.WithSelf.Op(constants.%B, constants.%Action.facet) { // CHECK:STDOUT: %T => constants.%B // CHECK:STDOUT: %Action.type => constants.%Action.type.879 // CHECK:STDOUT: %Self => constants.%Action.facet @@ -443,25 +466,26 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Action.type.c84: type = facet_type <@Action, @Action(%T)> [symbolic] // CHECK:STDOUT: %Self.6c1: %Action.type.c84 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Action.assoc_type.8f2: type = assoc_entity_type @Action, @Action(%T) [symbolic] -// CHECK:STDOUT: %assoc0.914f1c.1: %Action.assoc_type.8f2 = assoc_entity element0, imports.%Main.import_ref.d4fe9a.1 [symbolic] -// CHECK:STDOUT: %Action.Op.type.0d8: type = fn_type @Action.Op, @Action(%T) [symbolic] -// CHECK:STDOUT: %Action.Op.004: %Action.Op.type.0d8 = struct_value () [symbolic] +// CHECK:STDOUT: %Action.WithSelf.Op.type.c6d: type = fn_type @Action.WithSelf.Op, @Action(%T, %Self.6c1) [symbolic] +// CHECK:STDOUT: %Action.WithSelf.Op.290: %Action.WithSelf.Op.type.c6d = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.6c1 [symbolic] // CHECK:STDOUT: %pattern_type.0c5: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %Action.type.879: type = facet_type <@Action, @Action(%B)> [concrete] -// CHECK:STDOUT: %Action.assoc_type.826: type = assoc_entity_type @Action, @Action(%B) [concrete] -// CHECK:STDOUT: %assoc0.613: %Action.assoc_type.826 = assoc_entity element0, imports.%Main.import_ref.d9a [concrete] -// CHECK:STDOUT: %Action.Op.type.30c: type = fn_type @Action.Op, @Action(%B) [concrete] -// CHECK:STDOUT: %Action.Op.aa4: %Action.Op.type.30c = struct_value () [concrete] // CHECK:STDOUT: %Self.76c: %Action.type.879 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc0.914f1c.2: %Action.assoc_type.8f2 = assoc_entity element0, imports.%Main.import_ref.d4fe9a.2 [symbolic] +// CHECK:STDOUT: %Action.WithSelf.Op.type.d81: type = fn_type @Action.WithSelf.Op, @Action(%B, %Self.6c1) [symbolic] +// CHECK:STDOUT: %Action.WithSelf.Op.2ee: %Action.WithSelf.Op.type.d81 = struct_value () [symbolic] +// CHECK:STDOUT: %Action.assoc_type.826: type = assoc_entity_type @Action, @Action(%B) [concrete] +// CHECK:STDOUT: %assoc0.3bd: %Action.assoc_type.826 = assoc_entity element0, imports.%Main.import_ref.ca1 [concrete] +// CHECK:STDOUT: %assoc0.757: %Action.assoc_type.8f2 = assoc_entity element0, imports.%Main.import_ref.04b [symbolic] // CHECK:STDOUT: %Action.impl_witness: = impl_witness imports.%Action.impl_witness_table [concrete] // CHECK:STDOUT: %Action.facet: %Action.type.879 = facet_value %A, (%Action.impl_witness) [concrete] -// CHECK:STDOUT: %.115: type = fn_type_with_self_type %Action.Op.type.30c, %Action.facet [concrete] +// CHECK:STDOUT: %Action.WithSelf.Op.type.09b: type = fn_type @Action.WithSelf.Op, @Action(%B, %Action.facet) [concrete] +// CHECK:STDOUT: %Action.WithSelf.Op.0b2: %Action.WithSelf.Op.type.09b = struct_value () [concrete] +// CHECK:STDOUT: %.fba: type = fn_type_with_self_type %Action.WithSelf.Op.type.09b, %Action.facet [concrete] // CHECK:STDOUT: %A.as.Action.impl.Op.type: type = fn_type @A.as.Action.impl.Op [concrete] // CHECK:STDOUT: %A.as.Action.impl.Op: %A.as.Action.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -478,21 +502,20 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//action, loc9_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.536 = import_ref Main//action, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.763 = import_ref Main//action, loc4_28, unloaded -// CHECK:STDOUT: %Main.import_ref.5d2: @Action.%Action.assoc_type (%Action.assoc_type.8f2) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.914f1c.2)] +// CHECK:STDOUT: %Main.import_ref.a10: @Action.%Action.assoc_type (%Action.assoc_type.8f2) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.757)] // CHECK:STDOUT: %Main.Op = import_ref Main//action, Op, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.d4fe9a.1 = import_ref Main//action, loc5_22, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.35f: @Action.%Action.type (%Action.type.c84) = import_ref Main//action, loc4_28, loaded [symbolic = @Action.%Self (constants.%Self.6c1)] +// CHECK:STDOUT: %Main.import_ref.ca1: @Action.%Action.WithSelf.Op.type (%Action.WithSelf.Op.type.c6d) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%Action.WithSelf.Op (constants.%Action.WithSelf.Op.290)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.35fa29.2: @Action.%Action.type.1 (%Action.type.c84) = import_ref Main//action, loc4_28, loaded [symbolic = @Action.%Self.1 (constants.%Self.6c1)] +// CHECK:STDOUT: %Main.import_ref.763 = import_ref Main//action, loc4_28, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T.1 (constants.%T)] // CHECK:STDOUT: %Main.import_ref.170: = import_ref Main//action, loc12_21, loaded [concrete = constants.%Action.impl_witness] -// CHECK:STDOUT: %Main.import_ref.d9a: @Action.%Action.Op.type (%Action.Op.type.0d8) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%Action.Op (constants.%Action.Op.004)] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.450 = import_ref Main//action, inst{{[0-9A-F]+}} [no loc], unloaded // 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_23, unloaded -// CHECK:STDOUT: %Main.import_ref.d4fe9a.2 = import_ref Main//action, loc5_22, unloaded +// CHECK:STDOUT: %Main.import_ref.04b = import_ref Main//action, loc5_22, unloaded // CHECK:STDOUT: %Main.import_ref.4e3: %A.as.Action.impl.Op.type = import_ref Main//action, loc13_23, loaded [concrete = constants.%A.as.Action.impl.Op] // CHECK:STDOUT: %Action.impl_witness_table = impl_witness_table (%Main.import_ref.4e3), @A.as.Action.impl [concrete] // CHECK:STDOUT: } @@ -520,21 +543,17 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @Action(imports.%Main.import_ref.b3bc94.1: type) [from "action.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @Action(imports.%Main.import_ref.b3bc94.3: type) [from "action.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(%T)> [symbolic = %Action.type (constants.%Action.type.c84)] -// CHECK:STDOUT: %Self: @Action.%Action.type (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.6c1)] -// CHECK:STDOUT: %Action.Op.type: type = fn_type @Action.Op, @Action(%T) [symbolic = %Action.Op.type (constants.%Action.Op.type.0d8)] -// CHECK:STDOUT: %Action.Op: @Action.%Action.Op.type (%Action.Op.type.0d8) = struct_value () [symbolic = %Action.Op (constants.%Action.Op.004)] -// CHECK:STDOUT: %Action.assoc_type: type = assoc_entity_type @Action, @Action(%T) [symbolic = %Action.assoc_type (constants.%Action.assoc_type.8f2)] -// CHECK:STDOUT: %assoc0: @Action.%Action.assoc_type (%Action.assoc_type.8f2) = assoc_entity element0, imports.%Main.import_ref.d4fe9a.1 [symbolic = %assoc0 (constants.%assoc0.914f1c.1)] +// CHECK:STDOUT: %Action.type.1: type = facet_type <@Action, @Action(%T.1)> [symbolic = %Action.type.1 (constants.%Action.type.c84)] +// CHECK:STDOUT: %Self.1: @Action.%Action.type.1 (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.6c1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.763 -// CHECK:STDOUT: .Op = imports.%Main.import_ref.5d2 +// CHECK:STDOUT: .Op = imports.%Main.import_ref.a10 // CHECK:STDOUT: witness = (imports.%Main.Op) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -561,10 +580,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: .Self = imports.%Main.import_ref.450 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Action.Op(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.35f: @Action.%Action.type (%Action.type.c84)) [from "action.carbon"] { +// CHECK:STDOUT: generic fn @Action.WithSelf.Op(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.35fa29.2: @Action.%Action.type.1 (%Action.type.c84)) [from "action.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(%T)> [symbolic = %Action.type (constants.%Action.type.c84)] -// CHECK:STDOUT: %Self: @Action.Op.%Action.type (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.6c1)] +// CHECK:STDOUT: %Self: @Action.WithSelf.Op.%Action.type (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.6c1)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.0c5)] // CHECK:STDOUT: @@ -577,9 +596,9 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Action.ref: %Action.type.85c = name_ref Action, imports.%Main.Action [concrete = constants.%Action.generic] // CHECK:STDOUT: %B.ref: type = name_ref B, imports.%Main.B [concrete = constants.%B] // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(constants.%B)> [concrete = constants.%Action.type.879] -// CHECK:STDOUT: %.loc4: %Action.assoc_type.826 = specific_constant imports.%Main.import_ref.5d2, @Action(constants.%B) [concrete = constants.%assoc0.613] -// CHECK:STDOUT: %Op.ref: %Action.assoc_type.826 = name_ref Op, %.loc4 [concrete = constants.%assoc0.613] -// CHECK:STDOUT: %impl.elem0: %.115 = impl_witness_access constants.%Action.impl_witness, element0 [concrete = constants.%A.as.Action.impl.Op] +// CHECK:STDOUT: %.loc4: %Action.assoc_type.826 = specific_constant imports.%Main.import_ref.a10, @Action(constants.%B, constants.%Self.6c1) [concrete = constants.%assoc0.3bd] +// CHECK:STDOUT: %Op.ref: %Action.assoc_type.826 = name_ref Op, %.loc4 [concrete = constants.%assoc0.3bd] +// CHECK:STDOUT: %impl.elem0: %.fba = impl_witness_access constants.%Action.impl_witness, element0 [concrete = constants.%A.as.Action.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %A.as.Action.impl.Op.call: init %empty_tuple.type = call %bound_method(%a.ref) // CHECK:STDOUT: return @@ -588,10 +607,12 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: fn @A.as.Action.impl.Op [from "action.carbon"]; // CHECK:STDOUT: // CHECK:STDOUT: specific @Action(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Action.Op(constants.%T, constants.%Self.6c1) { +// CHECK:STDOUT: specific @Action(constants.%T, constants.%Self.6c1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Action.WithSelf.Op(constants.%T, constants.%Self.6c1) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Action.type => constants.%Action.type.c84 // CHECK:STDOUT: %Self => constants.%Self.6c1 @@ -600,15 +621,33 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Action(constants.%B) { -// CHECK:STDOUT: %T => constants.%B +// CHECK:STDOUT: %T.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Action.type => constants.%Action.type.879 -// CHECK:STDOUT: %Self => constants.%Self.76c -// CHECK:STDOUT: %Action.Op.type => constants.%Action.Op.type.30c -// CHECK:STDOUT: %Action.Op => constants.%Action.Op.aa4 +// CHECK:STDOUT: %Action.type.1 => constants.%Action.type.879 +// CHECK:STDOUT: %Self.1 => constants.%Self.76c +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Action(constants.%B, constants.%Self.6c1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%B +// CHECK:STDOUT: %Action.type.2 => constants.%Action.type.879 +// CHECK:STDOUT: %Self.2 => constants.%Self.6c1 +// CHECK:STDOUT: %Action.WithSelf.Op.type => constants.%Action.WithSelf.Op.type.d81 +// CHECK:STDOUT: %Action.WithSelf.Op => constants.%Action.WithSelf.Op.2ee // CHECK:STDOUT: %Action.assoc_type => constants.%Action.assoc_type.826 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.613 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.3bd +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Action(constants.%B, constants.%Action.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%B +// CHECK:STDOUT: %Action.type.2 => constants.%Action.type.879 +// CHECK:STDOUT: %Self.2 => constants.%Action.facet +// CHECK:STDOUT: %Action.WithSelf.Op.type => constants.%Action.WithSelf.Op.type.09b +// CHECK:STDOUT: %Action.WithSelf.Op => constants.%Action.WithSelf.Op.0b2 +// CHECK:STDOUT: %Action.assoc_type => constants.%Action.assoc_type.826 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.3bd // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_action.impl.carbon @@ -623,16 +662,11 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Action.type.c84: type = facet_type <@Action, @Action(%T)> [symbolic] // CHECK:STDOUT: %Self.6c1: %Action.type.c84 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Action.assoc_type.8f2: type = assoc_entity_type @Action, @Action(%T) [symbolic] -// CHECK:STDOUT: %assoc0.78e: %Action.assoc_type.8f2 = assoc_entity element0, imports.%Main.import_ref.d9a [symbolic] -// CHECK:STDOUT: %Action.Op.type.0d8: type = fn_type @Action.Op, @Action(%T) [symbolic] -// CHECK:STDOUT: %Action.Op.004: %Action.Op.type.0d8 = struct_value () [symbolic] +// CHECK:STDOUT: %Action.WithSelf.Op.type.c6d: type = fn_type @Action.WithSelf.Op, @Action(%T, %Self.6c1) [symbolic] +// CHECK:STDOUT: %Action.WithSelf.Op.290: %Action.WithSelf.Op.type.c6d = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.6c1 [symbolic] // CHECK:STDOUT: %pattern_type.0c5: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %Action.type.879: type = facet_type <@Action, @Action(%B)> [concrete] -// CHECK:STDOUT: %Action.assoc_type.826: type = assoc_entity_type @Action, @Action(%B) [concrete] -// CHECK:STDOUT: %assoc0.912: %Action.assoc_type.826 = assoc_entity element0, imports.%Main.import_ref.d4fe9a.1 [concrete] -// CHECK:STDOUT: %Action.Op.type.30c: type = fn_type @Action.Op, @Action(%B) [concrete] -// CHECK:STDOUT: %Action.Op.aa4: %Action.Op.type.30c = struct_value () [concrete] // CHECK:STDOUT: %Self.76c: %Action.type.879 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete] @@ -641,11 +675,11 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %Action.type.379: type = facet_type <@Action, @Action(%C)> [concrete] // CHECK:STDOUT: %Self.08d: %Action.type.379 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Action.Op.type.843: type = fn_type @Action.Op, @Action(%C) [concrete] -// CHECK:STDOUT: %Action.Op.a19: %Action.Op.type.843 = struct_value () [concrete] +// CHECK:STDOUT: %Action.WithSelf.Op.type.117: type = fn_type @Action.WithSelf.Op, @Action(%C, %Self.6c1) [symbolic] +// CHECK:STDOUT: %Action.WithSelf.Op.a00: %Action.WithSelf.Op.type.117 = struct_value () [symbolic] // CHECK:STDOUT: %Action.assoc_type.c40: type = assoc_entity_type @Action, @Action(%C) [concrete] -// CHECK:STDOUT: %assoc0.d67: %Action.assoc_type.c40 = assoc_entity element0, imports.%Main.import_ref.d9a [concrete] -// CHECK:STDOUT: %assoc0.914: %Action.assoc_type.8f2 = assoc_entity element0, imports.%Main.import_ref.d4fe9a.2 [symbolic] +// CHECK:STDOUT: %assoc0.6ec: %Action.assoc_type.c40 = assoc_entity element0, imports.%Main.import_ref.ca1 [concrete] +// CHECK:STDOUT: %assoc0.757: %Action.assoc_type.8f2 = assoc_entity element0, imports.%Main.import_ref.04b [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -660,15 +694,14 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//action, loc9_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.536 = import_ref Main//action, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.763 = import_ref Main//action, loc4_28, unloaded -// CHECK:STDOUT: %Main.import_ref.5d2: @Action.%Action.assoc_type (%Action.assoc_type.8f2) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.914)] +// CHECK:STDOUT: %Main.import_ref.a10: @Action.%Action.assoc_type (%Action.assoc_type.8f2) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.757)] // CHECK:STDOUT: %Main.Op = import_ref Main//action, Op, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.d9a: @Action.%Action.Op.type (%Action.Op.type.0d8) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%Action.Op (constants.%Action.Op.004)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.35f: @Action.%Action.type (%Action.type.c84) = import_ref Main//action, loc4_28, loaded [symbolic = @Action.%Self (constants.%Self.6c1)] +// CHECK:STDOUT: %Main.import_ref.ca1: @Action.%Action.WithSelf.Op.type (%Action.WithSelf.Op.type.c6d) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%Action.WithSelf.Op (constants.%Action.WithSelf.Op.290)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.35fa29.2: @Action.%Action.type.1 (%Action.type.c84) = import_ref Main//action, loc4_28, loaded [symbolic = @Action.%Self.1 (constants.%Self.6c1)] +// CHECK:STDOUT: %Main.import_ref.763 = import_ref Main//action, loc4_28, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T.1 (constants.%T)] // CHECK:STDOUT: %Main.import_ref.acc = import_ref Main//action, loc12_21, unloaded -// CHECK:STDOUT: %Main.import_ref.d4fe9a.1 = import_ref Main//action, loc5_22, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.450 = import_ref Main//action, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.d04: type = import_ref Main//action, loc12_6, loaded [concrete = constants.%A] @@ -676,7 +709,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Main.import_ref.018 = import_ref Main//action, loc13_23, 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.d4fe9a.2 = import_ref Main//action, loc5_22, unloaded +// CHECK:STDOUT: %Main.import_ref.04b = import_ref Main//action, loc5_22, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -702,21 +735,17 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @Action(imports.%Main.import_ref.b3bc94.1: type) [from "action.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @Action(imports.%Main.import_ref.b3bc94.3: type) [from "action.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(%T)> [symbolic = %Action.type (constants.%Action.type.c84)] -// CHECK:STDOUT: %Self: @Action.%Action.type (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.6c1)] -// CHECK:STDOUT: %Action.Op.type: type = fn_type @Action.Op, @Action(%T) [symbolic = %Action.Op.type (constants.%Action.Op.type.0d8)] -// CHECK:STDOUT: %Action.Op: @Action.%Action.Op.type (%Action.Op.type.0d8) = struct_value () [symbolic = %Action.Op (constants.%Action.Op.004)] -// CHECK:STDOUT: %Action.assoc_type: type = assoc_entity_type @Action, @Action(%T) [symbolic = %Action.assoc_type (constants.%Action.assoc_type.8f2)] -// CHECK:STDOUT: %assoc0: @Action.%Action.assoc_type (%Action.assoc_type.8f2) = assoc_entity element0, imports.%Main.import_ref.d9a [symbolic = %assoc0 (constants.%assoc0.78e)] +// CHECK:STDOUT: %Action.type.1: type = facet_type <@Action, @Action(%T.1)> [symbolic = %Action.type.1 (constants.%Action.type.c84)] +// CHECK:STDOUT: %Self.1: @Action.%Action.type.1 (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.6c1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.763 -// CHECK:STDOUT: .Op = imports.%Main.import_ref.5d2 +// CHECK:STDOUT: .Op = imports.%Main.import_ref.a10 // CHECK:STDOUT: witness = (imports.%Main.Op) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -750,10 +779,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: .Self = imports.%Main.import_ref.743 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Action.Op(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.35f: @Action.%Action.type (%Action.type.c84)) [from "action.carbon"] { +// CHECK:STDOUT: generic fn @Action.WithSelf.Op(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.35fa29.2: @Action.%Action.type.1 (%Action.type.c84)) [from "action.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(%T)> [symbolic = %Action.type (constants.%Action.type.c84)] -// CHECK:STDOUT: %Self: @Action.Op.%Action.type (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.6c1)] +// CHECK:STDOUT: %Self: @Action.WithSelf.Op.%Action.type (%Action.type.c84) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.6c1)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.0c5)] // CHECK:STDOUT: @@ -766,16 +795,18 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Action.ref: %Action.type.85c = name_ref Action, imports.%Main.Action [concrete = constants.%Action.generic] // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C] // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(constants.%C)> [concrete = constants.%Action.type.379] -// CHECK:STDOUT: %.loc8: %Action.assoc_type.c40 = specific_constant imports.%Main.import_ref.5d2, @Action(constants.%C) [concrete = constants.%assoc0.d67] -// CHECK:STDOUT: %Op.ref: %Action.assoc_type.c40 = name_ref Op, %.loc8 [concrete = constants.%assoc0.d67] +// CHECK:STDOUT: %.loc8: %Action.assoc_type.c40 = specific_constant imports.%Main.import_ref.a10, @Action(constants.%C, constants.%Self.6c1) [concrete = constants.%assoc0.6ec] +// CHECK:STDOUT: %Op.ref: %Action.assoc_type.c40 = name_ref Op, %.loc8 [concrete = constants.%assoc0.6ec] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Action(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Action.Op(constants.%T, constants.%Self.6c1) { +// CHECK:STDOUT: specific @Action(constants.%T, constants.%Self.6c1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Action.WithSelf.Op(constants.%T, constants.%Self.6c1) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Action.type => constants.%Action.type.c84 // CHECK:STDOUT: %Self => constants.%Self.6c1 @@ -784,27 +815,30 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Action(constants.%B) { -// CHECK:STDOUT: %T => constants.%B +// CHECK:STDOUT: %T.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Action.type => constants.%Action.type.879 -// CHECK:STDOUT: %Self => constants.%Self.76c -// CHECK:STDOUT: %Action.Op.type => constants.%Action.Op.type.30c -// CHECK:STDOUT: %Action.Op => constants.%Action.Op.aa4 -// CHECK:STDOUT: %Action.assoc_type => constants.%Action.assoc_type.826 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.912 +// CHECK:STDOUT: %Action.type.1 => constants.%Action.type.879 +// CHECK:STDOUT: %Self.1 => constants.%Self.76c // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Action(constants.%C) { -// CHECK:STDOUT: %T => constants.%C +// CHECK:STDOUT: %T.1 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Action.type => constants.%Action.type.379 -// CHECK:STDOUT: %Self => constants.%Self.08d -// CHECK:STDOUT: %Action.Op.type => constants.%Action.Op.type.843 -// CHECK:STDOUT: %Action.Op => constants.%Action.Op.a19 +// CHECK:STDOUT: %Action.type.1 => constants.%Action.type.379 +// CHECK:STDOUT: %Self.1 => constants.%Self.08d +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Action(constants.%C, constants.%Self.6c1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%C +// CHECK:STDOUT: %Action.type.2 => constants.%Action.type.379 +// CHECK:STDOUT: %Self.2 => constants.%Self.6c1 +// CHECK:STDOUT: %Action.WithSelf.Op.type => constants.%Action.WithSelf.Op.type.117 +// CHECK:STDOUT: %Action.WithSelf.Op => constants.%Action.WithSelf.Op.a00 // CHECK:STDOUT: %Action.assoc_type => constants.%Action.assoc_type.c40 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.d67 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.6ec // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- factory.carbon @@ -820,16 +854,16 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Self.cc4: %Factory.type.142 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %.41b: Core.Form = init_form %T, call_param0 [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] -// CHECK:STDOUT: %Factory.Make.type.9ff: type = fn_type @Factory.Make, @Factory(%T) [symbolic] -// CHECK:STDOUT: %Factory.Make.fd5: %Factory.Make.type.9ff = struct_value () [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Make.type.086: type = fn_type @Factory.WithSelf.Make, @Factory(%T, %Self.cc4) [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Make.6b9: %Factory.WithSelf.Make.type.086 = struct_value () [symbolic] // CHECK:STDOUT: %Factory.assoc_type.129: type = assoc_entity_type @Factory, @Factory(%T) [symbolic] -// CHECK:STDOUT: %assoc0.677: %Factory.assoc_type.129 = assoc_entity element0, @Factory.%Factory.Make.decl [symbolic] +// CHECK:STDOUT: %assoc0.cdd: %Factory.assoc_type.129 = assoc_entity element0, @Factory.%Factory.WithSelf.Make.decl [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.cc4 [symbolic] // CHECK:STDOUT: %pattern_type.077: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.3cf: Core.Form = init_form %T, call_param1 [symbolic] -// CHECK:STDOUT: %Factory.Method.type.6d3: type = fn_type @Factory.Method, @Factory(%T) [symbolic] -// CHECK:STDOUT: %Factory.Method.ad5: %Factory.Method.type.6d3 = struct_value () [symbolic] -// CHECK:STDOUT: %assoc1.d68: %Factory.assoc_type.129 = assoc_entity element1, @Factory.%Factory.Method.decl [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Method.type.900: type = fn_type @Factory.WithSelf.Method, @Factory(%T, %Self.cc4) [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Method.655: %Factory.WithSelf.Method.type.900 = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1.a88: %Factory.assoc_type.129 = assoc_entity element1, @Factory.%Factory.WithSelf.Method.decl [symbolic] // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -837,13 +871,13 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Factory.type.5dd: type = facet_type <@Factory, @Factory(%B)> [concrete] // CHECK:STDOUT: %Factory.impl_witness: = impl_witness @A.as.Factory.impl.%Factory.impl_witness_table [concrete] // CHECK:STDOUT: %Self.d67: %Factory.type.5dd = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Factory.Make.type.662: type = fn_type @Factory.Make, @Factory(%B) [concrete] -// CHECK:STDOUT: %Factory.Make.e72: %Factory.Make.type.662 = struct_value () [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Make.type.474: type = fn_type @Factory.WithSelf.Make, @Factory(%B, %Self.cc4) [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Make.11c: %Factory.WithSelf.Make.type.474 = struct_value () [symbolic] // CHECK:STDOUT: %Factory.assoc_type.3bd: type = assoc_entity_type @Factory, @Factory(%B) [concrete] -// CHECK:STDOUT: %assoc0.edc: %Factory.assoc_type.3bd = assoc_entity element0, @Factory.%Factory.Make.decl [concrete] -// CHECK:STDOUT: %Factory.Method.type.ae6: type = fn_type @Factory.Method, @Factory(%B) [concrete] -// CHECK:STDOUT: %Factory.Method.49b: %Factory.Method.type.ae6 = struct_value () [concrete] -// CHECK:STDOUT: %assoc1.d3a: %Factory.assoc_type.3bd = assoc_entity element1, @Factory.%Factory.Method.decl [concrete] +// CHECK:STDOUT: %assoc0.2f8: %Factory.assoc_type.3bd = assoc_entity element0, @Factory.%Factory.WithSelf.Make.decl [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Method.type.631: type = fn_type @Factory.WithSelf.Method, @Factory(%B, %Self.cc4) [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Method.6ef: %Factory.WithSelf.Method.type.631 = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1.5e4: %Factory.assoc_type.3bd = assoc_entity element1, @Factory.%Factory.WithSelf.Method.decl [concrete] // CHECK:STDOUT: %.e82: Core.Form = init_form %B, call_param0 [concrete] // CHECK:STDOUT: %pattern_type.1f4: type = pattern_type %B [concrete] // CHECK:STDOUT: %A.as.Factory.impl.Make.type: type = fn_type @A.as.Factory.impl.Make [concrete] @@ -853,6 +887,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %A.as.Factory.impl.Method.type: type = fn_type @A.as.Factory.impl.Method [concrete] // CHECK:STDOUT: %A.as.Factory.impl.Method: %A.as.Factory.impl.Method.type = struct_value () [concrete] // CHECK:STDOUT: %Factory.facet: %Factory.type.5dd = facet_value %A, (%Factory.impl_witness) [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Make.type.d44: type = fn_type @Factory.WithSelf.Make, @Factory(%B, %Factory.facet) [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Make.228: %Factory.WithSelf.Make.type.d44 = struct_value () [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Method.type.d2f: type = fn_type @Factory.WithSelf.Method, @Factory(%B, %Factory.facet) [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Method.a3c: %Factory.WithSelf.Method.type.d2f = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -890,55 +928,52 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %T.loc4_19.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_19.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(%T.loc4_19.1)> [symbolic = %Factory.type (constants.%Factory.type.142)] -// CHECK:STDOUT: %Self.loc4_29.2: @Factory.%Factory.type (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.cc4)] -// CHECK:STDOUT: %Factory.Make.type: type = fn_type @Factory.Make, @Factory(%T.loc4_19.1) [symbolic = %Factory.Make.type (constants.%Factory.Make.type.9ff)] -// CHECK:STDOUT: %Factory.Make: @Factory.%Factory.Make.type (%Factory.Make.type.9ff) = struct_value () [symbolic = %Factory.Make (constants.%Factory.Make.fd5)] -// CHECK:STDOUT: %Factory.assoc_type: type = assoc_entity_type @Factory, @Factory(%T.loc4_19.1) [symbolic = %Factory.assoc_type (constants.%Factory.assoc_type.129)] -// CHECK:STDOUT: %assoc0.loc6_17.2: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = assoc_entity element0, %Factory.Make.decl [symbolic = %assoc0.loc6_17.2 (constants.%assoc0.677)] -// CHECK:STDOUT: %Factory.Method.type: type = fn_type @Factory.Method, @Factory(%T.loc4_19.1) [symbolic = %Factory.Method.type (constants.%Factory.Method.type.6d3)] -// CHECK:STDOUT: %Factory.Method: @Factory.%Factory.Method.type (%Factory.Method.type.6d3) = struct_value () [symbolic = %Factory.Method (constants.%Factory.Method.ad5)] -// CHECK:STDOUT: %assoc1.loc8_31.2: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = assoc_entity element1, %Factory.Method.decl [symbolic = %assoc1.loc8_31.2 (constants.%assoc1.d68)] +// CHECK:STDOUT: %Factory.type.loc4: type = facet_type <@Factory, @Factory(%T.loc4_19.1)> [symbolic = %Factory.type.loc4 (constants.%Factory.type.142)] +// CHECK:STDOUT: %Self.loc4_29.2: @Factory.%Factory.type.loc4 (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.cc4)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_29.1: @Factory.%Factory.type (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.cc4)] -// CHECK:STDOUT: %Factory.Make.decl: @Factory.%Factory.Make.type (%Factory.Make.type.9ff) = fn_decl @Factory.Make [symbolic = @Factory.%Factory.Make (constants.%Factory.Make.fd5)] { -// CHECK:STDOUT: %return.patt: @Factory.Make.%pattern_type (%pattern_type.51d) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Factory.Make.%pattern_type (%pattern_type.51d) = out_param_pattern %return.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4_29.1: @Factory.%Factory.type.loc4 (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.cc4)] +// CHECK:STDOUT: interface_with_self_decl @Factory [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Factory.WithSelf.Make.decl: @Factory.%Factory.WithSelf.Make.type (%Factory.WithSelf.Make.type.086) = fn_decl @Factory.WithSelf.Make [symbolic = @Factory.%Factory.WithSelf.Make (constants.%Factory.WithSelf.Make.6b9)] { +// CHECK:STDOUT: %return.patt: @Factory.WithSelf.Make.%pattern_type (%pattern_type.51d) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Factory.WithSelf.Make.%pattern_type (%pattern_type.51d) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @Factory.%T.loc4_19.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %.loc6_16.2: Core.Form = init_form %T.ref, call_param0 [symbolic = %.loc6_16.1 (constants.%.41b)] -// CHECK:STDOUT: %return.param: ref @Factory.Make.%T (%T) = out_param call_param0 -// CHECK:STDOUT: %return: ref @Factory.Make.%T (%T) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @Factory.WithSelf.Make.%T (%T) = out_param call_param0 +// CHECK:STDOUT: %return: ref @Factory.WithSelf.Make.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc6_17.1: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = assoc_entity element0, %Factory.Make.decl [symbolic = %assoc0.loc6_17.2 (constants.%assoc0.677)] -// CHECK:STDOUT: %Factory.Method.decl: @Factory.%Factory.Method.type (%Factory.Method.type.6d3) = fn_decl @Factory.Method [symbolic = @Factory.%Factory.Method (constants.%Factory.Method.ad5)] { -// CHECK:STDOUT: %self.patt: @Factory.Method.%pattern_type.loc8_13 (%pattern_type.077) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Factory.Method.%pattern_type.loc8_13 (%pattern_type.077) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @Factory.Method.%pattern_type.loc8_27 (%pattern_type.51d) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @Factory.Method.%pattern_type.loc8_27 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %assoc0.loc6_17.1: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = assoc_entity element0, %Factory.WithSelf.Make.decl [symbolic = %assoc0.loc6_17.2 (constants.%assoc0.cdd)] +// CHECK:STDOUT: %Factory.WithSelf.Method.decl: @Factory.%Factory.WithSelf.Method.type (%Factory.WithSelf.Method.type.900) = fn_decl @Factory.WithSelf.Method [symbolic = @Factory.%Factory.WithSelf.Method (constants.%Factory.WithSelf.Method.655)] { +// CHECK:STDOUT: %self.patt: @Factory.WithSelf.Method.%pattern_type.loc8_13 (%pattern_type.077) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Factory.WithSelf.Method.%pattern_type.loc8_13 (%pattern_type.077) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @Factory.WithSelf.Method.%pattern_type.loc8_27 (%pattern_type.51d) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @Factory.WithSelf.Method.%pattern_type.loc8_27 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @Factory.%T.loc4_19.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %.loc8_30.2: Core.Form = init_form %T.ref, call_param1 [symbolic = %.loc8_30.1 (constants.%.3cf)] -// CHECK:STDOUT: %self.param: @Factory.Method.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Factory.WithSelf.Method.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc8_19.1: type = splice_block %.loc8_19.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %.loc8_19.2: @Factory.Method.%Factory.type (%Factory.type.142) = specific_constant @Factory.%Self.loc4_29.1, @Factory(constants.%T) [symbolic = %Self (constants.%Self.cc4)] -// CHECK:STDOUT: %Self.ref: @Factory.Method.%Factory.type (%Factory.type.142) = name_ref Self, %.loc8_19.2 [symbolic = %Self (constants.%Self.cc4)] +// CHECK:STDOUT: %.loc8_19.2: @Factory.WithSelf.Method.%Factory.type (%Factory.type.142) = specific_constant @Factory.%Self.loc4_29.1, @Factory(constants.%T) [symbolic = %Self (constants.%Self.cc4)] +// CHECK:STDOUT: %Self.ref: @Factory.WithSelf.Method.%Factory.type (%Factory.type.142) = name_ref Self, %.loc8_19.2 [symbolic = %Self (constants.%Self.cc4)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc8_19.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Factory.Method.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @Factory.Method.%T (%T) = out_param call_param1 -// CHECK:STDOUT: %return: ref @Factory.Method.%T (%T) = return_slot %return.param +// CHECK:STDOUT: %self: @Factory.WithSelf.Method.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %return.param: ref @Factory.WithSelf.Method.%T (%T) = out_param call_param1 +// CHECK:STDOUT: %return: ref @Factory.WithSelf.Method.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1.loc8_31.1: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = assoc_entity element1, %Factory.Method.decl [symbolic = %assoc1.loc8_31.2 (constants.%assoc1.d68)] +// CHECK:STDOUT: %assoc1.loc8_31.1: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = assoc_entity element1, %Factory.WithSelf.Method.decl [symbolic = %assoc1.loc8_31.2 (constants.%assoc1.a88)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_29.1 // CHECK:STDOUT: .T = +// CHECK:STDOUT: .T = // CHECK:STDOUT: .Make = %assoc0.loc6_17.1 // CHECK:STDOUT: .Method = %assoc1.loc8_31.1 -// CHECK:STDOUT: witness = (%Factory.Make.decl, %Factory.Method.decl) +// CHECK:STDOUT: witness = (%Factory.WithSelf.Make.decl, %Factory.WithSelf.Method.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -994,24 +1029,24 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Factory.Make(@Factory.%T.loc4_19.2: type, @Factory.%Self.loc4_29.1: @Factory.%Factory.type (%Factory.type.142)) { +// CHECK:STDOUT: generic fn @Factory.WithSelf.Make(@Factory.%T.loc4_19.2: type, @Factory.%Self.loc4_29.1: @Factory.%Factory.type.loc4 (%Factory.type.142)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %.loc6_16.1: Core.Form = init_form %T, call_param0 [symbolic = %.loc6_16.1 (constants.%.41b)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @Factory.Make.%T (%T); +// CHECK:STDOUT: fn() -> out %return.param: @Factory.WithSelf.Make.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Factory.Method(@Factory.%T.loc4_19.2: type, @Factory.%Self.loc4_29.1: @Factory.%Factory.type (%Factory.type.142)) { +// CHECK:STDOUT: generic fn @Factory.WithSelf.Method(@Factory.%T.loc4_19.2: type, @Factory.%Self.loc4_29.1: @Factory.%Factory.type.loc4 (%Factory.type.142)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(%T)> [symbolic = %Factory.type (constants.%Factory.type.142)] -// CHECK:STDOUT: %Self: @Factory.Method.%Factory.type (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.cc4)] +// CHECK:STDOUT: %Self: @Factory.WithSelf.Method.%Factory.type (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.cc4)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type.loc8_13: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc8_13 (constants.%pattern_type.077)] // CHECK:STDOUT: %.loc8_30.1: Core.Form = init_form %T, call_param1 [symbolic = %.loc8_30.1 (constants.%.3cf)] // CHECK:STDOUT: %pattern_type.loc8_27: type = pattern_type %T [symbolic = %pattern_type.loc8_27 (constants.%pattern_type.51d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Factory.Method.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @Factory.Method.%T (%T); +// CHECK:STDOUT: fn(%self.param: @Factory.WithSelf.Method.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @Factory.WithSelf.Method.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A.as.Factory.impl.Make() -> out %return.param: %B; @@ -1022,13 +1057,15 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %T.loc4_19.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory.Make(constants.%T, constants.%Self.cc4) { +// CHECK:STDOUT: specific @Factory(constants.%T, constants.%Self.cc4) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Factory.WithSelf.Make(constants.%T, constants.%Self.cc4) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %.loc6_16.1 => constants.%.41b // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory.Method(constants.%T, constants.%Self.cc4) { +// CHECK:STDOUT: specific @Factory.WithSelf.Method(constants.%T, constants.%Self.cc4) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Factory.type => constants.%Factory.type.142 // CHECK:STDOUT: %Self => constants.%Self.cc4 @@ -1042,24 +1079,45 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %T.loc4_19.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Factory.type => constants.%Factory.type.5dd +// CHECK:STDOUT: %Factory.type.loc4 => constants.%Factory.type.5dd // CHECK:STDOUT: %Self.loc4_29.2 => constants.%Self.d67 -// CHECK:STDOUT: %Factory.Make.type => constants.%Factory.Make.type.662 -// CHECK:STDOUT: %Factory.Make => constants.%Factory.Make.e72 -// CHECK:STDOUT: %Factory.assoc_type => constants.%Factory.assoc_type.3bd -// CHECK:STDOUT: %assoc0.loc6_17.2 => constants.%assoc0.edc -// CHECK:STDOUT: %Factory.Method.type => constants.%Factory.Method.type.ae6 -// CHECK:STDOUT: %Factory.Method => constants.%Factory.Method.49b -// CHECK:STDOUT: %assoc1.loc8_31.2 => constants.%assoc1.d3a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory.Make(constants.%B, constants.%Factory.facet) { +// CHECK:STDOUT: specific @Factory(constants.%B, constants.%Self.cc4) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%B +// CHECK:STDOUT: %Factory.type.loc6 => constants.%Factory.type.5dd +// CHECK:STDOUT: %Self.loc6 => constants.%Self.cc4 +// CHECK:STDOUT: %Factory.WithSelf.Make.type => constants.%Factory.WithSelf.Make.type.474 +// CHECK:STDOUT: %Factory.WithSelf.Make => constants.%Factory.WithSelf.Make.11c +// CHECK:STDOUT: %Factory.assoc_type => constants.%Factory.assoc_type.3bd +// CHECK:STDOUT: %assoc0.loc6_17.2 => constants.%assoc0.2f8 +// CHECK:STDOUT: %Factory.WithSelf.Method.type => constants.%Factory.WithSelf.Method.type.631 +// CHECK:STDOUT: %Factory.WithSelf.Method => constants.%Factory.WithSelf.Method.6ef +// CHECK:STDOUT: %assoc1.loc8_31.2 => constants.%assoc1.5e4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Factory(constants.%B, constants.%Factory.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%B +// CHECK:STDOUT: %Factory.type.loc6 => constants.%Factory.type.5dd +// CHECK:STDOUT: %Self.loc6 => constants.%Factory.facet +// CHECK:STDOUT: %Factory.WithSelf.Make.type => constants.%Factory.WithSelf.Make.type.d44 +// CHECK:STDOUT: %Factory.WithSelf.Make => constants.%Factory.WithSelf.Make.228 +// CHECK:STDOUT: %Factory.assoc_type => constants.%Factory.assoc_type.3bd +// CHECK:STDOUT: %assoc0.loc6_17.2 => constants.%assoc0.2f8 +// CHECK:STDOUT: %Factory.WithSelf.Method.type => constants.%Factory.WithSelf.Method.type.d2f +// CHECK:STDOUT: %Factory.WithSelf.Method => constants.%Factory.WithSelf.Method.a3c +// CHECK:STDOUT: %assoc1.loc8_31.2 => constants.%assoc1.5e4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Factory.WithSelf.Make(constants.%B, constants.%Factory.facet) { // CHECK:STDOUT: %T => constants.%B // CHECK:STDOUT: %.loc6_16.1 => constants.%.e82 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.1f4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory.Method(constants.%B, constants.%Factory.facet) { +// CHECK:STDOUT: specific @Factory.WithSelf.Method(constants.%B, constants.%Factory.facet) { // CHECK:STDOUT: %T => constants.%B // CHECK:STDOUT: %Factory.type => constants.%Factory.type.5dd // CHECK:STDOUT: %Self => constants.%Factory.facet @@ -1081,43 +1139,45 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Factory.type.142: type = facet_type <@Factory, @Factory(%T)> [symbolic] // CHECK:STDOUT: %Self.197: %Factory.type.142 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Factory.assoc_type.129: type = assoc_entity_type @Factory, @Factory(%T) [symbolic] -// CHECK:STDOUT: %assoc1.df9706.1: %Factory.assoc_type.129 = assoc_entity element1, imports.%Main.import_ref.c649d0.1 [symbolic] -// CHECK:STDOUT: %Factory.Method.type.6d3: type = fn_type @Factory.Method, @Factory(%T) [symbolic] -// CHECK:STDOUT: %Factory.Method.ad5: %Factory.Method.type.6d3 = struct_value () [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Method.type.e3d: type = fn_type @Factory.WithSelf.Method, @Factory(%T, %Self.197) [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Method.f9e: %Factory.WithSelf.Method.type.e3d = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.197 [symbolic] // CHECK:STDOUT: %pattern_type.12d: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.3cf: Core.Form = init_form %T, call_param1 [symbolic] -// CHECK:STDOUT: %assoc0.f7d053.1: %Factory.assoc_type.129 = assoc_entity element0, imports.%Main.import_ref.2d54f7.1 [symbolic] -// CHECK:STDOUT: %Factory.Make.type.9ff: type = fn_type @Factory.Make, @Factory(%T) [symbolic] -// CHECK:STDOUT: %Factory.Make.fd5: %Factory.Make.type.9ff = struct_value () [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Make.type.865: type = fn_type @Factory.WithSelf.Make, @Factory(%T, %Self.197) [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Make.400: %Factory.WithSelf.Make.type.865 = struct_value () [symbolic] // CHECK:STDOUT: %.41b: Core.Form = init_form %T, call_param0 [symbolic] // CHECK:STDOUT: %Factory.type.5dd: type = facet_type <@Factory, @Factory(%B)> [concrete] -// CHECK:STDOUT: %Factory.assoc_type.3bd: type = assoc_entity_type @Factory, @Factory(%B) [concrete] -// CHECK:STDOUT: %assoc1.be2: %Factory.assoc_type.3bd = assoc_entity element1, imports.%Main.import_ref.3cb [concrete] -// CHECK:STDOUT: %Factory.Method.type.ae6: type = fn_type @Factory.Method, @Factory(%B) [concrete] -// CHECK:STDOUT: %Factory.Method.49b: %Factory.Method.type.ae6 = struct_value () [concrete] -// CHECK:STDOUT: %assoc0.779: %Factory.assoc_type.3bd = assoc_entity element0, imports.%Main.import_ref.1fc [concrete] -// CHECK:STDOUT: %Factory.Make.type.662: type = fn_type @Factory.Make, @Factory(%B) [concrete] -// CHECK:STDOUT: %Factory.Make.e72: %Factory.Make.type.662 = struct_value () [concrete] // CHECK:STDOUT: %Self.843: %Factory.type.5dd = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %.e82: Core.Form = init_form %B, call_param0 [concrete] // CHECK:STDOUT: %pattern_type.1f4: type = pattern_type %B [concrete] // CHECK:STDOUT: %MakeB.type: type = fn_type @MakeB [concrete] // CHECK:STDOUT: %MakeB: %MakeB.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc0.f7d053.2: %Factory.assoc_type.129 = assoc_entity element0, imports.%Main.import_ref.2d54f7.2 [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Make.type.6ba: type = fn_type @Factory.WithSelf.Make, @Factory(%B, %Self.197) [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Make.b8a: %Factory.WithSelf.Make.type.6ba = struct_value () [symbolic] +// CHECK:STDOUT: %Factory.assoc_type.3bd: type = assoc_entity_type @Factory, @Factory(%B) [concrete] +// CHECK:STDOUT: %assoc0.75e: %Factory.assoc_type.3bd = assoc_entity element0, imports.%Main.import_ref.268 [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Method.type.d94: type = fn_type @Factory.WithSelf.Method, @Factory(%B, %Self.197) [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Method.1c4: %Factory.WithSelf.Method.type.d94 = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1.235: %Factory.assoc_type.3bd = assoc_entity element1, imports.%Main.import_ref.f85 [concrete] +// CHECK:STDOUT: %assoc0.16e: %Factory.assoc_type.129 = assoc_entity element0, imports.%Main.import_ref.c54 [symbolic] // CHECK:STDOUT: %Factory.impl_witness: = impl_witness imports.%Factory.impl_witness_table [concrete] // CHECK:STDOUT: %Factory.facet: %Factory.type.5dd = facet_value %A, (%Factory.impl_witness) [concrete] -// CHECK:STDOUT: %.d31: type = fn_type_with_self_type %Factory.Make.type.662, %Factory.facet [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Make.type.ac7: type = fn_type @Factory.WithSelf.Make, @Factory(%B, %Factory.facet) [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Make.c7c: %Factory.WithSelf.Make.type.ac7 = struct_value () [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Method.type.766: type = fn_type @Factory.WithSelf.Method, @Factory(%B, %Factory.facet) [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Method.c1e: %Factory.WithSelf.Method.type.766 = struct_value () [concrete] +// CHECK:STDOUT: %.cce: type = fn_type_with_self_type %Factory.WithSelf.Make.type.ac7, %Factory.facet [concrete] // CHECK:STDOUT: %A.as.Factory.impl.Make.type: type = fn_type @A.as.Factory.impl.Make [concrete] // CHECK:STDOUT: %A.as.Factory.impl.Make: %A.as.Factory.impl.Make.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete] // CHECK:STDOUT: %.916: Core.Form = init_form %B, call_param1 [concrete] // CHECK:STDOUT: %InstanceB.type: type = fn_type @InstanceB [concrete] // CHECK:STDOUT: %InstanceB: %InstanceB.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1.df9706.2: %Factory.assoc_type.129 = assoc_entity element1, imports.%Main.import_ref.c649d0.2 [symbolic] -// CHECK:STDOUT: %.b77: type = fn_type_with_self_type %Factory.Method.type.ae6, %Factory.facet [concrete] +// CHECK:STDOUT: %assoc1.97c: %Factory.assoc_type.129 = assoc_entity element1, imports.%Main.import_ref.71e [symbolic] +// CHECK:STDOUT: %.f92: type = fn_type_with_self_type %Factory.WithSelf.Method.type.766, %Factory.facet [concrete] // CHECK:STDOUT: %A.as.Factory.impl.Method.type: type = fn_type @A.as.Factory.impl.Method [concrete] // CHECK:STDOUT: %A.as.Factory.impl.Method: %A.as.Factory.impl.Method.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -1132,32 +1192,30 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//factory, loc12_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.536 = import_ref Main//factory, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.93a = import_ref Main//factory, loc4_29, unloaded -// CHECK:STDOUT: %Main.import_ref.6f2: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.f7d053.2)] -// CHECK:STDOUT: %Main.import_ref.fb1: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.df9706.2)] +// CHECK:STDOUT: %Main.import_ref.d1c: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.16e)] +// CHECK:STDOUT: %Main.import_ref.c7f: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.97c)] // CHECK:STDOUT: %Main.Make = import_ref Main//factory, Make, unloaded // CHECK:STDOUT: %Main.Method = import_ref Main//factory, Method, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.c649d0.1 = import_ref Main//factory, loc8_31, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.a2eb4c.1: @Factory.%Factory.type (%Factory.type.142) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self (constants.%Self.197)] -// CHECK:STDOUT: %Main.import_ref.2d54f7.1 = import_ref Main//factory, loc6_17, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.a2eb4c.2: @Factory.%Factory.type (%Factory.type.142) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self (constants.%Self.197)] +// CHECK:STDOUT: %Main.import_ref.f85: @Factory.%Factory.WithSelf.Method.type (%Factory.WithSelf.Method.type.e3d) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%Factory.WithSelf.Method (constants.%Factory.WithSelf.Method.f9e)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.a2eb4c.2: @Factory.%Factory.type.1 (%Factory.type.142) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self.1 (constants.%Self.197)] +// CHECK:STDOUT: %Main.import_ref.268: @Factory.%Factory.WithSelf.Make.type (%Factory.WithSelf.Make.type.865) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%Factory.WithSelf.Make (constants.%Factory.WithSelf.Make.400)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.a2eb4c.3: @Factory.%Factory.type.1 (%Factory.type.142) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self.1 (constants.%Self.197)] +// CHECK:STDOUT: %Main.import_ref.93a = import_ref Main//factory, loc4_29, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T.1 (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8a9: = import_ref Main//factory, loc14_22, loaded [concrete = constants.%Factory.impl_witness] -// CHECK:STDOUT: %Main.import_ref.3cb: @Factory.%Factory.Method.type (%Factory.Method.type.6d3) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%Factory.Method (constants.%Factory.Method.ad5)] -// CHECK:STDOUT: %Main.import_ref.1fc: @Factory.%Factory.Make.type (%Factory.Make.type.9ff) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%Factory.Make (constants.%Factory.Make.fd5)] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.450 = import_ref Main//factory, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.d04: type = import_ref Main//factory, loc14_6, loaded [concrete = constants.%A] // 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.2d54f7.2 = import_ref Main//factory, loc6_17, unloaded +// CHECK:STDOUT: %Main.import_ref.c54 = import_ref Main//factory, loc6_17, unloaded // CHECK:STDOUT: %Main.import_ref.797: %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.353: %A.as.Factory.impl.Method.type = import_ref Main//factory, loc16_31, loaded [concrete = constants.%A.as.Factory.impl.Method] // CHECK:STDOUT: %Factory.impl_witness_table = impl_witness_table (%Main.import_ref.797, %Main.import_ref.353), @A.as.Factory.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.c649d0.2 = import_ref Main//factory, loc8_31, unloaded +// CHECK:STDOUT: %Main.import_ref.71e = import_ref Main//factory, loc8_31, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1197,25 +1255,18 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @Factory(imports.%Main.import_ref.b3bc94.1: type) [from "factory.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @Factory(imports.%Main.import_ref.b3bc94.4: type) [from "factory.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(%T)> [symbolic = %Factory.type (constants.%Factory.type.142)] -// CHECK:STDOUT: %Self: @Factory.%Factory.type (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.197)] -// CHECK:STDOUT: %Factory.Make.type: type = fn_type @Factory.Make, @Factory(%T) [symbolic = %Factory.Make.type (constants.%Factory.Make.type.9ff)] -// CHECK:STDOUT: %Factory.Make: @Factory.%Factory.Make.type (%Factory.Make.type.9ff) = struct_value () [symbolic = %Factory.Make (constants.%Factory.Make.fd5)] -// CHECK:STDOUT: %Factory.assoc_type: type = assoc_entity_type @Factory, @Factory(%T) [symbolic = %Factory.assoc_type (constants.%Factory.assoc_type.129)] -// CHECK:STDOUT: %assoc0: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = assoc_entity element0, imports.%Main.import_ref.2d54f7.1 [symbolic = %assoc0 (constants.%assoc0.f7d053.1)] -// CHECK:STDOUT: %Factory.Method.type: type = fn_type @Factory.Method, @Factory(%T) [symbolic = %Factory.Method.type (constants.%Factory.Method.type.6d3)] -// CHECK:STDOUT: %Factory.Method: @Factory.%Factory.Method.type (%Factory.Method.type.6d3) = struct_value () [symbolic = %Factory.Method (constants.%Factory.Method.ad5)] -// CHECK:STDOUT: %assoc1: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = assoc_entity element1, imports.%Main.import_ref.c649d0.1 [symbolic = %assoc1 (constants.%assoc1.df9706.1)] +// CHECK:STDOUT: %Factory.type.1: type = facet_type <@Factory, @Factory(%T.1)> [symbolic = %Factory.type.1 (constants.%Factory.type.142)] +// CHECK:STDOUT: %Self.1: @Factory.%Factory.type.1 (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.197)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.93a -// CHECK:STDOUT: .Make = imports.%Main.import_ref.6f2 -// CHECK:STDOUT: .Method = imports.%Main.import_ref.fb1 +// CHECK:STDOUT: .Make = imports.%Main.import_ref.d1c +// CHECK:STDOUT: .Method = imports.%Main.import_ref.c7f // CHECK:STDOUT: witness = (imports.%Main.Make, imports.%Main.Method) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1243,10 +1294,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: .Self = imports.%Main.import_ref.450 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Factory.Method(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.a2eb4c.1: @Factory.%Factory.type (%Factory.type.142)) [from "factory.carbon"] { +// CHECK:STDOUT: generic fn @Factory.WithSelf.Method(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.a2eb4c.2: @Factory.%Factory.type.1 (%Factory.type.142)) [from "factory.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(%T)> [symbolic = %Factory.type (constants.%Factory.type.142)] -// CHECK:STDOUT: %Self: @Factory.Method.%Factory.type (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.197)] +// CHECK:STDOUT: %Self: @Factory.WithSelf.Method.%Factory.type (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.197)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.12d)] // CHECK:STDOUT: %.1: Core.Form = init_form %T, call_param1 [symbolic = %.1 (constants.%.3cf)] @@ -1255,7 +1306,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Factory.Make(imports.%Main.import_ref.b3bc94.3: type, imports.%Main.import_ref.a2eb4c.2: @Factory.%Factory.type (%Factory.type.142)) [from "factory.carbon"] { +// CHECK:STDOUT: generic fn @Factory.WithSelf.Make(imports.%Main.import_ref.b3bc94.3: type, imports.%Main.import_ref.a2eb4c.3: @Factory.%Factory.type.1 (%Factory.type.142)) [from "factory.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %.1: Core.Form = init_form %T, call_param0 [symbolic = %.1 (constants.%.41b)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)] @@ -1269,11 +1320,11 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Factory.ref: %Factory.type.2e5 = name_ref Factory, imports.%Main.Factory [concrete = constants.%Factory.generic] // CHECK:STDOUT: %B.ref.loc5: type = name_ref B, imports.%Main.B [concrete = constants.%B] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%B)> [concrete = constants.%Factory.type.5dd] -// CHECK:STDOUT: %.loc5_23: %Factory.assoc_type.3bd = specific_constant imports.%Main.import_ref.6f2, @Factory(constants.%B) [concrete = constants.%assoc0.779] -// CHECK:STDOUT: %Make.ref: %Factory.assoc_type.3bd = name_ref Make, %.loc5_23 [concrete = constants.%assoc0.779] +// CHECK:STDOUT: %.loc5_23: %Factory.assoc_type.3bd = specific_constant imports.%Main.import_ref.d1c, @Factory(constants.%B, constants.%Self.197) [concrete = constants.%assoc0.75e] +// CHECK:STDOUT: %Make.ref: %Factory.assoc_type.3bd = name_ref Make, %.loc5_23 [concrete = constants.%assoc0.75e] // CHECK:STDOUT: %Factory.facet: %Factory.type.5dd = facet_value %A.ref, (constants.%Factory.impl_witness) [concrete = constants.%Factory.facet] // CHECK:STDOUT: %.loc5_11: %Factory.type.5dd = converted %A.ref, %Factory.facet [concrete = constants.%Factory.facet] -// CHECK:STDOUT: %impl.elem0: %.d31 = impl_witness_access constants.%Factory.impl_witness, element0 [concrete = constants.%A.as.Factory.impl.Make] +// CHECK:STDOUT: %impl.elem0: %.cce = impl_witness_access constants.%Factory.impl_witness, element0 [concrete = constants.%A.as.Factory.impl.Make] // CHECK:STDOUT: %.loc4_15.1: ref %B = splice_block %return.param {} // CHECK:STDOUT: %A.as.Factory.impl.Make.call: init %B to %.loc4_15.1 = call %impl.elem0() // CHECK:STDOUT: return %A.as.Factory.impl.Make.call to %return.param @@ -1287,9 +1338,9 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Factory.ref: %Factory.type.2e5 = name_ref Factory, imports.%Main.Factory [concrete = constants.%Factory.generic] // CHECK:STDOUT: %B.ref.loc8: type = name_ref B, imports.%Main.B [concrete = constants.%B] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%B)> [concrete = constants.%Factory.type.5dd] -// CHECK:STDOUT: %.loc8: %Factory.assoc_type.3bd = specific_constant imports.%Main.import_ref.fb1, @Factory(constants.%B) [concrete = constants.%assoc1.be2] -// CHECK:STDOUT: %Method.ref: %Factory.assoc_type.3bd = name_ref Method, %.loc8 [concrete = constants.%assoc1.be2] -// CHECK:STDOUT: %impl.elem1: %.b77 = impl_witness_access constants.%Factory.impl_witness, element1 [concrete = constants.%A.as.Factory.impl.Method] +// CHECK:STDOUT: %.loc8: %Factory.assoc_type.3bd = specific_constant imports.%Main.import_ref.c7f, @Factory(constants.%B, constants.%Self.197) [concrete = constants.%assoc1.235] +// CHECK:STDOUT: %Method.ref: %Factory.assoc_type.3bd = name_ref Method, %.loc8 [concrete = constants.%assoc1.235] +// CHECK:STDOUT: %impl.elem1: %.f92 = impl_witness_access constants.%Factory.impl_witness, element1 [concrete = constants.%A.as.Factory.impl.Method] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: %.loc7_23.1: ref %B = splice_block %return.param {} // CHECK:STDOUT: %A.as.Factory.impl.Method.call: init %B to %.loc7_23.1 = call %bound_method(%a.ref) @@ -1299,10 +1350,12 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: fn @A.as.Factory.impl.Method [from "factory.carbon"]; // CHECK:STDOUT: // CHECK:STDOUT: specific @Factory(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory.Method(constants.%T, constants.%Self.197) { +// CHECK:STDOUT: specific @Factory(constants.%T, constants.%Self.197) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Factory.WithSelf.Method(constants.%T, constants.%Self.197) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Factory.type => constants.%Factory.type.142 // CHECK:STDOUT: %Self => constants.%Self.197 @@ -1312,25 +1365,46 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.51d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory.Make(constants.%T, constants.%Self.197) { +// CHECK:STDOUT: specific @Factory.WithSelf.Make(constants.%T, constants.%Self.197) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %.1 => constants.%.41b // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Factory(constants.%B) { -// CHECK:STDOUT: %T => constants.%B +// CHECK:STDOUT: %T.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Factory.type => constants.%Factory.type.5dd -// CHECK:STDOUT: %Self => constants.%Self.843 -// CHECK:STDOUT: %Factory.Make.type => constants.%Factory.Make.type.662 -// CHECK:STDOUT: %Factory.Make => constants.%Factory.Make.e72 +// CHECK:STDOUT: %Factory.type.1 => constants.%Factory.type.5dd +// CHECK:STDOUT: %Self.1 => constants.%Self.843 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Factory(constants.%B, constants.%Self.197) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%B +// CHECK:STDOUT: %Factory.type.2 => constants.%Factory.type.5dd +// CHECK:STDOUT: %Self.2 => constants.%Self.197 +// CHECK:STDOUT: %Factory.WithSelf.Make.type => constants.%Factory.WithSelf.Make.type.6ba +// CHECK:STDOUT: %Factory.WithSelf.Make => constants.%Factory.WithSelf.Make.b8a // CHECK:STDOUT: %Factory.assoc_type => constants.%Factory.assoc_type.3bd -// CHECK:STDOUT: %assoc0 => constants.%assoc0.779 -// CHECK:STDOUT: %Factory.Method.type => constants.%Factory.Method.type.ae6 -// CHECK:STDOUT: %Factory.Method => constants.%Factory.Method.49b -// CHECK:STDOUT: %assoc1 => constants.%assoc1.be2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.75e +// CHECK:STDOUT: %Factory.WithSelf.Method.type => constants.%Factory.WithSelf.Method.type.d94 +// CHECK:STDOUT: %Factory.WithSelf.Method => constants.%Factory.WithSelf.Method.1c4 +// CHECK:STDOUT: %assoc1 => constants.%assoc1.235 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Factory(constants.%B, constants.%Factory.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%B +// CHECK:STDOUT: %Factory.type.2 => constants.%Factory.type.5dd +// CHECK:STDOUT: %Self.2 => constants.%Factory.facet +// CHECK:STDOUT: %Factory.WithSelf.Make.type => constants.%Factory.WithSelf.Make.type.ac7 +// CHECK:STDOUT: %Factory.WithSelf.Make => constants.%Factory.WithSelf.Make.c7c +// CHECK:STDOUT: %Factory.assoc_type => constants.%Factory.assoc_type.3bd +// CHECK:STDOUT: %assoc0 => constants.%assoc0.75e +// CHECK:STDOUT: %Factory.WithSelf.Method.type => constants.%Factory.WithSelf.Method.type.766 +// CHECK:STDOUT: %Factory.WithSelf.Method => constants.%Factory.WithSelf.Method.c1e +// CHECK:STDOUT: %assoc1 => constants.%assoc1.235 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_factory.impl.carbon @@ -1345,25 +1419,16 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Factory.type.142: type = facet_type <@Factory, @Factory(%T)> [symbolic] // CHECK:STDOUT: %Self.197: %Factory.type.142 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Factory.assoc_type.129: type = assoc_entity_type @Factory, @Factory(%T) [symbolic] -// CHECK:STDOUT: %assoc1.0b7: %Factory.assoc_type.129 = assoc_entity element1, imports.%Main.import_ref.3cb [symbolic] -// CHECK:STDOUT: %Factory.Method.type.6d3: type = fn_type @Factory.Method, @Factory(%T) [symbolic] -// CHECK:STDOUT: %Factory.Method.ad5: %Factory.Method.type.6d3 = struct_value () [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Method.type.e3d: type = fn_type @Factory.WithSelf.Method, @Factory(%T, %Self.197) [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Method.f9e: %Factory.WithSelf.Method.type.e3d = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.197 [symbolic] // CHECK:STDOUT: %pattern_type.12d: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.3cf: Core.Form = init_form %T, call_param1 [symbolic] -// CHECK:STDOUT: %assoc0.8a8: %Factory.assoc_type.129 = assoc_entity element0, imports.%Main.import_ref.1fc [symbolic] -// CHECK:STDOUT: %Factory.Make.type.9ff: type = fn_type @Factory.Make, @Factory(%T) [symbolic] -// CHECK:STDOUT: %Factory.Make.fd5: %Factory.Make.type.9ff = struct_value () [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Make.type.865: type = fn_type @Factory.WithSelf.Make, @Factory(%T, %Self.197) [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Make.400: %Factory.WithSelf.Make.type.865 = struct_value () [symbolic] // CHECK:STDOUT: %.41b: Core.Form = init_form %T, call_param0 [symbolic] // CHECK:STDOUT: %Factory.type.5dd: type = facet_type <@Factory, @Factory(%B)> [concrete] -// CHECK:STDOUT: %Factory.assoc_type.3bd: type = assoc_entity_type @Factory, @Factory(%B) [concrete] -// CHECK:STDOUT: %assoc1.e9c: %Factory.assoc_type.3bd = assoc_entity element1, imports.%Main.import_ref.c649d0.1 [concrete] -// CHECK:STDOUT: %Factory.Method.type.ae6: type = fn_type @Factory.Method, @Factory(%B) [concrete] -// CHECK:STDOUT: %Factory.Method.49b: %Factory.Method.type.ae6 = struct_value () [concrete] -// CHECK:STDOUT: %assoc0.c00: %Factory.assoc_type.3bd = assoc_entity element0, imports.%Main.import_ref.2d54f7.1 [concrete] -// CHECK:STDOUT: %Factory.Make.type.662: type = fn_type @Factory.Make, @Factory(%B) [concrete] -// CHECK:STDOUT: %Factory.Make.e72: %Factory.Make.type.662 = struct_value () [concrete] // CHECK:STDOUT: %Self.843: %Factory.type.5dd = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] @@ -1373,19 +1438,19 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [concrete] // CHECK:STDOUT: %Factory.type.2db: type = facet_type <@Factory, @Factory(%C)> [concrete] // CHECK:STDOUT: %Self.e13: %Factory.type.2db = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Factory.Make.type.482: type = fn_type @Factory.Make, @Factory(%C) [concrete] -// CHECK:STDOUT: %Factory.Make.715: %Factory.Make.type.482 = struct_value () [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Make.type.1a1: type = fn_type @Factory.WithSelf.Make, @Factory(%C, %Self.197) [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Make.64e: %Factory.WithSelf.Make.type.1a1 = struct_value () [symbolic] // CHECK:STDOUT: %Factory.assoc_type.930: type = assoc_entity_type @Factory, @Factory(%C) [concrete] -// CHECK:STDOUT: %assoc0.4ac: %Factory.assoc_type.930 = assoc_entity element0, imports.%Main.import_ref.1fc [concrete] -// CHECK:STDOUT: %Factory.Method.type.4c3: type = fn_type @Factory.Method, @Factory(%C) [concrete] -// CHECK:STDOUT: %Factory.Method.ed8: %Factory.Method.type.4c3 = struct_value () [concrete] -// CHECK:STDOUT: %assoc1.09b: %Factory.assoc_type.930 = assoc_entity element1, imports.%Main.import_ref.3cb [concrete] -// CHECK:STDOUT: %assoc0.f7d: %Factory.assoc_type.129 = assoc_entity element0, imports.%Main.import_ref.2d54f7.2 [symbolic] +// CHECK:STDOUT: %assoc0.b1c: %Factory.assoc_type.930 = assoc_entity element0, imports.%Main.import_ref.268 [concrete] +// CHECK:STDOUT: %Factory.WithSelf.Method.type.485: type = fn_type @Factory.WithSelf.Method, @Factory(%C, %Self.197) [symbolic] +// CHECK:STDOUT: %Factory.WithSelf.Method.005: %Factory.WithSelf.Method.type.485 = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1.875: %Factory.assoc_type.930 = assoc_entity element1, imports.%Main.import_ref.f85 [concrete] +// CHECK:STDOUT: %assoc0.16e: %Factory.assoc_type.129 = assoc_entity element0, imports.%Main.import_ref.c54 [symbolic] // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete] // CHECK:STDOUT: %.b89: Core.Form = init_form %C, call_param1 [concrete] // CHECK:STDOUT: %InstanceC.type: type = fn_type @InstanceC [concrete] // CHECK:STDOUT: %InstanceC: %InstanceC.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1.df9: %Factory.assoc_type.129 = assoc_entity element1, imports.%Main.import_ref.c649d0.2 [symbolic] +// CHECK:STDOUT: %assoc1.97c: %Factory.assoc_type.129 = assoc_entity element1, imports.%Main.import_ref.71e [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1399,29 +1464,27 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//factory, loc12_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.536 = import_ref Main//factory, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.93a = import_ref Main//factory, loc4_29, unloaded -// CHECK:STDOUT: %Main.import_ref.6f2: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.f7d)] -// CHECK:STDOUT: %Main.import_ref.fb1: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.df9)] +// CHECK:STDOUT: %Main.import_ref.d1c: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.16e)] +// CHECK:STDOUT: %Main.import_ref.c7f: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.97c)] // CHECK:STDOUT: %Main.Make = import_ref Main//factory, Make, unloaded // CHECK:STDOUT: %Main.Method = import_ref Main//factory, Method, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.3cb: @Factory.%Factory.Method.type (%Factory.Method.type.6d3) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%Factory.Method (constants.%Factory.Method.ad5)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.a2eb4c.1: @Factory.%Factory.type (%Factory.type.142) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self (constants.%Self.197)] -// CHECK:STDOUT: %Main.import_ref.1fc: @Factory.%Factory.Make.type (%Factory.Make.type.9ff) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%Factory.Make (constants.%Factory.Make.fd5)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.a2eb4c.2: @Factory.%Factory.type (%Factory.type.142) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self (constants.%Self.197)] +// CHECK:STDOUT: %Main.import_ref.f85: @Factory.%Factory.WithSelf.Method.type (%Factory.WithSelf.Method.type.e3d) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%Factory.WithSelf.Method (constants.%Factory.WithSelf.Method.f9e)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.a2eb4c.2: @Factory.%Factory.type.1 (%Factory.type.142) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self.1 (constants.%Self.197)] +// CHECK:STDOUT: %Main.import_ref.268: @Factory.%Factory.WithSelf.Make.type (%Factory.WithSelf.Make.type.865) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%Factory.WithSelf.Make (constants.%Factory.WithSelf.Make.400)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.a2eb4c.3: @Factory.%Factory.type.1 (%Factory.type.142) = import_ref Main//factory, loc4_29, loaded [symbolic = @Factory.%Self.1 (constants.%Self.197)] +// CHECK:STDOUT: %Main.import_ref.93a = import_ref Main//factory, loc4_29, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T.1 (constants.%T)] // CHECK:STDOUT: %Main.import_ref.1cd = import_ref Main//factory, loc14_22, unloaded -// CHECK:STDOUT: %Main.import_ref.c649d0.1 = import_ref Main//factory, loc8_31, unloaded -// CHECK:STDOUT: %Main.import_ref.2d54f7.1 = import_ref Main//factory, loc6_17, unloaded // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.450 = import_ref Main//factory, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.d04: type = import_ref Main//factory, loc14_6, loaded [concrete = constants.%A] // 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.2d54f7.2 = import_ref Main//factory, loc6_17, unloaded -// CHECK:STDOUT: %Main.import_ref.c649d0.2 = import_ref Main//factory, loc8_31, 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: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1463,25 +1526,18 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @Factory(imports.%Main.import_ref.b3bc94.1: type) [from "factory.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @Factory(imports.%Main.import_ref.b3bc94.4: type) [from "factory.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(%T)> [symbolic = %Factory.type (constants.%Factory.type.142)] -// CHECK:STDOUT: %Self: @Factory.%Factory.type (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.197)] -// CHECK:STDOUT: %Factory.Make.type: type = fn_type @Factory.Make, @Factory(%T) [symbolic = %Factory.Make.type (constants.%Factory.Make.type.9ff)] -// CHECK:STDOUT: %Factory.Make: @Factory.%Factory.Make.type (%Factory.Make.type.9ff) = struct_value () [symbolic = %Factory.Make (constants.%Factory.Make.fd5)] -// CHECK:STDOUT: %Factory.assoc_type: type = assoc_entity_type @Factory, @Factory(%T) [symbolic = %Factory.assoc_type (constants.%Factory.assoc_type.129)] -// CHECK:STDOUT: %assoc0: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = assoc_entity element0, imports.%Main.import_ref.1fc [symbolic = %assoc0 (constants.%assoc0.8a8)] -// CHECK:STDOUT: %Factory.Method.type: type = fn_type @Factory.Method, @Factory(%T) [symbolic = %Factory.Method.type (constants.%Factory.Method.type.6d3)] -// CHECK:STDOUT: %Factory.Method: @Factory.%Factory.Method.type (%Factory.Method.type.6d3) = struct_value () [symbolic = %Factory.Method (constants.%Factory.Method.ad5)] -// CHECK:STDOUT: %assoc1: @Factory.%Factory.assoc_type (%Factory.assoc_type.129) = assoc_entity element1, imports.%Main.import_ref.3cb [symbolic = %assoc1 (constants.%assoc1.0b7)] +// CHECK:STDOUT: %Factory.type.1: type = facet_type <@Factory, @Factory(%T.1)> [symbolic = %Factory.type.1 (constants.%Factory.type.142)] +// CHECK:STDOUT: %Self.1: @Factory.%Factory.type.1 (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.197)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.93a -// CHECK:STDOUT: .Make = imports.%Main.import_ref.6f2 -// CHECK:STDOUT: .Method = imports.%Main.import_ref.fb1 +// CHECK:STDOUT: .Make = imports.%Main.import_ref.d1c +// CHECK:STDOUT: .Method = imports.%Main.import_ref.c7f // CHECK:STDOUT: witness = (imports.%Main.Make, imports.%Main.Method) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1517,10 +1573,10 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Factory.Method(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.a2eb4c.1: @Factory.%Factory.type (%Factory.type.142)) [from "factory.carbon"] { +// CHECK:STDOUT: generic fn @Factory.WithSelf.Method(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.a2eb4c.2: @Factory.%Factory.type.1 (%Factory.type.142)) [from "factory.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(%T)> [symbolic = %Factory.type (constants.%Factory.type.142)] -// CHECK:STDOUT: %Self: @Factory.Method.%Factory.type (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.197)] +// CHECK:STDOUT: %Self: @Factory.WithSelf.Method.%Factory.type (%Factory.type.142) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.197)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.12d)] // CHECK:STDOUT: %.1: Core.Form = init_form %T, call_param1 [symbolic = %.1 (constants.%.3cf)] @@ -1529,7 +1585,7 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Factory.Make(imports.%Main.import_ref.b3bc94.3: type, imports.%Main.import_ref.a2eb4c.2: @Factory.%Factory.type (%Factory.type.142)) [from "factory.carbon"] { +// CHECK:STDOUT: generic fn @Factory.WithSelf.Make(imports.%Main.import_ref.b3bc94.3: type, imports.%Main.import_ref.a2eb4c.3: @Factory.%Factory.type.1 (%Factory.type.142)) [from "factory.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %.1: Core.Form = init_form %T, call_param0 [symbolic = %.1 (constants.%.41b)] // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)] @@ -1543,8 +1599,8 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Factory.ref: %Factory.type.2e5 = name_ref Factory, imports.%Main.Factory [concrete = constants.%Factory.generic] // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%C)> [concrete = constants.%Factory.type.2db] -// CHECK:STDOUT: %.loc13: %Factory.assoc_type.930 = specific_constant imports.%Main.import_ref.6f2, @Factory(constants.%C) [concrete = constants.%assoc0.4ac] -// CHECK:STDOUT: %Make.ref: %Factory.assoc_type.930 = name_ref Make, %.loc13 [concrete = constants.%assoc0.4ac] +// CHECK:STDOUT: %.loc13: %Factory.assoc_type.930 = specific_constant imports.%Main.import_ref.d1c, @Factory(constants.%C, constants.%Self.197) [concrete = constants.%assoc0.b1c] +// CHECK:STDOUT: %Make.ref: %Factory.assoc_type.930 = name_ref Make, %.loc13 [concrete = constants.%assoc0.b1c] // CHECK:STDOUT: return to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1554,16 +1610,18 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %Factory.ref: %Factory.type.2e5 = name_ref Factory, imports.%Main.Factory [concrete = constants.%Factory.generic] // CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%C)> [concrete = constants.%Factory.type.2db] -// CHECK:STDOUT: %.loc21: %Factory.assoc_type.930 = specific_constant imports.%Main.import_ref.fb1, @Factory(constants.%C) [concrete = constants.%assoc1.09b] -// CHECK:STDOUT: %Method.ref: %Factory.assoc_type.930 = name_ref Method, %.loc21 [concrete = constants.%assoc1.09b] +// CHECK:STDOUT: %.loc21: %Factory.assoc_type.930 = specific_constant imports.%Main.import_ref.c7f, @Factory(constants.%C, constants.%Self.197) [concrete = constants.%assoc1.875] +// CHECK:STDOUT: %Method.ref: %Factory.assoc_type.930 = name_ref Method, %.loc21 [concrete = constants.%assoc1.875] // CHECK:STDOUT: return to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Factory(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory.Method(constants.%T, constants.%Self.197) { +// CHECK:STDOUT: specific @Factory(constants.%T, constants.%Self.197) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Factory.WithSelf.Method(constants.%T, constants.%Self.197) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Factory.type => constants.%Factory.type.142 // CHECK:STDOUT: %Self => constants.%Self.197 @@ -1573,39 +1631,39 @@ fn InstanceC(a: A) -> C { // CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.51d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Factory.Make(constants.%T, constants.%Self.197) { +// CHECK:STDOUT: specific @Factory.WithSelf.Make(constants.%T, constants.%Self.197) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %.1 => constants.%.41b // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Factory(constants.%B) { -// CHECK:STDOUT: %T => constants.%B +// CHECK:STDOUT: %T.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Factory.type => constants.%Factory.type.5dd -// CHECK:STDOUT: %Self => constants.%Self.843 -// CHECK:STDOUT: %Factory.Make.type => constants.%Factory.Make.type.662 -// CHECK:STDOUT: %Factory.Make => constants.%Factory.Make.e72 -// CHECK:STDOUT: %Factory.assoc_type => constants.%Factory.assoc_type.3bd -// CHECK:STDOUT: %assoc0 => constants.%assoc0.c00 -// CHECK:STDOUT: %Factory.Method.type => constants.%Factory.Method.type.ae6 -// CHECK:STDOUT: %Factory.Method => constants.%Factory.Method.49b -// CHECK:STDOUT: %assoc1 => constants.%assoc1.e9c +// CHECK:STDOUT: %Factory.type.1 => constants.%Factory.type.5dd +// CHECK:STDOUT: %Self.1 => constants.%Self.843 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Factory(constants.%C) { -// CHECK:STDOUT: %T => constants.%C +// CHECK:STDOUT: %T.1 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Factory.type => constants.%Factory.type.2db -// CHECK:STDOUT: %Self => constants.%Self.e13 -// CHECK:STDOUT: %Factory.Make.type => constants.%Factory.Make.type.482 -// CHECK:STDOUT: %Factory.Make => constants.%Factory.Make.715 +// CHECK:STDOUT: %Factory.type.1 => constants.%Factory.type.2db +// CHECK:STDOUT: %Self.1 => constants.%Self.e13 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Factory(constants.%C, constants.%Self.197) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%C +// CHECK:STDOUT: %Factory.type.2 => constants.%Factory.type.2db +// CHECK:STDOUT: %Self.2 => constants.%Self.197 +// CHECK:STDOUT: %Factory.WithSelf.Make.type => constants.%Factory.WithSelf.Make.type.1a1 +// CHECK:STDOUT: %Factory.WithSelf.Make => constants.%Factory.WithSelf.Make.64e // CHECK:STDOUT: %Factory.assoc_type => constants.%Factory.assoc_type.930 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.4ac -// CHECK:STDOUT: %Factory.Method.type => constants.%Factory.Method.type.4c3 -// CHECK:STDOUT: %Factory.Method => constants.%Factory.Method.ed8 -// CHECK:STDOUT: %assoc1 => constants.%assoc1.09b +// CHECK:STDOUT: %assoc0 => constants.%assoc0.b1c +// CHECK:STDOUT: %Factory.WithSelf.Method.type => constants.%Factory.WithSelf.Method.type.485 +// CHECK:STDOUT: %Factory.WithSelf.Method => constants.%Factory.WithSelf.Method.005 +// CHECK:STDOUT: %assoc1 => constants.%assoc1.875 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index ada9c67cd9d7..cb16c742b2da 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -34,11 +34,11 @@ fn G(c: C) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete] // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.adc: type = fn_type @HasF.WithSelf.F, @HasF(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.faa: %HasF.WithSelf.F.type.adc = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -46,10 +46,12 @@ fn G(c: C) { // CHECK:STDOUT: %C.as.HasF.impl.F.type: type = fn_type @C.as.HasF.impl.F [concrete] // CHECK:STDOUT: %C.as.HasF.impl.F: %C.as.HasF.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%HasF.impl_witness) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.5be: type = fn_type @HasF.WithSelf.F, @HasF(%HasF.facet) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.cc5: %HasF.WithSelf.F.type.5be = struct_value () [concrete] // CHECK:STDOUT: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] -// CHECK:STDOUT: %.c86: type = fn_type_with_self_type %HasF.F.type, %HasF.facet [concrete] +// CHECK:STDOUT: %.ff7: type = fn_type_with_self_type %HasF.WithSelf.F.type.5be, %HasF.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -75,14 +77,17 @@ fn G(c: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] {} {} -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc15: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @HasF [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.adc) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.faa)] {} {} +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%HasF.F.decl) +// CHECK:STDOUT: witness = (%HasF.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -110,7 +115,7 @@ fn G(c: C) { // CHECK:STDOUT: .G = %G // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%Self.loc15: %HasF.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -123,16 +128,30 @@ fn G(c: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc28: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %G.ref.loc28: %HasF.assoc_type = name_ref G, @C.%G [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc28: %.c86 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] +// CHECK:STDOUT: %impl.elem0.loc28: %.ff7 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] // CHECK:STDOUT: %C.as.HasF.impl.F.call.loc28: init %empty_tuple.type = call %impl.elem0.loc28() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %G.ref.loc29: %HasF.assoc_type = name_ref G, @C.%G [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc29: %.c86 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] +// CHECK:STDOUT: %impl.elem0.loc29: %.ff7 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] // CHECK:STDOUT: %C.as.HasF.impl.F.call.loc29: init %empty_tuple.type = call %impl.elem0.loc29() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%Self) {} +// CHECK:STDOUT: specific @HasF(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Self +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.adc +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.faa +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet) {} +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%HasF.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%HasF.facet +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.5be +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.cc5 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%HasF.facet) {} // 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 b11154a65035..92d43230da63 100644 --- a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon +++ b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon @@ -53,28 +53,28 @@ fn G() { // CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type.d31: type = symbolic_binding_type Self, 0, %Self.ab9 [symbolic] // CHECK:STDOUT: %pattern_type.fa0: type = pattern_type %Self.binding.as_type.d31 [symbolic] -// CHECK:STDOUT: %I.II.type: type = fn_type @I.II [concrete] +// CHECK:STDOUT: %I.WithSelf.II.type.7d3: type = fn_type @I.WithSelf.II, @I(%Self.ab9) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %I.II: %I.II.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.II.54d: %I.WithSelf.II.type.7d3 = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.b30: %I.assoc_type = assoc_entity element0, @I.%I.II.decl [concrete] +// CHECK:STDOUT: %assoc0.27e: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.II.decl [concrete] // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self.8a1: %J.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type.ed8: type = symbolic_binding_type Self, 0, %Self.8a1 [symbolic] // CHECK:STDOUT: %pattern_type.832: type = pattern_type %Self.binding.as_type.ed8 [symbolic] -// CHECK:STDOUT: %J.JJ.type: type = fn_type @J.JJ [concrete] -// CHECK:STDOUT: %J.JJ: %J.JJ.type = struct_value () [concrete] +// CHECK:STDOUT: %J.WithSelf.JJ.type.21e: type = fn_type @J.WithSelf.JJ, @J(%Self.8a1) [symbolic] +// CHECK:STDOUT: %J.WithSelf.JJ.473: %J.WithSelf.JJ.type.21e = struct_value () [symbolic] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0.d13: %J.assoc_type = assoc_entity element0, @J.%J.JJ.decl [concrete] +// CHECK:STDOUT: %assoc0.8f4: %J.assoc_type = assoc_entity element0, @J.%J.WithSelf.JJ.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %I.type, %type.as.BitAndWith.impl.Op [concrete] @@ -90,9 +90,15 @@ fn G() { // CHECK:STDOUT: %I.facet.990: %I.type = facet_value %T.binding.as_type, (%I.lookup_impl_witness) [symbolic] // CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T, @J [symbolic] // CHECK:STDOUT: %J.facet.a3a: %J.type = facet_value %T.binding.as_type, (%J.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.7eb: type = fn_type_with_self_type %J.JJ.type, %J.facet.a3a [symbolic] -// CHECK:STDOUT: %impl.elem0: %.7eb = impl_witness_access %J.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @J.JJ(%J.facet.a3a) [symbolic] +// CHECK:STDOUT: %I.WithSelf.II.type.b73: type = fn_type @I.WithSelf.II, @I(%T) [symbolic] +// CHECK:STDOUT: %I.WithSelf.II.1db: %I.WithSelf.II.type.b73 = struct_value () [symbolic] +// CHECK:STDOUT: %J.WithSelf.JJ.type.aa2: type = fn_type @J.WithSelf.JJ, @J(%T) [symbolic] +// CHECK:STDOUT: %J.WithSelf.JJ.2a2: %J.WithSelf.JJ.type.aa2 = struct_value () [symbolic] +// CHECK:STDOUT: %J.WithSelf.JJ.type.b4e: type = fn_type @J.WithSelf.JJ, @J(%J.facet.a3a) [symbolic] +// CHECK:STDOUT: %J.WithSelf.JJ.b7f: %J.WithSelf.JJ.type.b4e = struct_value () [symbolic] +// CHECK:STDOUT: %.130: type = fn_type_with_self_type %J.WithSelf.JJ.type.b4e, %J.facet.a3a [symbolic] +// CHECK:STDOUT: %impl.elem0: %.130 = impl_witness_access %J.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @J.WithSelf.JJ(%J.facet.a3a) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] @@ -101,15 +107,24 @@ fn G() { // CHECK:STDOUT: %C.as.I.impl.II.type: type = fn_type @C.as.I.impl.II [concrete] // CHECK:STDOUT: %C.as.I.impl.II: %C.as.I.impl.II.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet.cbf: %I.type = facet_value %C, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %I.WithSelf.II.type.0e1: type = fn_type @I.WithSelf.II, @I(%I.facet.cbf) [concrete] +// CHECK:STDOUT: %I.WithSelf.II.aae: %I.WithSelf.II.type.0e1 = struct_value () [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness @C.as.J.impl.%J.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.J.impl.JJ.type: type = fn_type @C.as.J.impl.JJ [concrete] // CHECK:STDOUT: %C.as.J.impl.JJ: %C.as.J.impl.JJ.type = struct_value () [concrete] // CHECK:STDOUT: %J.facet.fc3: %J.type = facet_value %C, (%J.impl_witness) [concrete] +// CHECK:STDOUT: %J.WithSelf.JJ.type.6ae: type = fn_type @J.WithSelf.JJ, @J(%J.facet.fc3) [concrete] +// CHECK:STDOUT: %J.WithSelf.JJ.a91: %J.WithSelf.JJ.type.6ae = 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: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %.322: type = fn_type_with_self_type %J.JJ.type, %J.facet.fc3 [concrete] +// CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] +// CHECK:STDOUT: %J.WithSelf.JJ.type.f53: type = fn_type @J.WithSelf.JJ, @J(%C.type.facet) [concrete] +// CHECK:STDOUT: %J.WithSelf.JJ.9df: %J.WithSelf.JJ.type.f53 = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.II.type.152: type = fn_type @I.WithSelf.II, @I(%C.type.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.II.feb: %I.WithSelf.II.type.152 = struct_value () [concrete] +// CHECK:STDOUT: %.366: type = fn_type_with_self_type %J.WithSelf.JJ.type.6ae, %J.facet.fc3 [concrete] // CHECK:STDOUT: %facet_value: %facet_type = facet_value %C, (%I.impl_witness, %J.impl_witness) [concrete] // CHECK:STDOUT: %F.specific_fn: = specific_function %F, @F(%facet_value) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] @@ -150,7 +165,7 @@ fn G() { // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %I.ref.loc22: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %J.ref.loc22: type = name_ref J, file.%J.decl [concrete = constants.%J.type] -// CHECK:STDOUT: %impl.elem0.loc22: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc22: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc22: = bound_method %I.ref.loc22, %impl.elem0.loc22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method.loc22(%I.ref.loc22, %J.ref.loc22) [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc22_12.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%facet_type] @@ -169,51 +184,57 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %I.II.decl: %I.II.type = fn_decl @I.II [concrete = constants.%I.II] { -// CHECK:STDOUT: %self.patt: @I.II.%pattern_type (%pattern_type.fa0) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.II.%pattern_type (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc15: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.II.decl: @I.%I.WithSelf.II.type (%I.WithSelf.II.type.7d3) = fn_decl @I.WithSelf.II [symbolic = @I.%I.WithSelf.II (constants.%I.WithSelf.II.54d)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.II.%pattern_type (%pattern_type.fa0) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.II.%pattern_type (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.II.%Self.binding.as_type (%Self.binding.as_type.d31) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.II.%Self.binding.as_type (%Self.binding.as_type.d31) = value_param call_param0 // CHECK:STDOUT: %.loc16_15.1: type = splice_block %.loc16_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self.loc15 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %.loc16_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.II.%Self.binding.as_type (%Self.binding.as_type.d31) = value_binding self, %self.param +// CHECK:STDOUT: %self: @I.WithSelf.II.%Self.binding.as_type (%Self.binding.as_type.d31) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.II.decl [concrete = constants.%assoc0.b30] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.II.decl [concrete = constants.%assoc0.27e] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .II = %assoc0 // CHECK:STDOUT: .JJ = // CHECK:STDOUT: .J = -// CHECK:STDOUT: witness = (%I.II.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.II.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.JJ.decl: %J.JJ.type = fn_decl @J.JJ [concrete = constants.%J.JJ] { -// CHECK:STDOUT: %self.patt: @J.JJ.%pattern_type (%pattern_type.832) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @J.JJ.%pattern_type (%pattern_type.832) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc18: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: interface_with_self_decl @J [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %J.WithSelf.JJ.decl: @J.%J.WithSelf.JJ.type (%J.WithSelf.JJ.type.21e) = fn_decl @J.WithSelf.JJ [symbolic = @J.%J.WithSelf.JJ (constants.%J.WithSelf.JJ.473)] { +// CHECK:STDOUT: %self.patt: @J.WithSelf.JJ.%pattern_type (%pattern_type.832) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @J.WithSelf.JJ.%pattern_type (%pattern_type.832) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @J.JJ.%Self.binding.as_type (%Self.binding.as_type.ed8) = value_param call_param0 +// CHECK:STDOUT: %self.param: @J.WithSelf.JJ.%Self.binding.as_type (%Self.binding.as_type.ed8) = value_param call_param0 // CHECK:STDOUT: %.loc19_15.1: type = splice_block %.loc19_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ed8)] { -// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.8a1)] +// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self.loc18 [symbolic = %Self (constants.%Self.8a1)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ed8)] // CHECK:STDOUT: %.loc19_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ed8)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @J.JJ.%Self.binding.as_type (%Self.binding.as_type.ed8) = value_binding self, %self.param +// CHECK:STDOUT: %self: @J.WithSelf.JJ.%Self.binding.as_type (%Self.binding.as_type.ed8) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.JJ.decl [concrete = constants.%assoc0.d13] +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.WithSelf.JJ.decl [concrete = constants.%assoc0.8f4] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc18 // CHECK:STDOUT: .JJ = %assoc0 -// CHECK:STDOUT: witness = (%J.JJ.decl) +// CHECK:STDOUT: witness = (%J.WithSelf.JJ.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -273,20 +294,20 @@ fn G() { // CHECK:STDOUT: extend @C.as.J.impl.%J.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.II(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.II(@I.%Self.loc15: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.fa0)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.II.%Self.binding.as_type (%Self.binding.as_type.d31)); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.II.%Self.binding.as_type (%Self.binding.as_type.d31)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.JJ(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.JJ(@J.%Self.loc18: %J.type) { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8a1)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ed8)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.832)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @J.JJ.%Self.binding.as_type (%Self.binding.as_type.ed8)); +// CHECK:STDOUT: fn(%self.param: @J.WithSelf.JJ.%Self.binding.as_type (%Self.binding.as_type.ed8)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%T.loc22_6.2: %facet_type) { @@ -300,9 +321,10 @@ fn G() { // CHECK:STDOUT: %I.facet.loc26_18.2: %I.type = facet_value %T.binding.as_type, (%I.lookup_impl_witness) [symbolic = %I.facet.loc26_18.2 (constants.%I.facet.990)] // CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc22_6.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness)] // CHECK:STDOUT: %J.facet.loc26_33.2: %J.type = facet_value %T.binding.as_type, (%J.lookup_impl_witness) [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.a3a)] -// CHECK:STDOUT: %.loc26_69: type = fn_type_with_self_type constants.%J.JJ.type, %J.facet.loc26_33.2 [symbolic = %.loc26_69 (constants.%.7eb)] -// CHECK:STDOUT: %impl.elem0.loc26_69.2: @F.%.loc26_69 (%.7eb) = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc26_69.2: = specific_impl_function %impl.elem0.loc26_69.2, @J.JJ(%J.facet.loc26_33.2) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %J.WithSelf.JJ.type: type = fn_type @J.WithSelf.JJ, @J(%J.facet.loc26_33.2) [symbolic = %J.WithSelf.JJ.type (constants.%J.WithSelf.JJ.type.b4e)] +// CHECK:STDOUT: %.loc26_69: type = fn_type_with_self_type %J.WithSelf.JJ.type, %J.facet.loc26_33.2 [symbolic = %.loc26_69 (constants.%.130)] +// CHECK:STDOUT: %impl.elem0.loc26_69.2: @F.%.loc26_69 (%.130) = impl_witness_access %J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc26_69.2: = specific_impl_function %impl.elem0.loc26_69.2, @J.WithSelf.JJ(%J.facet.loc26_33.2) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @F.%T.binding.as_type (%T.binding.as_type)) { // CHECK:STDOUT: !entry: @@ -329,12 +351,12 @@ fn G() { // CHECK:STDOUT: %.loc26_63: %J.type = converted %.loc26_54, %J.facet.loc26_63 [symbolic = %J.facet.loc26_33.2 (constants.%J.facet.a3a)] // CHECK:STDOUT: %as_type.loc26_67: type = facet_access_type %.loc26_63 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc26_67: type = converted %.loc26_63, %as_type.loc26_67 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.d13] -// CHECK:STDOUT: %impl.elem0.loc26_69.1: @F.%.loc26_69 (%.7eb) = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.8f4] +// CHECK:STDOUT: %impl.elem0.loc26_69.1: @F.%.loc26_69 (%.130) = impl_witness_access constants.%J.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc26_69.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc26_69: = bound_method %t.ref, %impl.elem0.loc26_69.1 -// CHECK:STDOUT: %specific_impl_fn.loc26_69.1: = specific_impl_function %impl.elem0.loc26_69.1, @J.JJ(constants.%J.facet.a3a) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc26_69.1: = specific_impl_function %impl.elem0.loc26_69.1, @J.WithSelf.JJ(constants.%J.facet.a3a) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc26_73: = bound_method %t.ref, %specific_impl_fn.loc26_69.1 -// CHECK:STDOUT: %J.JJ.call: init %empty_tuple.type = call %bound_method.loc26_73(%t.ref) +// CHECK:STDOUT: %J.WithSelf.JJ.call: init %empty_tuple.type = call %bound_method.loc26_73(%t.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -369,8 +391,8 @@ fn G() { // CHECK:STDOUT: %.loc40_71: %J.type = converted %.loc40_62, %J.facet.loc40_71 [concrete = constants.%J.facet.fc3] // CHECK:STDOUT: %as_type.loc40_75: type = facet_access_type %.loc40_71 [concrete = constants.%C] // CHECK:STDOUT: %.loc40_75: type = converted %.loc40_71, %as_type.loc40_75 [concrete = constants.%C] -// CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.d13] -// CHECK:STDOUT: %impl.elem0: %.322 = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%C.as.J.impl.JJ] +// CHECK:STDOUT: %JJ.ref: %J.assoc_type = name_ref JJ, @J.%assoc0 [concrete = constants.%assoc0.8f4] +// CHECK:STDOUT: %impl.elem0: %.366 = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%C.as.J.impl.JJ] // CHECK:STDOUT: %bound_method: = bound_method %.loc40_8.1, %impl.elem0 // CHECK:STDOUT: %.loc40_8.2: %C = acquire_value %.loc40_8.1 // CHECK:STDOUT: %C.as.J.impl.JJ.call: init %empty_tuple.type = call %bound_method(%.loc40_8.2) @@ -410,13 +432,27 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.II(constants.%Self.ab9) { +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Self.ab9 +// CHECK:STDOUT: %I.WithSelf.II.type => constants.%I.WithSelf.II.type.7d3 +// CHECK:STDOUT: %I.WithSelf.II => constants.%I.WithSelf.II.54d +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.II(constants.%Self.ab9) { // CHECK:STDOUT: %Self => constants.%Self.ab9 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.d31 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fa0 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.JJ(constants.%Self.8a1) { +// CHECK:STDOUT: specific @J(constants.%Self.8a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc19 => constants.%Self.8a1 +// CHECK:STDOUT: %J.WithSelf.JJ.type => constants.%J.WithSelf.JJ.type.21e +// CHECK:STDOUT: %J.WithSelf.JJ => constants.%J.WithSelf.JJ.473 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.JJ(constants.%Self.8a1) { // CHECK:STDOUT: %Self => constants.%Self.8a1 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.ed8 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.832 @@ -428,24 +464,73 @@ fn G() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.bd7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.JJ(constants.%J.facet.a3a) { +// CHECK:STDOUT: specific @I(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%T +// CHECK:STDOUT: %I.WithSelf.II.type => constants.%I.WithSelf.II.type.b73 +// CHECK:STDOUT: %I.WithSelf.II => constants.%I.WithSelf.II.1db +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc19 => constants.%T +// CHECK:STDOUT: %J.WithSelf.JJ.type => constants.%J.WithSelf.JJ.type.aa2 +// CHECK:STDOUT: %J.WithSelf.JJ => constants.%J.WithSelf.JJ.2a2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%J.facet.a3a) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc19 => constants.%J.facet.a3a +// CHECK:STDOUT: %J.WithSelf.JJ.type => constants.%J.WithSelf.JJ.type.b4e +// CHECK:STDOUT: %J.WithSelf.JJ => constants.%J.WithSelf.JJ.b7f +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.JJ(constants.%J.facet.a3a) { // CHECK:STDOUT: %Self => constants.%J.facet.a3a // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.bd7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.II(constants.%I.facet.cbf) { +// CHECK:STDOUT: specific @I(constants.%I.facet.cbf) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%I.facet.cbf +// CHECK:STDOUT: %I.WithSelf.II.type => constants.%I.WithSelf.II.type.0e1 +// CHECK:STDOUT: %I.WithSelf.II => constants.%I.WithSelf.II.aae +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.II(constants.%I.facet.cbf) { // CHECK:STDOUT: %Self => constants.%I.facet.cbf // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.893 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.JJ(constants.%J.facet.fc3) { +// CHECK:STDOUT: specific @J(constants.%J.facet.fc3) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc19 => constants.%J.facet.fc3 +// CHECK:STDOUT: %J.WithSelf.JJ.type => constants.%J.WithSelf.JJ.type.6ae +// CHECK:STDOUT: %J.WithSelf.JJ => constants.%J.WithSelf.JJ.a91 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.JJ(constants.%J.facet.fc3) { // CHECK:STDOUT: %Self => constants.%J.facet.fc3 // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.893 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc19 => constants.%C.type.facet +// CHECK:STDOUT: %J.WithSelf.JJ.type => constants.%J.WithSelf.JJ.type.f53 +// CHECK:STDOUT: %J.WithSelf.JJ => constants.%J.WithSelf.JJ.9df +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%C.type.facet +// CHECK:STDOUT: %I.WithSelf.II.type => constants.%I.WithSelf.II.type.152 +// CHECK:STDOUT: %I.WithSelf.II => constants.%I.WithSelf.II.feb +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%facet_value) { // CHECK:STDOUT: %T.loc22_6.1 => constants.%facet_value // CHECK:STDOUT: %T.binding.as_type => constants.%C @@ -457,7 +542,8 @@ fn G() { // CHECK:STDOUT: %I.facet.loc26_18.2 => constants.%I.facet.cbf // CHECK:STDOUT: %J.lookup_impl_witness => constants.%J.impl_witness // CHECK:STDOUT: %J.facet.loc26_33.2 => constants.%J.facet.fc3 -// CHECK:STDOUT: %.loc26_69 => constants.%.322 +// CHECK:STDOUT: %J.WithSelf.JJ.type => constants.%J.WithSelf.JJ.type.6ae +// CHECK:STDOUT: %.loc26_69 => constants.%.366 // CHECK:STDOUT: %impl.elem0.loc26_69.2 => constants.%C.as.J.impl.JJ // CHECK:STDOUT: %specific_impl_fn.loc26_69.2 => constants.%C.as.J.impl.JJ // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon index 75afd72c4286..15de05f9d7b3 100644 --- a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon @@ -38,10 +38,10 @@ fn F(c: C) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F: %I.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -69,14 +69,17 @@ fn F(c: C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] {} {} -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc15: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F)] {} {} +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -94,7 +97,7 @@ fn F(c: C) { // CHECK:STDOUT: .F = %F // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc15: %I.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -107,5 +110,12 @@ fn F(c: C) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Self +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) {} // 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 30e53cf68589..9f8ffa5c9d6a 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -53,22 +53,30 @@ fn G() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.705: %I.WithSelf.F.type.08c = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %I.impl_witness.ad4: = impl_witness @C.as.I.impl.b72.%I.impl_witness_table [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.b59: type = fn_type @I.WithSelf.F, @I(%C.type.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.521: %I.WithSelf.F.type.b59 = struct_value () [concrete] // CHECK:STDOUT: %I.facet.990: %I.type = facet_value %C, (%I.impl_witness.ad4) [concrete] -// CHECK:STDOUT: %.cdc: type = fn_type_with_self_type %I.F.type, %I.facet.990 [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.25c: type = fn_type @I.WithSelf.F, @I(%I.facet.990) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.570: %I.WithSelf.F.type.25c = struct_value () [concrete] +// CHECK:STDOUT: %.840: type = fn_type_with_self_type %I.WithSelf.F.type.25c, %I.facet.990 [concrete] // CHECK:STDOUT: %I.impl_witness.df9: = impl_witness @C.as.I.impl.e47.%I.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet.54e: %I.type = facet_value %C, (%I.impl_witness.df9) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.31f: type = fn_type @I.WithSelf.F, @I(%I.facet.54e) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.564: %I.WithSelf.F.type.31f = struct_value () [concrete] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -91,14 +99,17 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] {} {} -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc15: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.705)] {} {} +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -130,7 +141,7 @@ fn G() { // CHECK:STDOUT: extend @C.as.I.impl.b72.%I.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc15: %I.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -138,7 +149,7 @@ fn G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.cdc = impl_witness_access constants.%I.impl_witness.ad4, element0 [concrete = ] +// CHECK:STDOUT: %impl.elem0: %.840 = impl_witness_access constants.%I.impl_witness.ad4, element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -151,11 +162,39 @@ fn G() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.cdc = impl_witness_access constants.%I.impl_witness.ad4, element0 [concrete = ] +// CHECK:STDOUT: %impl.elem0: %.840 = impl_witness_access constants.%I.impl_witness.ad4, element0 [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Self +// 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.F(constants.%I.facet.54e) {} +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%C.type.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.b59 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.521 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet.990) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%I.facet.990 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.25c +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.570 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet.54e) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%I.facet.54e +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.31f +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.564 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet.54e) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index b6d84edcb9c0..33d16b80aa4a 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -134,11 +134,11 @@ fn G(x: A) { // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.d0b: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.adc: type = fn_type @HasF.WithSelf.F, @HasF(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.faa: %HasF.WithSelf.F.type.adc = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] @@ -148,6 +148,8 @@ fn G(x: A) { // CHECK:STDOUT: %T.as.HasF.impl.F.type.12d: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T) [symbolic] // CHECK:STDOUT: %T.as.HasF.impl.F.4f8: %T.as.HasF.impl.F.type.12d = struct_value () [symbolic] // CHECK:STDOUT: %HasF.facet.31c: %HasF.type = facet_value %T, (%HasF.impl_witness.c31) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.type.c95: type = fn_type @HasF.WithSelf.F, @HasF(%HasF.facet.31c) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.7ba: %HasF.WithSelf.F.type.c95 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %T [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -158,7 +160,9 @@ fn G(x: A) { // CHECK:STDOUT: %T.as.HasF.impl.F.type.472: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %T.as.HasF.impl.F.bd4: %T.as.HasF.impl.F.type.472 = struct_value () [concrete] // CHECK:STDOUT: %HasF.facet.53a: %HasF.type = facet_value %empty_struct_type, (%HasF.impl_witness.ada) [concrete] -// CHECK:STDOUT: %.52d: type = fn_type_with_self_type %HasF.F.type, %HasF.facet.53a [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.09b: type = fn_type @HasF.WithSelf.F, @HasF(%HasF.facet.53a) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.cc2: %HasF.WithSelf.F.type.09b = struct_value () [concrete] +// CHECK:STDOUT: %.f64: type = fn_type_with_self_type %HasF.WithSelf.F.type.09b, %HasF.facet.53a [concrete] // CHECK:STDOUT: %T.as.HasF.impl.F.specific_fn: = specific_function %T.as.HasF.impl.F.bd4, @T.as.HasF.impl.F(%empty_struct_type) [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: } @@ -200,25 +204,28 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] { -// CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @HasF [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.adc) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.faa)] { +// CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%HasF.F.decl) +// CHECK:STDOUT: witness = (%HasF.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -249,12 +256,12 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%Self.loc4: %HasF.type) { // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.d0b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc8_14.2: type) { @@ -275,7 +282,7 @@ fn G(x: A) { // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.52d = impl_witness_access constants.%HasF.impl_witness.ada, element0 [concrete = constants.%T.as.HasF.impl.F.bd4] +// CHECK:STDOUT: %impl.elem0: %.f64 = impl_witness_access constants.%HasF.impl_witness.ada, element0 [concrete = constants.%T.as.HasF.impl.F.bd4] // CHECK:STDOUT: %bound_method.loc13_4: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @T.as.HasF.impl.F(constants.%empty_struct_type) [concrete = constants.%T.as.HasF.impl.F.specific_fn] // CHECK:STDOUT: %bound_method.loc13_14: = bound_method %x.ref, %specific_fn @@ -283,7 +290,14 @@ fn G(x: A) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%Self) { +// CHECK:STDOUT: specific @HasF(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.adc +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.faa +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d0b @@ -303,7 +317,14 @@ fn G(x: A) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet.31c) { +// CHECK:STDOUT: specific @HasF(constants.%HasF.facet.31c) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%HasF.facet.31c +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.c95 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.7ba +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%HasF.facet.31c) { // CHECK:STDOUT: %Self => constants.%HasF.facet.31c // CHECK:STDOUT: %Self.binding.as_type => constants.%T // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d @@ -318,6 +339,13 @@ fn G(x: A) { // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F.bd4 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%HasF.facet.53a) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%HasF.facet.53a +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.09b +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.cc2 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%empty_struct_type) { // CHECK:STDOUT: %T => constants.%empty_struct_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a96 @@ -334,10 +362,10 @@ fn G(x: A) { // CHECK:STDOUT: %Self.binding.as_type.87c: type = symbolic_binding_type Self, 0, %Self.f09 [symbolic] // CHECK:STDOUT: %pattern_type.d0b: type = pattern_type %Self.binding.as_type.87c [symbolic] // CHECK:STDOUT: %.897: Core.Form = init_form %Self.binding.as_type.87c, call_param1 [symbolic] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete] -// CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.adc: type = fn_type @HasF.WithSelf.F, @HasF(%Self.f09) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.faa: %HasF.WithSelf.F.type.adc = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] -// CHECK:STDOUT: %assoc0.55d: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %assoc0.a7f: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] @@ -349,17 +377,19 @@ fn G(x: A) { // CHECK:STDOUT: %ptr.as.HasF.impl.F.type.672: type = fn_type @ptr.as.HasF.impl.F, @ptr.as.HasF.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.HasF.impl.F.dbd: %ptr.as.HasF.impl.F.type.672 = struct_value () [symbolic] // CHECK:STDOUT: %HasF.facet.506: %HasF.type = facet_value %ptr.e8f, (%HasF.impl_witness.e63) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.type.ac0: type = fn_type @HasF.WithSelf.F, @HasF(%HasF.facet.506) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.91f: %HasF.WithSelf.F.type.ac0 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.ef1: = require_complete_type %ptr.e8f [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: = lookup_impl_witness %ptr.e8f, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet.c25: %Copy.type = facet_value %ptr.e8f, (%Copy.lookup_impl_witness.2e6) [symbolic] -// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c25 [symbolic] -// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b84: = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet.c25) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.c25) [symbolic] +// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet.c25 [symbolic] +// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.366: = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet.c25) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %ptr.c28: type = ptr_type %empty_struct_type [concrete] @@ -371,7 +401,9 @@ fn G(x: A) { // CHECK:STDOUT: %ptr.as.HasF.impl.F.type.5bc: type = fn_type @ptr.as.HasF.impl.F, @ptr.as.HasF.impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %ptr.as.HasF.impl.F.8a8: %ptr.as.HasF.impl.F.type.5bc = struct_value () [concrete] // CHECK:STDOUT: %HasF.facet.b93: %HasF.type = facet_value %ptr.c28, (%HasF.impl_witness.e25) [concrete] -// CHECK:STDOUT: %.38f: type = fn_type_with_self_type %HasF.F.type, %HasF.facet.b93 [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.c08: type = fn_type @HasF.WithSelf.F, @HasF(%HasF.facet.b93) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.e22: %HasF.WithSelf.F.type.c08 = struct_value () [concrete] +// CHECK:STDOUT: %.f85: type = fn_type_with_self_type %HasF.WithSelf.F.type.c08, %HasF.facet.b93 [concrete] // CHECK:STDOUT: %ptr.as.HasF.impl.F.specific_fn: = specific_function %ptr.as.HasF.impl.F.8a8, @ptr.as.HasF.impl.F(%empty_struct_type) [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %ptr.c28 [concrete] // CHECK:STDOUT: %Copy.impl_witness.3fd: = impl_witness imports.%Copy.impl_witness_table.c3a, @ptr.as.Copy.impl(%empty_struct_type) [concrete] @@ -379,7 +411,8 @@ fn G(x: A) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.cbf: %ptr.as.Copy.impl.Op.type.032 = struct_value () [concrete] // CHECK:STDOUT: %.07c: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %Copy.facet.111: %Copy.type = facet_value %ptr.c28, (%Copy.impl_witness.3fd) [concrete] -// CHECK:STDOUT: %.38c: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.111 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.514: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.111) [concrete] +// CHECK:STDOUT: %.237: type = fn_type_with_self_type %Copy.WithSelf.Op.type.514, %Copy.facet.111 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.cbf, @ptr.as.Copy.impl.Op(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -434,33 +467,36 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self.f09] -// CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] { -// CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @HasF.F.%pattern_type (%pattern_type.d0b) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @HasF.F.%pattern_type (%pattern_type.d0b) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %Self.loc4: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self.f09] +// CHECK:STDOUT: interface_with_self_decl @HasF [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.adc) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.faa)] { +// CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc5_25: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self.f09)] +// CHECK:STDOUT: %Self.ref.loc5_25: %HasF.type = name_ref Self, @HasF.%Self.loc4 [symbolic = %Self (constants.%Self.f09)] // CHECK:STDOUT: %Self.as_type.loc5_25: type = facet_access_type %Self.ref.loc5_25 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)] // CHECK:STDOUT: %.loc5_25.2: type = converted %Self.ref.loc5_25, %Self.as_type.loc5_25 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)] // CHECK:STDOUT: %.loc5_25.3: Core.Form = init_form %.loc5_25.2, call_param1 [symbolic = %.loc5_25.1 (constants.%.897)] -// CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type.87c) = value_param call_param0 +// CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87c) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)] { -// CHECK:STDOUT: %Self.ref.loc5_14: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self.f09)] +// CHECK:STDOUT: %Self.ref.loc5_14: %HasF.type = name_ref Self, @HasF.%Self.loc4 [symbolic = %Self (constants.%Self.f09)] // CHECK:STDOUT: %Self.as_type.loc5_14: type = facet_access_type %Self.ref.loc5_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)] // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref.loc5_14, %Self.as_type.loc5_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type.87c) = value_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @HasF.F.%Self.binding.as_type (%Self.binding.as_type.87c) = out_param call_param1 -// CHECK:STDOUT: %return: ref @HasF.F.%Self.binding.as_type (%Self.binding.as_type.87c) = return_slot %return.param +// CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87c) = value_binding self, %self.param +// CHECK:STDOUT: %return.param: ref @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87c) = out_param call_param1 +// CHECK:STDOUT: %return: ref @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87c) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0.55d] +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.WithSelf.F.decl [concrete = constants.%assoc0.a7f] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%HasF.F.decl) +// CHECK:STDOUT: witness = (%HasF.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -500,13 +536,13 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%Self.loc4: %HasF.type) { // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.f09)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.d0b)] // CHECK:STDOUT: %.loc5_25.1: Core.Form = init_form %Self.binding.as_type, call_param1 [symbolic = %.loc5_25.1 (constants.%.897)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type.87c)) -> out %return.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type.87c); +// CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87c)) -> out %return.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87c); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @ptr.as.HasF.impl.F(@ptr.as.HasF.impl.%T.loc8_14.2: type) { @@ -520,19 +556,20 @@ fn G(x: A) { // CHECK:STDOUT: %.loc9_37.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T) [symbolic = %.loc9_37.1 (constants.%.2f2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc9_14, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc9_14, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.c25)] -// CHECK:STDOUT: %.loc9_37.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc9_37.2 (constants.%.b46)] -// CHECK:STDOUT: %impl.elem0.loc9_37.2: @ptr.as.HasF.impl.F.%.loc9_37.2 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.201)] -// CHECK:STDOUT: %specific_impl_fn.loc9_37.2: = specific_impl_function %impl.elem0.loc9_37.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc9_37.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d82)] +// CHECK:STDOUT: %.loc9_37.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc9_37.2 (constants.%.299)] +// CHECK:STDOUT: %impl.elem0.loc9_37.2: @ptr.as.HasF.impl.F.%.loc9_37.2 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.1c7)] +// CHECK:STDOUT: %specific_impl_fn.loc9_37.2: = specific_impl_function %impl.elem0.loc9_37.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc9_37.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f)) -> out %return.param: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = name_ref self, %self -// CHECK:STDOUT: %impl.elem0.loc9_37.1: @ptr.as.HasF.impl.F.%.loc9_37.2 (%.b46) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.201)] +// CHECK:STDOUT: %impl.elem0.loc9_37.1: @ptr.as.HasF.impl.F.%.loc9_37.2 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.1c7)] // CHECK:STDOUT: %bound_method.loc9_37.1: = bound_method %self.ref, %impl.elem0.loc9_37.1 -// CHECK:STDOUT: %specific_impl_fn.loc9_37.1: = specific_impl_function %impl.elem0.loc9_37.1, @Copy.Op(constants.%Copy.facet.c25) [symbolic = %specific_impl_fn.loc9_37.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %specific_impl_fn.loc9_37.1: = specific_impl_function %impl.elem0.loc9_37.1, @Copy.WithSelf.Op(constants.%Copy.facet.c25) [symbolic = %specific_impl_fn.loc9_37.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: %bound_method.loc9_37.2: = bound_method %self.ref, %specific_impl_fn.loc9_37.1 -// CHECK:STDOUT: %Copy.Op.call: init @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = call %bound_method.loc9_37.2(%self.ref) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = call %bound_method.loc9_37.2(%self.ref) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -540,8 +577,8 @@ fn G(x: A) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %ptr.c28 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0.55d] -// CHECK:STDOUT: %impl.elem0: %.38f = impl_witness_access constants.%HasF.impl_witness.e25, element0 [concrete = constants.%ptr.as.HasF.impl.F.8a8] +// CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0.a7f] +// CHECK:STDOUT: %impl.elem0: %.f85 = impl_witness_access constants.%HasF.impl_witness.e25, element0 [concrete = constants.%ptr.as.HasF.impl.F.8a8] // CHECK:STDOUT: %bound_method.loc13_11: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.HasF.impl.F(constants.%empty_struct_type) [concrete = constants.%ptr.as.HasF.impl.F.specific_fn] // CHECK:STDOUT: %bound_method.loc13_21: = bound_method %x.ref, %specific_fn @@ -549,7 +586,14 @@ fn G(x: A) { // CHECK:STDOUT: return %ptr.as.HasF.impl.F.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%Self.f09) { +// CHECK:STDOUT: specific @HasF(constants.%Self.f09) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self.f09 +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.adc +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.faa +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self.f09) { // CHECK:STDOUT: %Self => constants.%Self.f09 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.87c // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d0b @@ -573,7 +617,14 @@ fn G(x: A) { // CHECK:STDOUT: %.loc9_26.1 => constants.%.4fe // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet.506) { +// CHECK:STDOUT: specific @HasF(constants.%HasF.facet.506) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%HasF.facet.506 +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.ac0 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.91f +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%HasF.facet.506) { // CHECK:STDOUT: %Self => constants.%HasF.facet.506 // CHECK:STDOUT: %Self.binding.as_type => constants.%ptr.e8f // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4 @@ -590,6 +641,13 @@ fn G(x: A) { // CHECK:STDOUT: %ptr.as.HasF.impl.F => constants.%ptr.as.HasF.impl.F.8a8 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%HasF.facet.b93) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%HasF.facet.b93 +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.c08 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.e22 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @ptr.as.HasF.impl.F(constants.%empty_struct_type) { // CHECK:STDOUT: %T => constants.%empty_struct_type // CHECK:STDOUT: %ptr.loc9_14 => constants.%ptr.c28 @@ -601,7 +659,8 @@ fn G(x: A) { // CHECK:STDOUT: %.loc9_37.1 => constants.%.07c // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.3fd // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.111 -// CHECK:STDOUT: %.loc9_37.2 => constants.%.38c +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.514 +// CHECK:STDOUT: %.loc9_37.2 => constants.%.237 // CHECK:STDOUT: %impl.elem0.loc9_37.2 => constants.%ptr.as.Copy.impl.Op.cbf // CHECK:STDOUT: %specific_impl_fn.loc9_37.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } @@ -613,11 +672,11 @@ fn G(x: A) { // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.d0b: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.adc: type = fn_type @HasF.WithSelf.F, @HasF(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.faa: %HasF.WithSelf.F.type.adc = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] @@ -632,6 +691,8 @@ fn G(x: A) { // CHECK:STDOUT: %C.as.HasF.impl.F.type.fb0: type = fn_type @C.as.HasF.impl.F, @C.as.HasF.impl(%T) [symbolic] // CHECK:STDOUT: %C.as.HasF.impl.F.f34: %C.as.HasF.impl.F.type.fb0 = struct_value () [symbolic] // CHECK:STDOUT: %HasF.facet.834: %HasF.type = facet_value %C.5a3, (%HasF.impl_witness.61b) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.type.796: type = fn_type @HasF.WithSelf.F, @HasF(%HasF.facet.834) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.3a2: %HasF.WithSelf.F.type.796 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %C.5a3 [symbolic] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %C.850: type = class_type @C, @C(%empty_struct_type) [concrete] @@ -642,7 +703,9 @@ fn G(x: A) { // CHECK:STDOUT: %C.as.HasF.impl.F.type.98f: type = fn_type @C.as.HasF.impl.F, @C.as.HasF.impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %C.as.HasF.impl.F.a6f: %C.as.HasF.impl.F.type.98f = struct_value () [concrete] // CHECK:STDOUT: %HasF.facet.514: %HasF.type = facet_value %C.850, (%HasF.impl_witness.635) [concrete] -// CHECK:STDOUT: %.d74: type = fn_type_with_self_type %HasF.F.type, %HasF.facet.514 [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.753: type = fn_type @HasF.WithSelf.F, @HasF(%HasF.facet.514) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.412: %HasF.WithSelf.F.type.753 = struct_value () [concrete] +// CHECK:STDOUT: %.914: type = fn_type_with_self_type %HasF.WithSelf.F.type.753, %HasF.facet.514 [concrete] // CHECK:STDOUT: %C.as.HasF.impl.F.specific_fn: = specific_function %C.as.HasF.impl.F.a6f, @C.as.HasF.impl.F(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -694,25 +757,28 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] { -// CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @HasF [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.adc) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.faa)] { +// CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%HasF.F.decl) +// CHECK:STDOUT: witness = (%HasF.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -758,12 +824,12 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%Self.loc4: %HasF.type) { // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.d0b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @C.as.HasF.impl.F(@C.as.HasF.impl.%T.loc10_14.2: type) { @@ -785,7 +851,7 @@ fn G(x: A) { // CHECK:STDOUT: %x.ref: %C.850 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type] // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.d74 = impl_witness_access constants.%HasF.impl_witness.635, element0 [concrete = constants.%C.as.HasF.impl.F.a6f] +// CHECK:STDOUT: %impl.elem0: %.914 = impl_witness_access constants.%HasF.impl_witness.635, element0 [concrete = constants.%C.as.HasF.impl.F.a6f] // CHECK:STDOUT: %bound_method.loc15_4: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @C.as.HasF.impl.F(constants.%empty_struct_type) [concrete = constants.%C.as.HasF.impl.F.specific_fn] // CHECK:STDOUT: %bound_method.loc15_14: = bound_method %x.ref, %specific_fn @@ -793,7 +859,14 @@ fn G(x: A) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%Self) { +// CHECK:STDOUT: specific @HasF(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.adc +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.faa +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d0b @@ -821,7 +894,14 @@ fn G(x: A) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3d5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet.834) { +// CHECK:STDOUT: specific @HasF(constants.%HasF.facet.834) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%HasF.facet.834 +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.796 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.3a2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%HasF.facet.834) { // CHECK:STDOUT: %Self => constants.%HasF.facet.834 // CHECK:STDOUT: %Self.binding.as_type => constants.%C.5a3 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3d5 @@ -843,6 +923,13 @@ fn G(x: A) { // CHECK:STDOUT: %C.as.HasF.impl.F => constants.%C.as.HasF.impl.F.a6f // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%HasF.facet.514) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%HasF.facet.514 +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.753 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.412 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @C.as.HasF.impl.F(constants.%empty_struct_type) { // CHECK:STDOUT: %T => constants.%empty_struct_type // CHECK:STDOUT: %C => constants.%C.850 @@ -866,10 +953,10 @@ fn G(x: A) { // CHECK:STDOUT: %Self.c1f: %HasF.type.8a4 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.c1f [symbolic] // CHECK:STDOUT: %pattern_type.969: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %HasF.F.type.607: type = fn_type @HasF.F, @HasF(%T) [symbolic] -// CHECK:STDOUT: %HasF.F.39f: %HasF.F.type.607 = struct_value () [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.type.246: type = fn_type @HasF.WithSelf.F, @HasF(%T, %Self.c1f) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.58b: %HasF.WithSelf.F.type.246 = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type.196: type = assoc_entity_type @HasF, @HasF(%T) [symbolic] -// CHECK:STDOUT: %assoc0.303: %HasF.assoc_type.196 = assoc_entity element0, @HasF.%HasF.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.b54: %HasF.assoc_type.196 = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %HasF.impl_witness.63f: = impl_witness @empty_struct_type.as.HasF.impl.%HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%T) [symbolic] @@ -878,20 +965,24 @@ fn G(x: A) { // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type.1d0: type = fn_type @empty_struct_type.as.HasF.impl.F, @empty_struct_type.as.HasF.impl(%T) [symbolic] // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.e82: %empty_struct_type.as.HasF.impl.F.type.1d0 = struct_value () [symbolic] // CHECK:STDOUT: %HasF.facet.1a2: %HasF.type.8a4 = facet_value %empty_struct_type, (%HasF.impl_witness.63f) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.type.9ca: type = fn_type @HasF.WithSelf.F, @HasF(%T, %HasF.facet.1a2) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.180: %HasF.WithSelf.F.type.9ca = struct_value () [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.type.9d3: type = facet_type <@HasF, @HasF(%empty_struct_type)> [concrete] // CHECK:STDOUT: %Self.167: %HasF.type.9d3 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %HasF.F.type.9d7: type = fn_type @HasF.F, @HasF(%empty_struct_type) [concrete] -// CHECK:STDOUT: %HasF.F.6a4: %HasF.F.type.9d7 = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.534: type = fn_type @HasF.WithSelf.F, @HasF(%empty_struct_type, %Self.c1f) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.df0: %HasF.WithSelf.F.type.534 = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type.78b: type = assoc_entity_type @HasF, @HasF(%empty_struct_type) [concrete] -// CHECK:STDOUT: %assoc0.ed4: %HasF.assoc_type.78b = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %assoc0.db9: %HasF.assoc_type.78b = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [concrete] // CHECK:STDOUT: %HasF.impl_witness.95e: = impl_witness @empty_struct_type.as.HasF.impl.%HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %HasF.type.9d3 [concrete] // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type.0e6: type = fn_type @empty_struct_type.as.HasF.impl.F, @empty_struct_type.as.HasF.impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.a41: %empty_struct_type.as.HasF.impl.F.type.0e6 = struct_value () [concrete] // CHECK:STDOUT: %HasF.facet.d0d: %HasF.type.9d3 = facet_value %empty_struct_type, (%HasF.impl_witness.95e) [concrete] -// CHECK:STDOUT: %.dab: type = fn_type_with_self_type %HasF.F.type.9d7, %HasF.facet.d0d [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.0a8: type = fn_type @HasF.WithSelf.F, @HasF(%empty_struct_type, %HasF.facet.d0d) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.650: %HasF.WithSelf.F.type.0a8 = struct_value () [concrete] +// CHECK:STDOUT: %.8c8: type = fn_type_with_self_type %HasF.WithSelf.F.type.0a8, %HasF.facet.d0d [concrete] // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.specific_fn: = specific_function %empty_struct_type.as.HasF.impl.F.a41, @empty_struct_type.as.HasF.impl.F(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -943,34 +1034,33 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_16.1)> [symbolic = %HasF.type (constants.%HasF.type.8a4)] -// CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F, @HasF(%T.loc4_16.1) [symbolic = %HasF.F.type (constants.%HasF.F.type.607)] -// CHECK:STDOUT: %HasF.F: @HasF.%HasF.F.type (%HasF.F.type.607) = struct_value () [symbolic = %HasF.F (constants.%HasF.F.39f)] -// CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF, @HasF(%T.loc4_16.1) [symbolic = %HasF.assoc_type (constants.%HasF.assoc_type.196)] -// CHECK:STDOUT: %assoc0.loc5_21.2: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.303)] +// CHECK:STDOUT: %HasF.type.loc4: type = facet_type <@HasF, @HasF(%T.loc4_16.1)> [symbolic = %HasF.type.loc4 (constants.%HasF.type.8a4)] +// CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type.loc4 (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)] -// CHECK:STDOUT: %HasF.F.decl: @HasF.%HasF.F.type (%HasF.F.type.607) = fn_decl @HasF.F [symbolic = @HasF.%HasF.F (constants.%HasF.F.39f)] { -// CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.969) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.969) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type.loc4 (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)] +// CHECK:STDOUT: interface_with_self_decl @HasF [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.246) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.58b)] { +// CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.969) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.969) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %.loc5_14.2: @HasF.F.%HasF.type (%HasF.type.8a4) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.c1f)] -// CHECK:STDOUT: %Self.ref: @HasF.F.%HasF.type (%HasF.type.8a4) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.c1f)] +// CHECK:STDOUT: %.loc5_14.2: @HasF.WithSelf.F.%HasF.type (%HasF.type.8a4) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.c1f)] +// CHECK:STDOUT: %Self.ref: @HasF.WithSelf.F.%HasF.type (%HasF.type.8a4) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.c1f)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc5_21.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.303)] +// CHECK:STDOUT: %assoc0.loc5_21.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.WithSelf.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.b54)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_26.1 // CHECK:STDOUT: .F = %assoc0.loc5_21.1 -// CHECK:STDOUT: witness = (%HasF.F.decl) +// CHECK:STDOUT: witness = (%HasF.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -1004,14 +1094,14 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(@HasF.%T.loc4_16.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4)) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_16.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type.loc4 (%HasF.type.8a4)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.8a4)] -// CHECK:STDOUT: %Self: @HasF.F.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1f)] +// CHECK:STDOUT: %Self: @HasF.WithSelf.F.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1f)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.969)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @empty_struct_type.as.HasF.impl.F(@empty_struct_type.as.HasF.impl.%T.loc8_14.2: type) { @@ -1030,9 +1120,9 @@ fn G(x: A) { // CHECK:STDOUT: %.loc13_12: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc13_13: type = converted %.loc13_12, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%empty_struct_type)> [concrete = constants.%HasF.type.9d3] -// CHECK:STDOUT: %.loc13_14: %HasF.assoc_type.78b = specific_constant @HasF.%assoc0.loc5_21.1, @HasF(constants.%empty_struct_type) [concrete = constants.%assoc0.ed4] -// CHECK:STDOUT: %F.ref: %HasF.assoc_type.78b = name_ref F, %.loc13_14 [concrete = constants.%assoc0.ed4] -// CHECK:STDOUT: %impl.elem0: %.dab = impl_witness_access constants.%HasF.impl_witness.95e, element0 [concrete = constants.%empty_struct_type.as.HasF.impl.F.a41] +// CHECK:STDOUT: %.loc13_14: %HasF.assoc_type.78b = specific_constant @HasF.%assoc0.loc5_21.1, @HasF(constants.%empty_struct_type, constants.%Self.c1f) [concrete = constants.%assoc0.db9] +// CHECK:STDOUT: %F.ref: %HasF.assoc_type.78b = name_ref F, %.loc13_14 [concrete = constants.%assoc0.db9] +// CHECK:STDOUT: %impl.elem0: %.8c8 = impl_witness_access constants.%HasF.impl_witness.95e, element0 [concrete = constants.%empty_struct_type.as.HasF.impl.F.a41] // CHECK:STDOUT: %bound_method.loc13_4: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @empty_struct_type.as.HasF.impl.F(constants.%empty_struct_type) [concrete = constants.%empty_struct_type.as.HasF.impl.F.specific_fn] // CHECK:STDOUT: %bound_method.loc13_18: = bound_method %x.ref, %specific_fn @@ -1044,15 +1134,22 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc4_16.1 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4 +// CHECK:STDOUT: %HasF.type.loc4 => constants.%HasF.type.8a4 // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.c1f -// CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.607 -// CHECK:STDOUT: %HasF.F => constants.%HasF.F.39f -// CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.196 -// CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.303 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%T, constants.%Self.c1f) { +// CHECK:STDOUT: specific @HasF(constants.%T, constants.%Self.c1f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%T +// CHECK:STDOUT: %HasF.type.loc5 => constants.%HasF.type.8a4 +// CHECK:STDOUT: %Self.loc5 => constants.%Self.c1f +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.246 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.58b +// CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.196 +// CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.b54 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%T, constants.%Self.c1f) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4 // CHECK:STDOUT: %Self => constants.%Self.c1f @@ -1073,7 +1170,18 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl.F(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%T, constants.%HasF.facet.1a2) { +// CHECK:STDOUT: specific @HasF(constants.%T, constants.%HasF.facet.1a2) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%T +// CHECK:STDOUT: %HasF.type.loc5 => constants.%HasF.type.8a4 +// CHECK:STDOUT: %Self.loc5 => constants.%HasF.facet.1a2 +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.9ca +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.180 +// CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.196 +// CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.b54 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%T, constants.%HasF.facet.1a2) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4 // CHECK:STDOUT: %Self => constants.%HasF.facet.1a2 @@ -1085,12 +1193,19 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc4_16.1 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %HasF.type => constants.%HasF.type.9d3 +// CHECK:STDOUT: %HasF.type.loc4 => constants.%HasF.type.9d3 // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.167 -// CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.9d7 -// CHECK:STDOUT: %HasF.F => constants.%HasF.F.6a4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%empty_struct_type, constants.%Self.c1f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%empty_struct_type +// CHECK:STDOUT: %HasF.type.loc5 => constants.%HasF.type.9d3 +// CHECK:STDOUT: %Self.loc5 => constants.%Self.c1f +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.534 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.df0 // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.78b -// CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.ed4 +// CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.db9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl(constants.%empty_struct_type) { @@ -1104,6 +1219,17 @@ fn G(x: A) { // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F => constants.%empty_struct_type.as.HasF.impl.F.a41 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%empty_struct_type, constants.%HasF.facet.d0d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%empty_struct_type +// CHECK:STDOUT: %HasF.type.loc5 => constants.%HasF.type.9d3 +// CHECK:STDOUT: %Self.loc5 => constants.%HasF.facet.d0d +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.0a8 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.650 +// CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.78b +// CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.db9 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl.F(constants.%empty_struct_type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -1115,10 +1241,10 @@ fn G(x: A) { // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.d0b: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete] -// CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type: type = fn_type @HasF.WithSelf.F, @HasF(%Self) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F: %HasF.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] @@ -1176,25 +1302,28 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] { -// CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @HasF [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F)] { +// CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.d0b) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%HasF.F.decl) +// CHECK:STDOUT: witness = (%HasF.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -1226,12 +1355,12 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%Self.loc4: %HasF.type) { // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.d0b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc12_14.2: type, @T.as.HasF.impl.%U.loc12_24.2: type) { @@ -1255,7 +1384,14 @@ fn G(x: A) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%Self) { +// CHECK:STDOUT: specific @HasF(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d0b @@ -1289,16 +1425,18 @@ fn G(x: A) { // CHECK:STDOUT: %Self.c1f: %HasF.type.8a4 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.c1f [symbolic] // CHECK:STDOUT: %pattern_type.969: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %HasF.F.type.607: type = fn_type @HasF.F, @HasF(%T) [symbolic] -// CHECK:STDOUT: %HasF.F.39f: %HasF.F.type.607 = struct_value () [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.type.246: type = fn_type @HasF.WithSelf.F, @HasF(%T, %Self.c1f) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.58b: %HasF.WithSelf.F.type.246 = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type.196: type = assoc_entity_type @HasF, @HasF(%T) [symbolic] -// CHECK:STDOUT: %assoc0.303: %HasF.assoc_type.196 = assoc_entity element0, @HasF.%HasF.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.b54: %HasF.assoc_type.196 = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %HasF.impl_witness: = impl_witness @T.as.HasF.impl.%HasF.impl_witness_table, @T.as.HasF.impl(%T) [symbolic] // CHECK:STDOUT: %require_complete.5da: = require_complete_type %HasF.type.8a4 [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic] // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T) [symbolic] // CHECK:STDOUT: %T.as.HasF.impl.F: %T.as.HasF.impl.F.type = struct_value () [symbolic] // CHECK:STDOUT: %HasF.facet: %HasF.type.8a4 = facet_value %T, (%HasF.impl_witness) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.type.997: type = fn_type @HasF.WithSelf.F, @HasF(%T, %HasF.facet) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.e20: %HasF.WithSelf.F.type.997 = struct_value () [symbolic] // CHECK:STDOUT: %require_complete.944: = require_complete_type %T [symbolic] // CHECK:STDOUT: %A: type = class_type @A [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] @@ -1309,10 +1447,10 @@ fn G(x: A) { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.type.4ef: type = facet_type <@HasF, @HasF(%B)> [concrete] // CHECK:STDOUT: %Self.a94: %HasF.type.4ef = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %HasF.F.type.c38: type = fn_type @HasF.F, @HasF(%B) [concrete] -// CHECK:STDOUT: %HasF.F.bbb: %HasF.F.type.c38 = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.39d: type = fn_type @HasF.WithSelf.F, @HasF(%B, %Self.c1f) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.782: %HasF.WithSelf.F.type.39d = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type.e4f: type = assoc_entity_type @HasF, @HasF(%B) [concrete] -// CHECK:STDOUT: %assoc0.096: %HasF.assoc_type.e4f = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %assoc0.f91: %HasF.assoc_type.e4f = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1363,34 +1501,33 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_16.1)> [symbolic = %HasF.type (constants.%HasF.type.8a4)] -// CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F, @HasF(%T.loc4_16.1) [symbolic = %HasF.F.type (constants.%HasF.F.type.607)] -// CHECK:STDOUT: %HasF.F: @HasF.%HasF.F.type (%HasF.F.type.607) = struct_value () [symbolic = %HasF.F (constants.%HasF.F.39f)] -// CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF, @HasF(%T.loc4_16.1) [symbolic = %HasF.assoc_type (constants.%HasF.assoc_type.196)] -// CHECK:STDOUT: %assoc0.loc5_21.2: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.303)] +// CHECK:STDOUT: %HasF.type.loc4: type = facet_type <@HasF, @HasF(%T.loc4_16.1)> [symbolic = %HasF.type.loc4 (constants.%HasF.type.8a4)] +// CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type.loc4 (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)] -// CHECK:STDOUT: %HasF.F.decl: @HasF.%HasF.F.type (%HasF.F.type.607) = fn_decl @HasF.F [symbolic = @HasF.%HasF.F (constants.%HasF.F.39f)] { -// CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.969) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.969) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type.loc4 (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)] +// CHECK:STDOUT: interface_with_self_decl @HasF [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.246) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.58b)] { +// CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.969) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.969) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %.loc5_14.2: @HasF.F.%HasF.type (%HasF.type.8a4) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.c1f)] -// CHECK:STDOUT: %Self.ref: @HasF.F.%HasF.type (%HasF.type.8a4) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.c1f)] +// CHECK:STDOUT: %.loc5_14.2: @HasF.WithSelf.F.%HasF.type (%HasF.type.8a4) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.c1f)] +// CHECK:STDOUT: %Self.ref: @HasF.WithSelf.F.%HasF.type (%HasF.type.8a4) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.c1f)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc5_21.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.303)] +// CHECK:STDOUT: %assoc0.loc5_21.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.WithSelf.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.b54)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_26.1 // CHECK:STDOUT: .F = %assoc0.loc5_21.1 -// CHECK:STDOUT: witness = (%HasF.F.decl) +// CHECK:STDOUT: witness = (%HasF.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -1440,14 +1577,14 @@ fn G(x: A) { // CHECK:STDOUT: .Self = constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(@HasF.%T.loc4_16.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4)) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%T.loc4_16.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type.loc4 (%HasF.type.8a4)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.8a4)] -// CHECK:STDOUT: %Self: @HasF.F.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1f)] +// CHECK:STDOUT: %Self: @HasF.WithSelf.F.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1f)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.969)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc8_14.2: type) { @@ -1469,8 +1606,8 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.ref: %HasF.type.ee1 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%B)> [concrete = constants.%HasF.type.4ef] -// CHECK:STDOUT: %.loc22: %HasF.assoc_type.e4f = specific_constant @HasF.%assoc0.loc5_21.1, @HasF(constants.%B) [concrete = constants.%assoc0.096] -// CHECK:STDOUT: %F.ref: %HasF.assoc_type.e4f = name_ref F, %.loc22 [concrete = constants.%assoc0.096] +// CHECK:STDOUT: %.loc22: %HasF.assoc_type.e4f = specific_constant @HasF.%assoc0.loc5_21.1, @HasF(constants.%B, constants.%Self.c1f) [concrete = constants.%assoc0.f91] +// CHECK:STDOUT: %F.ref: %HasF.assoc_type.e4f = name_ref F, %.loc22 [concrete = constants.%assoc0.f91] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1478,15 +1615,22 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc4_16.1 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4 +// CHECK:STDOUT: %HasF.type.loc4 => constants.%HasF.type.8a4 // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.c1f -// CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.607 -// CHECK:STDOUT: %HasF.F => constants.%HasF.F.39f -// CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.196 -// CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.303 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%T, constants.%Self.c1f) { +// CHECK:STDOUT: specific @HasF(constants.%T, constants.%Self.c1f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%T +// CHECK:STDOUT: %HasF.type.loc5 => constants.%HasF.type.8a4 +// CHECK:STDOUT: %Self.loc5 => constants.%Self.c1f +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.246 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.58b +// CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.196 +// CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.b54 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%T, constants.%Self.c1f) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4 // CHECK:STDOUT: %Self => constants.%Self.c1f @@ -1510,7 +1654,18 @@ fn G(x: A) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%T, constants.%HasF.facet) { +// CHECK:STDOUT: specific @HasF(constants.%T, constants.%HasF.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%T +// CHECK:STDOUT: %HasF.type.loc5 => constants.%HasF.type.8a4 +// CHECK:STDOUT: %Self.loc5 => constants.%HasF.facet +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.997 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.e20 +// CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.196 +// CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.b54 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%T, constants.%HasF.facet) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4 // CHECK:STDOUT: %Self => constants.%HasF.facet @@ -1522,11 +1677,18 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc4_16.1 => constants.%B // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %HasF.type => constants.%HasF.type.4ef +// CHECK:STDOUT: %HasF.type.loc4 => constants.%HasF.type.4ef // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.a94 -// CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.c38 -// CHECK:STDOUT: %HasF.F => constants.%HasF.F.bbb +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%B, constants.%Self.c1f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%B +// CHECK:STDOUT: %HasF.type.loc5 => constants.%HasF.type.4ef +// CHECK:STDOUT: %Self.loc5 => constants.%Self.c1f +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.39d +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.782 // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.e4f -// CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.096 +// CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.f91 // 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 34ae4a3ff05d..cbdba5c95410 100644 --- a/toolchain/check/testdata/impl/lookup/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/impl_forall.carbon @@ -48,8 +48,11 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %A.type: type = generic_class_type @A [concrete] // CHECK:STDOUT: %A.generic: %A.type = struct_value () [concrete] +// CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %I.type.609: type = generic_interface_type @I [concrete] // CHECK:STDOUT: %I.generic: %I.type.609 = struct_value () [concrete] +// CHECK:STDOUT: %I.type.1ab3e4.1: type = facet_type <@I, @I(%U.67d)> [symbolic] +// CHECK:STDOUT: %Self.fdb544.1: %I.type.1ab3e4.1 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %V.67d: type = symbolic_binding V, 0 [symbolic] // CHECK:STDOUT: %A.95c0c7.2: type = class_type @A, @A(%V.67d) [symbolic] // CHECK:STDOUT: %I.type.1ab3e4.2: type = facet_type <@I, @I(%V.67d)> [symbolic] @@ -65,15 +68,15 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %require_complete.fd656a.1: = require_complete_type %A.95c0c7.2 [symbolic] // CHECK:STDOUT: %require_complete.ef162c.1: = require_complete_type %ptr.e8f8f9.2 [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4455.1: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e93b.1: %ptr.as.Copy.impl.Op.type.2d4455.1 = struct_value () [symbolic] // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%V.67d) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: = lookup_impl_witness %ptr.e8f8f9.2, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet.c25: %Copy.type = facet_value %ptr.e8f8f9.2, (%Copy.lookup_impl_witness.2e6) [symbolic] -// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c25 [symbolic] -// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b84: = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet.c25) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.c25) [symbolic] +// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet.c25 [symbolic] +// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.366: = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet.c25) [symbolic] // CHECK:STDOUT: %W: type = symbolic_binding W, 0 [symbolic] // CHECK:STDOUT: %A.95c0c7.3: type = class_type @A, @A(%W) [symbolic] // CHECK:STDOUT: %ptr.5da: type = ptr_type %A.95c0c7.3 [symbolic] @@ -82,9 +85,8 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %.4fe7d1.4: Core.Form = init_form %ptr.e8f8f9.4, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.4f4b84.4: type = pattern_type %ptr.e8f8f9.4 [symbolic] // CHECK:STDOUT: %I.type.1ab3e4.3: type = facet_type <@I, @I(%W)> [symbolic] -// CHECK:STDOUT: %I.F.type.93703d.3: type = fn_type @I.F, @I(%W) [symbolic] // CHECK:STDOUT: %I.assoc_type.76c031.3: type = assoc_entity_type @I, @I(%W) [symbolic] -// CHECK:STDOUT: %assoc0.6a687a.3: %I.assoc_type.76c031.3 = assoc_entity element0, @I.%I.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.203667.3: %I.assoc_type.76c031.3 = assoc_entity element0, @I.%I.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %require_complete.e360af.2: = require_complete_type %I.type.1ab3e4.3 [symbolic] // CHECK:STDOUT: %I.impl_witness.f3f3bd.2: = impl_witness @A.as.I.impl.%I.impl_witness_table, @A.as.I.impl(%W) [symbolic] // CHECK:STDOUT: %A.as.I.impl.F.type.58747b.2: type = fn_type @A.as.I.impl.F, @A.as.I.impl(%W) [symbolic] @@ -92,9 +94,10 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %.0fe: require_specific_def_type = require_specific_def @A.as.I.impl(%W) [symbolic] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %A.95c0c7.3, @I, @I(%W) [symbolic] // CHECK:STDOUT: %I.facet.558: %I.type.1ab3e4.3 = facet_value %A.95c0c7.3, (%I.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.560: type = fn_type_with_self_type %I.F.type.93703d.3, %I.facet.558 [symbolic] -// CHECK:STDOUT: %impl.elem0.5ff: %.560 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.898: = specific_impl_function %impl.elem0.5ff, @I.F(%W, %I.facet.558) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.912: type = fn_type @I.WithSelf.F, @I(%W, %I.facet.558) [symbolic] +// CHECK:STDOUT: %.695: type = fn_type_with_self_type %I.WithSelf.F.type.912, %I.facet.558 [symbolic] +// CHECK:STDOUT: %impl.elem0.976: %.695 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.3c2: = specific_impl_function %impl.elem0.976, @I.WithSelf.F(%W, %I.facet.558) [symbolic] // CHECK:STDOUT: %require_complete.fd656a.2: = require_complete_type %A.95c0c7.3 [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -104,15 +107,15 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %.98f: Core.Form = init_form %ptr.c28, call_param1 [concrete] // CHECK:STDOUT: %pattern_type.1cc: type = pattern_type %ptr.c28 [concrete] // CHECK:STDOUT: %I.type.ab5: type = facet_type <@I, @I(%empty_struct_type)> [concrete] -// CHECK:STDOUT: %I.F.type.550: type = fn_type @I.F, @I(%empty_struct_type) [concrete] // CHECK:STDOUT: %I.assoc_type.294: type = assoc_entity_type @I, @I(%empty_struct_type) [concrete] -// CHECK:STDOUT: %assoc0.130: %I.assoc_type.294 = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0.c64: %I.assoc_type.294 = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %I.impl_witness.708: = impl_witness @A.as.I.impl.%I.impl_witness_table, @A.as.I.impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %complete_type.5b1: = complete_type_witness %I.type.ab5 [concrete] // CHECK:STDOUT: %A.as.I.impl.F.type.aa2: type = fn_type @A.as.I.impl.F, @A.as.I.impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %A.as.I.impl.F.c38: %A.as.I.impl.F.type.aa2 = struct_value () [concrete] // CHECK:STDOUT: %I.facet.681: %I.type.ab5 = facet_value %A.ed7, (%I.impl_witness.708) [concrete] -// CHECK:STDOUT: %.160: type = fn_type_with_self_type %I.F.type.550, %I.facet.681 [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.d75: type = fn_type @I.WithSelf.F, @I(%empty_struct_type, %I.facet.681) [concrete] +// CHECK:STDOUT: %.d59: type = fn_type_with_self_type %I.WithSelf.F.type.d75, %I.facet.681 [concrete] // CHECK:STDOUT: %pattern_type.853: type = pattern_type %A.ed7 [concrete] // CHECK:STDOUT: %A.as.I.impl.F.specific_fn: = specific_function %A.as.I.impl.F.c38, @A.as.I.impl.F(%empty_struct_type) [concrete] // CHECK:STDOUT: %A.elem.599: type = unbound_element_type %A.ed7, %empty_struct_type [concrete] @@ -124,7 +127,8 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.cbf: %ptr.as.Copy.impl.Op.type.032 = struct_value () [concrete] // CHECK:STDOUT: %.07c: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%empty_struct_type) [concrete] // CHECK:STDOUT: %Copy.facet.111: %Copy.type = facet_value %ptr.c28, (%Copy.impl_witness.3fd) [concrete] -// CHECK:STDOUT: %.38c: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.111 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.514: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.111) [concrete] +// CHECK:STDOUT: %.237: type = fn_type_with_self_type %Copy.WithSelf.Op.type.514, %Copy.facet.111 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.cbf, @ptr.as.Copy.impl.Op(%empty_struct_type) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -200,9 +204,10 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %.loc14_12.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%V) [symbolic = %.loc14_12.1 (constants.%.2f2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc13_30.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc13_30.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.c25)] -// CHECK:STDOUT: %.loc14_12.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc14_12.2 (constants.%.b46)] -// CHECK:STDOUT: %impl.elem0.loc14_12.2: @A.as.I.impl.F.%.loc14_12.2 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_12.2 (constants.%impl.elem0.201)] -// CHECK:STDOUT: %specific_impl_fn.loc14_12.2: = specific_impl_function %impl.elem0.loc14_12.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc14_12.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d82)] +// CHECK:STDOUT: %.loc14_12.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc14_12.2 (constants.%.299)] +// CHECK:STDOUT: %impl.elem0.loc14_12.2: @A.as.I.impl.F.%.loc14_12.2 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_12.2 (constants.%impl.elem0.1c7)] +// CHECK:STDOUT: %specific_impl_fn.loc14_12.2: = specific_impl_function %impl.elem0.loc14_12.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc14_12.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: ref @A.as.I.impl.F.%A (%A.95c0c7.2)) -> out %return.param: @A.as.I.impl.F.%ptr.loc13_30.1 (%ptr.e8f8f9.2) { // CHECK:STDOUT: !entry: @@ -210,12 +215,12 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %n.ref: @A.as.I.impl.F.%A.elem (%A.elem.8a20fa.2) = name_ref n, @A.%.loc4 [concrete = @A.%.loc4] // CHECK:STDOUT: %.loc14_17: ref @A.as.I.impl.F.%V (%V.67d) = class_element_access %self.ref, element0 // CHECK:STDOUT: %addr: @A.as.I.impl.F.%ptr.loc13_30.1 (%ptr.e8f8f9.2) = addr_of %.loc14_17 -// CHECK:STDOUT: %impl.elem0.loc14_12.1: @A.as.I.impl.F.%.loc14_12.2 (%.b46) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc14_12.2 (constants.%impl.elem0.201)] +// CHECK:STDOUT: %impl.elem0.loc14_12.1: @A.as.I.impl.F.%.loc14_12.2 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc14_12.2 (constants.%impl.elem0.1c7)] // CHECK:STDOUT: %bound_method.loc14_12.1: = bound_method %addr, %impl.elem0.loc14_12.1 -// CHECK:STDOUT: %specific_impl_fn.loc14_12.1: = specific_impl_function %impl.elem0.loc14_12.1, @Copy.Op(constants.%Copy.facet.c25) [symbolic = %specific_impl_fn.loc14_12.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %specific_impl_fn.loc14_12.1: = specific_impl_function %impl.elem0.loc14_12.1, @Copy.WithSelf.Op(constants.%Copy.facet.c25) [symbolic = %specific_impl_fn.loc14_12.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: %bound_method.loc14_12.2: = bound_method %addr, %specific_impl_fn.loc14_12.1 -// CHECK:STDOUT: %Copy.Op.call: init @A.as.I.impl.F.%ptr.loc13_30.1 (%ptr.e8f8f9.2) = call %bound_method.loc14_12.2(%addr) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @A.as.I.impl.F.%ptr.loc13_30.1 (%ptr.e8f8f9.2) = call %bound_method.loc14_12.2(%addr) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -227,14 +232,14 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %I.type.loc21_17.2: type = facet_type <@I, @I(%W.loc19_16.1)> [symbolic = %I.type.loc21_17.2 (constants.%I.type.1ab3e4.3)] // CHECK:STDOUT: %require_complete.loc21_18: = require_complete_type %I.type.loc21_17.2 [symbolic = %require_complete.loc21_18 (constants.%require_complete.e360af.2)] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%W.loc19_16.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.76c031.3)] -// CHECK:STDOUT: %assoc0: @TestGeneric.%I.assoc_type (%I.assoc_type.76c031.3) = assoc_entity element0, @I.%I.F.decl [symbolic = %assoc0 (constants.%assoc0.6a687a.3)] +// CHECK:STDOUT: %assoc0: @TestGeneric.%I.assoc_type (%I.assoc_type.76c031.3) = assoc_entity element0, @I.%I.WithSelf.F.decl [symbolic = %assoc0 (constants.%assoc0.203667.3)] // CHECK:STDOUT: %.loc21_11.2: require_specific_def_type = require_specific_def @A.as.I.impl(%W.loc19_16.1) [symbolic = %.loc21_11.2 (constants.%.0fe)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %A.loc19_32.1, @I, @I(%W.loc19_16.1) [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F, @I(%W.loc19_16.1) [symbolic = %I.F.type (constants.%I.F.type.93703d.3)] // CHECK:STDOUT: %I.facet: @TestGeneric.%I.type.loc21_17.2 (%I.type.1ab3e4.3) = facet_value %A.loc19_32.1, (%I.lookup_impl_witness) [symbolic = %I.facet (constants.%I.facet.558)] -// CHECK:STDOUT: %.loc21_11.3: type = fn_type_with_self_type %I.F.type, %I.facet [symbolic = %.loc21_11.3 (constants.%.560)] -// CHECK:STDOUT: %impl.elem0.loc21_11.2: @TestGeneric.%.loc21_11.3 (%.560) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.5ff)] -// CHECK:STDOUT: %specific_impl_fn.loc21_11.2: = specific_impl_function %impl.elem0.loc21_11.2, @I.F(%W.loc19_16.1, %I.facet) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.898)] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%W.loc19_16.1, %I.facet) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.912)] +// CHECK:STDOUT: %.loc21_11.3: type = fn_type_with_self_type %I.WithSelf.F.type, %I.facet [symbolic = %.loc21_11.3 (constants.%.695)] +// CHECK:STDOUT: %impl.elem0.loc21_11.2: @TestGeneric.%.loc21_11.3 (%.695) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.976)] +// CHECK:STDOUT: %specific_impl_fn.loc21_11.2: = specific_impl_function %impl.elem0.loc21_11.2, @I.WithSelf.F(%W.loc19_16.1, %I.facet) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.3c2)] // CHECK:STDOUT: %require_complete.loc21_11: = require_complete_type %A.loc19_32.1 [symbolic = %require_complete.loc21_11 (constants.%require_complete.fd656a.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%a.param: @TestGeneric.%ptr.loc19_33.1 (%ptr.5da)) -> out %return.param: @TestGeneric.%ptr.loc19_40.1 (%ptr.e8f8f9.4) { @@ -243,15 +248,15 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %W.ref.loc21: type = name_ref W, %W.loc19_16.2 [symbolic = %W.loc19_16.1 (constants.%W)] // CHECK:STDOUT: %I.type.loc21_17.1: type = facet_type <@I, @I(constants.%W)> [symbolic = %I.type.loc21_17.2 (constants.%I.type.1ab3e4.3)] -// CHECK:STDOUT: %.loc21_18: @TestGeneric.%I.assoc_type (%I.assoc_type.76c031.3) = specific_constant @I.%assoc0.loc8_31.1, @I(constants.%W) [symbolic = %assoc0 (constants.%assoc0.6a687a.3)] -// CHECK:STDOUT: %F.ref: @TestGeneric.%I.assoc_type (%I.assoc_type.76c031.3) = name_ref F, %.loc21_18 [symbolic = %assoc0 (constants.%assoc0.6a687a.3)] +// CHECK:STDOUT: %.loc21_18: @TestGeneric.%I.assoc_type (%I.assoc_type.76c031.3) = specific_constant @I.%assoc0.loc8_31.1, @I(constants.%W, constants.%Self.fdb544.1) [symbolic = %assoc0 (constants.%assoc0.203667.3)] +// CHECK:STDOUT: %F.ref: @TestGeneric.%I.assoc_type (%I.assoc_type.76c031.3) = name_ref F, %.loc21_18 [symbolic = %assoc0 (constants.%assoc0.203667.3)] // CHECK:STDOUT: %.loc21_11.1: ref @TestGeneric.%A.loc19_32.1 (%A.95c0c7.3) = deref %a.ref -// CHECK:STDOUT: %impl.elem0.loc21_11.1: @TestGeneric.%.loc21_11.3 (%.560) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.5ff)] +// CHECK:STDOUT: %impl.elem0.loc21_11.1: @TestGeneric.%.loc21_11.3 (%.695) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.976)] // CHECK:STDOUT: %bound_method.loc21_11: = bound_method %.loc21_11.1, %impl.elem0.loc21_11.1 -// CHECK:STDOUT: %specific_impl_fn.loc21_11.1: = specific_impl_function %impl.elem0.loc21_11.1, @I.F(constants.%W, constants.%I.facet.558) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.898)] +// CHECK:STDOUT: %specific_impl_fn.loc21_11.1: = specific_impl_function %impl.elem0.loc21_11.1, @I.WithSelf.F(constants.%W, constants.%I.facet.558) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.3c2)] // CHECK:STDOUT: %bound_method.loc21_22: = bound_method %.loc21_11.1, %specific_impl_fn.loc21_11.1 -// CHECK:STDOUT: %I.F.call: init @TestGeneric.%ptr.loc19_40.1 (%ptr.e8f8f9.4) = call %bound_method.loc21_22(%.loc21_11.1) -// CHECK:STDOUT: return %I.F.call +// CHECK:STDOUT: %I.WithSelf.F.call: init @TestGeneric.%ptr.loc19_40.1 (%ptr.e8f8f9.4) = call %bound_method.loc21_22(%.loc21_11.1) +// CHECK:STDOUT: return %I.WithSelf.F.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -262,10 +267,10 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %.loc27_17: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %.loc27_18: type = converted %.loc27_17, constants.%empty_struct_type [concrete = constants.%empty_struct_type] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%empty_struct_type)> [concrete = constants.%I.type.ab5] -// CHECK:STDOUT: %.loc27_19: %I.assoc_type.294 = specific_constant @I.%assoc0.loc8_31.1, @I(constants.%empty_struct_type) [concrete = constants.%assoc0.130] -// CHECK:STDOUT: %F.ref: %I.assoc_type.294 = name_ref F, %.loc27_19 [concrete = constants.%assoc0.130] +// CHECK:STDOUT: %.loc27_19: %I.assoc_type.294 = specific_constant @I.%assoc0.loc8_31.1, @I(constants.%empty_struct_type, constants.%Self.fdb544.1) [concrete = constants.%assoc0.c64] +// CHECK:STDOUT: %F.ref: %I.assoc_type.294 = name_ref F, %.loc27_19 [concrete = constants.%assoc0.c64] // CHECK:STDOUT: %.loc27_11: ref %A.ed7 = deref %a.ref -// CHECK:STDOUT: %impl.elem0: %.160 = impl_witness_access constants.%I.impl_witness.708, element0 [concrete = constants.%A.as.I.impl.F.c38] +// CHECK:STDOUT: %impl.elem0: %.d59 = impl_witness_access constants.%I.impl_witness.708, element0 [concrete = constants.%A.as.I.impl.F.c38] // CHECK:STDOUT: %bound_method.loc27_11: = bound_method %.loc27_11, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @A.as.I.impl.F(constants.%empty_struct_type) [concrete = constants.%A.as.I.impl.F.specific_fn] // CHECK:STDOUT: %bound_method.loc27_23: = bound_method %.loc27_11, %specific_fn @@ -343,7 +348,8 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %.loc14_12.1 => constants.%.07c // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.3fd // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.111 -// CHECK:STDOUT: %.loc14_12.2 => constants.%.38c +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.514 +// CHECK:STDOUT: %.loc14_12.2 => constants.%.237 // CHECK:STDOUT: %impl.elem0.loc14_12.2 => constants.%ptr.as.Copy.impl.Op.cbf // CHECK:STDOUT: %specific_impl_fn.loc14_12.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index 4e58e7b89002..172f9730afcc 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -230,10 +230,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.92d: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete] -// CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.4d6: type = fn_type @HasF.WithSelf.F, @HasF(%Self) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.312: %HasF.WithSelf.F.type.4d6 = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -242,6 +242,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %C.as.HasF.impl.F.type: type = fn_type @C.as.HasF.impl.F [concrete] // CHECK:STDOUT: %C.as.HasF.impl.F: %C.as.HasF.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%HasF.impl_witness) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.f37: type = fn_type @HasF.WithSelf.F, @HasF(%HasF.facet) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.c63: %HasF.WithSelf.F.type.f37 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -267,25 +269,28 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] { -// CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.92d) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.92d) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @HasF [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.4d6) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.312)] { +// CHECK:STDOUT: %self.patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.92d) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @HasF.WithSelf.F.%pattern_type (%pattern_type.92d) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%HasF.F.decl) +// CHECK:STDOUT: witness = (%HasF.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -315,12 +320,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%Self.loc4: %HasF.type) { // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.92d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @HasF.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.HasF.impl.F(%self.param: %C) { @@ -328,13 +333,27 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%Self) { +// CHECK:STDOUT: specific @HasF(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.4d6 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.312 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.92d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet) { +// CHECK:STDOUT: specific @HasF(constants.%HasF.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%HasF.facet +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.f37 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.c63 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%HasF.facet) { // CHECK:STDOUT: %Self => constants.%HasF.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.039 @@ -347,10 +366,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self.26c: %HasG.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type.ba6: type = symbolic_binding_type Self, 0, %Self.26c [symbolic] // CHECK:STDOUT: %pattern_type.348: type = pattern_type %Self.binding.as_type.ba6 [symbolic] -// CHECK:STDOUT: %HasG.G.type: type = fn_type @HasG.G [concrete] -// CHECK:STDOUT: %HasG.G: %HasG.G.type = struct_value () [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.type.0fc: type = fn_type @HasG.WithSelf.G, @HasG(%Self.26c) [symbolic] +// CHECK:STDOUT: %HasG.WithSelf.G.8a1: %HasG.WithSelf.G.type.0fc = struct_value () [symbolic] // CHECK:STDOUT: %HasG.assoc_type: type = assoc_entity_type @HasG [concrete] -// CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, @HasG.%HasG.G.decl [concrete] +// CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, @HasG.%HasG.WithSelf.G.decl [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -360,21 +379,27 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %C.as.HasG.impl.G.type: type = fn_type @C.as.HasG.impl.G [concrete] // CHECK:STDOUT: %C.as.HasG.impl.G: %C.as.HasG.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: %HasG.facet.435: %HasG.type = facet_value %C, (%HasG.impl_witness.e0d) [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.type.119: type = fn_type @HasG.WithSelf.G, @HasG(%HasG.facet.435) [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.273: %HasG.WithSelf.G.type.119 = struct_value () [concrete] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete] // CHECK:STDOUT: %Self.656: %HasF.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasF.impl_witness: = impl_witness @D.as.HasF.impl.%HasF.impl_witness_table [concrete] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete] -// CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.ef3: type = fn_type @HasF.WithSelf.F, @HasF(%Self.656) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.efb: %HasF.WithSelf.F.type.ef3 = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type.e84: type = symbolic_binding_type Self, 0, %Self.656 [symbolic] // CHECK:STDOUT: %pattern_type.6ba: type = pattern_type %Self.binding.as_type.e84 [symbolic] +// CHECK:STDOUT: %HasF.impl_witness: = impl_witness @D.as.HasF.impl.%HasF.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.189: type = pattern_type %D [concrete] // CHECK:STDOUT: %D.as.HasF.impl.F.type: type = fn_type @D.as.HasF.impl.F [concrete] // CHECK:STDOUT: %D.as.HasF.impl.F: %D.as.HasF.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %D, (%HasF.impl_witness) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.e38: type = fn_type @HasF.WithSelf.F, @HasF(%HasF.facet) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.e09: %HasF.WithSelf.F.type.e38 = struct_value () [concrete] // CHECK:STDOUT: %HasG.impl_witness.a94: = impl_witness @D.as.HasG.impl.%HasG.impl_witness_table [concrete] // CHECK:STDOUT: %D.as.HasG.impl.G.type: type = fn_type @D.as.HasG.impl.G [concrete] // CHECK:STDOUT: %D.as.HasG.impl.G: %D.as.HasG.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: %HasG.facet.b67: %HasG.type = facet_value %D, (%HasG.impl_witness.a94) [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.type.0d1: type = fn_type @HasG.WithSelf.G, @HasG(%HasG.facet.b67) [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.3c3: %HasG.WithSelf.G.type.0d1 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -391,10 +416,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageA.import_ref.c44 = import_ref PackageA//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type] +// CHECK:STDOUT: %PackageA.import_ref.2d5 = import_ref PackageA//default, loc5_21, unloaded +// CHECK:STDOUT: %PackageA.F: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.ef3) = import_ref PackageA//default, F, loaded [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.efb)] +// CHECK:STDOUT: %PackageA.import_ref.d576df.2: %HasF.type = import_ref PackageA//default, loc4_16, loaded [symbolic = constants.%Self.656] // CHECK:STDOUT: %PackageA.import_ref.182 = import_ref PackageA//default, loc4_16, unloaded -// CHECK:STDOUT: %PackageA.import_ref.0b3 = import_ref PackageA//default, loc5_21, unloaded -// CHECK:STDOUT: %PackageA.F: %HasF.F.type = import_ref PackageA//default, F, loaded [concrete = constants.%HasF.F] -// CHECK:STDOUT: %PackageA.import_ref.d57: %HasF.type = import_ref PackageA//default, loc4_16, loaded [symbolic = constants.%Self.656] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -425,25 +450,28 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasG { -// CHECK:STDOUT: %Self: %HasG.type = symbolic_binding Self, 0 [symbolic = constants.%Self.26c] -// CHECK:STDOUT: %HasG.G.decl: %HasG.G.type = fn_decl @HasG.G [concrete = constants.%HasG.G] { -// CHECK:STDOUT: %self.patt: @HasG.G.%pattern_type (%pattern_type.348) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @HasG.G.%pattern_type (%pattern_type.348) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc6: %HasG.type = symbolic_binding Self, 0 [symbolic = constants.%Self.26c] +// CHECK:STDOUT: interface_with_self_decl @HasG [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasG.WithSelf.G.decl: @HasG.%HasG.WithSelf.G.type (%HasG.WithSelf.G.type.0fc) = fn_decl @HasG.WithSelf.G [symbolic = @HasG.%HasG.WithSelf.G (constants.%HasG.WithSelf.G.8a1)] { +// CHECK:STDOUT: %self.patt: @HasG.WithSelf.G.%pattern_type (%pattern_type.348) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @HasG.WithSelf.G.%pattern_type (%pattern_type.348) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @HasG.G.%Self.binding.as_type (%Self.binding.as_type.ba6) = value_param call_param0 +// CHECK:STDOUT: %self.param: @HasG.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type.ba6) = value_param call_param0 // CHECK:STDOUT: %.loc7_14.1: type = splice_block %.loc7_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ba6)] { -// CHECK:STDOUT: %Self.ref: %HasG.type = name_ref Self, @HasG.%Self [symbolic = %Self (constants.%Self.26c)] +// CHECK:STDOUT: %Self.ref: %HasG.type = name_ref Self, @HasG.%Self.loc6 [symbolic = %Self (constants.%Self.26c)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ba6)] // CHECK:STDOUT: %.loc7_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ba6)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @HasG.G.%Self.binding.as_type (%Self.binding.as_type.ba6) = value_binding self, %self.param +// CHECK:STDOUT: %self: @HasG.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type.ba6) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, %HasG.G.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, %HasG.WithSelf.G.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc6 // CHECK:STDOUT: .G = %assoc0 -// CHECK:STDOUT: witness = (%HasG.G.decl) +// CHECK:STDOUT: witness = (%HasG.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -451,7 +479,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @HasF [from "package_a.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%PackageA.import_ref.182 -// CHECK:STDOUT: .F = imports.%PackageA.import_ref.0b3 +// CHECK:STDOUT: .F = imports.%PackageA.import_ref.2d5 // CHECK:STDOUT: witness = (imports.%PackageA.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -523,12 +551,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: .Self = imports.%PackageA.import_ref.c44 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasG.G(@HasG.%Self: %HasG.type) { +// CHECK:STDOUT: generic fn @HasG.WithSelf.G(@HasG.%Self.loc6: %HasG.type) { // CHECK:STDOUT: %Self: %HasG.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.26c)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ba6)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.348)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @HasG.G.%Self.binding.as_type (%Self.binding.as_type.ba6)); +// CHECK:STDOUT: fn(%self.param: @HasG.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type.ba6)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.HasG.impl.G(%self.param: %C) { @@ -536,7 +564,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(imports.%PackageA.import_ref.d57: %HasF.type) [from "package_a.carbon"] { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(imports.%PackageA.import_ref.d576df.2: %HasF.type) [from "package_a.carbon"] { // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.656)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.e84)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.6ba)] @@ -554,31 +582,66 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasG.G(constants.%Self.26c) { +// CHECK:STDOUT: specific @HasG(constants.%Self.26c) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc7 => constants.%Self.26c +// CHECK:STDOUT: %HasG.WithSelf.G.type => constants.%HasG.WithSelf.G.type.0fc +// CHECK:STDOUT: %HasG.WithSelf.G => constants.%HasG.WithSelf.G.8a1 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasG.WithSelf.G(constants.%Self.26c) { // CHECK:STDOUT: %Self => constants.%Self.26c // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.ba6 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.348 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasG.G(constants.%HasG.facet.435) { +// CHECK:STDOUT: specific @HasG(constants.%HasG.facet.435) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc7 => constants.%HasG.facet.435 +// CHECK:STDOUT: %HasG.WithSelf.G.type => constants.%HasG.WithSelf.G.type.119 +// CHECK:STDOUT: %HasG.WithSelf.G => constants.%HasG.WithSelf.G.273 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasG.WithSelf.G(constants.%HasG.facet.435) { // CHECK:STDOUT: %Self => constants.%HasG.facet.435 // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.8e5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%Self.656) { +// CHECK:STDOUT: specific @HasF(constants.%Self.656) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.656 +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.ef3 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.efb +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self.656) { // CHECK:STDOUT: %Self => constants.%Self.656 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.e84 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6ba // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet) { +// CHECK:STDOUT: specific @HasF(constants.%HasF.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%HasF.facet +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.e38 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.e09 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%HasF.facet) { // CHECK:STDOUT: %Self => constants.%HasF.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%D // CHECK:STDOUT: %pattern_type => constants.%pattern_type.189 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasG.G(constants.%HasG.facet.b67) { +// CHECK:STDOUT: specific @HasG(constants.%HasG.facet.b67) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc7 => constants.%HasG.facet.b67 +// CHECK:STDOUT: %HasG.WithSelf.G.type => constants.%HasG.WithSelf.G.type.0d1 +// CHECK:STDOUT: %HasG.WithSelf.G => constants.%HasG.WithSelf.G.3c3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasG.WithSelf.G(constants.%HasG.facet.b67) { // CHECK:STDOUT: %Self => constants.%HasG.facet.b67 // CHECK:STDOUT: %Self.binding.as_type => constants.%D // CHECK:STDOUT: %pattern_type => constants.%pattern_type.189 @@ -596,15 +659,17 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %TestCF: %TestCF.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete] // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, imports.%PackageA.import_ref.05f [concrete] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete] -// CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.ef3: type = fn_type @HasF.WithSelf.F, @HasF(%Self) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.efb: %HasF.WithSelf.F.type.ef3 = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.6ba: type = pattern_type %Self.binding.as_type [symbolic] +// CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, imports.%PackageA.import_ref.995 [concrete] // CHECK:STDOUT: %HasF.impl_witness: = impl_witness imports.%HasF.impl_witness_table [concrete] // CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%HasF.impl_witness) [concrete] -// CHECK:STDOUT: %.a26: type = fn_type_with_self_type %HasF.F.type, %HasF.facet [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.9b5: type = fn_type @HasF.WithSelf.F, @HasF(%HasF.facet) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.dd0: %HasF.WithSelf.F.type.9b5 = struct_value () [concrete] +// CHECK:STDOUT: %.eb1: type = fn_type_with_self_type %HasF.WithSelf.F.type.9b5, %HasF.facet [concrete] // CHECK:STDOUT: %C.as.HasF.impl.F.type: type = fn_type @C.as.HasF.impl.F [concrete] // CHECK:STDOUT: %C.as.HasF.impl.F: %C.as.HasF.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -623,11 +688,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageA.import_ref.c44 = import_ref PackageA//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type] -// CHECK:STDOUT: %PackageA.import_ref.182 = import_ref PackageA//default, loc4_16, unloaded -// CHECK:STDOUT: %PackageA.import_ref.79c: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %PackageA.import_ref.a55: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded -// CHECK:STDOUT: %PackageA.import_ref.05f: %HasF.F.type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%HasF.F] -// CHECK:STDOUT: %PackageA.import_ref.d57: %HasF.type = import_ref PackageA//default, loc4_16, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %PackageA.import_ref.d576df.2: %HasF.type = import_ref PackageA//default, loc4_16, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %PackageA.import_ref.182 = import_ref PackageA//default, loc4_16, unloaded +// CHECK:STDOUT: %PackageA.import_ref.995: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.ef3) = import_ref PackageA//default, loc5_21, loaded [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.efb)] // CHECK:STDOUT: %PackageA.import_ref.45d: = import_ref PackageA//default, loc11_16, loaded [concrete = constants.%HasF.impl_witness] // CHECK:STDOUT: %PackageA.import_ref.83d: type = import_ref PackageA//default, loc11_6, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageA.import_ref.4b0: type = import_ref PackageA//default, loc11_11, loaded [concrete = constants.%HasF.type] @@ -659,7 +724,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @HasF [from "package_a.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%PackageA.import_ref.182 -// CHECK:STDOUT: .F = imports.%PackageA.import_ref.79c +// CHECK:STDOUT: .F = imports.%PackageA.import_ref.a55 // CHECK:STDOUT: witness = (imports.%PackageA.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -682,14 +747,14 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %PackageA.ref.loc7: = name_ref PackageA, imports.%PackageA [concrete = imports.%PackageA] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%PackageA.HasF [concrete = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, imports.%PackageA.import_ref.79c [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.a26 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] +// CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, imports.%PackageA.import_ref.a55 [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %.eb1 = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %C.as.HasF.impl.F.call: init %empty_tuple.type = call %bound_method(%c.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(imports.%PackageA.import_ref.d57: %HasF.type) [from "package_a.carbon"] { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(imports.%PackageA.import_ref.d576df.2: %HasF.type) [from "package_a.carbon"] { // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.6ba)] @@ -699,12 +764,26 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.HasF.impl.F [from "package_a.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%Self) { +// CHECK:STDOUT: specific @HasF(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.ef3 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.efb +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6ba // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%HasF.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%HasF.facet +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.9b5 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.dd0 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- use_df.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -717,16 +796,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %TestDF: %TestDF.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete] // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, imports.%PackageA.import_ref.05f [concrete] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete] -// CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.ef3: type = fn_type @HasF.WithSelf.F, @HasF(%Self) [symbolic] +// CHECK:STDOUT: %HasF.WithSelf.F.efb: %HasF.WithSelf.F.type.ef3 = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.6ba: type = pattern_type %Self.binding.as_type [symbolic] +// CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, imports.%PackageA.import_ref.995 [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %HasF.impl_witness: = impl_witness imports.%HasF.impl_witness_table [concrete] // CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %D, (%HasF.impl_witness) [concrete] -// CHECK:STDOUT: %.95d: type = fn_type_with_self_type %HasF.F.type, %HasF.facet [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.440: type = fn_type @HasF.WithSelf.F, @HasF(%HasF.facet) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.0da: %HasF.WithSelf.F.type.440 = struct_value () [concrete] +// CHECK:STDOUT: %.a8c: type = fn_type_with_self_type %HasF.WithSelf.F.type.440, %HasF.facet [concrete] // CHECK:STDOUT: %D.as.HasF.impl.F.type: type = fn_type @D.as.HasF.impl.F [concrete] // CHECK:STDOUT: %D.as.HasF.impl.F: %D.as.HasF.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -748,11 +829,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageB.import_ref.8f2: = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageB.import_ref.468 = import_ref PackageB//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type] -// CHECK:STDOUT: %PackageA.import_ref.182 = import_ref PackageA//default, loc4_16, unloaded -// CHECK:STDOUT: %PackageA.import_ref.79c: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %PackageA.import_ref.a55: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded -// CHECK:STDOUT: %PackageA.import_ref.05f: %HasF.F.type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%HasF.F] -// CHECK:STDOUT: %PackageA.import_ref.d57: %HasF.type = import_ref PackageA//default, loc4_16, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %PackageA.import_ref.d576df.2: %HasF.type = import_ref PackageA//default, loc4_16, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %PackageA.import_ref.182 = import_ref PackageA//default, loc4_16, unloaded +// CHECK:STDOUT: %PackageA.import_ref.995: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.ef3) = import_ref PackageA//default, loc5_21, loaded [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.efb)] // CHECK:STDOUT: %PackageA.import_ref.907 = import_ref PackageA//default, loc11_16, unloaded // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageA.import_ref.c44 = import_ref PackageA//default, inst{{[0-9A-F]+}} [no loc], unloaded @@ -791,7 +872,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @HasF [from "package_a.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%PackageA.import_ref.182 -// CHECK:STDOUT: .F = imports.%PackageA.import_ref.79c +// CHECK:STDOUT: .F = imports.%PackageA.import_ref.a55 // CHECK:STDOUT: witness = (imports.%PackageA.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -826,14 +907,14 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %d.ref: %D = name_ref d, %d // CHECK:STDOUT: %PackageA.ref: = name_ref PackageA, imports.%PackageA [concrete = imports.%PackageA] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%PackageA.HasF [concrete = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, imports.%PackageA.import_ref.79c [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.95d = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%D.as.HasF.impl.F] +// CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, imports.%PackageA.import_ref.a55 [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %.a8c = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%D.as.HasF.impl.F] // CHECK:STDOUT: %bound_method: = bound_method %d.ref, %impl.elem0 // CHECK:STDOUT: %D.as.HasF.impl.F.call: init %empty_tuple.type = call %bound_method(%d.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(imports.%PackageA.import_ref.d57: %HasF.type) [from "package_a.carbon"] { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(imports.%PackageA.import_ref.d576df.2: %HasF.type) [from "package_a.carbon"] { // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.6ba)] @@ -843,12 +924,26 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: fn @D.as.HasF.impl.F [from "package_b.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%Self) { +// CHECK:STDOUT: specific @HasF(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.ef3 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.efb +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6ba // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%HasF.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%HasF.facet +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.440 +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.0da +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- use_cg.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -861,16 +956,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %TestCG: %TestCG.type = struct_value () [concrete] // CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [concrete] // CHECK:STDOUT: %Self: %HasG.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasG.assoc_type: type = assoc_entity_type @HasG [concrete] -// CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, imports.%PackageB.import_ref.d98 [concrete] -// CHECK:STDOUT: %HasG.G.type: type = fn_type @HasG.G [concrete] -// CHECK:STDOUT: %HasG.G: %HasG.G.type = struct_value () [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.type.15f: type = fn_type @HasG.WithSelf.G, @HasG(%Self) [symbolic] +// CHECK:STDOUT: %HasG.WithSelf.G.5c1: %HasG.WithSelf.G.type.15f = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.588: type = pattern_type %Self.binding.as_type [symbolic] +// CHECK:STDOUT: %HasG.assoc_type: type = assoc_entity_type @HasG [concrete] +// CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, imports.%PackageB.import_ref.cd5 [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %HasG.impl_witness: = impl_witness imports.%HasG.impl_witness_table [concrete] // CHECK:STDOUT: %HasG.facet: %HasG.type = facet_value %C, (%HasG.impl_witness) [concrete] -// CHECK:STDOUT: %.549: type = fn_type_with_self_type %HasG.G.type, %HasG.facet [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.type.ad3: type = fn_type @HasG.WithSelf.G, @HasG(%HasG.facet) [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.8f3: %HasG.WithSelf.G.type.ad3 = struct_value () [concrete] +// CHECK:STDOUT: %.b85: type = fn_type_with_self_type %HasG.WithSelf.G.type.ad3, %HasG.facet [concrete] // CHECK:STDOUT: %C.as.HasG.impl.G.type: type = fn_type @C.as.HasG.impl.G [concrete] // CHECK:STDOUT: %C.as.HasG.impl.G: %C.as.HasG.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -892,11 +989,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageA.import_ref.8f2: = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageA.import_ref.c44 = import_ref PackageA//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %PackageB.HasG: type = import_ref PackageB//default, HasG, loaded [concrete = constants.%HasG.type] -// CHECK:STDOUT: %PackageB.import_ref.6dc = import_ref PackageB//default, loc6_16, unloaded -// CHECK:STDOUT: %PackageB.import_ref.239: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %PackageB.import_ref.03b: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageB.G = import_ref PackageB//default, G, unloaded -// CHECK:STDOUT: %PackageB.import_ref.d98: %HasG.G.type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%HasG.G] -// CHECK:STDOUT: %PackageB.import_ref.945: %HasG.type = import_ref PackageB//default, loc6_16, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %PackageB.import_ref.945b0d.2: %HasG.type = import_ref PackageB//default, loc6_16, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %PackageB.import_ref.6dc = import_ref PackageB//default, loc6_16, unloaded +// CHECK:STDOUT: %PackageB.import_ref.cd5: @HasG.%HasG.WithSelf.G.type (%HasG.WithSelf.G.type.15f) = import_ref PackageB//default, loc7_21, loaded [symbolic = @HasG.%HasG.WithSelf.G (constants.%HasG.WithSelf.G.5c1)] // CHECK:STDOUT: %PackageB.import_ref.c85: = import_ref PackageB//default, loc13_25, loaded [concrete = constants.%HasG.impl_witness] // CHECK:STDOUT: %PackageB.import_ref.2c1: type = import_ref PackageB//default, loc13_14, loaded [concrete = constants.%C] // CHECK:STDOUT: %PackageB.import_ref.d31a52.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type] @@ -935,7 +1032,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @HasG [from "package_b.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%PackageB.import_ref.6dc -// CHECK:STDOUT: .G = imports.%PackageB.import_ref.239 +// CHECK:STDOUT: .G = imports.%PackageB.import_ref.03b // CHECK:STDOUT: witness = (imports.%PackageB.G) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -970,14 +1067,14 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %PackageB.ref: = name_ref PackageB, imports.%PackageB [concrete = imports.%PackageB] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, imports.%PackageB.HasG [concrete = constants.%HasG.type] -// CHECK:STDOUT: %G.ref: %HasG.assoc_type = name_ref G, imports.%PackageB.import_ref.239 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.549 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%C.as.HasG.impl.G] +// CHECK:STDOUT: %G.ref: %HasG.assoc_type = name_ref G, imports.%PackageB.import_ref.03b [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %.b85 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%C.as.HasG.impl.G] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %C.as.HasG.impl.G.call: init %empty_tuple.type = call %bound_method(%c.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasG.G(imports.%PackageB.import_ref.945: %HasG.type) [from "package_b.carbon"] { +// CHECK:STDOUT: generic fn @HasG.WithSelf.G(imports.%PackageB.import_ref.945b0d.2: %HasG.type) [from "package_b.carbon"] { // CHECK:STDOUT: %Self: %HasG.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.588)] @@ -987,12 +1084,26 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.HasG.impl.G [from "package_b.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasG.G(constants.%Self) { +// CHECK:STDOUT: specific @HasG(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %HasG.WithSelf.G.type => constants.%HasG.WithSelf.G.type.15f +// CHECK:STDOUT: %HasG.WithSelf.G => constants.%HasG.WithSelf.G.5c1 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasG.WithSelf.G(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.588 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @HasG(constants.%HasG.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%HasG.facet +// CHECK:STDOUT: %HasG.WithSelf.G.type => constants.%HasG.WithSelf.G.type.ad3 +// CHECK:STDOUT: %HasG.WithSelf.G => constants.%HasG.WithSelf.G.8f3 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- use_dg.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1005,16 +1116,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %TestDG: %TestDG.type = struct_value () [concrete] // CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [concrete] // CHECK:STDOUT: %Self: %HasG.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasG.assoc_type: type = assoc_entity_type @HasG [concrete] -// CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, imports.%PackageB.import_ref.d98 [concrete] -// CHECK:STDOUT: %HasG.G.type: type = fn_type @HasG.G [concrete] -// CHECK:STDOUT: %HasG.G: %HasG.G.type = struct_value () [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.type.15f: type = fn_type @HasG.WithSelf.G, @HasG(%Self) [symbolic] +// CHECK:STDOUT: %HasG.WithSelf.G.5c1: %HasG.WithSelf.G.type.15f = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.588: type = pattern_type %Self.binding.as_type [symbolic] +// CHECK:STDOUT: %HasG.assoc_type: type = assoc_entity_type @HasG [concrete] +// CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, imports.%PackageB.import_ref.cd5 [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %HasG.impl_witness: = impl_witness imports.%HasG.impl_witness_table [concrete] // CHECK:STDOUT: %HasG.facet: %HasG.type = facet_value %D, (%HasG.impl_witness) [concrete] -// CHECK:STDOUT: %.169: type = fn_type_with_self_type %HasG.G.type, %HasG.facet [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.type.e6c: type = fn_type @HasG.WithSelf.G, @HasG(%HasG.facet) [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.df8: %HasG.WithSelf.G.type.e6c = struct_value () [concrete] +// CHECK:STDOUT: %.6a4: type = fn_type_with_self_type %HasG.WithSelf.G.type.e6c, %HasG.facet [concrete] // CHECK:STDOUT: %D.as.HasG.impl.G.type: type = fn_type @D.as.HasG.impl.G [concrete] // CHECK:STDOUT: %D.as.HasG.impl.G: %D.as.HasG.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -1033,11 +1146,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageB.import_ref.8f2: = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageB.import_ref.468 = import_ref PackageB//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %PackageB.HasG: type = import_ref PackageB//default, HasG, loaded [concrete = constants.%HasG.type] -// CHECK:STDOUT: %PackageB.import_ref.6dc = import_ref PackageB//default, loc6_16, unloaded -// CHECK:STDOUT: %PackageB.import_ref.239: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %PackageB.import_ref.03b: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageB.G = import_ref PackageB//default, G, unloaded -// CHECK:STDOUT: %PackageB.import_ref.d98: %HasG.G.type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%HasG.G] -// CHECK:STDOUT: %PackageB.import_ref.945: %HasG.type = import_ref PackageB//default, loc6_16, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %PackageB.import_ref.945b0d.2: %HasG.type = import_ref PackageB//default, loc6_16, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %PackageB.import_ref.6dc = import_ref PackageB//default, loc6_16, unloaded +// CHECK:STDOUT: %PackageB.import_ref.cd5: @HasG.%HasG.WithSelf.G.type (%HasG.WithSelf.G.type.15f) = import_ref PackageB//default, loc7_21, loaded [symbolic = @HasG.%HasG.WithSelf.G (constants.%HasG.WithSelf.G.5c1)] // CHECK:STDOUT: %PackageB.import_ref.148 = import_ref PackageB//default, loc13_25, unloaded // CHECK:STDOUT: %PackageB.import_ref.8db: = import_ref PackageB//default, inst{{[0-9A-F]+}} [indirect], loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %PackageB.import_ref.572 = import_ref PackageB//default, inst{{[0-9A-F]+}} [indirect], unloaded @@ -1074,7 +1187,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @HasG [from "package_b.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%PackageB.import_ref.6dc -// CHECK:STDOUT: .G = imports.%PackageB.import_ref.239 +// CHECK:STDOUT: .G = imports.%PackageB.import_ref.03b // CHECK:STDOUT: witness = (imports.%PackageB.G) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1109,14 +1222,14 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %d.ref: %D = name_ref d, %d // CHECK:STDOUT: %PackageB.ref.loc7: = name_ref PackageB, imports.%PackageB [concrete = imports.%PackageB] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, imports.%PackageB.HasG [concrete = constants.%HasG.type] -// CHECK:STDOUT: %G.ref: %HasG.assoc_type = name_ref G, imports.%PackageB.import_ref.239 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.169 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%D.as.HasG.impl.G] +// CHECK:STDOUT: %G.ref: %HasG.assoc_type = name_ref G, imports.%PackageB.import_ref.03b [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %.6a4 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%D.as.HasG.impl.G] // CHECK:STDOUT: %bound_method: = bound_method %d.ref, %impl.elem0 // CHECK:STDOUT: %D.as.HasG.impl.G.call: init %empty_tuple.type = call %bound_method(%d.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasG.G(imports.%PackageB.import_ref.945: %HasG.type) [from "package_b.carbon"] { +// CHECK:STDOUT: generic fn @HasG.WithSelf.G(imports.%PackageB.import_ref.945b0d.2: %HasG.type) [from "package_b.carbon"] { // CHECK:STDOUT: %Self: %HasG.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.588)] @@ -1126,12 +1239,26 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: fn @D.as.HasG.impl.G [from "package_b.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasG.G(constants.%Self) { +// CHECK:STDOUT: specific @HasG(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %HasG.WithSelf.G.type => constants.%HasG.WithSelf.G.type.15f +// CHECK:STDOUT: %HasG.WithSelf.G => constants.%HasG.WithSelf.G.5c1 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasG.WithSelf.G(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.588 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @HasG(constants.%HasG.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%HasG.facet +// CHECK:STDOUT: %HasG.WithSelf.G.type => constants.%HasG.WithSelf.G.type.e6c +// CHECK:STDOUT: %HasG.WithSelf.G => constants.%HasG.WithSelf.G.df8 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- associated_interface.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1139,17 +1266,19 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.336: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %Z.H.type: type = fn_type @Z.H [concrete] +// CHECK:STDOUT: %Z.WithSelf.H.type.2a4: type = fn_type @Z.WithSelf.H, @Z(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %Z.H: %Z.H.type = struct_value () [concrete] +// CHECK:STDOUT: %Z.WithSelf.H.514: %Z.WithSelf.H.type.2a4 = struct_value () [symbolic] // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z [concrete] -// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, @Z.%Z.H.decl [concrete] +// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, @Z.%Z.WithSelf.H.decl [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Z.impl_witness: = impl_witness @empty_tuple.type.as.Z.impl.%Z.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %empty_tuple.type.as.Z.impl.H.type: type = fn_type @empty_tuple.type.as.Z.impl.H [concrete] // CHECK:STDOUT: %empty_tuple.type.as.Z.impl.H: %empty_tuple.type.as.Z.impl.H.type = struct_value () [concrete] // CHECK:STDOUT: %Z.facet: %Z.type = facet_value %empty_tuple.type, (%Z.impl_witness) [concrete] +// CHECK:STDOUT: %Z.WithSelf.H.type.24c: type = fn_type @Z.WithSelf.H, @Z(%Z.facet) [concrete] +// CHECK:STDOUT: %Z.WithSelf.H.45d: %Z.WithSelf.H.type.24c = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1174,25 +1303,28 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { -// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Z.H.decl: %Z.H.type = fn_decl @Z.H [concrete = constants.%Z.H] { -// CHECK:STDOUT: %self.patt: @Z.H.%pattern_type (%pattern_type.336) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Z.H.%pattern_type (%pattern_type.336) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.H.decl: @Z.%Z.WithSelf.H.type (%Z.WithSelf.H.type.2a4) = fn_decl @Z.WithSelf.H [symbolic = @Z.%Z.WithSelf.H (constants.%Z.WithSelf.H.514)] { +// CHECK:STDOUT: %self.patt: @Z.WithSelf.H.%pattern_type (%pattern_type.336) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Z.WithSelf.H.%pattern_type (%pattern_type.336) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @Z.H.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Z.WithSelf.H.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Z.H.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @Z.WithSelf.H.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, %Z.H.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, %Z.WithSelf.H.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .H = %assoc0 -// CHECK:STDOUT: witness = (%Z.H.decl) +// CHECK:STDOUT: witness = (%Z.WithSelf.H.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -1214,12 +1346,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: witness = %Z.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Z.H(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic fn @Z.WithSelf.H(@Z.%Self.loc4: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.336)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Z.H.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @Z.WithSelf.H.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @empty_tuple.type.as.Z.impl.H(%self.param: %empty_tuple.type) { @@ -1227,13 +1359,27 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.H(constants.%Self) { +// CHECK:STDOUT: specific @Z(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self +// CHECK:STDOUT: %Z.WithSelf.H.type => constants.%Z.WithSelf.H.type.2a4 +// CHECK:STDOUT: %Z.WithSelf.H => constants.%Z.WithSelf.H.514 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.H(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.336 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.H(constants.%Z.facet) { +// CHECK:STDOUT: specific @Z(constants.%Z.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Z.facet +// CHECK:STDOUT: %Z.WithSelf.H.type => constants.%Z.WithSelf.H.type.24c +// CHECK:STDOUT: %Z.WithSelf.H => constants.%Z.WithSelf.H.45d +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.H(constants.%Z.facet) { // CHECK:STDOUT: %Self => constants.%Z.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%empty_tuple.type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb1 @@ -1248,15 +1394,17 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z [concrete] -// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, imports.%PackageAssociatedInterface.import_ref.9c5 [concrete] -// CHECK:STDOUT: %Z.H.type: type = fn_type @Z.H [concrete] -// CHECK:STDOUT: %Z.H: %Z.H.type = struct_value () [concrete] +// CHECK:STDOUT: %Z.WithSelf.H.type.5e9: type = fn_type @Z.WithSelf.H, @Z(%Self) [symbolic] +// CHECK:STDOUT: %Z.WithSelf.H.6f7: %Z.WithSelf.H.type.5e9 = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.91a: type = pattern_type %Self.binding.as_type [symbolic] +// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z [concrete] +// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, imports.%PackageAssociatedInterface.import_ref.13b [concrete] // CHECK:STDOUT: %Z.impl_witness: = impl_witness imports.%Z.impl_witness_table [concrete] // CHECK:STDOUT: %Z.facet: %Z.type = facet_value %empty_tuple.type, (%Z.impl_witness) [concrete] -// CHECK:STDOUT: %.d6a: type = fn_type_with_self_type %Z.H.type, %Z.facet [concrete] +// CHECK:STDOUT: %Z.WithSelf.H.type.19c: type = fn_type @Z.WithSelf.H, @Z(%Z.facet) [concrete] +// CHECK:STDOUT: %Z.WithSelf.H.0b4: %Z.WithSelf.H.type.19c = struct_value () [concrete] +// CHECK:STDOUT: %.117: type = fn_type_with_self_type %Z.WithSelf.H.type.19c, %Z.facet [concrete] // CHECK:STDOUT: %empty_tuple.type.as.Z.impl.H.type: type = fn_type @empty_tuple.type.as.Z.impl.H [concrete] // CHECK:STDOUT: %empty_tuple.type.as.Z.impl.H: %empty_tuple.type.as.Z.impl.H.type = struct_value () [concrete] // CHECK:STDOUT: %empty_tuple.type.as.Z.impl.H.bound: = bound_method %empty_tuple, %empty_tuple.type.as.Z.impl.H [concrete] @@ -1272,11 +1420,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: import PackageAssociatedInterface//default // CHECK:STDOUT: } // CHECK:STDOUT: %PackageAssociatedInterface.Z: type = import_ref PackageAssociatedInterface//default, Z, loaded [concrete = constants.%Z.type] -// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.d8d = import_ref PackageAssociatedInterface//default, loc4_13, unloaded -// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.35f: %Z.assoc_type = import_ref PackageAssociatedInterface//default, loc5_21, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.cdc: %Z.assoc_type = import_ref PackageAssociatedInterface//default, loc5_21, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %PackageAssociatedInterface.H = import_ref PackageAssociatedInterface//default, H, unloaded -// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.9c5: %Z.H.type = import_ref PackageAssociatedInterface//default, loc5_21, loaded [concrete = constants.%Z.H] -// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.b0a: %Z.type = import_ref PackageAssociatedInterface//default, loc4_13, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.b0a283.2: %Z.type = import_ref PackageAssociatedInterface//default, loc4_13, loaded [symbolic = constants.%Self] +// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.d8d = import_ref PackageAssociatedInterface//default, loc4_13, unloaded +// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.13b: @Z.%Z.WithSelf.H.type (%Z.WithSelf.H.type.5e9) = import_ref PackageAssociatedInterface//default, loc5_21, loaded [symbolic = @Z.%Z.WithSelf.H (constants.%Z.WithSelf.H.6f7)] // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.5f5: = import_ref PackageAssociatedInterface//default, loc8_14, loaded [concrete = constants.%Z.impl_witness] // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.e5c: type = import_ref PackageAssociatedInterface//default, loc8_7, loaded [concrete = constants.%empty_tuple.type] // CHECK:STDOUT: %PackageAssociatedInterface.import_ref.5fa: type = import_ref PackageAssociatedInterface//default, loc8_12, loaded [concrete = constants.%Z.type] @@ -1298,7 +1446,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @Z [from "associated_interface.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%PackageAssociatedInterface.import_ref.d8d -// CHECK:STDOUT: .H = imports.%PackageAssociatedInterface.import_ref.35f +// CHECK:STDOUT: .H = imports.%PackageAssociatedInterface.import_ref.cdc // CHECK:STDOUT: witness = (imports.%PackageAssociatedInterface.H) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1314,8 +1462,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %.loc7_4.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %PackageAssociatedInterface.ref: = name_ref PackageAssociatedInterface, imports.%PackageAssociatedInterface [concrete = imports.%PackageAssociatedInterface] // CHECK:STDOUT: %Z.ref: type = name_ref Z, imports.%PackageAssociatedInterface.Z [concrete = constants.%Z.type] -// CHECK:STDOUT: %H.ref: %Z.assoc_type = name_ref H, imports.%PackageAssociatedInterface.import_ref.35f [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.d6a = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%empty_tuple.type.as.Z.impl.H] +// CHECK:STDOUT: %H.ref: %Z.assoc_type = name_ref H, imports.%PackageAssociatedInterface.import_ref.cdc [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %.117 = impl_witness_access constants.%Z.impl_witness, element0 [concrete = constants.%empty_tuple.type.as.Z.impl.H] // CHECK:STDOUT: %bound_method: = bound_method %.loc7_4.1, %impl.elem0 [concrete = constants.%empty_tuple.type.as.Z.impl.H.bound] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc7_4.2: %empty_tuple.type = converted %.loc7_4.1, %empty_tuple [concrete = constants.%empty_tuple] @@ -1323,7 +1471,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Z.H(imports.%PackageAssociatedInterface.import_ref.b0a: %Z.type) [from "associated_interface.carbon"] { +// CHECK:STDOUT: generic fn @Z.WithSelf.H(imports.%PackageAssociatedInterface.import_ref.b0a283.2: %Z.type) [from "associated_interface.carbon"] { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.91a)] @@ -1333,12 +1481,26 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: fn @empty_tuple.type.as.Z.impl.H [from "associated_interface.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.H(constants.%Self) { +// CHECK:STDOUT: specific @Z(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %Z.WithSelf.H.type => constants.%Z.WithSelf.H.type.5e9 +// CHECK:STDOUT: %Z.WithSelf.H => constants.%Z.WithSelf.H.6f7 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.H(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.91a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Z.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Z.facet +// CHECK:STDOUT: %Z.WithSelf.H.type => constants.%Z.WithSelf.H.type.19c +// CHECK:STDOUT: %Z.WithSelf.H => constants.%Z.WithSelf.H.0b4 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- has_param.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1357,10 +1519,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.880: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %Y.K.type: type = fn_type @Y.K [concrete] -// CHECK:STDOUT: %Y.K: %Y.K.type = struct_value () [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.type: type = fn_type @Y.WithSelf.K, @Y(%Self) [symbolic] +// CHECK:STDOUT: %Y.WithSelf.K: %Y.WithSelf.K.type = struct_value () [symbolic] // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete] -// CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, @Y.%Y.K.decl [concrete] +// CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, @Y.%Y.WithSelf.K.decl [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1394,25 +1556,28 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Y { -// CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Y.K.decl: %Y.K.type = fn_decl @Y.K [concrete = constants.%Y.K] { -// CHECK:STDOUT: %self.patt: @Y.K.%pattern_type (%pattern_type.880) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Y.K.%pattern_type (%pattern_type.880) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc6: %Y.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Y [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Y.WithSelf.K.decl: @Y.%Y.WithSelf.K.type (%Y.WithSelf.K.type) = fn_decl @Y.WithSelf.K [symbolic = @Y.%Y.WithSelf.K (constants.%Y.WithSelf.K)] { +// CHECK:STDOUT: %self.patt: @Y.WithSelf.K.%pattern_type (%pattern_type.880) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Y.WithSelf.K.%pattern_type (%pattern_type.880) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @Y.K.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Y.WithSelf.K.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc7_14.1: type = splice_block %.loc7_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %Y.type = name_ref Self, @Y.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %Y.type = name_ref Self, @Y.%Self.loc6 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc7_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Y.K.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @Y.WithSelf.K.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, %Y.K.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, %Y.WithSelf.K.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc6 // CHECK:STDOUT: .K = %assoc0 -// CHECK:STDOUT: witness = (%Y.K.decl) +// CHECK:STDOUT: witness = (%Y.WithSelf.K.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -1433,7 +1598,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Y.K(@Y.%Self: %Y.type) { +// CHECK:STDOUT: generic fn @Y.WithSelf.K(@Y.%Self.loc6: %Y.type) { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.880)] @@ -1441,7 +1606,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %Self.binding.as_type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Y.K.%Self.binding.as_type (%Self.binding.as_type)) { +// CHECK:STDOUT: fn(%self.param: @Y.WithSelf.K.%Self.binding.as_type (%Self.binding.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1453,7 +1618,14 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Y.K(constants.%Self) { +// CHECK:STDOUT: specific @Y(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc7 => constants.%Self +// CHECK:STDOUT: %Y.WithSelf.K.type => constants.%Y.WithSelf.K.type +// CHECK:STDOUT: %Y.WithSelf.K => constants.%Y.WithSelf.K +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y.WithSelf.K(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.880 @@ -1482,23 +1654,25 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %AnyParam.33d: type = class_type @AnyParam, @AnyParam(%GenericInterface.type.9e8, %GenericInterface.generic) [concrete] // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete] // CHECK:STDOUT: %Self.079: %Y.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Y.impl_witness: = impl_witness @AnyParam.as.Y.impl.%Y.impl_witness_table [concrete] -// CHECK:STDOUT: %Y.K.type: type = fn_type @Y.K [concrete] -// CHECK:STDOUT: %Y.K: %Y.K.type = struct_value () [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.type.1bb: type = fn_type @Y.WithSelf.K, @Y(%Self.079) [symbolic] +// CHECK:STDOUT: %Y.WithSelf.K.378: %Y.WithSelf.K.type.1bb = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type.c23: type = symbolic_binding_type Self, 0, %Self.079 [symbolic] // CHECK:STDOUT: %pattern_type.420: type = pattern_type %Self.binding.as_type.c23 [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.binding.as_type.c23 [symbolic] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness @AnyParam.as.Y.impl.%Y.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.a39: type = pattern_type %AnyParam.33d [concrete] // CHECK:STDOUT: %AnyParam.as.Y.impl.K.type: type = fn_type @AnyParam.as.Y.impl.K [concrete] // CHECK:STDOUT: %AnyParam.as.Y.impl.K: %AnyParam.as.Y.impl.K.type = struct_value () [concrete] // CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.33d, (%Y.impl_witness) [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.type.d5a: type = fn_type @Y.WithSelf.K, @Y(%Y.facet) [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.fb5: %Y.WithSelf.K.type.d5a = struct_value () [concrete] // CHECK:STDOUT: %L.type: type = fn_type @L [concrete] // CHECK:STDOUT: %L: %L.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %AnyParam.val: %AnyParam.33d = struct_value () [concrete] // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete] -// CHECK:STDOUT: %assoc0.749: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.e48 [concrete] -// CHECK:STDOUT: %.94f: type = fn_type_with_self_type %Y.K.type, %Y.facet [concrete] +// CHECK:STDOUT: %assoc0.633: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.0e4 [concrete] +// CHECK:STDOUT: %.6b1: type = fn_type_with_self_type %Y.WithSelf.K.type.d5a, %Y.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] @@ -1521,11 +1695,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] +// CHECK:STDOUT: %PackageHasParam.import_ref.274: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.633] +// CHECK:STDOUT: %PackageHasParam.K: @Y.%Y.WithSelf.K.type (%Y.WithSelf.K.type.1bb) = import_ref PackageHasParam//default, K, loaded [symbolic = @Y.%Y.WithSelf.K (constants.%Y.WithSelf.K.378)] +// CHECK:STDOUT: %PackageHasParam.import_ref.71dd35.2: %Y.type = import_ref PackageHasParam//default, loc6_13, loaded [symbolic = constants.%Self.079] // CHECK:STDOUT: %PackageHasParam.import_ref.9b4 = import_ref PackageHasParam//default, loc6_13, unloaded -// CHECK:STDOUT: %PackageHasParam.import_ref.7ef: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.749] -// CHECK:STDOUT: %PackageHasParam.K: %Y.K.type = import_ref PackageHasParam//default, K, loaded [concrete = constants.%Y.K] -// CHECK:STDOUT: %PackageHasParam.import_ref.71d: %Y.type = import_ref PackageHasParam//default, loc6_13, loaded [symbolic = constants.%Self.079] -// CHECK:STDOUT: %PackageHasParam.import_ref.e48: %Y.K.type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%Y.K] +// CHECK:STDOUT: %PackageHasParam.import_ref.0e4: @Y.%Y.WithSelf.K.type (%Y.WithSelf.K.type.1bb) = import_ref PackageHasParam//default, loc7_22, loaded [symbolic = @Y.%Y.WithSelf.K (constants.%Y.WithSelf.K.378)] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1564,6 +1738,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc6_38.1: @GenericInterface.%GenericInterface.type (%GenericInterface.type.ad9) = symbolic_binding Self, 1 [symbolic = %Self.loc6_38.2 (constants.%Self.383)] +// CHECK:STDOUT: interface_with_self_decl @GenericInterface [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc6_38.1 @@ -1576,7 +1751,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @Y [from "has_param.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%PackageHasParam.import_ref.9b4 -// CHECK:STDOUT: .K = imports.%PackageHasParam.import_ref.7ef +// CHECK:STDOUT: .K = imports.%PackageHasParam.import_ref.274 // CHECK:STDOUT: witness = (imports.%PackageHasParam.K) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1614,7 +1789,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Y.K(imports.%PackageHasParam.import_ref.71d: %Y.type) [from "has_param.carbon"] { +// CHECK:STDOUT: generic fn @Y.WithSelf.K(imports.%PackageHasParam.import_ref.71dd35.2: %Y.type) [from "has_param.carbon"] { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.079)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.c23)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.420)] @@ -1651,8 +1826,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %obj.ref: ref %AnyParam.33d = name_ref obj, %obj // CHECK:STDOUT: %PackageHasParam.ref.loc14: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] -// CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.7ef [concrete = constants.%assoc0.749] -// CHECK:STDOUT: %impl.elem0: %.94f = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%AnyParam.as.Y.impl.K] +// CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.274 [concrete = constants.%assoc0.633] +// CHECK:STDOUT: %impl.elem0: %.6b1 = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%AnyParam.as.Y.impl.K] // CHECK:STDOUT: %bound_method: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc14: %AnyParam.33d = acquire_value %obj.ref // CHECK:STDOUT: %AnyParam.as.Y.impl.K.call: init %empty_tuple.type = call %bound_method(%.loc14) @@ -1667,6 +1842,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %U.loc6_28.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericInterface(constants.%U, constants.%Self.383) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @AnyParam(constants.%T, constants.%X) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %X => constants.%X @@ -1681,13 +1858,27 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Y.K(constants.%Self.079) { +// CHECK:STDOUT: specific @Y(constants.%Self.079) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.079 +// CHECK:STDOUT: %Y.WithSelf.K.type => constants.%Y.WithSelf.K.type.1bb +// CHECK:STDOUT: %Y.WithSelf.K => constants.%Y.WithSelf.K.378 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y.WithSelf.K(constants.%Self.079) { // CHECK:STDOUT: %Self => constants.%Self.079 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.c23 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.420 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Y.K(constants.%Y.facet) { +// CHECK:STDOUT: specific @Y(constants.%Y.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Y.facet +// CHECK:STDOUT: %Y.WithSelf.K.type => constants.%Y.WithSelf.K.type.d5a +// CHECK:STDOUT: %Y.WithSelf.K => constants.%Y.WithSelf.K.fb5 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y.WithSelf.K(constants.%Y.facet) { // CHECK:STDOUT: %Self => constants.%Y.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%AnyParam.33d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a39 @@ -1718,16 +1909,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %AnyParam.val: %AnyParam.861 = struct_value () [concrete] // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete] // CHECK:STDOUT: %Self.079: %Y.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete] -// CHECK:STDOUT: %assoc0.749: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.e48 [concrete] -// CHECK:STDOUT: %Y.K.type: type = fn_type @Y.K [concrete] -// CHECK:STDOUT: %Y.K: %Y.K.type = struct_value () [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.type.1bb: type = fn_type @Y.WithSelf.K, @Y(%Self.079) [symbolic] +// CHECK:STDOUT: %Y.WithSelf.K.378: %Y.WithSelf.K.type.1bb = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type.c23: type = symbolic_binding_type Self, 0, %Self.079 [symbolic] // CHECK:STDOUT: %pattern_type.420: type = pattern_type %Self.binding.as_type.c23 [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.binding.as_type.c23 [symbolic] +// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete] +// CHECK:STDOUT: %assoc0.633: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.0e4 [concrete] // CHECK:STDOUT: %Y.impl_witness: = impl_witness imports.%Y.impl_witness_table [concrete] // CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.861, (%Y.impl_witness) [concrete] -// CHECK:STDOUT: %.854: type = fn_type_with_self_type %Y.K.type, %Y.facet [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.type.143: type = fn_type @Y.WithSelf.K, @Y(%Y.facet) [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.d75: %Y.WithSelf.K.type.143 = struct_value () [concrete] +// CHECK:STDOUT: %.e3e: type = fn_type_with_self_type %Y.WithSelf.K.type.143, %Y.facet [concrete] // CHECK:STDOUT: %AnyParam.as.Y.impl.K.type: type = fn_type @AnyParam.as.Y.impl.K [concrete] // CHECK:STDOUT: %AnyParam.as.Y.impl.K: %AnyParam.as.Y.impl.K.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] @@ -1757,13 +1950,13 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageGenericInterface.GenericInterface: %GenericInterface.type.0da = import_ref PackageGenericInterface//default, GenericInterface, loaded [concrete = constants.%GenericInterface.generic] // CHECK:STDOUT: %PackageGenericInterface.import_ref.116 = import_ref PackageGenericInterface//default, loc6_38, unloaded -// CHECK:STDOUT: %PackageGenericInterface.import_ref.b3b: type = import_ref PackageGenericInterface//default, loc6_28, loaded [symbolic = @GenericInterface.%U (constants.%U)] +// CHECK:STDOUT: %PackageGenericInterface.import_ref.b3bc94.2: type = import_ref PackageGenericInterface//default, loc6_28, loaded [symbolic = @GenericInterface.%U (constants.%U)] // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %PackageHasParam.import_ref.9b4 = import_ref PackageHasParam//default, loc6_13, unloaded -// CHECK:STDOUT: %PackageHasParam.import_ref.7ef: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.749] +// CHECK:STDOUT: %PackageHasParam.import_ref.274: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.633] // CHECK:STDOUT: %PackageHasParam.K = import_ref PackageHasParam//default, K, unloaded -// CHECK:STDOUT: %PackageHasParam.import_ref.e48: %Y.K.type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%Y.K] -// CHECK:STDOUT: %PackageHasParam.import_ref.71d: %Y.type = import_ref PackageHasParam//default, loc6_13, loaded [symbolic = constants.%Self.079] +// CHECK:STDOUT: %PackageHasParam.import_ref.71dd35.2: %Y.type = import_ref PackageHasParam//default, loc6_13, loaded [symbolic = constants.%Self.079] +// CHECK:STDOUT: %PackageHasParam.import_ref.9b4 = import_ref PackageHasParam//default, loc6_13, unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.0e4: @Y.%Y.WithSelf.K.type (%Y.WithSelf.K.type.1bb) = import_ref PackageHasParam//default, loc7_22, loaded [symbolic = @Y.%Y.WithSelf.K (constants.%Y.WithSelf.K.378)] // CHECK:STDOUT: %PackageGenericInterface.import_ref.564: = import_ref PackageGenericInterface//default, loc8_70, loaded [concrete = constants.%Y.impl_witness] // CHECK:STDOUT: %PackageGenericInterface.import_ref.2fb: type = import_ref PackageGenericInterface//default, loc8_47, loaded [concrete = constants.%AnyParam.861] // CHECK:STDOUT: %PackageGenericInterface.import_ref.6c1: type = import_ref PackageGenericInterface//default, loc8_67, loaded [concrete = constants.%Y.type] @@ -1785,7 +1978,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %M.decl: %M.type = fn_decl @M [concrete = constants.%M] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @GenericInterface(imports.%PackageGenericInterface.import_ref.b3b: type) [from "has_generic_interface.carbon"] { +// CHECK:STDOUT: generic interface @GenericInterface(imports.%PackageGenericInterface.import_ref.b3bc94.2: type) [from "has_generic_interface.carbon"] { // CHECK:STDOUT: %U: type = symbolic_binding U, 0 [symbolic = %U (constants.%U)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1804,7 +1997,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @Y [from "has_param.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%PackageHasParam.import_ref.9b4 -// CHECK:STDOUT: .K = imports.%PackageHasParam.import_ref.7ef +// CHECK:STDOUT: .K = imports.%PackageHasParam.import_ref.274 // CHECK:STDOUT: witness = (imports.%PackageHasParam.K) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -1852,8 +2045,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %obj.ref: ref %AnyParam.861 = name_ref obj, %obj // CHECK:STDOUT: %PackageHasParam.ref.loc10: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] -// CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.7ef [concrete = constants.%assoc0.749] -// CHECK:STDOUT: %impl.elem0: %.854 = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%AnyParam.as.Y.impl.K] +// CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.274 [concrete = constants.%assoc0.633] +// CHECK:STDOUT: %impl.elem0: %.e3e = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%AnyParam.as.Y.impl.K] // CHECK:STDOUT: %bound_method: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc10: %AnyParam.861 = acquire_value %obj.ref // CHECK:STDOUT: %AnyParam.as.Y.impl.K.call: init %empty_tuple.type = call %bound_method(%.loc10) @@ -1862,7 +2055,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Y.K(imports.%PackageHasParam.import_ref.71d: %Y.type) [from "has_param.carbon"] { +// CHECK:STDOUT: generic fn @Y.WithSelf.K(imports.%PackageHasParam.import_ref.71dd35.2: %Y.type) [from "has_param.carbon"] { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.079)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.c23)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.420)] @@ -1887,6 +2080,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericInterface(constants.%U, constants.%Self.793) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @AnyParam(constants.%GenericInterface.type.0da, constants.%GenericInterface.generic) { // CHECK:STDOUT: %T => constants.%GenericInterface.type.0da // CHECK:STDOUT: %X => constants.%GenericInterface.generic @@ -1895,12 +2090,26 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Y.K(constants.%Self.079) { +// CHECK:STDOUT: specific @Y(constants.%Self.079) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.079 +// CHECK:STDOUT: %Y.WithSelf.K.type => constants.%Y.WithSelf.K.type.1bb +// CHECK:STDOUT: %Y.WithSelf.K => constants.%Y.WithSelf.K.378 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y.WithSelf.K(constants.%Self.079) { // CHECK:STDOUT: %Self => constants.%Self.079 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.c23 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.420 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%Y.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Y.facet +// CHECK:STDOUT: %Y.WithSelf.K.type => constants.%Y.WithSelf.K.type.143 +// CHECK:STDOUT: %Y.WithSelf.K => constants.%Y.WithSelf.K.d75 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- has_generic_class.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1923,23 +2132,25 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %AnyParam.8e0: type = class_type @AnyParam, @AnyParam(%GenericClass.type, %GenericClass.generic) [concrete] // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete] // CHECK:STDOUT: %Self.079: %Y.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Y.impl_witness: = impl_witness @AnyParam.as.Y.impl.%Y.impl_witness_table [concrete] -// CHECK:STDOUT: %Y.K.type: type = fn_type @Y.K [concrete] -// CHECK:STDOUT: %Y.K: %Y.K.type = struct_value () [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.type.1bb: type = fn_type @Y.WithSelf.K, @Y(%Self.079) [symbolic] +// CHECK:STDOUT: %Y.WithSelf.K.378: %Y.WithSelf.K.type.1bb = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type.c23: type = symbolic_binding_type Self, 0, %Self.079 [symbolic] // CHECK:STDOUT: %pattern_type.420: type = pattern_type %Self.binding.as_type.c23 [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.binding.as_type.c23 [symbolic] +// CHECK:STDOUT: %Y.impl_witness: = impl_witness @AnyParam.as.Y.impl.%Y.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.ff6: type = pattern_type %AnyParam.8e0 [concrete] // CHECK:STDOUT: %AnyParam.as.Y.impl.K.type: type = fn_type @AnyParam.as.Y.impl.K [concrete] // CHECK:STDOUT: %AnyParam.as.Y.impl.K: %AnyParam.as.Y.impl.K.type = struct_value () [concrete] // CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.8e0, (%Y.impl_witness) [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.type.cd5: type = fn_type @Y.WithSelf.K, @Y(%Y.facet) [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.08f: %Y.WithSelf.K.type.cd5 = struct_value () [concrete] // CHECK:STDOUT: %L.type: type = fn_type @L [concrete] // CHECK:STDOUT: %L: %L.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %AnyParam.val: %AnyParam.8e0 = struct_value () [concrete] // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete] -// CHECK:STDOUT: %assoc0.749: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.e48 [concrete] -// CHECK:STDOUT: %.dfd: type = fn_type_with_self_type %Y.K.type, %Y.facet [concrete] +// CHECK:STDOUT: %assoc0.633: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.0e4 [concrete] +// CHECK:STDOUT: %.c0a: type = fn_type_with_self_type %Y.WithSelf.K.type.cd5, %Y.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] @@ -1962,11 +2173,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageHasParam.import_ref.b3b: type = import_ref PackageHasParam//default, loc4_16, loaded [symbolic = @AnyParam.%T (constants.%T)] // CHECK:STDOUT: %PackageHasParam.import_ref.b42: @AnyParam.%T (%T) = import_ref PackageHasParam//default, loc4_26, loaded [symbolic = @AnyParam.%X (constants.%X)] // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] +// CHECK:STDOUT: %PackageHasParam.import_ref.274: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.633] +// CHECK:STDOUT: %PackageHasParam.K: @Y.%Y.WithSelf.K.type (%Y.WithSelf.K.type.1bb) = import_ref PackageHasParam//default, K, loaded [symbolic = @Y.%Y.WithSelf.K (constants.%Y.WithSelf.K.378)] +// CHECK:STDOUT: %PackageHasParam.import_ref.71dd35.2: %Y.type = import_ref PackageHasParam//default, loc6_13, loaded [symbolic = constants.%Self.079] // CHECK:STDOUT: %PackageHasParam.import_ref.9b4 = import_ref PackageHasParam//default, loc6_13, unloaded -// CHECK:STDOUT: %PackageHasParam.import_ref.7ef: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.749] -// CHECK:STDOUT: %PackageHasParam.K: %Y.K.type = import_ref PackageHasParam//default, K, loaded [concrete = constants.%Y.K] -// CHECK:STDOUT: %PackageHasParam.import_ref.71d: %Y.type = import_ref PackageHasParam//default, loc6_13, loaded [symbolic = constants.%Self.079] -// CHECK:STDOUT: %PackageHasParam.import_ref.e48: %Y.K.type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%Y.K] +// CHECK:STDOUT: %PackageHasParam.import_ref.0e4: @Y.%Y.WithSelf.K.type (%Y.WithSelf.K.type.1bb) = import_ref PackageHasParam//default, loc7_22, loaded [symbolic = @Y.%Y.WithSelf.K (constants.%Y.WithSelf.K.378)] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1999,7 +2210,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @Y [from "has_param.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%PackageHasParam.import_ref.9b4 -// CHECK:STDOUT: .K = imports.%PackageHasParam.import_ref.7ef +// CHECK:STDOUT: .K = imports.%PackageHasParam.import_ref.274 // CHECK:STDOUT: witness = (imports.%PackageHasParam.K) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -2051,7 +2262,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Y.K(imports.%PackageHasParam.import_ref.71d: %Y.type) [from "has_param.carbon"] { +// CHECK:STDOUT: generic fn @Y.WithSelf.K(imports.%PackageHasParam.import_ref.71dd35.2: %Y.type) [from "has_param.carbon"] { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.079)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.c23)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.420)] @@ -2088,8 +2299,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %obj.ref: ref %AnyParam.8e0 = name_ref obj, %obj // CHECK:STDOUT: %PackageHasParam.ref.loc14: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] -// CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.7ef [concrete = constants.%assoc0.749] -// CHECK:STDOUT: %impl.elem0: %.dfd = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%AnyParam.as.Y.impl.K] +// CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.274 [concrete = constants.%assoc0.633] +// CHECK:STDOUT: %impl.elem0: %.c0a = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%AnyParam.as.Y.impl.K] // CHECK:STDOUT: %bound_method: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc14: %AnyParam.8e0 = acquire_value %obj.ref // CHECK:STDOUT: %AnyParam.as.Y.impl.K.call: init %empty_tuple.type = call %bound_method(%.loc14) @@ -2118,13 +2329,27 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Y.K(constants.%Self.079) { +// CHECK:STDOUT: specific @Y(constants.%Self.079) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.079 +// CHECK:STDOUT: %Y.WithSelf.K.type => constants.%Y.WithSelf.K.type.1bb +// CHECK:STDOUT: %Y.WithSelf.K => constants.%Y.WithSelf.K.378 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y.WithSelf.K(constants.%Self.079) { // CHECK:STDOUT: %Self => constants.%Self.079 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.c23 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.420 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Y.K(constants.%Y.facet) { +// CHECK:STDOUT: specific @Y(constants.%Y.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Y.facet +// CHECK:STDOUT: %Y.WithSelf.K.type => constants.%Y.WithSelf.K.type.cd5 +// CHECK:STDOUT: %Y.WithSelf.K => constants.%Y.WithSelf.K.08f +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y.WithSelf.K(constants.%Y.facet) { // CHECK:STDOUT: %Self => constants.%Y.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%AnyParam.8e0 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.ff6 @@ -2153,16 +2378,18 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %AnyParam.val: %AnyParam.d71 = struct_value () [concrete] // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete] // CHECK:STDOUT: %Self.079: %Y.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete] -// CHECK:STDOUT: %assoc0.749: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.e48 [concrete] -// CHECK:STDOUT: %Y.K.type: type = fn_type @Y.K [concrete] -// CHECK:STDOUT: %Y.K: %Y.K.type = struct_value () [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.type.1bb: type = fn_type @Y.WithSelf.K, @Y(%Self.079) [symbolic] +// CHECK:STDOUT: %Y.WithSelf.K.378: %Y.WithSelf.K.type.1bb = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type.c23: type = symbolic_binding_type Self, 0, %Self.079 [symbolic] // CHECK:STDOUT: %pattern_type.420: type = pattern_type %Self.binding.as_type.c23 [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.binding.as_type.c23 [symbolic] +// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete] +// CHECK:STDOUT: %assoc0.633: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.0e4 [concrete] // CHECK:STDOUT: %Y.impl_witness: = impl_witness imports.%Y.impl_witness_table [concrete] // CHECK:STDOUT: %Y.facet: %Y.type = facet_value %AnyParam.d71, (%Y.impl_witness) [concrete] -// CHECK:STDOUT: %.536: type = fn_type_with_self_type %Y.K.type, %Y.facet [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.type.a84: type = fn_type @Y.WithSelf.K, @Y(%Y.facet) [concrete] +// CHECK:STDOUT: %Y.WithSelf.K.e55: %Y.WithSelf.K.type.a84 = struct_value () [concrete] +// CHECK:STDOUT: %.61a: type = fn_type_with_self_type %Y.WithSelf.K.type.a84, %Y.facet [concrete] // CHECK:STDOUT: %AnyParam.as.Y.impl.K.type: type = fn_type @AnyParam.as.Y.impl.K [concrete] // CHECK:STDOUT: %AnyParam.as.Y.impl.K: %AnyParam.as.Y.impl.K.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] @@ -2195,11 +2422,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %PackageGenericClass.import_ref.7ce = import_ref PackageGenericClass//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %PackageGenericClass.import_ref.b3b: type = import_ref PackageGenericClass//default, loc6_20, loaded [symbolic = @GenericClass.%U (constants.%U)] // CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type] -// CHECK:STDOUT: %PackageHasParam.import_ref.9b4 = import_ref PackageHasParam//default, loc6_13, unloaded -// CHECK:STDOUT: %PackageHasParam.import_ref.7ef: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.749] +// CHECK:STDOUT: %PackageHasParam.import_ref.274: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0.633] // CHECK:STDOUT: %PackageHasParam.K = import_ref PackageHasParam//default, K, unloaded -// CHECK:STDOUT: %PackageHasParam.import_ref.e48: %Y.K.type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%Y.K] -// CHECK:STDOUT: %PackageHasParam.import_ref.71d: %Y.type = import_ref PackageHasParam//default, loc6_13, loaded [symbolic = constants.%Self.079] +// CHECK:STDOUT: %PackageHasParam.import_ref.71dd35.2: %Y.type = import_ref PackageHasParam//default, loc6_13, loaded [symbolic = constants.%Self.079] +// CHECK:STDOUT: %PackageHasParam.import_ref.9b4 = import_ref PackageHasParam//default, loc6_13, unloaded +// CHECK:STDOUT: %PackageHasParam.import_ref.0e4: @Y.%Y.WithSelf.K.type (%Y.WithSelf.K.type.1bb) = import_ref PackageHasParam//default, loc7_22, loaded [symbolic = @Y.%Y.WithSelf.K (constants.%Y.WithSelf.K.378)] // CHECK:STDOUT: %PackageGenericClass.import_ref.f5f: = import_ref PackageGenericClass//default, loc8_66, loaded [concrete = constants.%Y.impl_witness] // CHECK:STDOUT: %PackageGenericClass.import_ref.1b3: type = import_ref PackageGenericClass//default, loc8_43, loaded [concrete = constants.%AnyParam.d71] // CHECK:STDOUT: %PackageGenericClass.import_ref.6c1: type = import_ref PackageGenericClass//default, loc8_63, loaded [concrete = constants.%Y.type] @@ -2224,7 +2451,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @Y [from "has_param.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%PackageHasParam.import_ref.9b4 -// CHECK:STDOUT: .K = imports.%PackageHasParam.import_ref.7ef +// CHECK:STDOUT: .K = imports.%PackageHasParam.import_ref.274 // CHECK:STDOUT: witness = (imports.%PackageHasParam.K) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -2285,8 +2512,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %obj.ref: ref %AnyParam.d71 = name_ref obj, %obj // CHECK:STDOUT: %PackageHasParam.ref.loc9: = name_ref PackageHasParam, imports.%PackageHasParam [concrete = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%PackageHasParam.Y [concrete = constants.%Y.type] -// CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.7ef [concrete = constants.%assoc0.749] -// CHECK:STDOUT: %impl.elem0: %.536 = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%AnyParam.as.Y.impl.K] +// CHECK:STDOUT: %K.ref: %Y.assoc_type = name_ref K, imports.%PackageHasParam.import_ref.274 [concrete = constants.%assoc0.633] +// CHECK:STDOUT: %impl.elem0: %.61a = impl_witness_access constants.%Y.impl_witness, element0 [concrete = constants.%AnyParam.as.Y.impl.K] // CHECK:STDOUT: %bound_method: = bound_method %obj.ref, %impl.elem0 // CHECK:STDOUT: %.loc9: %AnyParam.d71 = acquire_value %obj.ref // CHECK:STDOUT: %AnyParam.as.Y.impl.K.call: init %empty_tuple.type = call %bound_method(%.loc9) @@ -2295,7 +2522,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Y.K(imports.%PackageHasParam.import_ref.71d: %Y.type) [from "has_param.carbon"] { +// CHECK:STDOUT: generic fn @Y.WithSelf.K(imports.%PackageHasParam.import_ref.71dd35.2: %Y.type) [from "has_param.carbon"] { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.079)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.c23)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.420)] @@ -2328,12 +2555,26 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Y.K(constants.%Self.079) { +// CHECK:STDOUT: specific @Y(constants.%Self.079) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.079 +// CHECK:STDOUT: %Y.WithSelf.K.type => constants.%Y.WithSelf.K.type.1bb +// CHECK:STDOUT: %Y.WithSelf.K => constants.%Y.WithSelf.K.378 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y.WithSelf.K(constants.%Self.079) { // CHECK:STDOUT: %Self => constants.%Self.079 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.c23 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.420 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%Y.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Y.facet +// CHECK:STDOUT: %Y.WithSelf.K.type => constants.%Y.WithSelf.K.type.a84 +// CHECK:STDOUT: %Y.WithSelf.K => constants.%Y.WithSelf.K.e55 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- has_extra_interfaces.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -2366,10 +2607,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Self.c1b: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.c1b [symbolic] // CHECK:STDOUT: %pattern_type.c3e: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.fca: type = fn_type @I.WithSelf.F, @I(%Self.c1b) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.6d7: %I.WithSelf.F.type.fca = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %tuple.type.c53: type = tuple_type (type, type, type, type, type, type, type, type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.c53 = tuple_value (%Extra1.type, %Extra2.type, %Extra3.type, %Extra4.type, %Extra5.type, %Extra6.type, %Extra7.type, %Extra8.type) [concrete] // CHECK:STDOUT: %tuple.type.9c0: type = tuple_type (%Extra1.type, %Extra2.type, %Extra3.type, %Extra4.type, %Extra5.type, %Extra6.type, %Extra7.type, %Extra8.type) [concrete] @@ -2379,6 +2620,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C.806, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.989: type = fn_type @I.WithSelf.F, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.797: %I.WithSelf.F.type.989 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2437,6 +2680,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Extra1 { // CHECK:STDOUT: %Self: %Extra1.type = symbolic_binding Self, 0 [symbolic = constants.%Self.244] +// CHECK:STDOUT: interface_with_self_decl @Extra1 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -2447,6 +2691,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Extra2 { // CHECK:STDOUT: %Self: %Extra2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.b9c] +// CHECK:STDOUT: interface_with_self_decl @Extra2 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -2457,6 +2702,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Extra3 { // CHECK:STDOUT: %Self: %Extra3.type = symbolic_binding Self, 0 [symbolic = constants.%Self.409] +// CHECK:STDOUT: interface_with_self_decl @Extra3 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -2467,6 +2713,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Extra4 { // CHECK:STDOUT: %Self: %Extra4.type = symbolic_binding Self, 0 [symbolic = constants.%Self.035] +// CHECK:STDOUT: interface_with_self_decl @Extra4 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -2477,6 +2724,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Extra5 { // CHECK:STDOUT: %Self: %Extra5.type = symbolic_binding Self, 0 [symbolic = constants.%Self.28e] +// CHECK:STDOUT: interface_with_self_decl @Extra5 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -2487,6 +2735,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Extra6 { // CHECK:STDOUT: %Self: %Extra6.type = symbolic_binding Self, 0 [symbolic = constants.%Self.b11] +// CHECK:STDOUT: interface_with_self_decl @Extra6 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -2497,6 +2746,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Extra7 { // CHECK:STDOUT: %Self: %Extra7.type = symbolic_binding Self, 0 [symbolic = constants.%Self.fa4] +// CHECK:STDOUT: interface_with_self_decl @Extra7 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -2507,6 +2757,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Extra8 { // CHECK:STDOUT: %Self: %Extra8.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a2] +// CHECK:STDOUT: interface_with_self_decl @Extra8 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -2516,25 +2767,28 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c1b] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { -// CHECK:STDOUT: %self.patt: @I.F.%pattern_type (%pattern_type.c3e) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type (%pattern_type.c3e) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc14_13: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c1b] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.fca) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.6d7)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type.c3e) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.c3e) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc14_26.1: type = splice_block %.loc14_26.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.c1b)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self.loc14_13 [symbolic = %Self (constants.%Self.c1b)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc14_26.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc14_13 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -2570,12 +2824,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc14_13: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c1b)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.c3e)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.I.impl.F(%self.param: %C.806) { @@ -2583,11 +2837,34 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra1(constants.%Self.244) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra2(constants.%Self.b9c) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra3(constants.%Self.409) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra4(constants.%Self.035) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra5(constants.%Self.28e) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra6(constants.%Self.b11) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra7(constants.%Self.fa4) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra8(constants.%Self.8a2) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%T) { // CHECK:STDOUT: %T.loc13_9.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.c1b) { +// CHECK:STDOUT: specific @I(constants.%Self.c1b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc14_33 => constants.%Self.c1b +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.fca +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.6d7 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.c1b) { // CHECK:STDOUT: %Self => constants.%Self.c1b // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.c3e @@ -2599,7 +2876,14 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc14_33 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.989 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.797 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet) { // CHECK:STDOUT: %Self => constants.%I.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%C.806 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.e9e @@ -2619,20 +2903,28 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Test: %Test.type = struct_value () [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.d36: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%HasExtraInterfaces.import_ref.795 [concrete] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%Self.d36) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F: %I.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.d36 [symbolic] // CHECK:STDOUT: %pattern_type.327: type = pattern_type %Self.binding.as_type [symbolic] +// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%HasExtraInterfaces.import_ref.6b6 [concrete] // CHECK:STDOUT: %Extra8.type: type = facet_type <@Extra8> [concrete] +// CHECK:STDOUT: %Self.930: %Extra8.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Extra7.type: type = facet_type <@Extra7> [concrete] +// CHECK:STDOUT: %Self.8b7: %Extra7.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Extra6.type: type = facet_type <@Extra6> [concrete] +// CHECK:STDOUT: %Self.d4b: %Extra6.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Extra5.type: type = facet_type <@Extra5> [concrete] +// CHECK:STDOUT: %Self.00f: %Extra5.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Extra4.type: type = facet_type <@Extra4> [concrete] +// CHECK:STDOUT: %Self.2c8: %Extra4.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Extra3.type: type = facet_type <@Extra3> [concrete] +// CHECK:STDOUT: %Self.e29: %Extra3.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Extra2.type: type = facet_type <@Extra2> [concrete] +// CHECK:STDOUT: %Self.048: %Extra2.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Extra1.type: type = facet_type <@Extra1> [concrete] +// CHECK:STDOUT: %Self.396: %Extra1.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %tuple.type: type = tuple_type (%Extra1.type, %Extra2.type, %Extra3.type, %Extra4.type, %Extra5.type, %Extra6.type, %Extra7.type, %Extra8.type) [concrete] // CHECK:STDOUT: %C.317: type = class_type @C, @C(%tuple.type) [concrete] // CHECK:STDOUT: } @@ -2652,11 +2944,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %HasExtraInterfaces.import_ref.87a = import_ref HasExtraInterfaces//default, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.b3b: type = import_ref HasExtraInterfaces//default, loc13_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %HasExtraInterfaces.I: type = import_ref HasExtraInterfaces//default, I, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.027 = import_ref HasExtraInterfaces//default, loc14_13, unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.f9b: %I.assoc_type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.3b1: %I.assoc_type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%assoc0] // CHECK:STDOUT: %HasExtraInterfaces.F = import_ref HasExtraInterfaces//default, F, unloaded -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.795: %I.F.type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %HasExtraInterfaces.import_ref.1d0: %I.type = import_ref HasExtraInterfaces//default, loc14_13, loaded [symbolic = constants.%Self.d36] +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.1d0862.2: %I.type = import_ref HasExtraInterfaces//default, loc14_13, loaded [symbolic = constants.%Self.d36] +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.027 = import_ref HasExtraInterfaces//default, loc14_13, unloaded +// CHECK:STDOUT: %HasExtraInterfaces.import_ref.6b6: @I.%I.WithSelf.F.type (%I.WithSelf.F.type) = import_ref HasExtraInterfaces//default, loc14_33, loaded [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F)] // CHECK:STDOUT: %HasExtraInterfaces.import_ref.afb = import_ref HasExtraInterfaces//default, loc16_79, unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.040 = import_ref HasExtraInterfaces//default, loc11_18, unloaded // CHECK:STDOUT: %HasExtraInterfaces.import_ref.623 = import_ref HasExtraInterfaces//default, loc10_18, unloaded @@ -2695,7 +2987,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: interface @I [from "has_extra_interfaces.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%HasExtraInterfaces.import_ref.027 -// CHECK:STDOUT: .F = imports.%HasExtraInterfaces.import_ref.f9b +// CHECK:STDOUT: .F = imports.%HasExtraInterfaces.import_ref.3b1 // CHECK:STDOUT: witness = (imports.%HasExtraInterfaces.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -2788,11 +3080,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %c.ref: %C.42e = name_ref c, %c // CHECK:STDOUT: %HasExtraInterfaces.ref.loc12: = name_ref HasExtraInterfaces, imports.%HasExtraInterfaces [concrete = imports.%HasExtraInterfaces] // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%HasExtraInterfaces.I [concrete = constants.%I.type] -// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%HasExtraInterfaces.import_ref.f9b [concrete = constants.%assoc0] +// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%HasExtraInterfaces.import_ref.3b1 [concrete = constants.%assoc0] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(imports.%HasExtraInterfaces.import_ref.1d0: %I.type) [from "has_extra_interfaces.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.F(imports.%HasExtraInterfaces.import_ref.1d0862.2: %I.type) [from "has_extra_interfaces.carbon"] { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.d36)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.327)] @@ -2810,12 +3102,35 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.d36) { +// CHECK:STDOUT: specific @I(constants.%Self.d36) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.d36 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.d36) { // CHECK:STDOUT: %Self => constants.%Self.d36 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.327 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra8(constants.%Self.930) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra7(constants.%Self.8b7) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra6(constants.%Self.d4b) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra5(constants.%Self.00f) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra4(constants.%Self.2c8) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra3(constants.%Self.e29) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra2(constants.%Self.048) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Extra1(constants.%Self.396) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%tuple.type) { // CHECK:STDOUT: %T => constants.%tuple.type // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/instance_method.carbon b/toolchain/check/testdata/impl/lookup/instance_method.carbon index 6956600be6e2..540b6b4b1f80 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -42,20 +42,26 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %.e54: Core.Form = init_form %i32, call_param1 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.705: %I.WithSelf.F.type.08c = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.ba3: type = fn_type @I.WithSelf.F, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.0e5: %I.WithSelf.F.type.ba3 = 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: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] -// CHECK:STDOUT: %.7a3: type = fn_type_with_self_type %I.F.type, %I.facet [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.b59: type = fn_type @I.WithSelf.F, @I(%C.type.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.521: %I.WithSelf.F.type.b59 = struct_value () [concrete] +// CHECK:STDOUT: %.b54: type = fn_type_with_self_type %I.WithSelf.F.type.ba3, %I.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -96,32 +102,35 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { -// CHECK:STDOUT: %self.patt: @I.F.%pattern_type (%pattern_type.fa0) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc17: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.705)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type.fa0) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %.loc18_25: Core.Form = init_form %i32, call_param1 [concrete = constants.%.e54] -// CHECK:STDOUT: %self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc18_14.1: type = splice_block %.loc18_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self.loc17 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc18_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc17 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -165,12 +174,12 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: extend @C.as.I.impl.%I.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc17: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.fa0)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: %i32; +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: %i32; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.I.impl.F(%self.param: %C) -> out %return.param: %i32; @@ -179,21 +188,42 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.7a3 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F] +// CHECK:STDOUT: %impl.elem0: %.b54 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %C.as.I.impl.F.call: init %i32 = call %bound_method(%c.ref) // CHECK:STDOUT: return %C.as.I.impl.F.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) { +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc18 => constants.%Self +// 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) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fa0 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc18 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.ba3 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.0e5 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet) { // CHECK:STDOUT: %Self => constants.%I.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7c7 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc18 => constants.%C.type.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.b59 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.521 +// 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 e6d845ed42e1..b4e1d528e0b6 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 @@ -114,7 +114,7 @@ fn F() { // CHECK:STDOUT: %Y.type.6b3: type = facet_type <@Y, @Y(%OuterParam)> [symbolic] // CHECK:STDOUT: %Self.8ed: %Y.type.6b3 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Y.assoc_type.978: type = assoc_entity_type @Y, @Y(%OuterParam) [symbolic] -// CHECK:STDOUT: %assoc0.29e: %Y.assoc_type.978 = assoc_entity element0, @Y.%T [symbolic] +// CHECK:STDOUT: %assoc0.049: %Y.assoc_type.978 = assoc_entity element0, @Y.%T [symbolic] // CHECK:STDOUT: %.Self.cf7: %Y.type.6b3 = symbolic_binding .Self [symbolic] // CHECK:STDOUT: %require_complete: = require_complete_type %Y.type.6b3 [symbolic] // CHECK:STDOUT: %.Self.binding.as_type.b3c: type = symbolic_binding_type .Self, %.Self.cf7 [symbolic] @@ -136,12 +136,13 @@ fn F() { // CHECK:STDOUT: %.Self.f22: %Y.type.5e1 = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Self.95d: %Y.type.5e1 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Y.assoc_type.4bc: type = assoc_entity_type @Y, @Y(%empty_tuple.type) [concrete] -// CHECK:STDOUT: %assoc0.36c: %Y.assoc_type.4bc = assoc_entity element0, @Y.%T [concrete] +// CHECK:STDOUT: %assoc0.7fe: %Y.assoc_type.4bc = assoc_entity element0, @Y.%T [concrete] // CHECK:STDOUT: %.Self.binding.as_type.32f: type = symbolic_binding_type .Self, %.Self.f22 [symbolic_self] // CHECK:STDOUT: %Y.lookup_impl_witness.b08: = lookup_impl_witness %.Self.f22, @Y, @Y(%empty_tuple.type) [symbolic_self] // CHECK:STDOUT: %impl.elem0.48b: type = impl_witness_access %Y.lookup_impl_witness.b08, element0 [symbolic_self] // CHECK:STDOUT: %Y_where.type.ad5: type = facet_type <@Y, @Y(%empty_tuple.type) where %impl.elem0.48b = %empty_tuple.type> [concrete] // CHECK:STDOUT: %Y.impl_witness: = impl_witness @C.as.Y.impl.%Y.impl_witness_table [concrete] +// CHECK:STDOUT: %Y.facet: %Y.type.5e1 = facet_value %C, (%Y.impl_witness) [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %facet_value: %Y_where.type.ad5 = facet_value %C, (%Y.impl_witness) [concrete] @@ -184,8 +185,8 @@ fn F() { // CHECK:STDOUT: %.Self.ref: %Y.type.5e1 = name_ref .Self, %.Self [symbolic_self = constants.%.Self.f22] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type.32f] // CHECK:STDOUT: %.loc58_29.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type.32f] -// CHECK:STDOUT: %.loc58_29.2: %Y.assoc_type.4bc = specific_constant @T.%assoc0, @Y(constants.%empty_tuple.type) [concrete = constants.%assoc0.36c] -// CHECK:STDOUT: %T.ref: %Y.assoc_type.4bc = name_ref T, %.loc58_29.2 [concrete = constants.%assoc0.36c] +// CHECK:STDOUT: %.loc58_29.2: %Y.assoc_type.4bc = specific_constant @T.%assoc0, @Y(constants.%empty_tuple.type, constants.%.Self.f22) [concrete = constants.%assoc0.7fe] +// CHECK:STDOUT: %T.ref: %Y.assoc_type.4bc = name_ref T, %.loc58_29.2 [concrete = constants.%assoc0.7fe] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Y.lookup_impl_witness.b08, element0 [symbolic_self = constants.%impl.elem0.48b] // CHECK:STDOUT: %.loc58_35.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc58_35.2: type = converted %.loc58_35.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -199,16 +200,17 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: generic interface @Y(@Outer.%OuterParam.loc49_13.2: type) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %OuterParam: type = symbolic_binding OuterParam, 0 [symbolic = %OuterParam (constants.%OuterParam)] -// CHECK:STDOUT: %Y.type: type = facet_type <@Y, @Y(%OuterParam)> [symbolic = %Y.type (constants.%Y.type.6b3)] +// CHECK:STDOUT: %OuterParam.loc50: type = symbolic_binding OuterParam, 0 [symbolic = %OuterParam.loc50 (constants.%OuterParam)] +// CHECK:STDOUT: %Y.type: type = facet_type <@Y, @Y(%OuterParam.loc50)> [symbolic = %Y.type (constants.%Y.type.6b3)] // CHECK:STDOUT: %Self.loc50_15.2: @Y.%Y.type (%Y.type.6b3) = symbolic_binding Self, 1 [symbolic = %Self.loc50_15.2 (constants.%Self.8ed)] -// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%OuterParam) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.978)] -// CHECK:STDOUT: %assoc0: @Y.%Y.assoc_type (%Y.assoc_type.978) = assoc_entity element0, %T [symbolic = %assoc0 (constants.%assoc0.29e)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc50_15.1: @Y.%Y.type (%Y.type.6b3) = symbolic_binding Self, 1 [symbolic = %Self.loc50_15.2 (constants.%Self.8ed)] +// CHECK:STDOUT: interface_with_self_decl @Y [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { -// CHECK:STDOUT: %assoc0: @Y.%Y.assoc_type (%Y.assoc_type.978) = assoc_entity element0, @Y.%T [symbolic = @Y.%assoc0 (constants.%assoc0.29e)] +// CHECK:STDOUT: %assoc0: @Y.%Y.assoc_type (%Y.assoc_type.978) = assoc_entity element0, @Y.%T [symbolic = @Y.%assoc0 (constants.%assoc0.049)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -220,10 +222,6 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@Outer.%OuterParam.loc49_13.2: type, @Y.%Self.loc50_15.1: @Y.%Y.type (%Y.type.6b3)) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @C.as.Y.impl: %C.ref as %.loc58_23 { // CHECK:STDOUT: %Y.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @C.as.Y.impl [concrete] // CHECK:STDOUT: %Y.impl_witness: = impl_witness %Y.impl_witness_table [concrete = constants.%Y.impl_witness] @@ -254,8 +252,8 @@ fn F() { // CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.6b3) = name_ref .Self, %.Self.3 [symbolic = %.Self.1 (constants.%.Self.cf7)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.b3c)] // CHECK:STDOUT: %.loc54_20.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.b3c)] -// CHECK:STDOUT: %.loc54_20.2: @Outer.G.%Y.assoc_type (%Y.assoc_type.978) = specific_constant @T.%assoc0, @Y(constants.%OuterParam) [symbolic = %assoc0 (constants.%assoc0.29e)] -// CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.978) = name_ref T, %.loc54_20.2 [symbolic = %assoc0 (constants.%assoc0.29e)] +// CHECK:STDOUT: %.loc54_20.2: @Outer.G.%Y.assoc_type (%Y.assoc_type.978) = specific_constant @T.%assoc0, @Y(constants.%OuterParam, constants.%.Self.cf7) [symbolic = %assoc0 (constants.%assoc0.049)] +// CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.978) = name_ref T, %.loc54_20.2 [symbolic = %assoc0 (constants.%assoc0.049)] // CHECK:STDOUT: %impl.elem0.loc54_20.2: type = impl_witness_access constants.%Y.lookup_impl_witness.3b9, element0 [symbolic = %impl.elem0.loc54_20.1 (constants.%impl.elem0.284)] // CHECK:STDOUT: %.loc54_26.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc54_26.2: type = converted %.loc54_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -285,7 +283,7 @@ fn F() { // CHECK:STDOUT: %require_complete: = require_complete_type %Y.type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.1 [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.b3c)] // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%OuterParam) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.978)] -// CHECK:STDOUT: %assoc0: @Outer.G.%Y.assoc_type (%Y.assoc_type.978) = assoc_entity element0, @Y.%T [symbolic = %assoc0 (constants.%assoc0.29e)] +// CHECK:STDOUT: %assoc0: @Outer.G.%Y.assoc_type (%Y.assoc_type.978) = assoc_entity element0, @Y.%T [symbolic = %assoc0 (constants.%assoc0.049)] // CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %.Self.1, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness.3b9)] // CHECK:STDOUT: %impl.elem0.loc54_20.1: type = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc54_20.1 (constants.%impl.elem0.284)] // CHECK:STDOUT: %Y_where.type: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.loc54_20.1 = constants.%empty_tuple.type> [symbolic = %Y_where.type (constants.%Y_where.type.7c7)] @@ -327,16 +325,24 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Y(constants.%OuterParam) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %OuterParam => constants.%OuterParam +// CHECK:STDOUT: %OuterParam.loc50 => constants.%OuterParam // CHECK:STDOUT: %Y.type => constants.%Y.type.6b3 // CHECK:STDOUT: %Self.loc50_15.2 => constants.%Self.8ed -// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.978 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.29e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%OuterParam, constants.%Self.8ed) {} +// CHECK:STDOUT: specific @Y(constants.%OuterParam, constants.%Self.8ed) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %OuterParam.loc51 => constants.%OuterParam +// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.978 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.049 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%OuterParam, constants.%.Self.cf7) {} +// CHECK:STDOUT: specific @Y(constants.%OuterParam, constants.%.Self.cf7) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %OuterParam.loc51 => constants.%OuterParam +// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.978 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.049 +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer.G(constants.%OuterParam, constants.%H) { // CHECK:STDOUT: %OuterParam => constants.%OuterParam @@ -345,7 +351,7 @@ fn F() { // CHECK:STDOUT: %require_complete => constants.%require_complete // CHECK:STDOUT: %.Self.binding.as_type => constants.%.Self.binding.as_type.b3c // CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.978 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.29e +// CHECK:STDOUT: %assoc0 => constants.%assoc0.049 // CHECK:STDOUT: %Y.lookup_impl_witness => constants.%Y.lookup_impl_witness.3b9 // CHECK:STDOUT: %impl.elem0.loc54_20.1 => constants.%impl.elem0.284 // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.7c7 @@ -364,14 +370,31 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Y(constants.%empty_tuple.type) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %OuterParam => constants.%empty_tuple.type +// CHECK:STDOUT: %OuterParam.loc50 => constants.%empty_tuple.type // CHECK:STDOUT: %Y.type => constants.%Y.type.5e1 // CHECK:STDOUT: %Self.loc50_15.2 => constants.%Self.95d -// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.4bc -// CHECK:STDOUT: %assoc0 => constants.%assoc0.36c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%empty_tuple.type, constants.%.Self.f22) {} +// CHECK:STDOUT: specific @Y(constants.%empty_tuple.type, constants.%Self.8ed) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %OuterParam.loc51 => constants.%empty_tuple.type +// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.4bc +// CHECK:STDOUT: %assoc0 => constants.%assoc0.7fe +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%empty_tuple.type, constants.%.Self.f22) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %OuterParam.loc51 => constants.%empty_tuple.type +// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.4bc +// CHECK:STDOUT: %assoc0 => constants.%assoc0.7fe +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%empty_tuple.type, constants.%Y.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %OuterParam.loc51 => constants.%empty_tuple.type +// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.4bc +// CHECK:STDOUT: %assoc0 => constants.%assoc0.7fe +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer.G(constants.%empty_tuple.type, constants.%facet_value) { // CHECK:STDOUT: %OuterParam => constants.%empty_tuple.type @@ -380,7 +403,7 @@ fn F() { // CHECK:STDOUT: %require_complete => constants.%complete_type.ed2 // CHECK:STDOUT: %.Self.binding.as_type => constants.%.Self.binding.as_type.32f // CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.4bc -// CHECK:STDOUT: %assoc0 => constants.%assoc0.36c +// CHECK:STDOUT: %assoc0 => constants.%assoc0.7fe // CHECK:STDOUT: %Y.lookup_impl_witness => constants.%Y.lookup_impl_witness.b08 // CHECK:STDOUT: %impl.elem0.loc54_20.1 => constants.%impl.elem0.48b // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.ad5 @@ -408,7 +431,7 @@ fn F() { // CHECK:STDOUT: %Y.type.6ae: type = facet_type <@Y, @Y(%OuterParam)> [symbolic] // CHECK:STDOUT: %Self.f29: %Y.type.6ae = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Y.assoc_type.aab: type = assoc_entity_type @Y, @Y(%OuterParam) [symbolic] -// CHECK:STDOUT: %assoc0.5a1: %Y.assoc_type.aab = assoc_entity element0, @Y.%T [symbolic] +// CHECK:STDOUT: %assoc0.43a: %Y.assoc_type.aab = assoc_entity element0, @Y.%T [symbolic] // CHECK:STDOUT: %.Self.997: %Y.type.6ae = symbolic_binding .Self [symbolic] // CHECK:STDOUT: %require_complete.f45: = require_complete_type %Y.type.6ae [symbolic] // CHECK:STDOUT: %.Self.binding.as_type.238: type = symbolic_binding_type .Self, %.Self.997 [symbolic] @@ -423,25 +446,27 @@ fn F() { // CHECK:STDOUT: %C.521: type = class_type @C, @C(%OuterParam) [symbolic] // CHECK:STDOUT: %Y.impl_witness.26b: = impl_witness @C.as.Y.impl.%Y.impl_witness_table, @C.as.Y.impl(%OuterParam) [symbolic] // CHECK:STDOUT: %require_complete.4a2: = require_complete_type %Y_where.type.b0f [symbolic] +// CHECK:STDOUT: %Y.facet: %Y.type.6ae = facet_value %C.521, (%Y.impl_witness.26b) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Z1.impl_witness: = impl_witness @empty_tuple.type.as.Z1.impl.%Z1.impl_witness_table [concrete] +// CHECK:STDOUT: %Z1.facet: %Z1.type = facet_value %empty_tuple.type, (%Z1.impl_witness) [concrete] // CHECK:STDOUT: %Z2.impl_witness: = impl_witness @empty_tuple.type.as.Z2.impl.%Z2.impl_witness_table [concrete] +// CHECK:STDOUT: %Z2.facet: %Z2.type = facet_value %empty_tuple.type, (%Z2.impl_witness) [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %Z1.type, %type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %facet_type: type = facet_type <@Z1 & @Z2> [concrete] // CHECK:STDOUT: %facet_value.d99: %facet_type = facet_value %empty_tuple.type, (%Z1.impl_witness, %Z2.impl_witness) [concrete] -// CHECK:STDOUT: %Z1.facet: %Z1.type = facet_value %empty_tuple.type, (%Z1.impl_witness) [concrete] // CHECK:STDOUT: %Outer.87f: type = class_type @Outer, @Outer(%Z1.facet) [concrete] // CHECK:STDOUT: %Y.type.874: type = facet_type <@Y, @Y(%Z1.facet)> [concrete] // CHECK:STDOUT: %Outer.G.type.663: type = fn_type @Outer.G, @Outer(%Z1.facet) [concrete] @@ -453,7 +478,7 @@ fn F() { // CHECK:STDOUT: %Y_where.type.c95: type = facet_type <@Y, @Y(%Z1.facet) where %impl.elem0.9e9 = %empty_tuple.type> [concrete] // CHECK:STDOUT: %Self.974: %Y.type.874 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Y.assoc_type.748: type = assoc_entity_type @Y, @Y(%Z1.facet) [concrete] -// CHECK:STDOUT: %assoc0.673: %Y.assoc_type.748 = assoc_entity element0, @Y.%T [concrete] +// CHECK:STDOUT: %assoc0.5a7: %Y.assoc_type.748 = assoc_entity element0, @Y.%T [concrete] // CHECK:STDOUT: %complete_type.f55: = complete_type_witness %Y.type.874 [concrete] // CHECK:STDOUT: %.Self.binding.as_type.d52: type = symbolic_binding_type .Self, %.Self.178 [symbolic_self] // CHECK:STDOUT: %Y.impl_witness.004: = impl_witness @C.as.Y.impl.%Y.impl_witness_table, @C.as.Y.impl(%Z1.facet) [concrete] @@ -509,6 +534,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z1 { // CHECK:STDOUT: %Self: %Z1.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d71] +// CHECK:STDOUT: interface_with_self_decl @Z1 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -519,6 +545,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z2 { // CHECK:STDOUT: %Self: %Z2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.cde] +// CHECK:STDOUT: interface_with_self_decl @Z2 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -529,16 +556,17 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: generic interface @Y(@Outer.%OuterParam.loc6_13.2: %Z1.type) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %OuterParam: %Z1.type = symbolic_binding OuterParam, 0 [symbolic = %OuterParam (constants.%OuterParam)] -// CHECK:STDOUT: %Y.type: type = facet_type <@Y, @Y(%OuterParam)> [symbolic = %Y.type (constants.%Y.type.6ae)] +// CHECK:STDOUT: %OuterParam.loc7: %Z1.type = symbolic_binding OuterParam, 0 [symbolic = %OuterParam.loc7 (constants.%OuterParam)] +// CHECK:STDOUT: %Y.type: type = facet_type <@Y, @Y(%OuterParam.loc7)> [symbolic = %Y.type (constants.%Y.type.6ae)] // CHECK:STDOUT: %Self.loc7_15.2: @Y.%Y.type (%Y.type.6ae) = symbolic_binding Self, 1 [symbolic = %Self.loc7_15.2 (constants.%Self.f29)] -// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%OuterParam) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.aab)] -// CHECK:STDOUT: %assoc0: @Y.%Y.assoc_type (%Y.assoc_type.aab) = assoc_entity element0, %T [symbolic = %assoc0 (constants.%assoc0.5a1)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc7_15.1: @Y.%Y.type (%Y.type.6ae) = symbolic_binding Self, 1 [symbolic = %Self.loc7_15.2 (constants.%Self.f29)] +// CHECK:STDOUT: interface_with_self_decl @Y [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { -// CHECK:STDOUT: %assoc0: @Y.%Y.assoc_type (%Y.assoc_type.aab) = assoc_entity element0, @Y.%T [symbolic = @Y.%assoc0 (constants.%assoc0.5a1)] +// CHECK:STDOUT: %assoc0: @Y.%Y.assoc_type (%Y.assoc_type.aab) = assoc_entity element0, @Y.%T [symbolic = @Y.%assoc0 (constants.%assoc0.43a)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -550,10 +578,6 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@Outer.%OuterParam.loc6_13.2: %Z1.type, @Y.%Self.loc7_15.1: @Y.%Y.type (%Y.type.6ae)) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic impl @C.as.Y.impl(@Outer.%OuterParam.loc6_13.2: %Z1.type) { // CHECK:STDOUT: %OuterParam: %Z1.type = symbolic_binding OuterParam, 0 [symbolic = %OuterParam (constants.%OuterParam)] // CHECK:STDOUT: %C: type = class_type @C, @C(%OuterParam) [symbolic = %C (constants.%C.521)] @@ -562,7 +586,7 @@ fn F() { // CHECK:STDOUT: %require_complete.loc14_21: = require_complete_type %Y.type [symbolic = %require_complete.loc14_21 (constants.%require_complete.f45)] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.2 [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.238)] // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%OuterParam) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.aab)] -// CHECK:STDOUT: %assoc0: @C.as.Y.impl.%Y.assoc_type (%Y.assoc_type.aab) = assoc_entity element0, @Y.%T [symbolic = %assoc0 (constants.%assoc0.5a1)] +// CHECK:STDOUT: %assoc0: @C.as.Y.impl.%Y.assoc_type (%Y.assoc_type.aab) = assoc_entity element0, @Y.%T [symbolic = %assoc0 (constants.%assoc0.43a)] // CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %.Self.2, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness.5bf)] // CHECK:STDOUT: %impl.elem0.loc14_21.2: type = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_21.2 (constants.%impl.elem0.63e)] // CHECK:STDOUT: %Y_where.type: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.loc14_21.2 = constants.%empty_tuple.type> [symbolic = %Y_where.type (constants.%Y_where.type.b0f)] @@ -619,8 +643,8 @@ fn F() { // CHECK:STDOUT: %.Self.ref: @Outer.G.%Y.type (%Y.type.6ae) = name_ref .Self, %.Self.3 [symbolic = %.Self.1 (constants.%.Self.997)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.238)] // CHECK:STDOUT: %.loc11_20.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.238)] -// CHECK:STDOUT: %.loc11_20.2: @Outer.G.%Y.assoc_type (%Y.assoc_type.aab) = specific_constant @T.%assoc0, @Y(constants.%OuterParam) [symbolic = %assoc0 (constants.%assoc0.5a1)] -// CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.aab) = name_ref T, %.loc11_20.2 [symbolic = %assoc0 (constants.%assoc0.5a1)] +// CHECK:STDOUT: %.loc11_20.2: @Outer.G.%Y.assoc_type (%Y.assoc_type.aab) = specific_constant @T.%assoc0, @Y(constants.%OuterParam, constants.%.Self.997) [symbolic = %assoc0 (constants.%assoc0.43a)] +// CHECK:STDOUT: %T.ref: @Outer.G.%Y.assoc_type (%Y.assoc_type.aab) = name_ref T, %.loc11_20.2 [symbolic = %assoc0 (constants.%assoc0.43a)] // CHECK:STDOUT: %impl.elem0.loc11_20.2: type = impl_witness_access constants.%Y.lookup_impl_witness.5bf, element0 [symbolic = %impl.elem0.loc11_20.1 (constants.%impl.elem0.63e)] // CHECK:STDOUT: %.loc11_26.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc11_26.2: type = converted %.loc11_26.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -641,8 +665,8 @@ fn F() { // CHECK:STDOUT: %.Self.ref: @C.as.Y.impl.%Y.type (%Y.type.6ae) = name_ref .Self, %.Self.1 [symbolic = %.Self.2 (constants.%.Self.997)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.238)] // CHECK:STDOUT: %.loc14_21.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.238)] -// CHECK:STDOUT: %.loc14_21.2: @C.as.Y.impl.%Y.assoc_type (%Y.assoc_type.aab) = specific_constant @T.%assoc0, @Y(constants.%OuterParam) [symbolic = %assoc0 (constants.%assoc0.5a1)] -// CHECK:STDOUT: %T.ref: @C.as.Y.impl.%Y.assoc_type (%Y.assoc_type.aab) = name_ref T, %.loc14_21.2 [symbolic = %assoc0 (constants.%assoc0.5a1)] +// CHECK:STDOUT: %.loc14_21.2: @C.as.Y.impl.%Y.assoc_type (%Y.assoc_type.aab) = specific_constant @T.%assoc0, @Y(constants.%OuterParam, constants.%.Self.997) [symbolic = %assoc0 (constants.%assoc0.43a)] +// CHECK:STDOUT: %T.ref: @C.as.Y.impl.%Y.assoc_type (%Y.assoc_type.aab) = name_ref T, %.loc14_21.2 [symbolic = %assoc0 (constants.%assoc0.43a)] // CHECK:STDOUT: %impl.elem0.loc14_21.1: type = impl_witness_access constants.%Y.lookup_impl_witness.5bf, element0 [symbolic = %impl.elem0.loc14_21.2 (constants.%impl.elem0.63e)] // CHECK:STDOUT: %.loc14_27.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc14_27.2: type = converted %.loc14_27.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -673,7 +697,7 @@ fn F() { // CHECK:STDOUT: %require_complete: = require_complete_type %Y.type [symbolic = %require_complete (constants.%require_complete.f45)] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.1 [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.238)] // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%OuterParam) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.aab)] -// CHECK:STDOUT: %assoc0: @Outer.G.%Y.assoc_type (%Y.assoc_type.aab) = assoc_entity element0, @Y.%T [symbolic = %assoc0 (constants.%assoc0.5a1)] +// CHECK:STDOUT: %assoc0: @Outer.G.%Y.assoc_type (%Y.assoc_type.aab) = assoc_entity element0, @Y.%T [symbolic = %assoc0 (constants.%assoc0.43a)] // CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %.Self.1, @Y, @Y(%OuterParam) [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness.5bf)] // CHECK:STDOUT: %impl.elem0.loc11_20.1: type = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_20.1 (constants.%impl.elem0.63e)] // CHECK:STDOUT: %Y_where.type: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.loc11_20.1 = constants.%empty_tuple.type> [symbolic = %Y_where.type (constants.%Y_where.type.b0f)] @@ -694,7 +718,7 @@ fn F() { // CHECK:STDOUT: %.loc21_10: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %Z1.ref.loc21_16: type = name_ref Z1, file.%Z1.decl [concrete = constants.%Z1.type] // CHECK:STDOUT: %Z2.ref.loc21_21: type = name_ref Z2, file.%Z2.decl [concrete = constants.%Z2.type] -// CHECK:STDOUT: %impl.elem0.loc21_19: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc21_19: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc21_19: = bound_method %Z1.ref.loc21_16, %impl.elem0.loc21_19 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc21_19: init type = call %bound_method.loc21_19(%Z1.ref.loc21_16, %Z2.ref.loc21_21) [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc21_23.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc21_19 [concrete = constants.%facet_type] @@ -711,7 +735,7 @@ fn F() { // CHECK:STDOUT: %.loc21_35: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %Z1.ref.loc21_41: type = name_ref Z1, file.%Z1.decl [concrete = constants.%Z1.type] // CHECK:STDOUT: %Z2.ref.loc21_46: type = name_ref Z2, file.%Z2.decl [concrete = constants.%Z2.type] -// CHECK:STDOUT: %impl.elem0.loc21_44: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc21_44: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc21_44: = bound_method %Z1.ref.loc21_41, %impl.elem0.loc21_44 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc21_44: init type = call %bound_method.loc21_44(%Z1.ref.loc21_41, %Z2.ref.loc21_46) [concrete = constants.%facet_type] // CHECK:STDOUT: %.loc21_48.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc21_44 [concrete = constants.%facet_type] @@ -731,6 +755,14 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z1(constants.%Self.d71) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z2(constants.%Self.cde) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%OuterParam) { // CHECK:STDOUT: %OuterParam.loc6_13.1 => constants.%OuterParam // CHECK:STDOUT: @@ -743,16 +775,24 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Y(constants.%OuterParam) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %OuterParam => constants.%OuterParam +// CHECK:STDOUT: %OuterParam.loc7 => constants.%OuterParam // CHECK:STDOUT: %Y.type => constants.%Y.type.6ae // CHECK:STDOUT: %Self.loc7_15.2 => constants.%Self.f29 -// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.aab -// CHECK:STDOUT: %assoc0 => constants.%assoc0.5a1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%OuterParam, constants.%Self.f29) {} +// CHECK:STDOUT: specific @Y(constants.%OuterParam, constants.%Self.f29) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %OuterParam.loc8 => constants.%OuterParam +// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.aab +// CHECK:STDOUT: %assoc0 => constants.%assoc0.43a +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%OuterParam, constants.%.Self.997) {} +// CHECK:STDOUT: specific @Y(constants.%OuterParam, constants.%.Self.997) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %OuterParam.loc8 => constants.%OuterParam +// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.aab +// CHECK:STDOUT: %assoc0 => constants.%assoc0.43a +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer.G(constants.%OuterParam, constants.%H) { // CHECK:STDOUT: %OuterParam => constants.%OuterParam @@ -761,7 +801,7 @@ fn F() { // CHECK:STDOUT: %require_complete => constants.%require_complete.f45 // CHECK:STDOUT: %.Self.binding.as_type => constants.%.Self.binding.as_type.238 // CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.aab -// CHECK:STDOUT: %assoc0 => constants.%assoc0.5a1 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.43a // CHECK:STDOUT: %Y.lookup_impl_witness => constants.%Y.lookup_impl_witness.5bf // CHECK:STDOUT: %impl.elem0.loc11_20.1 => constants.%impl.elem0.63e // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.b0f @@ -779,13 +819,28 @@ fn F() { // CHECK:STDOUT: %require_complete.loc14_21 => constants.%require_complete.f45 // CHECK:STDOUT: %.Self.binding.as_type => constants.%.Self.binding.as_type.238 // CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.aab -// CHECK:STDOUT: %assoc0 => constants.%assoc0.5a1 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.43a // CHECK:STDOUT: %Y.lookup_impl_witness => constants.%Y.lookup_impl_witness.5bf // CHECK:STDOUT: %impl.elem0.loc14_21.2 => constants.%impl.elem0.63e // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.b0f // CHECK:STDOUT: %Y.impl_witness.loc14_29.2 => constants.%Y.impl_witness.26b // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%OuterParam, constants.%Y.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %OuterParam.loc8 => constants.%OuterParam +// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.aab +// CHECK:STDOUT: %assoc0 => constants.%assoc0.43a +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z1(constants.%Z1.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z2(constants.%Z2.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%Z1.facet) { // CHECK:STDOUT: %OuterParam.loc6_13.1 => constants.%Z1.facet // CHECK:STDOUT: @@ -798,11 +853,9 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: specific @Y(constants.%Z1.facet) { // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %OuterParam => constants.%Z1.facet +// CHECK:STDOUT: %OuterParam.loc7 => constants.%Z1.facet // CHECK:STDOUT: %Y.type => constants.%Y.type.874 // CHECK:STDOUT: %Self.loc7_15.2 => constants.%Self.974 -// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.748 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.673 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%Z1.facet) {} @@ -815,7 +868,7 @@ fn F() { // CHECK:STDOUT: %require_complete.loc14_21 => constants.%complete_type.f55 // CHECK:STDOUT: %.Self.binding.as_type => constants.%.Self.binding.as_type.d52 // CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.748 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.673 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.5a7 // CHECK:STDOUT: %Y.lookup_impl_witness => constants.%Y.lookup_impl_witness.249 // CHECK:STDOUT: %impl.elem0.loc14_21.2 => constants.%impl.elem0.9e9 // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.c95 @@ -825,6 +878,13 @@ fn F() { // CHECK:STDOUT: %require_complete.loc14_15 => constants.%complete_type.fa4 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%Z1.facet, constants.%Self.f29) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %OuterParam.loc8 => constants.%Z1.facet +// CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.748 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.5a7 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Outer.G(constants.%Z1.facet, constants.%facet_value.256) { // CHECK:STDOUT: %OuterParam => constants.%Z1.facet // CHECK:STDOUT: %Y.type => constants.%Y.type.874 @@ -832,7 +892,7 @@ fn F() { // CHECK:STDOUT: %require_complete => constants.%complete_type.f55 // CHECK:STDOUT: %.Self.binding.as_type => constants.%.Self.binding.as_type.d52 // CHECK:STDOUT: %Y.assoc_type => constants.%Y.assoc_type.748 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.673 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.5a7 // CHECK:STDOUT: %Y.lookup_impl_witness => constants.%Y.lookup_impl_witness.249 // CHECK:STDOUT: %impl.elem0.loc11_20.1 => constants.%impl.elem0.9e9 // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type.c95 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 e0b38264fa42..f8a1908dee81 100644 --- a/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon +++ b/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon @@ -107,7 +107,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.type.0ed: type = facet_type <@Z, @Z(%T.67d)> [symbolic] // CHECK:STDOUT: %Self.822: %Z.type.0ed = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Z.assoc_type.0bf: type = assoc_entity_type @Z, @Z(%T.67d) [symbolic] -// CHECK:STDOUT: %assoc0.bb9: %Z.assoc_type.0bf = assoc_entity element0, @Z.%X [symbolic] +// CHECK:STDOUT: %assoc0.f33: %Z.assoc_type.0bf = assoc_entity element0, @Z.%X [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -116,7 +116,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.Self.90f: %Z.type.4d0 = symbolic_binding .Self [symbolic] // CHECK:STDOUT: %Self.427: %Z.type.4d0 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Z.assoc_type.5b2: type = assoc_entity_type @Z, @Z(%S) [symbolic] -// CHECK:STDOUT: %assoc0.1d5: %Z.assoc_type.5b2 = assoc_entity element0, @Z.%X [symbolic] +// CHECK:STDOUT: %assoc0.8bc: %Z.assoc_type.5b2 = assoc_entity element0, @Z.%X [symbolic] // CHECK:STDOUT: %require_complete.72d: = require_complete_type %Z.type.4d0 [symbolic] // CHECK:STDOUT: %.Self.binding.as_type.097: type = symbolic_binding_type .Self, %.Self.90f [symbolic] // CHECK:STDOUT: %Z.lookup_impl_witness.7d6: = lookup_impl_witness %.Self.90f, @Z, @Z(%S) [symbolic] @@ -125,17 +125,19 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z_where.type.a76: type = facet_type <@Z, @Z(%S) where %impl.elem0.e5e = %empty_tuple.type> [symbolic] // CHECK:STDOUT: %Z.impl_witness.cfe: = impl_witness @T.as.Z.impl.34a.%Z.impl_witness_table, @T.as.Z.impl.34a(%T.67d, %S) [symbolic] // CHECK:STDOUT: %require_complete.1f8: = require_complete_type %Z_where.type.a76 [symbolic] +// CHECK:STDOUT: %Z.facet.100: %Z.type.4d0 = facet_value %T.67d, (%Z.impl_witness.cfe) [symbolic] // CHECK:STDOUT: %Z.type.be4: type = facet_type <@Z, @Z(%C)> [concrete] // CHECK:STDOUT: %.Self.bf2: %Z.type.be4 = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Self.af9: %Z.type.be4 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Z.assoc_type.553: type = assoc_entity_type @Z, @Z(%C) [concrete] -// CHECK:STDOUT: %assoc0.20f: %Z.assoc_type.553 = assoc_entity element0, @Z.%X [concrete] +// CHECK:STDOUT: %assoc0.1e0: %Z.assoc_type.553 = assoc_entity element0, @Z.%X [concrete] // CHECK:STDOUT: %.Self.binding.as_type.8c6: type = symbolic_binding_type .Self, %.Self.bf2 [symbolic_self] // CHECK:STDOUT: %Z.lookup_impl_witness.c06: = lookup_impl_witness %.Self.bf2, @Z, @Z(%C) [symbolic_self] // CHECK:STDOUT: %impl.elem0.2cd: type = impl_witness_access %Z.lookup_impl_witness.c06, element0 [symbolic_self] // CHECK:STDOUT: %Z_where.type.c3e: type = facet_type <@Z, @Z(%C) where %impl.elem0.2cd = %T.67d> [symbolic] // CHECK:STDOUT: %Z.impl_witness.9b0: = impl_witness @T.as.Z.impl.cf0.%Z.impl_witness_table, @T.as.Z.impl.cf0(%T.67d) [symbolic] // CHECK:STDOUT: %require_complete.864: = require_complete_type %Z_where.type.c3e [symbolic] +// CHECK:STDOUT: %Z.facet.738: %Z.type.be4 = facet_value %T.67d, (%Z.impl_witness.9b0) [symbolic] // CHECK:STDOUT: %T.fe5: %Z.type.be4 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.53f: type = pattern_type %Z.type.be4 [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.fe5 [symbolic] @@ -183,8 +185,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.Self.ref: @T.as.Z.impl.34a.%Z.type.loc9_42.2 (%Z.type.4d0) = name_ref .Self, %.Self.1 [symbolic = %.Self.4 (constants.%.Self.90f)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.097)] // CHECK:STDOUT: %.loc9_50.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.097)] -// CHECK:STDOUT: %.loc9_50.2: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = specific_constant @X.%assoc0, @Z(constants.%S) [symbolic = %assoc0 (constants.%assoc0.1d5)] -// CHECK:STDOUT: %X.ref: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = name_ref X, %.loc9_50.2 [symbolic = %assoc0 (constants.%assoc0.1d5)] +// CHECK:STDOUT: %.loc9_50.2: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = specific_constant @X.%assoc0, @Z(constants.%S, constants.%.Self.90f) [symbolic = %assoc0 (constants.%assoc0.8bc)] +// CHECK:STDOUT: %X.ref: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = name_ref X, %.loc9_50.2 [symbolic = %assoc0 (constants.%assoc0.8bc)] // CHECK:STDOUT: %impl.elem0.loc9_50.1: type = impl_witness_access constants.%Z.lookup_impl_witness.7d6, element0 [symbolic = %impl.elem0.loc9_50.2 (constants.%impl.elem0.e5e)] // CHECK:STDOUT: %.loc9_56.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc9_56.2: type = converted %.loc9_56.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -208,8 +210,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.Self.ref: %Z.type.be4 = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.bf2] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type.8c6] // CHECK:STDOUT: %.loc11_46.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type.8c6] -// CHECK:STDOUT: %.loc11_46.2: %Z.assoc_type.553 = specific_constant @X.%assoc0, @Z(constants.%C) [concrete = constants.%assoc0.20f] -// CHECK:STDOUT: %X.ref: %Z.assoc_type.553 = name_ref X, %.loc11_46.2 [concrete = constants.%assoc0.20f] +// CHECK:STDOUT: %.loc11_46.2: %Z.assoc_type.553 = specific_constant @X.%assoc0, @Z(constants.%C, constants.%.Self.bf2) [concrete = constants.%assoc0.1e0] +// CHECK:STDOUT: %X.ref: %Z.assoc_type.553 = name_ref X, %.loc11_46.2 [concrete = constants.%assoc0.1e0] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness.c06, element0 [symbolic_self = constants.%impl.elem0.2cd] // CHECK:STDOUT: %T.ref.loc11_51: type = name_ref T, %T.loc11_20.1 [symbolic = %T.loc11_20.2 (constants.%T.67d)] // CHECK:STDOUT: %.loc11_40: type = where_expr %.Self.1 [symbolic = %Z_where.type (constants.%Z_where.type.c3e)] { @@ -247,13 +249,14 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc3_13.1)> [symbolic = %Z.type (constants.%Z.type.0ed)] // CHECK:STDOUT: %Self.loc3_23.2: @Z.%Z.type (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.822)] -// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%T.loc3_13.1) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.0bf)] -// CHECK:STDOUT: %assoc0: @Z.%Z.assoc_type (%Z.assoc_type.0bf) = assoc_entity element0, %X [symbolic = %assoc0 (constants.%assoc0.bb9)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc3_23.1: @Z.%Z.type (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.822)] +// CHECK:STDOUT: 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.%Z.assoc_type (%Z.assoc_type.0bf) = assoc_entity element0, @Z.%X [symbolic = @Z.%assoc0 (constants.%assoc0.bb9)] +// CHECK:STDOUT: %assoc0: @Z.%Z.assoc_type (%Z.assoc_type.0bf) = assoc_entity element0, @Z.%X [symbolic = @Z.%assoc0 (constants.%assoc0.f33)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -265,10 +268,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @X(@Z.%T.loc3_13.2: type, @Z.%Self.loc3_23.1: @Z.%Z.type (%Z.type.0ed)) { -// CHECK:STDOUT: assoc_const X:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic impl @T.as.Z.impl.34a(%T.loc9_14.1: type, %S.loc9_24.1: type) { // CHECK:STDOUT: %T.loc9_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_14.2 (constants.%T.67d)] // CHECK:STDOUT: %S.loc9_24.2: type = symbolic_binding S, 1 [symbolic = %S.loc9_24.2 (constants.%S)] @@ -277,7 +276,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete.loc9_50: = require_complete_type %Z.type.loc9_42.2 [symbolic = %require_complete.loc9_50 (constants.%require_complete.72d)] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.4 [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.097)] // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%S.loc9_24.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.5b2)] -// CHECK:STDOUT: %assoc0: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = assoc_entity element0, @Z.%X [symbolic = %assoc0 (constants.%assoc0.1d5)] +// CHECK:STDOUT: %assoc0: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = assoc_entity element0, @Z.%X [symbolic = %assoc0 (constants.%assoc0.8bc)] // CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %.Self.4, @Z, @Z(%S.loc9_24.2) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.7d6)] // CHECK:STDOUT: %impl.elem0.loc9_50.2: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_50.2 (constants.%impl.elem0.e5e)] // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%S.loc9_24.2) where %impl.elem0.loc9_50.2 = constants.%empty_tuple.type> [symbolic = %Z_where.type (constants.%Z_where.type.a76)] @@ -342,8 +341,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.ref.loc15: %Z.type.be4 = name_ref T, %T.loc13_6.2 [symbolic = %T.loc13_6.1 (constants.%T.fe5)] // CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc15_11.2: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc15_11.3: %Z.assoc_type.553 = specific_constant @X.%assoc0, @Z(constants.%C) [concrete = constants.%assoc0.20f] -// CHECK:STDOUT: %X.ref: %Z.assoc_type.553 = name_ref X, %.loc15_11.3 [concrete = constants.%assoc0.20f] +// CHECK:STDOUT: %.loc15_11.3: %Z.assoc_type.553 = specific_constant @X.%assoc0, @Z(constants.%C, constants.%T.fe5) [concrete = constants.%assoc0.1e0] +// CHECK:STDOUT: %X.ref: %Z.assoc_type.553 = name_ref X, %.loc15_11.3 [concrete = constants.%assoc0.1e0] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.impl_witness.5a3, element0 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%T.binding.as_type (%T.binding.as_type) = value_binding a, %t.ref @@ -355,7 +354,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.loc3_13.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%T.67d, constants.%Self.822) {} +// CHECK:STDOUT: specific @Z(constants.%T.67d, constants.%Self.822) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%S) { // CHECK:STDOUT: %T.loc3_13.1 => constants.%S @@ -363,11 +362,21 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type => constants.%Z.type.4d0 // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.427 -// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.1d5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%S, constants.%.Self.90f) {} +// CHECK:STDOUT: specific @Z(constants.%S, constants.%Self.822) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%S +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%S, constants.%.Self.90f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%S +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.Z.impl.34a(constants.%T.67d, constants.%S) { // CHECK:STDOUT: %T.loc9_14.2 => constants.%T.67d @@ -377,24 +386,41 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete.loc9_50 => constants.%require_complete.72d // CHECK:STDOUT: %.Self.binding.as_type => constants.%.Self.binding.as_type.097 // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.1d5 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc // CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.lookup_impl_witness.7d6 // CHECK:STDOUT: %impl.elem0.loc9_50.2 => constants.%impl.elem0.e5e // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.a76 // CHECK:STDOUT: %Z.impl_witness.loc9_58.2 => constants.%Z.impl_witness.cfe // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%S, constants.%Z.facet.100) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%S +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%C) { // CHECK:STDOUT: %T.loc3_13.1 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type => constants.%Z.type.be4 // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.af9 -// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.20f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%C, constants.%.Self.bf2) {} +// CHECK:STDOUT: specific @Z(constants.%C, constants.%Self.822) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%C +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%C, constants.%.Self.bf2) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%C +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0 +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.Z.impl.cf0(constants.%T.67d) { // CHECK:STDOUT: %T.loc11_20.2 => constants.%T.67d @@ -402,12 +428,26 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.impl_witness.loc11_53.2 => constants.%Z.impl_witness.9b0 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%C, constants.%Z.facet.738) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%C +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.fe5) { // CHECK:STDOUT: %T.loc13_6.1 => constants.%T.fe5 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.bb9 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%C, constants.%T.fe5) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%C +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.Z.impl.cf0(constants.%T.binding.as_type) { // CHECK:STDOUT: %T.loc11_20.2 => constants.%T.binding.as_type // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.325 @@ -417,8 +457,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete => constants.%require_complete.267 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%C, constants.%T.fe5) {} -// CHECK:STDOUT: // CHECK:STDOUT: --- fail_nonfinal_specialized_symbolic_rewrite.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -432,7 +470,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.type.0ed: type = facet_type <@Z, @Z(%T.67d)> [symbolic] // CHECK:STDOUT: %Self.822: %Z.type.0ed = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Z.assoc_type.0bf: type = assoc_entity_type @Z, @Z(%T.67d) [symbolic] -// CHECK:STDOUT: %assoc0.bb9: %Z.assoc_type.0bf = assoc_entity element0, @Z.%X [symbolic] +// CHECK:STDOUT: %assoc0.f33: %Z.assoc_type.0bf = assoc_entity element0, @Z.%X [symbolic] // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete] // CHECK:STDOUT: %Self.162: %Y.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] @@ -443,7 +481,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.Self.90f: %Z.type.4d0 = symbolic_binding .Self [symbolic] // CHECK:STDOUT: %Self.427: %Z.type.4d0 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Z.assoc_type.5b2: type = assoc_entity_type @Z, @Z(%S) [symbolic] -// CHECK:STDOUT: %assoc0.1d5: %Z.assoc_type.5b2 = assoc_entity element0, @Z.%X [symbolic] +// CHECK:STDOUT: %assoc0.8bc: %Z.assoc_type.5b2 = assoc_entity element0, @Z.%X [symbolic] // CHECK:STDOUT: %require_complete.72d: = require_complete_type %Z.type.4d0 [symbolic] // CHECK:STDOUT: %.Self.binding.as_type.097: type = symbolic_binding_type .Self, %.Self.90f [symbolic] // CHECK:STDOUT: %Z.lookup_impl_witness.7d6: = lookup_impl_witness %.Self.90f, @Z, @Z(%S) [symbolic] @@ -452,17 +490,19 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z_where.type.a76: type = facet_type <@Z, @Z(%S) where %impl.elem0.e5e = %empty_tuple.type> [symbolic] // CHECK:STDOUT: %Z.impl_witness.cfe: = impl_witness @T.as.Z.impl.34a.%Z.impl_witness_table, @T.as.Z.impl.34a(%T.67d, %S) [symbolic] // CHECK:STDOUT: %require_complete.1f8: = require_complete_type %Z_where.type.a76 [symbolic] +// CHECK:STDOUT: %Z.facet.100: %Z.type.4d0 = facet_value %T.67d, (%Z.impl_witness.cfe) [symbolic] // CHECK:STDOUT: %Z.type.be4: type = facet_type <@Z, @Z(%C)> [concrete] // CHECK:STDOUT: %.Self.bf2: %Z.type.be4 = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Self.af9: %Z.type.be4 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Z.assoc_type.553: type = assoc_entity_type @Z, @Z(%C) [concrete] -// CHECK:STDOUT: %assoc0.20f: %Z.assoc_type.553 = assoc_entity element0, @Z.%X [concrete] +// CHECK:STDOUT: %assoc0.1e0: %Z.assoc_type.553 = assoc_entity element0, @Z.%X [concrete] // CHECK:STDOUT: %.Self.binding.as_type.8c6: type = symbolic_binding_type .Self, %.Self.bf2 [symbolic_self] // CHECK:STDOUT: %Z.lookup_impl_witness.c06: = lookup_impl_witness %.Self.bf2, @Z, @Z(%C) [symbolic_self] // CHECK:STDOUT: %impl.elem0.2cd: type = impl_witness_access %Z.lookup_impl_witness.c06, element0 [symbolic_self] // CHECK:STDOUT: %Z_where.type.c3e: type = facet_type <@Z, @Z(%C) where %impl.elem0.2cd = %T.67d> [symbolic] // CHECK:STDOUT: %Z.impl_witness.9b0: = impl_witness @T.as.Z.impl.cf0.%Z.impl_witness_table, @T.as.Z.impl.cf0(%T.67d) [symbolic] // CHECK:STDOUT: %require_complete.864: = require_complete_type %Z_where.type.c3e [symbolic] +// CHECK:STDOUT: %Z.facet.738: %Z.type.be4 = facet_value %T.67d, (%Z.impl_witness.9b0) [symbolic] // CHECK:STDOUT: %T.fe5: %Z.type.be4 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.53f: type = pattern_type %Z.type.be4 [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.fe5 [symbolic] @@ -477,14 +517,16 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic] +// CHECK:STDOUT: %ImplicitAs.type.031: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic] +// CHECK:STDOUT: %Self.738: %ImplicitAs.type.031 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.ff3: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6d3: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.50f: %ImplicitAs.Convert.type.6d3 = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b3a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Dest, %Self.738) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.1de: %ImplicitAs.WithSelf.Convert.type.b3a = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.7e4: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.a5e)> [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type.ac6: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.a5e) [symbolic] -// CHECK:STDOUT: %assoc0.43e: %ImplicitAs.assoc_type.ac6 = assoc_entity element0, imports.%Core.import_ref.218 [symbolic] +// CHECK:STDOUT: %assoc0.ae8: %ImplicitAs.assoc_type.ac6 = assoc_entity element0, imports.%Core.import_ref.201 [symbolic] // CHECK:STDOUT: %require_complete.591: = require_complete_type %ImplicitAs.type.7e4 [symbolic] -// CHECK:STDOUT: %assoc0.0bc: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.fa2 [symbolic] +// CHECK:STDOUT: %assoc0.843: %ImplicitAs.assoc_type.ff3 = assoc_entity element0, imports.%Core.import_ref.cc1 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -494,9 +536,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // 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: %Core.import_ref.a80: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.0bc)] -// CHECK:STDOUT: %Core.import_ref.218: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type.6d3) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert.50f)] -// CHECK:STDOUT: %Core.import_ref.fa2 = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.178: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ff3) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.843)] +// CHECK:STDOUT: %Core.import_ref.201: @ImplicitAs.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type.b3a) = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, loaded [symbolic = @ImplicitAs.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert.1de)] +// CHECK:STDOUT: %Core.import_ref.cc1 = import_ref Core//prelude/parts/as, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -528,8 +570,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.Self.ref: @T.as.Z.impl.34a.%Z.type.loc10_42.2 (%Z.type.4d0) = name_ref .Self, %.Self.1 [symbolic = %.Self.4 (constants.%.Self.90f)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.097)] // CHECK:STDOUT: %.loc10_50.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.097)] -// CHECK:STDOUT: %.loc10_50.2: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = specific_constant @X.%assoc0, @Z(constants.%S) [symbolic = %assoc0 (constants.%assoc0.1d5)] -// CHECK:STDOUT: %X.ref: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = name_ref X, %.loc10_50.2 [symbolic = %assoc0 (constants.%assoc0.1d5)] +// CHECK:STDOUT: %.loc10_50.2: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = specific_constant @X.%assoc0, @Z(constants.%S, constants.%.Self.90f) [symbolic = %assoc0 (constants.%assoc0.8bc)] +// CHECK:STDOUT: %X.ref: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = name_ref X, %.loc10_50.2 [symbolic = %assoc0 (constants.%assoc0.8bc)] // CHECK:STDOUT: %impl.elem0.loc10_50.1: type = impl_witness_access constants.%Z.lookup_impl_witness.7d6, element0 [symbolic = %impl.elem0.loc10_50.2 (constants.%impl.elem0.e5e)] // CHECK:STDOUT: %.loc10_56.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc10_56.2: type = converted %.loc10_56.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -553,8 +595,8 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.Self.ref: %Z.type.be4 = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.bf2] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type.8c6] // CHECK:STDOUT: %.loc12_40.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type.8c6] -// CHECK:STDOUT: %.loc12_40.2: %Z.assoc_type.553 = specific_constant @X.%assoc0, @Z(constants.%C) [concrete = constants.%assoc0.20f] -// CHECK:STDOUT: %X.ref: %Z.assoc_type.553 = name_ref X, %.loc12_40.2 [concrete = constants.%assoc0.20f] +// CHECK:STDOUT: %.loc12_40.2: %Z.assoc_type.553 = specific_constant @X.%assoc0, @Z(constants.%C, constants.%.Self.bf2) [concrete = constants.%assoc0.1e0] +// CHECK:STDOUT: %X.ref: %Z.assoc_type.553 = name_ref X, %.loc12_40.2 [concrete = constants.%assoc0.1e0] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Z.lookup_impl_witness.c06, element0 [symbolic_self = constants.%impl.elem0.2cd] // CHECK:STDOUT: %T.ref.loc12_45: type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T.67d)] // CHECK:STDOUT: %.loc12_34: type = where_expr %.Self.1 [symbolic = %Z_where.type (constants.%Z_where.type.c3e)] { @@ -592,13 +634,14 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type: type = facet_type <@Z, @Z(%T.loc3_13.1)> [symbolic = %Z.type (constants.%Z.type.0ed)] // CHECK:STDOUT: %Self.loc3_23.2: @Z.%Z.type (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.822)] -// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%T.loc3_13.1) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.0bf)] -// CHECK:STDOUT: %assoc0: @Z.%Z.assoc_type (%Z.assoc_type.0bf) = assoc_entity element0, %X [symbolic = %assoc0 (constants.%assoc0.bb9)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc3_23.1: @Z.%Z.type (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self.822)] +// CHECK:STDOUT: 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.%Z.assoc_type (%Z.assoc_type.0bf) = assoc_entity element0, @Z.%X [symbolic = @Z.%assoc0 (constants.%assoc0.bb9)] +// CHECK:STDOUT: %assoc0: @Z.%Z.assoc_type (%Z.assoc_type.0bf) = assoc_entity element0, @Z.%X [symbolic = @Z.%assoc0 (constants.%assoc0.f33)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -612,6 +655,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Y { // CHECK:STDOUT: %Self: %Y.type = symbolic_binding Self, 0 [symbolic = constants.%Self.162] +// CHECK:STDOUT: interface_with_self_decl @Y [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -620,10 +664,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @X(@Z.%T.loc3_13.2: type, @Z.%Self.loc3_23.1: @Z.%Z.type (%Z.type.0ed)) { -// CHECK:STDOUT: assoc_const X:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic impl @T.as.Z.impl.34a(%T.loc10_14.1: type, %S.loc10_24.1: type) { // CHECK:STDOUT: %T.loc10_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_14.2 (constants.%T.67d)] // CHECK:STDOUT: %S.loc10_24.2: type = symbolic_binding S, 1 [symbolic = %S.loc10_24.2 (constants.%S)] @@ -632,7 +672,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete.loc10_50: = require_complete_type %Z.type.loc10_42.2 [symbolic = %require_complete.loc10_50 (constants.%require_complete.72d)] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.4 [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.097)] // CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type @Z, @Z(%S.loc10_24.2) [symbolic = %Z.assoc_type (constants.%Z.assoc_type.5b2)] -// CHECK:STDOUT: %assoc0: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = assoc_entity element0, @Z.%X [symbolic = %assoc0 (constants.%assoc0.1d5)] +// CHECK:STDOUT: %assoc0: @T.as.Z.impl.34a.%Z.assoc_type (%Z.assoc_type.5b2) = assoc_entity element0, @Z.%X [symbolic = %assoc0 (constants.%assoc0.8bc)] // CHECK:STDOUT: %Z.lookup_impl_witness: = lookup_impl_witness %.Self.4, @Z, @Z(%S.loc10_24.2) [symbolic = %Z.lookup_impl_witness (constants.%Z.lookup_impl_witness.7d6)] // CHECK:STDOUT: %impl.elem0.loc10_50.2: type = impl_witness_access %Z.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_50.2 (constants.%impl.elem0.e5e)] // CHECK:STDOUT: %Z_where.type: type = facet_type <@Z, @Z(%S.loc10_24.2) where %impl.elem0.loc10_50.2 = constants.%empty_tuple.type> [symbolic = %Z_where.type (constants.%Z_where.type.a76)] @@ -691,7 +731,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %ImplicitAs.type.loc22_16.2: type = facet_type <@ImplicitAs, @ImplicitAs(%impl.elem0.loc22_11.2)> [symbolic = %ImplicitAs.type.loc22_16.2 (constants.%ImplicitAs.type.7e4)] // CHECK:STDOUT: %require_complete.loc22_16: = require_complete_type %ImplicitAs.type.loc22_16.2 [symbolic = %require_complete.loc22_16 (constants.%require_complete.591)] // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%impl.elem0.loc22_11.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.ac6)] -// CHECK:STDOUT: %assoc0: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ac6) = assoc_entity element0, imports.%Core.import_ref.218 [symbolic = %assoc0 (constants.%assoc0.43e)] +// CHECK:STDOUT: %assoc0: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ac6) = assoc_entity element0, imports.%Core.import_ref.201 [symbolic = %assoc0 (constants.%assoc0.ae8)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @F.%T.binding.as_type (%T.binding.as_type)) { // CHECK:STDOUT: !entry: @@ -703,13 +743,13 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.ref.loc22: %Z.type.be4 = name_ref T, %T.loc14_6.2 [symbolic = %T.loc14_6.1 (constants.%T.fe5)] // CHECK:STDOUT: %T.as_type.loc22: type = facet_access_type %T.ref.loc22 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc22_11.2: type = converted %T.ref.loc22, %T.as_type.loc22 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc22_11.3: %Z.assoc_type.553 = specific_constant @X.%assoc0, @Z(constants.%C) [concrete = constants.%assoc0.20f] -// CHECK:STDOUT: %X.ref: %Z.assoc_type.553 = name_ref X, %.loc22_11.3 [concrete = constants.%assoc0.20f] +// CHECK:STDOUT: %.loc22_11.3: %Z.assoc_type.553 = specific_constant @X.%assoc0, @Z(constants.%C, constants.%T.fe5) [concrete = constants.%assoc0.1e0] +// CHECK:STDOUT: %X.ref: %Z.assoc_type.553 = name_ref X, %.loc22_11.3 [concrete = constants.%assoc0.1e0] // CHECK:STDOUT: %impl.elem0.loc22_11.1: type = impl_witness_access constants.%Z.lookup_impl_witness.1cb, element0 [symbolic = %impl.elem0.loc22_11.2 (constants.%impl.elem0.a5e)] // CHECK:STDOUT: } // CHECK:STDOUT: %ImplicitAs.type.loc22_16.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%impl.elem0.a5e)> [symbolic = %ImplicitAs.type.loc22_16.2 (constants.%ImplicitAs.type.7e4)] -// CHECK:STDOUT: %.loc22_16.1: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ac6) = specific_constant imports.%Core.import_ref.a80, @ImplicitAs(constants.%impl.elem0.a5e) [symbolic = %assoc0 (constants.%assoc0.43e)] -// CHECK:STDOUT: %Convert.ref: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ac6) = name_ref Convert, %.loc22_16.1 [symbolic = %assoc0 (constants.%assoc0.43e)] +// CHECK:STDOUT: %.loc22_16.1: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ac6) = specific_constant imports.%Core.import_ref.178, @ImplicitAs(constants.%impl.elem0.a5e, constants.%Self.738) [symbolic = %assoc0 (constants.%assoc0.ae8)] +// CHECK:STDOUT: %Convert.ref: @F.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ac6) = name_ref Convert, %.loc22_16.1 [symbolic = %assoc0 (constants.%assoc0.ae8)] // CHECK:STDOUT: %.loc22_16.2: @F.%impl.elem0.loc22_11.2 (%impl.elem0.a5e) = converted %t.ref, [concrete = ] // CHECK:STDOUT: %a: @F.%impl.elem0.loc22_11.2 (%impl.elem0.a5e) = value_binding a, [concrete = ] // CHECK:STDOUT: return @@ -720,7 +760,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.loc3_13.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%T.67d, constants.%Self.822) {} +// CHECK:STDOUT: specific @Z(constants.%T.67d, constants.%Self.822) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Y(constants.%Self.162) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%S) { // CHECK:STDOUT: %T.loc3_13.1 => constants.%S @@ -728,11 +770,21 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type => constants.%Z.type.4d0 // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.427 -// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.1d5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%S, constants.%.Self.90f) {} +// CHECK:STDOUT: specific @Z(constants.%S, constants.%Self.822) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%S +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%S, constants.%.Self.90f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%S +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.Z.impl.34a(constants.%T.67d, constants.%S) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T.67d @@ -742,24 +794,41 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete.loc10_50 => constants.%require_complete.72d // CHECK:STDOUT: %.Self.binding.as_type => constants.%.Self.binding.as_type.097 // CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.1d5 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc // CHECK:STDOUT: %Z.lookup_impl_witness => constants.%Z.lookup_impl_witness.7d6 // CHECK:STDOUT: %impl.elem0.loc10_50.2 => constants.%impl.elem0.e5e // CHECK:STDOUT: %Z_where.type => constants.%Z_where.type.a76 // CHECK:STDOUT: %Z.impl_witness.loc10_58.2 => constants.%Z.impl_witness.cfe // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%S, constants.%Z.facet.100) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%S +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.5b2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.8bc +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%C) { // CHECK:STDOUT: %T.loc3_13.1 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Z.type => constants.%Z.type.be4 // CHECK:STDOUT: %Self.loc3_23.2 => constants.%Self.af9 -// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.20f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%C, constants.%.Self.bf2) {} +// CHECK:STDOUT: specific @Z(constants.%C, constants.%Self.822) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%C +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%C, constants.%.Self.bf2) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%C +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0 +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.Z.impl.cf0(constants.%T.67d) { // CHECK:STDOUT: %T.loc12_14.2 => constants.%T.67d @@ -767,13 +836,25 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Z.impl_witness.loc12_47.2 => constants.%Z.impl_witness.9b0 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%C, constants.%Z.facet.738) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%C +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.fe5) { // CHECK:STDOUT: %T.loc14_6.1 => constants.%T.fe5 // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %pattern_type.loc14 => constants.%pattern_type.bb9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%C, constants.%T.fe5) {} +// CHECK:STDOUT: specific @Z(constants.%C, constants.%T.fe5) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc4 => constants.%C +// CHECK:STDOUT: %Z.assoc_type => constants.%Z.assoc_type.553 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.1e0 +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_impl_lookup.carbon // CHECK:STDOUT: @@ -781,7 +862,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr.type: type = facet_type <@Ptr> [concrete] // CHECK:STDOUT: %Self.0e0: %Ptr.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Ptr.assoc_type: type = assoc_entity_type @Ptr [concrete] -// CHECK:STDOUT: %assoc0.516: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete] +// CHECK:STDOUT: %assoc0.6bc: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic] @@ -794,6 +875,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr_where.type.3963c5.1: type = facet_type <@Ptr where %impl.elem0.4ac = %ptr.e8f8f9.1> [symbolic] // CHECK:STDOUT: %Ptr.impl_witness.117547.1: = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%U.67d) [symbolic] // CHECK:STDOUT: %require_complete.73ad1d.1: = require_complete_type %Ptr_where.type.3963c5.1 [symbolic] +// CHECK:STDOUT: %Ptr.facet.5445c3.1: %Ptr.type = facet_value %U.67d, (%Ptr.impl_witness.117547.1) [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T.67d [symbolic] // CHECK:STDOUT: %ptr.e8f8f9.2: type = ptr_type %T.67d [symbolic] @@ -801,7 +883,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr.impl_witness.117547.2: = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%T.67d) [symbolic] // CHECK:STDOUT: %require_complete.73ad1d.2: = require_complete_type %Ptr_where.type.3963c5.2 [symbolic] // CHECK:STDOUT: %.656: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.67d) [symbolic] -// CHECK:STDOUT: %Ptr.facet: %Ptr.type = facet_value %T.67d, (%Ptr.impl_witness.117547.2) [symbolic] +// CHECK:STDOUT: %Ptr.facet.5445c3.2: %Ptr.type = facet_value %T.67d, (%Ptr.impl_witness.117547.2) [symbolic] // CHECK:STDOUT: %.4fe: Core.Form = init_form %ptr.e8f8f9.2, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr.e8f8f9.2 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] @@ -809,13 +891,13 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete.944: = require_complete_type %T.67d [symbolic] // CHECK:STDOUT: %require_complete.ef1: = require_complete_type %ptr.e8f8f9.2 [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: = lookup_impl_witness %ptr.e8f8f9.2, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.e8f8f9.2, (%Copy.lookup_impl_witness.2e6) [symbolic] -// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b84: = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic] +// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.366: = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -844,7 +926,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.47a] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.516] +// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.6bc] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.4ac] // CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U.67d)] // CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] @@ -865,9 +947,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc9_29: type = name_ref T, %T.loc9_6.2 [symbolic = %T.loc9_6.1 (constants.%T.67d)] // CHECK:STDOUT: %Ptr.ref: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] -// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.516] -// CHECK:STDOUT: %Ptr.facet.loc9_30.2: %Ptr.type = facet_value %T.ref.loc9_29, (constants.%Ptr.impl_witness.117547.2) [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet)] -// CHECK:STDOUT: %.loc9_30.3: %Ptr.type = converted %T.ref.loc9_29, %Ptr.facet.loc9_30.2 [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet)] +// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.6bc] +// CHECK:STDOUT: %Ptr.facet.loc9_30.2: %Ptr.type = facet_value %T.ref.loc9_29, (constants.%Ptr.impl_witness.117547.2) [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet.5445c3.2)] +// CHECK:STDOUT: %.loc9_30.3: %Ptr.type = converted %T.ref.loc9_29, %Ptr.facet.loc9_30.2 [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet.5445c3.2)] // CHECK:STDOUT: %impl.elem0.loc9: type = impl_witness_access constants.%Ptr.impl_witness.117547.2, element0 [symbolic = %ptr (constants.%ptr.e8f8f9.2)] // CHECK:STDOUT: %.loc9_30.4: Core.Form = init_form %impl.elem0.loc9, call_param1 [symbolic = %.loc9_30.2 (constants.%.4fe)] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self.c39] @@ -882,8 +964,11 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Ptr { // CHECK:STDOUT: %Self: %Ptr.type = symbolic_binding Self, 0 [symbolic = constants.%Self.0e0] +// CHECK:STDOUT: interface_with_self_decl @Ptr [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %Type: type = assoc_const_decl @Type [concrete] { -// CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete = constants.%assoc0.516] +// CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete = constants.%assoc0.6bc] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -894,10 +979,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @Type(@Ptr.%Self: %Ptr.type) { -// CHECK:STDOUT: assoc_const Type:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic impl @U.as.Ptr.impl(%U.loc7_20.1: type) { // CHECK:STDOUT: %U.loc7_20.2: type = symbolic_binding U, 0 [symbolic = %U.loc7_20.2 (constants.%U.67d)] // CHECK:STDOUT: %ptr.loc7_54.2: type = ptr_type %U.loc7_20.2 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] @@ -922,7 +1003,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %pattern_type.loc9_20: type = pattern_type %T.loc9_6.1 [symbolic = %pattern_type.loc9_20 (constants.%pattern_type.51d)] // CHECK:STDOUT: %.loc9_30.1: require_specific_def_type = require_specific_def @U.as.Ptr.impl(%T.loc9_6.1) [symbolic = %.loc9_30.1 (constants.%.656)] // CHECK:STDOUT: %Ptr.impl_witness: = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%T.loc9_6.1) [symbolic = %Ptr.impl_witness (constants.%Ptr.impl_witness.117547.2)] -// CHECK:STDOUT: %Ptr.facet.loc9_30.1: %Ptr.type = facet_value %T.loc9_6.1, (%Ptr.impl_witness) [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet)] +// CHECK:STDOUT: %Ptr.facet.loc9_30.1: %Ptr.type = facet_value %T.loc9_6.1, (%Ptr.impl_witness) [symbolic = %Ptr.facet.loc9_30.1 (constants.%Ptr.facet.5445c3.2)] // CHECK:STDOUT: %ptr: type = ptr_type %T.loc9_6.1 [symbolic = %ptr (constants.%ptr.e8f8f9.2)] // CHECK:STDOUT: %.loc9_30.2: Core.Form = init_form %ptr, call_param1 [symbolic = %.loc9_30.2 (constants.%.4fe)] // CHECK:STDOUT: %pattern_type.loc9_26: type = pattern_type %ptr [symbolic = %pattern_type.loc9_26 (constants.%pattern_type.4f4)] @@ -933,26 +1014,31 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.loc10_10.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc9_6.1) [symbolic = %.loc10_10.1 (constants.%.2f2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc10_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_10.2 (constants.%.b46)] -// CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.2 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.201)] -// CHECK:STDOUT: %specific_impl_fn.loc10_10.2: = specific_impl_function %impl.elem0.loc10_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d82)] +// CHECK:STDOUT: %.loc10_10.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc10_10.2 (constants.%.299)] +// CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.2 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.1c7)] +// CHECK:STDOUT: %specific_impl_fn.loc10_10.2: = specific_impl_function %impl.elem0.loc10_10.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: ref @F.%T.loc9_6.1 (%T.67d)) -> out %return.param: @F.%ptr (%ptr.e8f8f9.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: ref @F.%T.loc9_6.1 (%T.67d) = name_ref t, %t // CHECK:STDOUT: %addr: @F.%ptr (%ptr.e8f8f9.2) = addr_of %t.ref -// CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.2 (%.b46) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.201)] +// CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.2 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.1c7)] // CHECK:STDOUT: %bound_method.loc10_10.1: = bound_method %addr, %impl.elem0.loc10_10.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_10.1: = specific_impl_function %impl.elem0.loc10_10.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %specific_impl_fn.loc10_10.1: = specific_impl_function %impl.elem0.loc10_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: %bound_method.loc10_10.2: = bound_method %addr, %specific_impl_fn.loc10_10.1 -// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr (%ptr.e8f8f9.2) = call %bound_method.loc10_10.2(%addr) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr (%ptr.e8f8f9.2) = call %bound_method.loc10_10.2(%addr) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Self.0e0) {} +// CHECK:STDOUT: specific @Ptr(constants.%Self.0e0) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%.Self.47a) {} +// CHECK:STDOUT: specific @Ptr(constants.%.Self.47a) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%U.67d) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%U.67d @@ -961,6 +1047,10 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.117547.1 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Ptr(constants.%Ptr.facet.5445c3.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%T.67d) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%T.67d // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.e8f8f9.2 @@ -971,14 +1061,16 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete => constants.%require_complete.73ad1d.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Ptr.facet) {} +// CHECK:STDOUT: specific @Ptr(constants.%Ptr.facet.5445c3.2) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.67d) { // CHECK:STDOUT: %T.loc9_6.1 => constants.%T.67d // CHECK:STDOUT: %pattern_type.loc9_20 => constants.%pattern_type.51d // CHECK:STDOUT: %.loc9_30.1 => constants.%.656 // CHECK:STDOUT: %Ptr.impl_witness => constants.%Ptr.impl_witness.117547.2 -// CHECK:STDOUT: %Ptr.facet.loc9_30.1 => constants.%Ptr.facet +// CHECK:STDOUT: %Ptr.facet.loc9_30.1 => constants.%Ptr.facet.5445c3.2 // CHECK:STDOUT: %ptr => constants.%ptr.e8f8f9.2 // CHECK:STDOUT: %.loc9_30.2 => constants.%.4fe // CHECK:STDOUT: %pattern_type.loc9_26 => constants.%pattern_type.4f4 @@ -990,7 +1082,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr.type: type = facet_type <@Ptr> [concrete] // CHECK:STDOUT: %Self.0e0: %Ptr.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Ptr.assoc_type: type = assoc_entity_type @Ptr [concrete] -// CHECK:STDOUT: %assoc0.516: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete] +// CHECK:STDOUT: %assoc0.6bc: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic] @@ -1003,6 +1095,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr_where.type.396: type = facet_type <@Ptr where %impl.elem0.4ac = %ptr.e8f8f9.1> [symbolic] // CHECK:STDOUT: %Ptr.impl_witness.117: = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%U.67d) [symbolic] // CHECK:STDOUT: %require_complete.73a: = require_complete_type %Ptr_where.type.396 [symbolic] +// CHECK:STDOUT: %Ptr.facet: %Ptr.type = facet_value %U.67d, (%Ptr.impl_witness.117) [symbolic] // CHECK:STDOUT: %T.ffa: %Ptr.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.6d2: type = pattern_type %Ptr.type [concrete] // CHECK:STDOUT: %T.binding.as_type.3dc: type = symbolic_binding_type T, 0, %T.ffa [symbolic] @@ -1019,13 +1112,13 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete.552: = require_complete_type %T.binding.as_type.3dc [symbolic] // CHECK:STDOUT: %require_complete.c1c: = require_complete_type %ptr.a86 [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %.54b: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type.3dc) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.3c7: = lookup_impl_witness %ptr.a86, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.a86, (%Copy.lookup_impl_witness.3c7) [symbolic] -// CHECK:STDOUT: %.4b6: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.8b5: %.4b6 = impl_witness_access %Copy.lookup_impl_witness.3c7, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.4b3: = specific_impl_function %impl.elem0.8b5, @Copy.Op(%Copy.facet) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.207: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic] +// CHECK:STDOUT: %.382: type = fn_type_with_self_type %Copy.WithSelf.Op.type.207, %Copy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.c19: %.382 = impl_witness_access %Copy.lookup_impl_witness.3c7, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.25f: = specific_impl_function %impl.elem0.c19, @Copy.WithSelf.Op(%Copy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1054,7 +1147,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.47a] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.516] +// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.6bc] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.4ac] // CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U.67d)] // CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] @@ -1076,7 +1169,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %T.ref.loc9_28: %Ptr.type = name_ref T, %T.loc9_6.2 [symbolic = %T.loc9_6.1 (constants.%T.ffa)] // CHECK:STDOUT: %T.as_type.loc9_29: type = facet_access_type %T.ref.loc9_28 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.3dc)] // CHECK:STDOUT: %.loc9_29.3: type = converted %T.ref.loc9_28, %T.as_type.loc9_29 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.3dc)] -// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.516] +// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.6bc] // CHECK:STDOUT: %impl.elem0.loc9: type = impl_witness_access constants.%Ptr.impl_witness.373, element0 [symbolic = %ptr (constants.%ptr.a86)] // CHECK:STDOUT: %.loc9_29.4: Core.Form = init_form %impl.elem0.loc9, call_param1 [symbolic = %.loc9_29.2 (constants.%.63b)] // CHECK:STDOUT: %.loc9_10: type = splice_block %Ptr.ref [concrete = constants.%Ptr.type] { @@ -1098,8 +1191,11 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Ptr { // CHECK:STDOUT: %Self: %Ptr.type = symbolic_binding Self, 0 [symbolic = constants.%Self.0e0] +// CHECK:STDOUT: interface_with_self_decl @Ptr [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %Type: type = assoc_const_decl @Type [concrete] { -// CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete = constants.%assoc0.516] +// CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete = constants.%assoc0.6bc] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -1110,10 +1206,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @Type(@Ptr.%Self: %Ptr.type) { -// CHECK:STDOUT: assoc_const Type:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic impl @U.as.Ptr.impl(%U.loc7_20.1: type) { // CHECK:STDOUT: %U.loc7_20.2: type = symbolic_binding U, 0 [symbolic = %U.loc7_20.2 (constants.%U.67d)] // CHECK:STDOUT: %ptr.loc7_54.2: type = ptr_type %U.loc7_20.2 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] @@ -1149,26 +1241,31 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.loc10_10.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic = %.loc10_10.1 (constants.%.54b)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.3c7)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc10_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_10.2 (constants.%.4b6)] -// CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.2 (%.4b6) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.8b5)] -// CHECK:STDOUT: %specific_impl_fn.loc10_10.2: = specific_impl_function %impl.elem0.loc10_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.4b3)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.207)] +// CHECK:STDOUT: %.loc10_10.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc10_10.2 (constants.%.382)] +// CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.2 (%.382) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.c19)] +// CHECK:STDOUT: %specific_impl_fn.loc10_10.2: = specific_impl_function %impl.elem0.loc10_10.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.25f)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: ref @F.%T.binding.as_type (%T.binding.as_type.3dc)) -> out %return.param: @F.%ptr (%ptr.a86) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: ref @F.%T.binding.as_type (%T.binding.as_type.3dc) = name_ref t, %t // CHECK:STDOUT: %addr: @F.%ptr (%ptr.a86) = addr_of %t.ref -// CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.2 (%.4b6) = impl_witness_access constants.%Copy.lookup_impl_witness.3c7, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.8b5)] +// CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.2 (%.382) = impl_witness_access constants.%Copy.lookup_impl_witness.3c7, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.c19)] // CHECK:STDOUT: %bound_method.loc10_10.1: = bound_method %addr, %impl.elem0.loc10_10.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_10.1: = specific_impl_function %impl.elem0.loc10_10.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.4b3)] +// CHECK:STDOUT: %specific_impl_fn.loc10_10.1: = specific_impl_function %impl.elem0.loc10_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.25f)] // CHECK:STDOUT: %bound_method.loc10_10.2: = bound_method %addr, %specific_impl_fn.loc10_10.1 -// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr (%ptr.a86) = call %bound_method.loc10_10.2(%addr) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr (%ptr.a86) = call %bound_method.loc10_10.2(%addr) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Self.0e0) {} +// CHECK:STDOUT: specific @Ptr(constants.%Self.0e0) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%.Self.47a) {} +// CHECK:STDOUT: specific @Ptr(constants.%.Self.47a) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%U.67d) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%U.67d @@ -1177,6 +1274,14 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.117 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Ptr(constants.%Ptr.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Ptr(constants.%T.ffa) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%T.binding.as_type.3dc) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%T.binding.as_type.3dc // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.a86 @@ -1187,8 +1292,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete => constants.%require_complete.2f9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%T.ffa) {} -// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.ffa) { // CHECK:STDOUT: %T.loc9_6.1 => constants.%T.ffa // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type.3dc @@ -1206,7 +1309,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr.type: type = facet_type <@Ptr> [concrete] // CHECK:STDOUT: %Self.0e0: %Ptr.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Ptr.assoc_type: type = assoc_entity_type @Ptr [concrete] -// CHECK:STDOUT: %assoc0.516: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete] +// CHECK:STDOUT: %assoc0.6bc: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic] @@ -1219,6 +1322,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr_where.type.396: type = facet_type <@Ptr where %impl.elem0.4ac = %ptr.e8f8f9.1> [symbolic] // CHECK:STDOUT: %Ptr.impl_witness.117: = impl_witness @U.as.Ptr.impl.%Ptr.impl_witness_table, @U.as.Ptr.impl(%U.67d) [symbolic] // CHECK:STDOUT: %require_complete.73a: = require_complete_type %Ptr_where.type.396 [symbolic] +// CHECK:STDOUT: %Ptr.facet: %Ptr.type = facet_value %U.67d, (%Ptr.impl_witness.117) [symbolic] // CHECK:STDOUT: %T.ffa: %Ptr.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.6d2: type = pattern_type %Ptr.type [concrete] // CHECK:STDOUT: %T.binding.as_type.3dc: type = symbolic_binding_type T, 0, %T.ffa [symbolic] @@ -1235,13 +1339,13 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete.552: = require_complete_type %T.binding.as_type.3dc [symbolic] // CHECK:STDOUT: %require_complete.c1c: = require_complete_type %ptr.a86 [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %.54b: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type.3dc) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.3c7: = lookup_impl_witness %ptr.a86, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.a86, (%Copy.lookup_impl_witness.3c7) [symbolic] -// CHECK:STDOUT: %.4b6: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.8b5: %.4b6 = impl_witness_access %Copy.lookup_impl_witness.3c7, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.4b3: = specific_impl_function %impl.elem0.8b5, @Copy.Op(%Copy.facet) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.207: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic] +// CHECK:STDOUT: %.382: type = fn_type_with_self_type %Copy.WithSelf.Op.type.207, %Copy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.c19: %.382 = impl_witness_access %Copy.lookup_impl_witness.3c7, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.25f: = specific_impl_function %impl.elem0.c19, @Copy.WithSelf.Op(%Copy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1270,7 +1374,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.Self.ref: %Ptr.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.47a] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc7_45: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.516] +// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.6bc] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%Ptr.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0.4ac] // CHECK:STDOUT: %U.ref.loc7_53: type = name_ref U, %U.loc7_20.1 [symbolic = %U.loc7_20.2 (constants.%U.67d)] // CHECK:STDOUT: %ptr.loc7_54.1: type = ptr_type %U.ref.loc7_53 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] @@ -1291,7 +1395,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref.loc9_28: %Ptr.type = name_ref T, %T.loc9_6.2 [symbolic = %T.loc9_6.1 (constants.%T.ffa)] // CHECK:STDOUT: %Ptr.ref.loc9_31: type = name_ref Ptr, file.%Ptr.decl [concrete = constants.%Ptr.type] -// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.516] +// CHECK:STDOUT: %Type.ref: %Ptr.assoc_type = name_ref Type, @Type.%assoc0 [concrete = constants.%assoc0.6bc] // CHECK:STDOUT: %impl.elem0.loc9: type = impl_witness_access constants.%Ptr.impl_witness.373, element0 [symbolic = %ptr (constants.%ptr.a86)] // CHECK:STDOUT: %.loc9_29.3: Core.Form = init_form %impl.elem0.loc9, call_param1 [symbolic = %.loc9_29.2 (constants.%.63b)] // CHECK:STDOUT: %.loc9_10: type = splice_block %Ptr.ref.loc9_10 [concrete = constants.%Ptr.type] { @@ -1313,8 +1417,11 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Ptr { // CHECK:STDOUT: %Self: %Ptr.type = symbolic_binding Self, 0 [symbolic = constants.%Self.0e0] +// CHECK:STDOUT: interface_with_self_decl @Ptr [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %Type: type = assoc_const_decl @Type [concrete] { -// CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete = constants.%assoc0.516] +// CHECK:STDOUT: %assoc0: %Ptr.assoc_type = assoc_entity element0, @Ptr.%Type [concrete = constants.%assoc0.6bc] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -1325,10 +1432,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @Type(@Ptr.%Self: %Ptr.type) { -// CHECK:STDOUT: assoc_const Type:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic impl @U.as.Ptr.impl(%U.loc7_20.1: type) { // CHECK:STDOUT: %U.loc7_20.2: type = symbolic_binding U, 0 [symbolic = %U.loc7_20.2 (constants.%U.67d)] // CHECK:STDOUT: %ptr.loc7_54.2: type = ptr_type %U.loc7_20.2 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)] @@ -1364,26 +1467,31 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %.loc10_10.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic = %.loc10_10.1 (constants.%.54b)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.3c7)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc10_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_10.2 (constants.%.4b6)] -// CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.2 (%.4b6) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.8b5)] -// CHECK:STDOUT: %specific_impl_fn.loc10_10.2: = specific_impl_function %impl.elem0.loc10_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.4b3)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.207)] +// CHECK:STDOUT: %.loc10_10.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc10_10.2 (constants.%.382)] +// CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.2 (%.382) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.c19)] +// CHECK:STDOUT: %specific_impl_fn.loc10_10.2: = specific_impl_function %impl.elem0.loc10_10.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.25f)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: ref @F.%T.binding.as_type (%T.binding.as_type.3dc)) -> out %return.param: @F.%ptr (%ptr.a86) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: ref @F.%T.binding.as_type (%T.binding.as_type.3dc) = name_ref t, %t // CHECK:STDOUT: %addr: @F.%ptr (%ptr.a86) = addr_of %t.ref -// CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.2 (%.4b6) = impl_witness_access constants.%Copy.lookup_impl_witness.3c7, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.8b5)] +// CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.2 (%.382) = impl_witness_access constants.%Copy.lookup_impl_witness.3c7, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.c19)] // CHECK:STDOUT: %bound_method.loc10_10.1: = bound_method %addr, %impl.elem0.loc10_10.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_10.1: = specific_impl_function %impl.elem0.loc10_10.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.4b3)] +// CHECK:STDOUT: %specific_impl_fn.loc10_10.1: = specific_impl_function %impl.elem0.loc10_10.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.25f)] // CHECK:STDOUT: %bound_method.loc10_10.2: = bound_method %addr, %specific_impl_fn.loc10_10.1 -// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr (%ptr.a86) = call %bound_method.loc10_10.2(%addr) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @F.%ptr (%ptr.a86) = call %bound_method.loc10_10.2(%addr) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%Self.0e0) {} +// CHECK:STDOUT: specific @Ptr(constants.%Self.0e0) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%.Self.47a) {} +// CHECK:STDOUT: specific @Ptr(constants.%.Self.47a) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%U.67d) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%U.67d @@ -1392,6 +1500,10 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %Ptr.impl_witness.loc7_56.2 => constants.%Ptr.impl_witness.117 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Ptr(constants.%Ptr.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @U.as.Ptr.impl(constants.%T.binding.as_type.3dc) { // CHECK:STDOUT: %U.loc7_20.2 => constants.%T.binding.as_type.3dc // CHECK:STDOUT: %ptr.loc7_54.2 => constants.%ptr.a86 @@ -1402,7 +1514,9 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: %require_complete => constants.%require_complete.2f9 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Type(constants.%T.ffa) {} +// CHECK:STDOUT: specific @Ptr(constants.%T.ffa) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.ffa) { // CHECK:STDOUT: %T.loc9_6.1 => constants.%T.ffa diff --git a/toolchain/check/testdata/impl/lookup/specific_args.carbon b/toolchain/check/testdata/impl/lookup/specific_args.carbon index 2743cff7242f..d9acd94efb9f 100644 --- a/toolchain/check/testdata/impl/lookup/specific_args.carbon +++ b/toolchain/check/testdata/impl/lookup/specific_args.carbon @@ -68,10 +68,10 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Self: %I.type.1ab = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic] // CHECK:STDOUT: %pattern_type.a8a: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F, @I(%T) [symbolic] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%T, %Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F: %I.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [symbolic] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete] // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete] // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic] @@ -105,34 +105,33 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %T.loc4_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_13.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc4_13.1)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Self.loc4_23.2: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F, @I(%T.loc4_13.1) [symbolic = %I.F.type (constants.%I.F.type)] -// CHECK:STDOUT: %I.F: @I.%I.F.type (%I.F.type) = struct_value () [symbolic = %I.F (constants.%I.F)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc4_13.1) [symbolic = %I.assoc_type (constants.%I.assoc_type)] -// CHECK:STDOUT: %assoc0.loc4_43.2: @I.%I.assoc_type (%I.assoc_type) = assoc_entity element0, %I.F.decl [symbolic = %assoc0.loc4_43.2 (constants.%assoc0)] +// CHECK:STDOUT: %I.type.loc4_23: type = facet_type <@I, @I(%T.loc4_13.1)> [symbolic = %I.type.loc4_23 (constants.%I.type.1ab)] +// CHECK:STDOUT: %Self.loc4_23.2: @I.%I.type.loc4_23 (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_23.1: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)] -// CHECK:STDOUT: %I.F.decl: @I.%I.F.type (%I.F.type) = fn_decl @I.F [symbolic = @I.%I.F (constants.%I.F)] { -// CHECK:STDOUT: %self.patt: @I.F.%pattern_type (%pattern_type.a8a) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type (%pattern_type.a8a) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4_23.1: @I.%I.type.loc4_23 (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type.a8a) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.a8a) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc4_36.1: type = splice_block %.loc4_36.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %.loc4_36.2: @I.F.%I.type (%I.type.1ab) = specific_constant @I.%Self.loc4_23.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @I.F.%I.type (%I.type.1ab) = name_ref Self, %.loc4_36.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc4_36.2: @I.WithSelf.F.%I.type (%I.type.1ab) = specific_constant @I.%Self.loc4_23.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @I.WithSelf.F.%I.type (%I.type.1ab) = name_ref Self, %.loc4_36.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc4_36.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc4_43.1: @I.%I.assoc_type (%I.assoc_type) = assoc_entity element0, %I.F.decl [symbolic = %assoc0.loc4_43.2 (constants.%assoc0)] +// CHECK:STDOUT: %assoc0.loc4_43.1: @I.%I.assoc_type (%I.assoc_type) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc4_43.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_23.1 // CHECK:STDOUT: .F = %assoc0.loc4_43.1 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -160,21 +159,23 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: .Self = constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%T.loc4_13.2: type, @I.%Self.loc4_23.1: @I.%I.type (%I.type.1ab)) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc4_13.2: type, @I.%Self.loc4_23.1: @I.%I.type.loc4_23 (%I.type.1ab)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Self: @I.F.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self: @I.WithSelf.F.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.a8a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T) { // CHECK:STDOUT: %T.loc4_13.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%T, constants.%Self) { +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%T, constants.%Self) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.1ab // CHECK:STDOUT: %Self => constants.%Self @@ -198,23 +199,23 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self.c1b: %I.type.1ab = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %I.assoc_type.76c: type = assoc_entity_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %assoc0.837: %I.assoc_type.76c = assoc_entity element0, imports.%Main.import_ref.bc9 [symbolic] -// CHECK:STDOUT: %I.F.type.937: type = fn_type @I.F, @I(%T) [symbolic] -// CHECK:STDOUT: %I.F.a37: %I.F.type.937 = struct_value () [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.efc: type = fn_type @I.WithSelf.F, @I(%T, %Self.c1b) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.213: %I.WithSelf.F.type.efc = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.c1b [symbolic] // CHECK:STDOUT: %pattern_type.f2c: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %I.type.39c: type = facet_type <@I, @I(%InInterfaceArgs)> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @X.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Self.ccd: %I.type.39c = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %I.F.type.606: type = fn_type @I.F, @I(%InInterfaceArgs) [concrete] -// CHECK:STDOUT: %I.F.e0c: %I.F.type.606 = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.8da: type = fn_type @I.WithSelf.F, @I(%InInterfaceArgs, %Self.c1b) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.1cf: %I.WithSelf.F.type.8da = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type.6ad: type = assoc_entity_type @I, @I(%InInterfaceArgs) [concrete] -// CHECK:STDOUT: %assoc0.9fe: %I.assoc_type.6ad = assoc_entity element0, imports.%Main.import_ref.bc9 [concrete] +// CHECK:STDOUT: %assoc0.c3e: %I.assoc_type.6ad = assoc_entity element0, imports.%Main.import_ref.a9d [concrete] // CHECK:STDOUT: %pattern_type.05f: type = pattern_type %X [concrete] // CHECK:STDOUT: %X.as.I.impl.F.type: type = fn_type @X.as.I.impl.F [concrete] // CHECK:STDOUT: %X.as.I.impl.F: %X.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type.39c = facet_value %X, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.705: type = fn_type @I.WithSelf.F, @I(%InInterfaceArgs, %I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.f79: %I.WithSelf.F.type.705 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -223,13 +224,13 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.X: type = import_ref Main//types, X, loaded [concrete = constants.%X] // CHECK:STDOUT: %Main.import_ref.8f2: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.8d2 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded +// CHECK:STDOUT: %Main.import_ref.108 = import_ref Main//types, loc4_43, unloaded +// CHECK:STDOUT: %Main.F: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.efc) = import_ref Main//types, F, loaded [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.213)] +// CHECK:STDOUT: %Main.import_ref.a9d = import_ref Main//types, loc4_43, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.45ead6.2: @I.%I.type.1 (%I.type.1ab) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self.1 (constants.%Self.c1b)] // CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//types, loc4_23, unloaded -// CHECK:STDOUT: %Main.import_ref.17a = import_ref Main//types, loc4_43, unloaded -// CHECK:STDOUT: %Main.F: @I.%I.F.type (%I.F.type.937) = import_ref Main//types, F, loaded [symbolic = @I.%I.F (constants.%I.F.a37)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.bc9 = import_ref Main//types, loc4_43, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.45e: @I.%I.type (%I.type.1ab) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self (constants.%Self.c1b)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -249,21 +250,17 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.1: type) [from "types.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.3: type) [from "types.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Self: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F, @I(%T) [symbolic = %I.F.type (constants.%I.F.type.937)] -// CHECK:STDOUT: %I.F: @I.%I.F.type (%I.F.type.937) = struct_value () [symbolic = %I.F (constants.%I.F.a37)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T) [symbolic = %I.assoc_type (constants.%I.assoc_type.76c)] -// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, imports.%Main.import_ref.bc9 [symbolic = %assoc0 (constants.%assoc0.837)] +// CHECK:STDOUT: %I.type.1: type = facet_type <@I, @I(%T.1)> [symbolic = %I.type.1 (constants.%I.type.1ab)] +// CHECK:STDOUT: %Self.1: @I.%I.type.1 (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.c1b)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.3fa -// CHECK:STDOUT: .F = imports.%Main.import_ref.17a +// CHECK:STDOUT: .F = imports.%Main.import_ref.108 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -302,10 +299,10 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: .Self = imports.%Main.import_ref.8d2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.45e: @I.%I.type (%I.type.1ab)) [from "types.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.F(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.45ead6.2: @I.%I.type.1 (%I.type.1ab)) [from "types.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Self: @I.F.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)] +// CHECK:STDOUT: %Self: @I.WithSelf.F.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.f2c)] // CHECK:STDOUT: @@ -318,10 +315,12 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%T, constants.%Self.c1b) { +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.c1b) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%T, constants.%Self.c1b) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.1ab // CHECK:STDOUT: %Self => constants.%Self.c1b @@ -330,18 +329,36 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%InInterfaceArgs) { -// CHECK:STDOUT: %T => constants.%InInterfaceArgs +// CHECK:STDOUT: %T.1 => constants.%InInterfaceArgs // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type => constants.%I.type.39c -// CHECK:STDOUT: %Self => constants.%Self.ccd -// CHECK:STDOUT: %I.F.type => constants.%I.F.type.606 -// CHECK:STDOUT: %I.F => constants.%I.F.e0c -// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.6ad -// CHECK:STDOUT: %assoc0 => constants.%assoc0.9fe +// CHECK:STDOUT: %I.type.1 => constants.%I.type.39c +// CHECK:STDOUT: %Self.1 => constants.%Self.ccd // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%InInterfaceArgs, constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%InInterfaceArgs, constants.%Self.c1b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%InInterfaceArgs +// CHECK:STDOUT: %I.type.2 => constants.%I.type.39c +// CHECK:STDOUT: %Self.2 => constants.%Self.c1b +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.8da +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.1cf +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.6ad +// CHECK:STDOUT: %assoc0 => constants.%assoc0.c3e +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%InInterfaceArgs, constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%InInterfaceArgs +// CHECK:STDOUT: %I.type.2 => constants.%I.type.39c +// CHECK:STDOUT: %Self.2 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.705 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.f79 +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.6ad +// CHECK:STDOUT: %assoc0 => constants.%assoc0.c3e +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%InInterfaceArgs, constants.%I.facet) { // CHECK:STDOUT: %T => constants.%InInterfaceArgs // CHECK:STDOUT: %I.type => constants.%I.type.39c // CHECK:STDOUT: %Self => constants.%I.facet @@ -365,22 +382,23 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self.c1b: %I.type.1ab = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %I.assoc_type.76c: type = assoc_entity_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %assoc0.a3b: %I.assoc_type.76c = assoc_entity element0, imports.%Main.import_ref.f64 [symbolic] -// CHECK:STDOUT: %I.F.type.937: type = fn_type @I.F, @I(%T) [symbolic] -// CHECK:STDOUT: %I.F.a37: %I.F.type.937 = struct_value () [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.efc: type = fn_type @I.WithSelf.F, @I(%T, %Self.c1b) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.213: %I.WithSelf.F.type.efc = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.c1b [symbolic] // CHECK:STDOUT: %pattern_type.f2c: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %InInterfaceArgs: type = class_type @InInterfaceArgs [concrete] // CHECK:STDOUT: %I.type.39c: type = facet_type <@I, @I(%InInterfaceArgs)> [concrete] // CHECK:STDOUT: %Self.ccd: %I.type.39c = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %I.F.type.606: type = fn_type @I.F, @I(%InInterfaceArgs) [concrete] -// CHECK:STDOUT: %I.F.e0c: %I.F.type.606 = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.8da: type = fn_type @I.WithSelf.F, @I(%InInterfaceArgs, %Self.c1b) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.1cf: %I.WithSelf.F.type.8da = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type.6ad: type = assoc_entity_type @I, @I(%InInterfaceArgs) [concrete] -// CHECK:STDOUT: %assoc0.b9c: %I.assoc_type.6ad = assoc_entity element0, imports.%Main.import_ref.f64 [concrete] -// CHECK:STDOUT: %assoc0.837: %I.assoc_type.76c = assoc_entity element0, imports.%Main.import_ref.bc9 [symbolic] +// CHECK:STDOUT: %assoc0.8de: %I.assoc_type.6ad = assoc_entity element0, imports.%Main.import_ref.e65 [concrete] +// CHECK:STDOUT: %assoc0.d22: %I.assoc_type.76c = assoc_entity element0, imports.%Main.import_ref.a9d [symbolic] // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type.39c = facet_value %X, (%I.impl_witness) [concrete] -// CHECK:STDOUT: %.4ae: type = fn_type_with_self_type %I.F.type.606, %I.facet [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.25e: type = fn_type @I.WithSelf.F, @I(%InInterfaceArgs, %I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.511: %I.WithSelf.F.type.25e = struct_value () [concrete] +// CHECK:STDOUT: %.9ab: type = fn_type_with_self_type %I.WithSelf.F.type.25e, %I.facet [concrete] // CHECK:STDOUT: %X.as.I.impl.F.type: type = fn_type @X.as.I.impl.F [concrete] // CHECK:STDOUT: %X.as.I.impl.F: %X.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -392,16 +410,16 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.InInterfaceArgs: type = import_ref Main//impl_in_interface_args, InInterfaceArgs, loaded [concrete = constants.%InInterfaceArgs] // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.8d2 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//types, loc4_23, unloaded -// CHECK:STDOUT: %Main.import_ref.d71: @I.%I.assoc_type (%I.assoc_type.76c) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%assoc0 (constants.%assoc0.837)] +// CHECK:STDOUT: %Main.import_ref.480: @I.%I.assoc_type (%I.assoc_type.76c) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%assoc0 (constants.%assoc0.d22)] // CHECK:STDOUT: %Main.F = import_ref Main//types, F, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.f64: @I.%I.F.type (%I.F.type.937) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%I.F (constants.%I.F.a37)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.45e: @I.%I.type (%I.type.1ab) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self (constants.%Self.c1b)] +// CHECK:STDOUT: %Main.import_ref.e65: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.efc) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.213)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.45ead6.2: @I.%I.type.1 (%I.type.1ab) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self.1 (constants.%Self.c1b)] +// CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//types, loc4_23, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T.1 (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//impl_in_interface_args, loc5_24, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.ec3 = import_ref Main//impl_in_interface_args, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.bc9 = import_ref Main//types, loc4_43, unloaded +// CHECK:STDOUT: %Main.import_ref.a9d = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: %Main.import_ref.d1b: = import_ref Main//impl_in_interface_args, loc7_30, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.044: type = import_ref Main//impl_in_interface_args, loc7_6, loaded [concrete = constants.%X] // CHECK:STDOUT: %Main.import_ref.acb: type = import_ref Main//impl_in_interface_args, loc7_28, loaded [concrete = constants.%I.type.39c] @@ -428,21 +446,17 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.1: type) [from "types.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.3: type) [from "types.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Self: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F, @I(%T) [symbolic = %I.F.type (constants.%I.F.type.937)] -// CHECK:STDOUT: %I.F: @I.%I.F.type (%I.F.type.937) = struct_value () [symbolic = %I.F (constants.%I.F.a37)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T) [symbolic = %I.assoc_type (constants.%I.assoc_type.76c)] -// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, imports.%Main.import_ref.f64 [symbolic = %assoc0 (constants.%assoc0.a3b)] +// CHECK:STDOUT: %I.type.1: type = facet_type <@I, @I(%T.1)> [symbolic = %I.type.1 (constants.%I.type.1ab)] +// CHECK:STDOUT: %Self.1: @I.%I.type.1 (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.c1b)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.3fa -// CHECK:STDOUT: .F = imports.%Main.import_ref.d71 +// CHECK:STDOUT: .F = imports.%Main.import_ref.480 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -474,18 +488,18 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, imports.%Main.I [concrete = constants.%I.generic] // CHECK:STDOUT: %InInterfaceArgs.ref: type = name_ref InInterfaceArgs, imports.%Main.InInterfaceArgs [concrete = constants.%InInterfaceArgs] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%InInterfaceArgs)> [concrete = constants.%I.type.39c] -// CHECK:STDOUT: %.loc6: %I.assoc_type.6ad = specific_constant imports.%Main.import_ref.d71, @I(constants.%InInterfaceArgs) [concrete = constants.%assoc0.b9c] -// CHECK:STDOUT: %F.ref: %I.assoc_type.6ad = name_ref F, %.loc6 [concrete = constants.%assoc0.b9c] -// CHECK:STDOUT: %impl.elem0: %.4ae = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%X.as.I.impl.F] +// CHECK:STDOUT: %.loc6: %I.assoc_type.6ad = specific_constant imports.%Main.import_ref.480, @I(constants.%InInterfaceArgs, constants.%Self.c1b) [concrete = constants.%assoc0.8de] +// CHECK:STDOUT: %F.ref: %I.assoc_type.6ad = name_ref F, %.loc6 [concrete = constants.%assoc0.8de] +// CHECK:STDOUT: %impl.elem0: %.9ab = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%X.as.I.impl.F] // CHECK:STDOUT: %bound_method: = bound_method %x.ref, %impl.elem0 // CHECK:STDOUT: %X.as.I.impl.F.call: init %empty_tuple.type = call %bound_method(%x.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.45e: @I.%I.type (%I.type.1ab)) [from "types.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.F(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.45ead6.2: @I.%I.type.1 (%I.type.1ab)) [from "types.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Self: @I.F.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)] +// CHECK:STDOUT: %Self: @I.WithSelf.F.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.f2c)] // CHECK:STDOUT: @@ -495,10 +509,12 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: fn @X.as.I.impl.F [from "impl_in_interface_args.carbon"]; // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%T, constants.%Self.c1b) { +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.c1b) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%T, constants.%Self.c1b) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.1ab // CHECK:STDOUT: %Self => constants.%Self.c1b @@ -507,15 +523,33 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%InInterfaceArgs) { -// CHECK:STDOUT: %T => constants.%InInterfaceArgs +// CHECK:STDOUT: %T.1 => constants.%InInterfaceArgs // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type => constants.%I.type.39c -// CHECK:STDOUT: %Self => constants.%Self.ccd -// CHECK:STDOUT: %I.F.type => constants.%I.F.type.606 -// CHECK:STDOUT: %I.F => constants.%I.F.e0c +// CHECK:STDOUT: %I.type.1 => constants.%I.type.39c +// CHECK:STDOUT: %Self.1 => constants.%Self.ccd +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%InInterfaceArgs, constants.%Self.c1b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%InInterfaceArgs +// CHECK:STDOUT: %I.type.2 => constants.%I.type.39c +// CHECK:STDOUT: %Self.2 => constants.%Self.c1b +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.8da +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.1cf // CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.6ad -// CHECK:STDOUT: %assoc0 => constants.%assoc0.b9c +// CHECK:STDOUT: %assoc0 => constants.%assoc0.8de +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%InInterfaceArgs, constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%InInterfaceArgs +// CHECK:STDOUT: %I.type.2 => constants.%I.type.39c +// CHECK:STDOUT: %Self.2 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.25e +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.511 +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.6ad +// CHECK:STDOUT: %assoc0 => constants.%assoc0.8de // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- impl_in_class_args.carbon @@ -532,24 +566,24 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %I.generic: %I.type.609 = struct_value () [concrete] // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self.c1b: %I.type.1ab = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %I.assoc_type.76c: type = assoc_entity_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %assoc0.837: %I.assoc_type.76c = assoc_entity element0, imports.%Main.import_ref.bc9 [symbolic] -// CHECK:STDOUT: %I.F.type.937: type = fn_type @I.F, @I(%T) [symbolic] -// CHECK:STDOUT: %I.F.a37: %I.F.type.937 = struct_value () [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.efc: type = fn_type @I.WithSelf.F, @I(%T, %Self.c1b) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.213: %I.WithSelf.F.type.efc = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.c1b [symbolic] // CHECK:STDOUT: %pattern_type.f2c: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %I.type.03e: type = facet_type <@I, @I(%X)> [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %Self.9c0: %I.type.03e = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %I.F.type.cf1: type = fn_type @I.F, @I(%X) [concrete] -// CHECK:STDOUT: %I.F.28b: %I.F.type.cf1 = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.bfe: type = fn_type @I.WithSelf.F, @I(%X, %Self.c1b) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.0d9: %I.WithSelf.F.type.bfe = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type.46b: type = assoc_entity_type @I, @I(%X) [concrete] -// CHECK:STDOUT: %assoc0.425: %I.assoc_type.46b = assoc_entity element0, imports.%Main.import_ref.bc9 [concrete] +// CHECK:STDOUT: %assoc0.e51: %I.assoc_type.46b = assoc_entity element0, imports.%Main.import_ref.a9d [concrete] // CHECK:STDOUT: %pattern_type.65d: type = pattern_type %C.83f [concrete] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type.03e = facet_value %C.83f, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.0fc: type = fn_type @I.WithSelf.F, @I(%X, %I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.b98: %I.WithSelf.F.type.0fc = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -559,13 +593,13 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.import_ref.8f24d3.1: = import_ref Main//types, loc5_20, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.820 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//types, loc5_9, loaded [symbolic = @C.%T (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.108 = import_ref Main//types, loc4_43, unloaded +// CHECK:STDOUT: %Main.F: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.efc) = import_ref Main//types, F, loaded [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.213)] +// CHECK:STDOUT: %Main.import_ref.a9d = import_ref Main//types, loc4_43, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.45ead6.2: @I.%I.type.1 (%I.type.1ab) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self.1 (constants.%Self.c1b)] // CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//types, loc4_23, unloaded -// CHECK:STDOUT: %Main.import_ref.17a = import_ref Main//types, loc4_43, unloaded -// CHECK:STDOUT: %Main.F: @I.%I.F.type (%I.F.type.937) = import_ref Main//types, F, loaded [symbolic = @I.%I.F (constants.%I.F.a37)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.bc9 = import_ref Main//types, loc4_43, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.45e: @I.%I.type (%I.type.1ab) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self (constants.%Self.c1b)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T.1 (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.8d2 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded // CHECK:STDOUT: } @@ -589,21 +623,17 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.2: type) [from "types.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.4: type) [from "types.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Self: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F, @I(%T) [symbolic = %I.F.type (constants.%I.F.type.937)] -// CHECK:STDOUT: %I.F: @I.%I.F.type (%I.F.type.937) = struct_value () [symbolic = %I.F (constants.%I.F.a37)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T) [symbolic = %I.assoc_type (constants.%I.assoc_type.76c)] -// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, imports.%Main.import_ref.bc9 [symbolic = %assoc0 (constants.%assoc0.837)] +// CHECK:STDOUT: %I.type.1: type = facet_type <@I, @I(%T.1)> [symbolic = %I.type.1 (constants.%I.type.1ab)] +// CHECK:STDOUT: %Self.1: @I.%I.type.1 (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.c1b)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.3fa -// CHECK:STDOUT: .F = imports.%Main.import_ref.17a +// CHECK:STDOUT: .F = imports.%Main.import_ref.108 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -655,10 +685,10 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: .Self = imports.%Main.import_ref.8d2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.b3bc94.3: type, imports.%Main.import_ref.45e: @I.%I.type (%I.type.1ab)) [from "types.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.F(imports.%Main.import_ref.b3bc94.3: type, imports.%Main.import_ref.45ead6.2: @I.%I.type.1 (%I.type.1ab)) [from "types.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Self: @I.F.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)] +// CHECK:STDOUT: %Self: @I.WithSelf.F.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.f2c)] // CHECK:STDOUT: @@ -681,10 +711,12 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%T, constants.%Self.c1b) { +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.c1b) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%T, constants.%Self.c1b) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.1ab // CHECK:STDOUT: %Self => constants.%Self.c1b @@ -693,18 +725,36 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%X) { -// CHECK:STDOUT: %T => constants.%X +// CHECK:STDOUT: %T.1 => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type => constants.%I.type.03e -// CHECK:STDOUT: %Self => constants.%Self.9c0 -// CHECK:STDOUT: %I.F.type => constants.%I.F.type.cf1 -// CHECK:STDOUT: %I.F => constants.%I.F.28b -// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.46b -// CHECK:STDOUT: %assoc0 => constants.%assoc0.425 +// CHECK:STDOUT: %I.type.1 => constants.%I.type.03e +// CHECK:STDOUT: %Self.1 => constants.%Self.9c0 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%X, constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%X, constants.%Self.c1b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%X +// CHECK:STDOUT: %I.type.2 => constants.%I.type.03e +// CHECK:STDOUT: %Self.2 => constants.%Self.c1b +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.bfe +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.0d9 +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.46b +// CHECK:STDOUT: %assoc0 => constants.%assoc0.e51 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%X, constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%X +// CHECK:STDOUT: %I.type.2 => constants.%I.type.03e +// CHECK:STDOUT: %Self.2 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.0fc +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.b98 +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.46b +// CHECK:STDOUT: %assoc0 => constants.%assoc0.e51 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%X, constants.%I.facet) { // CHECK:STDOUT: %T => constants.%X // CHECK:STDOUT: %I.type => constants.%I.type.03e // CHECK:STDOUT: %Self => constants.%I.facet @@ -731,22 +781,23 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self.c1b: %I.type.1ab = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %I.assoc_type.76c: type = assoc_entity_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %assoc0.a3b: %I.assoc_type.76c = assoc_entity element0, imports.%Main.import_ref.f64 [symbolic] -// CHECK:STDOUT: %I.F.type.937: type = fn_type @I.F, @I(%T) [symbolic] -// CHECK:STDOUT: %I.F.a37: %I.F.type.937 = struct_value () [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.efc: type = fn_type @I.WithSelf.F, @I(%T, %Self.c1b) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.213: %I.WithSelf.F.type.efc = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.c1b [symbolic] // CHECK:STDOUT: %pattern_type.f2c: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %I.type.03e: type = facet_type <@I, @I(%X)> [concrete] // CHECK:STDOUT: %Self.9c0: %I.type.03e = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %I.F.type.cf1: type = fn_type @I.F, @I(%X) [concrete] -// CHECK:STDOUT: %I.F.28b: %I.F.type.cf1 = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.bfe: type = fn_type @I.WithSelf.F, @I(%X, %Self.c1b) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.0d9: %I.WithSelf.F.type.bfe = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type.46b: type = assoc_entity_type @I, @I(%X) [concrete] -// CHECK:STDOUT: %assoc0.b42: %I.assoc_type.46b = assoc_entity element0, imports.%Main.import_ref.f64 [concrete] -// CHECK:STDOUT: %assoc0.837: %I.assoc_type.76c = assoc_entity element0, imports.%Main.import_ref.bc9 [symbolic] +// CHECK:STDOUT: %assoc0.683: %I.assoc_type.46b = assoc_entity element0, imports.%Main.import_ref.e65 [concrete] +// CHECK:STDOUT: %assoc0.d22: %I.assoc_type.76c = assoc_entity element0, imports.%Main.import_ref.a9d [symbolic] // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type.03e = facet_value %C.83f, (%I.impl_witness) [concrete] -// CHECK:STDOUT: %.0a8: type = fn_type_with_self_type %I.F.type.cf1, %I.facet [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.2d3: type = fn_type @I.WithSelf.F, @I(%X, %I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.841: %I.WithSelf.F.type.2d3 = struct_value () [concrete] +// CHECK:STDOUT: %.ac4: type = fn_type_with_self_type %I.WithSelf.F.type.2d3, %I.facet [concrete] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: } @@ -761,16 +812,16 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//types, loc5_9, loaded [symbolic = @C.%T (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f24d3.2: = import_ref Main//impl_in_class_args, loc5_20, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.9b7 = import_ref Main//impl_in_class_args, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//types, loc4_23, unloaded -// CHECK:STDOUT: %Main.import_ref.d71: @I.%I.assoc_type (%I.assoc_type.76c) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%assoc0 (constants.%assoc0.837)] +// CHECK:STDOUT: %Main.import_ref.480: @I.%I.assoc_type (%I.assoc_type.76c) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%assoc0 (constants.%assoc0.d22)] // CHECK:STDOUT: %Main.F = import_ref Main//types, F, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.f64: @I.%I.F.type (%I.F.type.937) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%I.F (constants.%I.F.a37)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.45e: @I.%I.type (%I.type.1ab) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self (constants.%Self.c1b)] +// CHECK:STDOUT: %Main.import_ref.e65: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.efc) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.213)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.45ead6.2: @I.%I.type.1 (%I.type.1ab) = import_ref Main//types, loc4_23, loaded [symbolic = @I.%Self.1 (constants.%Self.c1b)] +// CHECK:STDOUT: %Main.import_ref.3fa = import_ref Main//types, loc4_23, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T.1 (constants.%T)] // CHECK:STDOUT: %Main.import_ref.8f24d3.3: = import_ref Main//types, loc7_10, loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.8d2 = import_ref Main//types, inst{{[0-9A-F]+}} [no loc], unloaded -// CHECK:STDOUT: %Main.import_ref.bc9 = import_ref Main//types, loc4_43, unloaded +// CHECK:STDOUT: %Main.import_ref.a9d = import_ref Main//types, loc4_43, unloaded // CHECK:STDOUT: %Main.import_ref.5ca: = import_ref Main//impl_in_class_args, loc7_29, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.7f4: type = import_ref Main//impl_in_class_args, loc7_19, loaded [concrete = constants.%C.83f] // CHECK:STDOUT: %Main.import_ref.15e: type = import_ref Main//impl_in_class_args, loc7_27, loaded [concrete = constants.%I.type.03e] @@ -801,21 +852,17 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.2: type) [from "types.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @I(imports.%Main.import_ref.b3bc94.4: type) [from "types.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Self: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F, @I(%T) [symbolic = %I.F.type (constants.%I.F.type.937)] -// CHECK:STDOUT: %I.F: @I.%I.F.type (%I.F.type.937) = struct_value () [symbolic = %I.F (constants.%I.F.a37)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T) [symbolic = %I.assoc_type (constants.%I.assoc_type.76c)] -// CHECK:STDOUT: %assoc0: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, imports.%Main.import_ref.f64 [symbolic = %assoc0 (constants.%assoc0.a3b)] +// CHECK:STDOUT: %I.type.1: type = facet_type <@I, @I(%T.1)> [symbolic = %I.type.1 (constants.%I.type.1ab)] +// CHECK:STDOUT: %Self.1: @I.%I.type.1 (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.c1b)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.3fa -// CHECK:STDOUT: .F = imports.%Main.import_ref.d71 +// CHECK:STDOUT: .F = imports.%Main.import_ref.480 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -860,18 +907,18 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, imports.%Main.I [concrete = constants.%I.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, imports.%Main.X [concrete = constants.%X] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%X)> [concrete = constants.%I.type.03e] -// CHECK:STDOUT: %.loc6_34: %I.assoc_type.46b = specific_constant imports.%Main.import_ref.d71, @I(constants.%X) [concrete = constants.%assoc0.b42] -// CHECK:STDOUT: %F.ref: %I.assoc_type.46b = name_ref F, %.loc6_34 [concrete = constants.%assoc0.b42] -// CHECK:STDOUT: %impl.elem0: %.0a8 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F] +// CHECK:STDOUT: %.loc6_34: %I.assoc_type.46b = specific_constant imports.%Main.import_ref.480, @I(constants.%X, constants.%Self.c1b) [concrete = constants.%assoc0.683] +// CHECK:STDOUT: %F.ref: %I.assoc_type.46b = name_ref F, %.loc6_34 [concrete = constants.%assoc0.683] +// CHECK:STDOUT: %impl.elem0: %.ac4 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %C.as.I.impl.F.call: init %empty_tuple.type = call %bound_method(%c.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.b3bc94.3: type, imports.%Main.import_ref.45e: @I.%I.type (%I.type.1ab)) [from "types.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.F(imports.%Main.import_ref.b3bc94.3: type, imports.%Main.import_ref.45ead6.2: @I.%I.type.1 (%I.type.1ab)) [from "types.carbon"] { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Self: @I.F.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)] +// CHECK:STDOUT: %Self: @I.WithSelf.F.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1b)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.f2c)] // CHECK:STDOUT: @@ -891,10 +938,12 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%T, constants.%Self.c1b) { +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.c1b) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%T, constants.%Self.c1b) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.1ab // CHECK:STDOUT: %Self => constants.%Self.c1b @@ -903,14 +952,32 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%X) { -// CHECK:STDOUT: %T => constants.%X +// CHECK:STDOUT: %T.1 => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type => constants.%I.type.03e -// CHECK:STDOUT: %Self => constants.%Self.9c0 -// CHECK:STDOUT: %I.F.type => constants.%I.F.type.cf1 -// CHECK:STDOUT: %I.F => constants.%I.F.28b +// CHECK:STDOUT: %I.type.1 => constants.%I.type.03e +// CHECK:STDOUT: %Self.1 => constants.%Self.9c0 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%X, constants.%Self.c1b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%X +// CHECK:STDOUT: %I.type.2 => constants.%I.type.03e +// CHECK:STDOUT: %Self.2 => constants.%Self.c1b +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.bfe +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.0d9 // CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.46b -// CHECK:STDOUT: %assoc0 => constants.%assoc0.b42 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.683 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%X, constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%X +// CHECK:STDOUT: %I.type.2 => constants.%I.type.03e +// CHECK:STDOUT: %Self.2 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.2d3 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.841 +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.46b +// CHECK:STDOUT: %assoc0 => constants.%assoc0.683 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/transitive.carbon b/toolchain/check/testdata/impl/lookup/transitive.carbon index b55c43aebbc2..bd41a493bb05 100644 --- a/toolchain/check/testdata/impl/lookup/transitive.carbon +++ b/toolchain/check/testdata/impl/lookup/transitive.carbon @@ -54,10 +54,10 @@ fn Call() { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F: %I.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,38 +77,43 @@ fn Call() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { -// CHECK:STDOUT: %self.patt: @I.F.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4_13: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc4_26.1: type = splice_block %.loc4_26.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self.loc4_13 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc4_26.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4_13 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc4_13: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) { +// CHECK:STDOUT: specific @I(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type @@ -122,15 +127,17 @@ fn Call() { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.a1f: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.cc3: %I.WithSelf.F.type.a1f = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.422: type = pattern_type %Self.binding.as_type [symbolic] +// CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.31f: type = fn_type @I.WithSelf.F, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.564: %I.WithSelf.F.type.31f = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -139,10 +146,10 @@ fn Call() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } +// CHECK:STDOUT: %Main.import_ref.7f4 = import_ref Main//i, loc4_33, unloaded +// CHECK:STDOUT: %Main.F: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.a1f) = import_ref Main//i, F, loaded [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.cc3)] +// CHECK:STDOUT: %Main.import_ref.2362f8.2: %I.type = import_ref Main//i, loc4_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//i, loc4_13, unloaded -// CHECK:STDOUT: %Main.import_ref.ef2 = import_ref Main//i, loc4_33, unloaded -// CHECK:STDOUT: %Main.F: %I.F.type = import_ref Main//i, F, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//i, loc4_13, loaded [symbolic = constants.%Self] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -163,7 +170,7 @@ fn Call() { // CHECK:STDOUT: interface @I [from "i.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .F = imports.%Main.import_ref.ef2 +// CHECK:STDOUT: .F = imports.%Main.import_ref.7f4 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -194,7 +201,7 @@ fn Call() { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.236: %I.type) [from "i.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.F(imports.%Main.import_ref.2362f8.2: %I.type) [from "i.carbon"] { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.422)] @@ -207,13 +214,27 @@ fn Call() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) { +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.a1f +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.cc3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.422 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.31f +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.564 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet) { // CHECK:STDOUT: %Self => constants.%I.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7c7 @@ -282,15 +303,17 @@ fn Call() { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.651: %I.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.a72: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.b58 [concrete] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.a1f: type = fn_type @I.WithSelf.F, @I(%Self.651) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.cc3: %I.WithSelf.F.type.a1f = struct_value () [symbolic] // CHECK:STDOUT: %Self.binding.as_type.3af: type = symbolic_binding_type Self, 0, %Self.651 [symbolic] // CHECK:STDOUT: %pattern_type.422: type = pattern_type %Self.binding.as_type.3af [symbolic] +// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] +// CHECK:STDOUT: %assoc0.a42: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.972 [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] -// CHECK:STDOUT: %.d13: type = fn_type_with_self_type %I.F.type, %I.facet [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.442: type = fn_type @I.WithSelf.F, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.26e: %I.WithSelf.F.type.442 = struct_value () [concrete] +// CHECK:STDOUT: %.c4c: type = fn_type_with_self_type %I.WithSelf.F.type.442, %I.facet [concrete] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] @@ -308,11 +331,11 @@ fn Call() { // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.8db: = import_ref Main//get, inst{{[0-9A-F]+}} [indirect], loaded [concrete = constants.%complete_type] // CHECK:STDOUT: %Main.import_ref.a60 = import_ref Main//get, inst{{[0-9A-F]+}} [indirect], unloaded -// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//i, loc4_13, unloaded -// CHECK:STDOUT: %Main.import_ref.ce7: %I.assoc_type = import_ref Main//i, loc4_33, loaded [concrete = constants.%assoc0.a72] +// CHECK:STDOUT: %Main.import_ref.a54: %I.assoc_type = import_ref Main//i, loc4_33, loaded [concrete = constants.%assoc0.a42] // CHECK:STDOUT: %Main.F = import_ref Main//i, F, unloaded -// CHECK:STDOUT: %Main.import_ref.b58: %I.F.type = import_ref Main//i, loc4_33, loaded [concrete = constants.%I.F] -// CHECK:STDOUT: %Main.import_ref.236: %I.type = import_ref Main//i, loc4_13, loaded [symbolic = constants.%Self.651] +// CHECK:STDOUT: %Main.import_ref.2362f8.2: %I.type = import_ref Main//i, loc4_13, loaded [symbolic = constants.%Self.651] +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//i, loc4_13, unloaded +// CHECK:STDOUT: %Main.import_ref.972: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.a1f) = import_ref Main//i, loc4_33, loaded [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.cc3)] // CHECK:STDOUT: %Main.import_ref.31c: = import_ref Main//c, loc7_13, loaded [concrete = constants.%I.impl_witness] // CHECK:STDOUT: %Main.import_ref.61c: type = import_ref Main//c, loc7_6, loaded [concrete = constants.%C] // CHECK:STDOUT: %Main.import_ref.91f: type = import_ref Main//c, loc7_11, loaded [concrete = constants.%I.type] @@ -336,7 +359,7 @@ fn Call() { // CHECK:STDOUT: interface @I [from "i.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 -// CHECK:STDOUT: .F = imports.%Main.import_ref.ce7 +// CHECK:STDOUT: .F = imports.%Main.import_ref.a54 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -360,8 +383,8 @@ fn Call() { // CHECK:STDOUT: %.loc9_7.1: ref %C = temporary_storage // CHECK:STDOUT: %Get.call: init %C to %.loc9_7.1 = call %Get.ref() // CHECK:STDOUT: %I.ref: type = name_ref I, imports.%Main.I [concrete = constants.%I.type] -// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%Main.import_ref.ce7 [concrete = constants.%assoc0.a72] -// CHECK:STDOUT: %impl.elem0: %.d13 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F] +// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, imports.%Main.import_ref.a54 [concrete = constants.%assoc0.a42] +// CHECK:STDOUT: %impl.elem0: %.c4c = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F] // CHECK:STDOUT: %bound_method: = bound_method %Get.call, %impl.elem0 // CHECK:STDOUT: %.loc9_7.2: ref %C = temporary %.loc9_7.1, %Get.call // CHECK:STDOUT: %.loc9_7.3: %C = acquire_value %.loc9_7.2 @@ -373,7 +396,7 @@ fn Call() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Get [from "get.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(imports.%Main.import_ref.236: %I.type) [from "i.carbon"] { +// CHECK:STDOUT: generic fn @I.WithSelf.F(imports.%Main.import_ref.2362f8.2: %I.type) [from "i.carbon"] { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.651)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.3af)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.422)] @@ -385,9 +408,23 @@ fn Call() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.651) { +// CHECK:STDOUT: specific @I(constants.%Self.651) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.651 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.a1f +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.cc3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.651) { // CHECK:STDOUT: %Self => constants.%Self.651 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.3af // CHECK:STDOUT: %pattern_type => constants.%pattern_type.422 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.442 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.26e +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/multiple_extend.carbon b/toolchain/check/testdata/impl/multiple_extend.carbon index beea39d46d63..8c2a0f040f43 100644 --- a/toolchain/check/testdata/impl/multiple_extend.carbon +++ b/toolchain/check/testdata/impl/multiple_extend.carbon @@ -169,33 +169,43 @@ fn P(o: O) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete] // CHECK:STDOUT: %Self.f09: %HasF.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.adc: type = fn_type @HasF.WithSelf.F, @HasF(%Self.f09) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.faa: %HasF.WithSelf.F.type.adc = struct_value () [symbolic] // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete] -// CHECK:STDOUT: %assoc0.55d: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete] +// CHECK:STDOUT: %assoc0.a7f: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.WithSelf.F.decl [concrete] // CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [concrete] // CHECK:STDOUT: %Self.5aa: %HasG.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasG.G.type: type = fn_type @HasG.G [concrete] -// CHECK:STDOUT: %HasG.G: %HasG.G.type = struct_value () [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.type.979: type = fn_type @HasG.WithSelf.G, @HasG(%Self.5aa) [symbolic] +// CHECK:STDOUT: %HasG.WithSelf.G.ed6: %HasG.WithSelf.G.type.979 = struct_value () [symbolic] // CHECK:STDOUT: %HasG.assoc_type: type = assoc_entity_type @HasG [concrete] -// CHECK:STDOUT: %assoc0.949: %HasG.assoc_type = assoc_entity element0, @HasG.%HasG.G.decl [concrete] +// CHECK:STDOUT: %assoc0.035: %HasG.assoc_type = assoc_entity element0, @HasG.%HasG.WithSelf.G.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %HasF.impl_witness: = impl_witness @C.as.HasF.impl.%HasF.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.HasF.impl.F.type: type = fn_type @C.as.HasF.impl.F [concrete] // CHECK:STDOUT: %C.as.HasF.impl.F: %C.as.HasF.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%HasF.impl_witness) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.eea: type = fn_type @HasF.WithSelf.F, @HasF(%HasF.facet) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.fb3: %HasF.WithSelf.F.type.eea = struct_value () [concrete] // CHECK:STDOUT: %HasG.impl_witness: = impl_witness @C.as.HasG.impl.%HasG.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.HasG.impl.G.type: type = fn_type @C.as.HasG.impl.G [concrete] // CHECK:STDOUT: %C.as.HasG.impl.G: %C.as.HasG.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: %HasG.facet: %HasG.type = facet_value %C, (%HasG.impl_witness) [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.type.6cb: type = fn_type @HasG.WithSelf.G, @HasG(%HasG.facet) [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.32e: %HasG.WithSelf.G.type.6cb = 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: %pattern_type: type = pattern_type %C [concrete] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] -// CHECK:STDOUT: %.18d: type = fn_type_with_self_type %HasF.F.type, %HasF.facet [concrete] -// CHECK:STDOUT: %.8c6: type = fn_type_with_self_type %HasG.G.type, %HasG.facet [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %C.type.facet: %type = facet_value %C, () [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.type.b80: type = fn_type @HasG.WithSelf.G, @HasG(%C.type.facet) [concrete] +// CHECK:STDOUT: %HasG.WithSelf.G.11f: %HasG.WithSelf.G.type.b80 = struct_value () [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.type.5ef: type = fn_type @HasF.WithSelf.F, @HasF(%C.type.facet) [concrete] +// CHECK:STDOUT: %HasF.WithSelf.F.d3b: %HasF.WithSelf.F.type.5ef = struct_value () [concrete] +// CHECK:STDOUT: %.acd: type = fn_type_with_self_type %HasF.WithSelf.F.type.eea, %HasF.facet [concrete] +// CHECK:STDOUT: %.892: type = fn_type_with_self_type %HasG.WithSelf.G.type.6cb, %HasG.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -219,30 +229,36 @@ fn P(o: O) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { -// CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self.f09] -// CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] {} {} -// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0.55d] +// CHECK:STDOUT: %Self.loc4: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self.f09] +// CHECK:STDOUT: interface_with_self_decl @HasF [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasF.WithSelf.F.decl: @HasF.%HasF.WithSelf.F.type (%HasF.WithSelf.F.type.adc) = fn_decl @HasF.WithSelf.F [symbolic = @HasF.%HasF.WithSelf.F (constants.%HasF.WithSelf.F.faa)] {} {} +// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.WithSelf.F.decl [concrete = constants.%assoc0.a7f] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: .HasG = // CHECK:STDOUT: .G = -// CHECK:STDOUT: witness = (%HasF.F.decl) +// CHECK:STDOUT: witness = (%HasF.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasG { -// CHECK:STDOUT: %Self: %HasG.type = symbolic_binding Self, 0 [symbolic = constants.%Self.5aa] -// CHECK:STDOUT: %HasG.G.decl: %HasG.G.type = fn_decl @HasG.G [concrete = constants.%HasG.G] {} {} -// CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, %HasG.G.decl [concrete = constants.%assoc0.949] +// CHECK:STDOUT: %Self.loc8: %HasG.type = symbolic_binding Self, 0 [symbolic = constants.%Self.5aa] +// CHECK:STDOUT: interface_with_self_decl @HasG [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasG.WithSelf.G.decl: @HasG.%HasG.WithSelf.G.type (%HasG.WithSelf.G.type.979) = fn_decl @HasG.WithSelf.G [symbolic = @HasG.%HasG.WithSelf.G (constants.%HasG.WithSelf.G.ed6)] {} {} +// CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, %HasG.WithSelf.G.decl [concrete = constants.%assoc0.035] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc8 // CHECK:STDOUT: .G = %assoc0 // CHECK:STDOUT: .F = -// CHECK:STDOUT: witness = (%HasG.G.decl) +// CHECK:STDOUT: witness = (%HasG.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -289,11 +305,11 @@ fn P(o: O) { // CHECK:STDOUT: extend @C.as.HasG.impl.%HasG.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) { +// CHECK:STDOUT: generic fn @HasF.WithSelf.F(@HasF.%Self.loc4: %HasF.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasG.G(@HasG.%Self: %HasG.type) { +// CHECK:STDOUT: generic fn @HasG.WithSelf.G(@HasG.%Self.loc8: %HasG.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -310,61 +326,113 @@ fn P(o: O) { // CHECK:STDOUT: fn @H(%c.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %F.ref.loc22: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0.55d] -// CHECK:STDOUT: %impl.elem0.loc22: %.18d = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] +// CHECK:STDOUT: %F.ref.loc22: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0.a7f] +// CHECK:STDOUT: %impl.elem0.loc22: %.acd = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] // CHECK:STDOUT: %C.as.HasF.impl.F.call.loc22: init %empty_tuple.type = call %impl.elem0.loc22() // CHECK:STDOUT: %c.ref.loc23: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref.loc23: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0.55d] -// CHECK:STDOUT: %impl.elem0.loc23: %.18d = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] +// CHECK:STDOUT: %F.ref.loc23: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0.a7f] +// CHECK:STDOUT: %impl.elem0.loc23: %.acd = impl_witness_access constants.%HasF.impl_witness, element0 [concrete = constants.%C.as.HasF.impl.F] // CHECK:STDOUT: %C.as.HasF.impl.F.call.loc23: init %empty_tuple.type = call %impl.elem0.loc23() // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [concrete = constants.%C] -// CHECK:STDOUT: %G.ref.loc24: %HasG.assoc_type = name_ref G, @HasG.%assoc0 [concrete = constants.%assoc0.949] -// CHECK:STDOUT: %impl.elem0.loc24: %.8c6 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%C.as.HasG.impl.G] +// CHECK:STDOUT: %G.ref.loc24: %HasG.assoc_type = name_ref G, @HasG.%assoc0 [concrete = constants.%assoc0.035] +// CHECK:STDOUT: %impl.elem0.loc24: %.892 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%C.as.HasG.impl.G] // CHECK:STDOUT: %C.as.HasG.impl.G.call.loc24: init %empty_tuple.type = call %impl.elem0.loc24() // CHECK:STDOUT: %c.ref.loc25: %C = name_ref c, %c -// CHECK:STDOUT: %G.ref.loc25: %HasG.assoc_type = name_ref G, @HasG.%assoc0 [concrete = constants.%assoc0.949] -// CHECK:STDOUT: %impl.elem0.loc25: %.8c6 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%C.as.HasG.impl.G] +// CHECK:STDOUT: %G.ref.loc25: %HasG.assoc_type = name_ref G, @HasG.%assoc0 [concrete = constants.%assoc0.035] +// CHECK:STDOUT: %impl.elem0.loc25: %.892 = impl_witness_access constants.%HasG.impl_witness, element0 [concrete = constants.%C.as.HasG.impl.G] // CHECK:STDOUT: %C.as.HasG.impl.G.call.loc25: init %empty_tuple.type = call %impl.elem0.loc25() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%Self.f09) {} +// CHECK:STDOUT: specific @HasF(constants.%Self.f09) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self.f09 +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.adc +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.faa +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasG.G(constants.%Self.5aa) {} +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%Self.f09) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet) {} +// CHECK:STDOUT: specific @HasG(constants.%Self.5aa) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%Self.5aa +// CHECK:STDOUT: %HasG.WithSelf.G.type => constants.%HasG.WithSelf.G.type.979 +// CHECK:STDOUT: %HasG.WithSelf.G => constants.%HasG.WithSelf.G.ed6 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasG.G(constants.%HasG.facet) {} +// CHECK:STDOUT: specific @HasG.WithSelf.G(constants.%Self.5aa) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%HasF.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%HasF.facet +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.eea +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.fb3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF.WithSelf.F(constants.%HasF.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasG(constants.%HasG.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%HasG.facet +// CHECK:STDOUT: %HasG.WithSelf.G.type => constants.%HasG.WithSelf.G.type.6cb +// CHECK:STDOUT: %HasG.WithSelf.G => constants.%HasG.WithSelf.G.32e +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasG.WithSelf.G(constants.%HasG.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasG(constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%C.type.facet +// CHECK:STDOUT: %HasG.WithSelf.G.type => constants.%HasG.WithSelf.G.type.b80 +// CHECK:STDOUT: %HasG.WithSelf.G => constants.%HasG.WithSelf.G.11f +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasF(constants.%C.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%C.type.facet +// CHECK:STDOUT: %HasF.WithSelf.F.type => constants.%HasF.WithSelf.F.type.5ef +// CHECK:STDOUT: %HasF.WithSelf.F => constants.%HasF.WithSelf.F.d3b +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_ambiguous_impls.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %HasA1.type: type = facet_type <@HasA1> [concrete] // CHECK:STDOUT: %Self.5fb: %HasA1.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasA1.A.type: type = fn_type @HasA1.A [concrete] -// CHECK:STDOUT: %HasA1.A: %HasA1.A.type = struct_value () [concrete] +// CHECK:STDOUT: %HasA1.WithSelf.A.type.bc6: type = fn_type @HasA1.WithSelf.A, @HasA1(%Self.5fb) [symbolic] +// CHECK:STDOUT: %HasA1.WithSelf.A.972: %HasA1.WithSelf.A.type.bc6 = struct_value () [symbolic] // CHECK:STDOUT: %HasA1.assoc_type: type = assoc_entity_type @HasA1 [concrete] -// CHECK:STDOUT: %assoc0.94a: %HasA1.assoc_type = assoc_entity element0, @HasA1.%HasA1.A.decl [concrete] +// CHECK:STDOUT: %assoc0.5de: %HasA1.assoc_type = assoc_entity element0, @HasA1.%HasA1.WithSelf.A.decl [concrete] // CHECK:STDOUT: %HasA2.type: type = facet_type <@HasA2> [concrete] // CHECK:STDOUT: %Self.dd3: %HasA2.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasA2.A.type: type = fn_type @HasA2.A [concrete] -// CHECK:STDOUT: %HasA2.A: %HasA2.A.type = struct_value () [concrete] +// CHECK:STDOUT: %HasA2.WithSelf.A.type.b2b: type = fn_type @HasA2.WithSelf.A, @HasA2(%Self.dd3) [symbolic] +// CHECK:STDOUT: %HasA2.WithSelf.A.39a: %HasA2.WithSelf.A.type.b2b = struct_value () [symbolic] // CHECK:STDOUT: %HasA2.assoc_type: type = assoc_entity_type @HasA2 [concrete] -// CHECK:STDOUT: %assoc0.2a1: %HasA2.assoc_type = assoc_entity element0, @HasA2.%HasA2.A.decl [concrete] +// CHECK:STDOUT: %assoc0.e6e: %HasA2.assoc_type = assoc_entity element0, @HasA2.%HasA2.WithSelf.A.decl [concrete] // CHECK:STDOUT: %D: type = class_type @D [concrete] // CHECK:STDOUT: %HasA1.impl_witness: = impl_witness @D.as.HasA1.impl.%HasA1.impl_witness_table [concrete] // CHECK:STDOUT: %D.as.HasA1.impl.A.type: type = fn_type @D.as.HasA1.impl.A [concrete] // CHECK:STDOUT: %D.as.HasA1.impl.A: %D.as.HasA1.impl.A.type = struct_value () [concrete] // CHECK:STDOUT: %HasA1.facet: %HasA1.type = facet_value %D, (%HasA1.impl_witness) [concrete] +// CHECK:STDOUT: %HasA1.WithSelf.A.type.bad: type = fn_type @HasA1.WithSelf.A, @HasA1(%HasA1.facet) [concrete] +// CHECK:STDOUT: %HasA1.WithSelf.A.4c9: %HasA1.WithSelf.A.type.bad = struct_value () [concrete] // CHECK:STDOUT: %HasA2.impl_witness: = impl_witness @D.as.HasA2.impl.%HasA2.impl_witness_table [concrete] // CHECK:STDOUT: %D.as.HasA2.impl.A.type: type = fn_type @D.as.HasA2.impl.A [concrete] // CHECK:STDOUT: %D.as.HasA2.impl.A: %D.as.HasA2.impl.A.type = struct_value () [concrete] // CHECK:STDOUT: %HasA2.facet: %HasA2.type = facet_value %D, (%HasA2.impl_witness) [concrete] +// CHECK:STDOUT: %HasA2.WithSelf.A.type.1d3: type = fn_type @HasA2.WithSelf.A, @HasA2(%HasA2.facet) [concrete] +// CHECK:STDOUT: %HasA2.WithSelf.A.c84: %HasA2.WithSelf.A.type.1d3 = 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: %pattern_type: type = pattern_type %D [concrete] // CHECK:STDOUT: %B.type: type = fn_type @B [concrete] // CHECK:STDOUT: %B: %B.type = struct_value () [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %D.type.facet: %type = facet_value %D, () [concrete] +// CHECK:STDOUT: %HasA2.WithSelf.A.type.435: type = fn_type @HasA2.WithSelf.A, @HasA2(%D.type.facet) [concrete] +// CHECK:STDOUT: %HasA2.WithSelf.A.6fa: %HasA2.WithSelf.A.type.435 = struct_value () [concrete] +// CHECK:STDOUT: %HasA1.WithSelf.A.type.299: type = fn_type @HasA1.WithSelf.A, @HasA1(%D.type.facet) [concrete] +// CHECK:STDOUT: %HasA1.WithSelf.A.d53: %HasA1.WithSelf.A.type.299 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -388,28 +456,34 @@ fn P(o: O) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasA1 { -// CHECK:STDOUT: %Self: %HasA1.type = symbolic_binding Self, 0 [symbolic = constants.%Self.5fb] -// CHECK:STDOUT: %HasA1.A.decl: %HasA1.A.type = fn_decl @HasA1.A [concrete = constants.%HasA1.A] {} {} -// CHECK:STDOUT: %assoc0: %HasA1.assoc_type = assoc_entity element0, %HasA1.A.decl [concrete = constants.%assoc0.94a] +// CHECK:STDOUT: %Self.loc4: %HasA1.type = symbolic_binding Self, 0 [symbolic = constants.%Self.5fb] +// CHECK:STDOUT: interface_with_self_decl @HasA1 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasA1.WithSelf.A.decl: @HasA1.%HasA1.WithSelf.A.type (%HasA1.WithSelf.A.type.bc6) = fn_decl @HasA1.WithSelf.A [symbolic = @HasA1.%HasA1.WithSelf.A (constants.%HasA1.WithSelf.A.972)] {} {} +// CHECK:STDOUT: %assoc0: %HasA1.assoc_type = assoc_entity element0, %HasA1.WithSelf.A.decl [concrete = constants.%assoc0.5de] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .A = %assoc0 // CHECK:STDOUT: .HasA2 = -// CHECK:STDOUT: witness = (%HasA1.A.decl) +// CHECK:STDOUT: witness = (%HasA1.WithSelf.A.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasA2 { -// CHECK:STDOUT: %Self: %HasA2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dd3] -// CHECK:STDOUT: %HasA2.A.decl: %HasA2.A.type = fn_decl @HasA2.A [concrete = constants.%HasA2.A] {} {} -// CHECK:STDOUT: %assoc0: %HasA2.assoc_type = assoc_entity element0, %HasA2.A.decl [concrete = constants.%assoc0.2a1] +// CHECK:STDOUT: %Self.loc8: %HasA2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.dd3] +// CHECK:STDOUT: interface_with_self_decl @HasA2 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasA2.WithSelf.A.decl: @HasA2.%HasA2.WithSelf.A.type (%HasA2.WithSelf.A.type.b2b) = fn_decl @HasA2.WithSelf.A [symbolic = @HasA2.%HasA2.WithSelf.A (constants.%HasA2.WithSelf.A.39a)] {} {} +// CHECK:STDOUT: %assoc0: %HasA2.assoc_type = assoc_entity element0, %HasA2.WithSelf.A.decl [concrete = constants.%assoc0.e6e] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc8 // CHECK:STDOUT: .A = %assoc0 -// CHECK:STDOUT: witness = (%HasA2.A.decl) +// CHECK:STDOUT: witness = (%HasA2.WithSelf.A.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -455,11 +529,11 @@ fn P(o: O) { // CHECK:STDOUT: extend @D.as.HasA2.impl.%HasA2.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasA1.A(@HasA1.%Self: %HasA1.type) { +// CHECK:STDOUT: generic fn @HasA1.WithSelf.A(@HasA1.%Self.loc4: %HasA1.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasA2.A(@HasA2.%Self: %HasA2.type) { +// CHECK:STDOUT: generic fn @HasA2.WithSelf.A(@HasA2.%Self.loc8: %HasA2.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -482,24 +556,66 @@ fn P(o: O) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasA1.A(constants.%Self.5fb) {} +// CHECK:STDOUT: specific @HasA1(constants.%Self.5fb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self.5fb +// CHECK:STDOUT: %HasA1.WithSelf.A.type => constants.%HasA1.WithSelf.A.type.bc6 +// CHECK:STDOUT: %HasA1.WithSelf.A => constants.%HasA1.WithSelf.A.972 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasA2.A(constants.%Self.dd3) {} +// CHECK:STDOUT: specific @HasA1.WithSelf.A(constants.%Self.5fb) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasA1.A(constants.%HasA1.facet) {} +// CHECK:STDOUT: specific @HasA2(constants.%Self.dd3) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%Self.dd3 +// CHECK:STDOUT: %HasA2.WithSelf.A.type => constants.%HasA2.WithSelf.A.type.b2b +// CHECK:STDOUT: %HasA2.WithSelf.A => constants.%HasA2.WithSelf.A.39a +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasA2.A(constants.%HasA2.facet) {} +// CHECK:STDOUT: specific @HasA2.WithSelf.A(constants.%Self.dd3) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasA1(constants.%HasA1.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%HasA1.facet +// CHECK:STDOUT: %HasA1.WithSelf.A.type => constants.%HasA1.WithSelf.A.type.bad +// CHECK:STDOUT: %HasA1.WithSelf.A => constants.%HasA1.WithSelf.A.4c9 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasA1.WithSelf.A(constants.%HasA1.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasA2(constants.%HasA2.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%HasA2.facet +// CHECK:STDOUT: %HasA2.WithSelf.A.type => constants.%HasA2.WithSelf.A.type.1d3 +// CHECK:STDOUT: %HasA2.WithSelf.A => constants.%HasA2.WithSelf.A.c84 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasA2.WithSelf.A(constants.%HasA2.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasA2(constants.%D.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%D.type.facet +// CHECK:STDOUT: %HasA2.WithSelf.A.type => constants.%HasA2.WithSelf.A.type.435 +// CHECK:STDOUT: %HasA2.WithSelf.A => constants.%HasA2.WithSelf.A.6fa +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasA1(constants.%D.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%D.type.facet +// CHECK:STDOUT: %HasA1.WithSelf.A.type => constants.%HasA1.WithSelf.A.type.299 +// CHECK:STDOUT: %HasA1.WithSelf.A => constants.%HasA1.WithSelf.A.d53 +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- different_impl_and_base.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %HasI.type: type = facet_type <@HasI> [concrete] // CHECK:STDOUT: %Self: %HasI.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasI.I.type: type = fn_type @HasI.I [concrete] +// CHECK:STDOUT: %HasI.WithSelf.I.type.c0d: type = fn_type @HasI.WithSelf.I, @HasI(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %HasI.I: %HasI.I.type = struct_value () [concrete] +// CHECK:STDOUT: %HasI.WithSelf.I.4ad: %HasI.WithSelf.I.type.c0d = struct_value () [symbolic] // CHECK:STDOUT: %HasI.assoc_type: type = assoc_entity_type @HasI [concrete] -// CHECK:STDOUT: %assoc0: %HasI.assoc_type = assoc_entity element0, @HasI.%HasI.I.decl [concrete] +// CHECK:STDOUT: %assoc0: %HasI.assoc_type = assoc_entity element0, @HasI.%HasI.WithSelf.I.decl [concrete] // CHECK:STDOUT: %B: type = class_type @B [concrete] // CHECK:STDOUT: %B.J.type: type = fn_type @B.J [concrete] // CHECK:STDOUT: %B.J: %B.J.type = struct_value () [concrete] @@ -511,12 +627,18 @@ fn P(o: O) { // CHECK:STDOUT: %E.as.HasI.impl.I.type: type = fn_type @E.as.HasI.impl.I [concrete] // CHECK:STDOUT: %E.as.HasI.impl.I: %E.as.HasI.impl.I.type = struct_value () [concrete] // CHECK:STDOUT: %HasI.facet: %HasI.type = facet_value %E, (%HasI.impl_witness) [concrete] +// CHECK:STDOUT: %HasI.WithSelf.I.type.ece: type = fn_type @HasI.WithSelf.I, @HasI(%HasI.facet) [concrete] +// CHECK:STDOUT: %HasI.WithSelf.I.a85: %HasI.WithSelf.I.type.ece = struct_value () [concrete] // CHECK:STDOUT: %struct_type.base.64a: type = struct_type {.base: %B} [concrete] // CHECK:STDOUT: %complete_type.021: = complete_type_witness %struct_type.base.64a [concrete] // CHECK:STDOUT: %pattern_type: type = pattern_type %E [concrete] // CHECK:STDOUT: %H.type: type = fn_type @H [concrete] // CHECK:STDOUT: %H: %H.type = struct_value () [concrete] -// CHECK:STDOUT: %.f7a: type = fn_type_with_self_type %HasI.I.type, %HasI.facet [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %E.type.facet: %type = facet_value %E, () [concrete] +// CHECK:STDOUT: %HasI.WithSelf.I.type.ca9: type = fn_type @HasI.WithSelf.I, @HasI(%E.type.facet) [concrete] +// CHECK:STDOUT: %HasI.WithSelf.I.b25: %HasI.WithSelf.I.type.ca9 = struct_value () [concrete] +// CHECK:STDOUT: %.170: type = fn_type_with_self_type %HasI.WithSelf.I.type.ece, %HasI.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -540,15 +662,18 @@ fn P(o: O) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasI { -// CHECK:STDOUT: %Self: %HasI.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %HasI.I.decl: %HasI.I.type = fn_decl @HasI.I [concrete = constants.%HasI.I] {} {} -// CHECK:STDOUT: %assoc0: %HasI.assoc_type = assoc_entity element0, %HasI.I.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc4: %HasI.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @HasI [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasI.WithSelf.I.decl: @HasI.%HasI.WithSelf.I.type (%HasI.WithSelf.I.type.c0d) = fn_decl @HasI.WithSelf.I [symbolic = @HasI.%HasI.WithSelf.I (constants.%HasI.WithSelf.I.4ad)] {} {} +// CHECK:STDOUT: %assoc0: %HasI.assoc_type = assoc_entity element0, %HasI.WithSelf.I.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .I = %assoc0 // CHECK:STDOUT: .J = -// CHECK:STDOUT: witness = (%HasI.I.decl) +// CHECK:STDOUT: witness = (%HasI.WithSelf.I.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -596,7 +721,7 @@ fn P(o: O) { // CHECK:STDOUT: extend @E.as.HasI.impl.%HasI.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasI.I(@HasI.%Self: %HasI.type) { +// CHECK:STDOUT: generic fn @HasI.WithSelf.I(@HasI.%Self.loc4: %HasI.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -614,11 +739,11 @@ fn P(o: O) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %E.ref.loc20: type = name_ref E, file.%E.decl [concrete = constants.%E] // CHECK:STDOUT: %I.ref.loc20: %HasI.assoc_type = name_ref I, @HasI.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc20: %.f7a = impl_witness_access constants.%HasI.impl_witness, element0 [concrete = constants.%E.as.HasI.impl.I] +// CHECK:STDOUT: %impl.elem0.loc20: %.170 = impl_witness_access constants.%HasI.impl_witness, element0 [concrete = constants.%E.as.HasI.impl.I] // CHECK:STDOUT: %E.as.HasI.impl.I.call.loc20: init %empty_tuple.type = call %impl.elem0.loc20() // CHECK:STDOUT: %e.ref.loc21: %E = name_ref e, %e // CHECK:STDOUT: %I.ref.loc21: %HasI.assoc_type = name_ref I, @HasI.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc21: %.f7a = impl_witness_access constants.%HasI.impl_witness, element0 [concrete = constants.%E.as.HasI.impl.I] +// CHECK:STDOUT: %impl.elem0.loc21: %.170 = impl_witness_access constants.%HasI.impl_witness, element0 [concrete = constants.%E.as.HasI.impl.I] // CHECK:STDOUT: %E.as.HasI.impl.I.call.loc21: init %empty_tuple.type = call %impl.elem0.loc21() // CHECK:STDOUT: %E.ref.loc22: type = name_ref E, file.%E.decl [concrete = constants.%E] // CHECK:STDOUT: %J.ref.loc22: %B.J.type = name_ref J, @B.%B.J.decl [concrete = constants.%B.J] @@ -629,9 +754,30 @@ fn P(o: O) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasI.I(constants.%Self) {} +// CHECK:STDOUT: specific @HasI(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self +// CHECK:STDOUT: %HasI.WithSelf.I.type => constants.%HasI.WithSelf.I.type.c0d +// CHECK:STDOUT: %HasI.WithSelf.I => constants.%HasI.WithSelf.I.4ad +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasI.I(constants.%HasI.facet) {} +// CHECK:STDOUT: specific @HasI.WithSelf.I(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasI(constants.%HasI.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%HasI.facet +// CHECK:STDOUT: %HasI.WithSelf.I.type => constants.%HasI.WithSelf.I.type.ece +// CHECK:STDOUT: %HasI.WithSelf.I => constants.%HasI.WithSelf.I.a85 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasI.WithSelf.I(constants.%HasI.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasI(constants.%E.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%E.type.facet +// CHECK:STDOUT: %HasI.WithSelf.I.type => constants.%HasI.WithSelf.I.type.ca9 +// CHECK:STDOUT: %HasI.WithSelf.I => constants.%HasI.WithSelf.I.b25 +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_ambiguous_impl_and_base.carbon // CHECK:STDOUT: @@ -643,21 +789,27 @@ fn P(o: O) { // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %HasK.type: type = facet_type <@HasK> [concrete] // CHECK:STDOUT: %Self: %HasK.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasK.K.type: type = fn_type @HasK.K [concrete] -// CHECK:STDOUT: %HasK.K: %HasK.K.type = struct_value () [concrete] +// CHECK:STDOUT: %HasK.WithSelf.K.type.81f: type = fn_type @HasK.WithSelf.K, @HasK(%Self) [symbolic] +// CHECK:STDOUT: %HasK.WithSelf.K.fb8: %HasK.WithSelf.K.type.81f = struct_value () [symbolic] // CHECK:STDOUT: %HasK.assoc_type: type = assoc_entity_type @HasK [concrete] -// CHECK:STDOUT: %assoc0: %HasK.assoc_type = assoc_entity element0, @HasK.%HasK.K.decl [concrete] +// CHECK:STDOUT: %assoc0: %HasK.assoc_type = assoc_entity element0, @HasK.%HasK.WithSelf.K.decl [concrete] // CHECK:STDOUT: %L: type = class_type @L [concrete] // CHECK:STDOUT: %L.elem: type = unbound_element_type %L, %Base [concrete] // CHECK:STDOUT: %HasK.impl_witness: = impl_witness @L.as.HasK.impl.%HasK.impl_witness_table [concrete] // CHECK:STDOUT: %L.as.HasK.impl.K.type: type = fn_type @L.as.HasK.impl.K [concrete] // CHECK:STDOUT: %L.as.HasK.impl.K: %L.as.HasK.impl.K.type = struct_value () [concrete] // CHECK:STDOUT: %HasK.facet: %HasK.type = facet_value %L, (%HasK.impl_witness) [concrete] +// CHECK:STDOUT: %HasK.WithSelf.K.type.2e3: type = fn_type @HasK.WithSelf.K, @HasK(%HasK.facet) [concrete] +// CHECK:STDOUT: %HasK.WithSelf.K.99c: %HasK.WithSelf.K.type.2e3 = struct_value () [concrete] // CHECK:STDOUT: %struct_type.base.27a: type = struct_type {.base: %Base} [concrete] // CHECK:STDOUT: %complete_type.5a1: = complete_type_witness %struct_type.base.27a [concrete] // CHECK:STDOUT: %pattern_type: type = pattern_type %L [concrete] // CHECK:STDOUT: %M.type: type = fn_type @M [concrete] // CHECK:STDOUT: %M: %M.type = struct_value () [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] +// CHECK:STDOUT: %L.type.facet: %type = facet_value %L, () [concrete] +// CHECK:STDOUT: %HasK.WithSelf.K.type.837: type = fn_type @HasK.WithSelf.K, @HasK(%L.type.facet) [concrete] +// CHECK:STDOUT: %HasK.WithSelf.K.0b2: %HasK.WithSelf.K.type.837 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -681,14 +833,17 @@ fn P(o: O) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasK { -// CHECK:STDOUT: %Self: %HasK.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %HasK.K.decl: %HasK.K.type = fn_decl @HasK.K [concrete = constants.%HasK.K] {} {} -// CHECK:STDOUT: %assoc0: %HasK.assoc_type = assoc_entity element0, %HasK.K.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc8: %HasK.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @HasK [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasK.WithSelf.K.decl: @HasK.%HasK.WithSelf.K.type (%HasK.WithSelf.K.type.81f) = fn_decl @HasK.WithSelf.K [symbolic = @HasK.%HasK.WithSelf.K (constants.%HasK.WithSelf.K.fb8)] {} {} +// CHECK:STDOUT: %assoc0: %HasK.assoc_type = assoc_entity element0, %HasK.WithSelf.K.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc8 // CHECK:STDOUT: .K = %assoc0 -// CHECK:STDOUT: witness = (%HasK.K.decl) +// CHECK:STDOUT: witness = (%HasK.WithSelf.K.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -739,7 +894,7 @@ fn P(o: O) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasK.K(@HasK.%Self: %HasK.type) { +// CHECK:STDOUT: generic fn @HasK.WithSelf.K(@HasK.%Self.loc8: %HasK.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -757,9 +912,30 @@ fn P(o: O) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasK.K(constants.%Self) {} +// CHECK:STDOUT: specific @HasK(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%Self +// CHECK:STDOUT: %HasK.WithSelf.K.type => constants.%HasK.WithSelf.K.type.81f +// CHECK:STDOUT: %HasK.WithSelf.K => constants.%HasK.WithSelf.K.fb8 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasK.K(constants.%HasK.facet) {} +// CHECK:STDOUT: specific @HasK.WithSelf.K(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasK(constants.%HasK.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%HasK.facet +// CHECK:STDOUT: %HasK.WithSelf.K.type => constants.%HasK.WithSelf.K.type.2e3 +// CHECK:STDOUT: %HasK.WithSelf.K => constants.%HasK.WithSelf.K.99c +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasK.WithSelf.K(constants.%HasK.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasK(constants.%L.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%L.type.facet +// CHECK:STDOUT: %HasK.WithSelf.K.type => constants.%HasK.WithSelf.K.type.837 +// CHECK:STDOUT: %HasK.WithSelf.K => constants.%HasK.WithSelf.K.0b2 +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- ambiguity_hidden.carbon // CHECK:STDOUT: @@ -772,26 +948,30 @@ fn P(o: O) { // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %HasN1.type: type = facet_type <@HasN1> [concrete] // CHECK:STDOUT: %Self.874: %HasN1.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasN1.N.type: type = fn_type @HasN1.N [concrete] -// CHECK:STDOUT: %HasN1.N: %HasN1.N.type = struct_value () [concrete] +// CHECK:STDOUT: %HasN1.WithSelf.N.type.684: type = fn_type @HasN1.WithSelf.N, @HasN1(%Self.874) [symbolic] +// CHECK:STDOUT: %HasN1.WithSelf.N.b29: %HasN1.WithSelf.N.type.684 = struct_value () [symbolic] // CHECK:STDOUT: %HasN1.assoc_type: type = assoc_entity_type @HasN1 [concrete] -// CHECK:STDOUT: %assoc0.bc6: %HasN1.assoc_type = assoc_entity element0, @HasN1.%HasN1.N.decl [concrete] +// CHECK:STDOUT: %assoc0.23e: %HasN1.assoc_type = assoc_entity element0, @HasN1.%HasN1.WithSelf.N.decl [concrete] // CHECK:STDOUT: %HasN2.type: type = facet_type <@HasN2> [concrete] // CHECK:STDOUT: %Self.20b: %HasN2.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %HasN2.N.type: type = fn_type @HasN2.N [concrete] -// CHECK:STDOUT: %HasN2.N: %HasN2.N.type = struct_value () [concrete] +// CHECK:STDOUT: %HasN2.WithSelf.N.type.3c7: type = fn_type @HasN2.WithSelf.N, @HasN2(%Self.20b) [symbolic] +// CHECK:STDOUT: %HasN2.WithSelf.N.fce: %HasN2.WithSelf.N.type.3c7 = struct_value () [symbolic] // CHECK:STDOUT: %HasN2.assoc_type: type = assoc_entity_type @HasN2 [concrete] -// CHECK:STDOUT: %assoc0.b53: %HasN2.assoc_type = assoc_entity element0, @HasN2.%HasN2.N.decl [concrete] +// CHECK:STDOUT: %assoc0.4bc: %HasN2.assoc_type = assoc_entity element0, @HasN2.%HasN2.WithSelf.N.decl [concrete] // CHECK:STDOUT: %O: type = class_type @O [concrete] // CHECK:STDOUT: %O.elem: type = unbound_element_type %O, %NBase [concrete] // CHECK:STDOUT: %HasN1.impl_witness: = impl_witness @O.as.HasN1.impl.%HasN1.impl_witness_table [concrete] // CHECK:STDOUT: %O.as.HasN1.impl.N.type: type = fn_type @O.as.HasN1.impl.N [concrete] // CHECK:STDOUT: %O.as.HasN1.impl.N: %O.as.HasN1.impl.N.type = struct_value () [concrete] // CHECK:STDOUT: %HasN1.facet: %HasN1.type = facet_value %O, (%HasN1.impl_witness) [concrete] +// CHECK:STDOUT: %HasN1.WithSelf.N.type.524: type = fn_type @HasN1.WithSelf.N, @HasN1(%HasN1.facet) [concrete] +// CHECK:STDOUT: %HasN1.WithSelf.N.1bf: %HasN1.WithSelf.N.type.524 = struct_value () [concrete] // CHECK:STDOUT: %HasN2.impl_witness: = impl_witness @O.as.HasN2.impl.%HasN2.impl_witness_table [concrete] // CHECK:STDOUT: %O.as.HasN2.impl.N.type: type = fn_type @O.as.HasN2.impl.N [concrete] // CHECK:STDOUT: %O.as.HasN2.impl.N: %O.as.HasN2.impl.N.type = struct_value () [concrete] // CHECK:STDOUT: %HasN2.facet: %HasN2.type = facet_value %O, (%HasN2.impl_witness) [concrete] +// CHECK:STDOUT: %HasN2.WithSelf.N.type.4d2: type = fn_type @HasN2.WithSelf.N, @HasN2(%HasN2.facet) [concrete] +// CHECK:STDOUT: %HasN2.WithSelf.N.b8c: %HasN2.WithSelf.N.type.4d2 = struct_value () [concrete] // CHECK:STDOUT: %O.N.type: type = fn_type @O.N [concrete] // CHECK:STDOUT: %O.N: %O.N.type = struct_value () [concrete] // CHECK:STDOUT: %struct_type.base.df9: type = struct_type {.base: %NBase} [concrete] @@ -824,28 +1004,34 @@ fn P(o: O) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasN1 { -// CHECK:STDOUT: %Self: %HasN1.type = symbolic_binding Self, 0 [symbolic = constants.%Self.874] -// CHECK:STDOUT: %HasN1.N.decl: %HasN1.N.type = fn_decl @HasN1.N [concrete = constants.%HasN1.N] {} {} -// CHECK:STDOUT: %assoc0: %HasN1.assoc_type = assoc_entity element0, %HasN1.N.decl [concrete = constants.%assoc0.bc6] +// CHECK:STDOUT: %Self.loc8: %HasN1.type = symbolic_binding Self, 0 [symbolic = constants.%Self.874] +// CHECK:STDOUT: interface_with_self_decl @HasN1 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasN1.WithSelf.N.decl: @HasN1.%HasN1.WithSelf.N.type (%HasN1.WithSelf.N.type.684) = fn_decl @HasN1.WithSelf.N [symbolic = @HasN1.%HasN1.WithSelf.N (constants.%HasN1.WithSelf.N.b29)] {} {} +// CHECK:STDOUT: %assoc0: %HasN1.assoc_type = assoc_entity element0, %HasN1.WithSelf.N.decl [concrete = constants.%assoc0.23e] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc8 // CHECK:STDOUT: .N = %assoc0 // CHECK:STDOUT: .HasN2 = -// CHECK:STDOUT: witness = (%HasN1.N.decl) +// CHECK:STDOUT: witness = (%HasN1.WithSelf.N.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasN2 { -// CHECK:STDOUT: %Self: %HasN2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.20b] -// CHECK:STDOUT: %HasN2.N.decl: %HasN2.N.type = fn_decl @HasN2.N [concrete = constants.%HasN2.N] {} {} -// CHECK:STDOUT: %assoc0: %HasN2.assoc_type = assoc_entity element0, %HasN2.N.decl [concrete = constants.%assoc0.b53] +// CHECK:STDOUT: %Self.loc12: %HasN2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.20b] +// CHECK:STDOUT: interface_with_self_decl @HasN2 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %HasN2.WithSelf.N.decl: @HasN2.%HasN2.WithSelf.N.type (%HasN2.WithSelf.N.type.3c7) = fn_decl @HasN2.WithSelf.N [symbolic = @HasN2.%HasN2.WithSelf.N (constants.%HasN2.WithSelf.N.fce)] {} {} +// CHECK:STDOUT: %assoc0: %HasN2.assoc_type = assoc_entity element0, %HasN2.WithSelf.N.decl [concrete = constants.%assoc0.4bc] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc12 // CHECK:STDOUT: .N = %assoc0 -// CHECK:STDOUT: witness = (%HasN2.N.decl) +// CHECK:STDOUT: witness = (%HasN2.WithSelf.N.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -914,11 +1100,11 @@ fn P(o: O) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasN1.N(@HasN1.%Self: %HasN1.type) { +// CHECK:STDOUT: generic fn @HasN1.WithSelf.N(@HasN1.%Self.loc8: %HasN1.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @HasN2.N(@HasN2.%Self: %HasN2.type) { +// CHECK:STDOUT: generic fn @HasN2.WithSelf.N(@HasN2.%Self.loc12: %HasN2.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -945,11 +1131,39 @@ fn P(o: O) { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasN1.N(constants.%Self.874) {} +// CHECK:STDOUT: specific @HasN1(constants.%Self.874) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%Self.874 +// CHECK:STDOUT: %HasN1.WithSelf.N.type => constants.%HasN1.WithSelf.N.type.684 +// CHECK:STDOUT: %HasN1.WithSelf.N => constants.%HasN1.WithSelf.N.b29 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasN2.N(constants.%Self.20b) {} +// CHECK:STDOUT: specific @HasN1.WithSelf.N(constants.%Self.874) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasN1.N(constants.%HasN1.facet) {} +// CHECK:STDOUT: specific @HasN2(constants.%Self.20b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc13 => constants.%Self.20b +// CHECK:STDOUT: %HasN2.WithSelf.N.type => constants.%HasN2.WithSelf.N.type.3c7 +// CHECK:STDOUT: %HasN2.WithSelf.N => constants.%HasN2.WithSelf.N.fce +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @HasN2.N(constants.%HasN2.facet) {} +// CHECK:STDOUT: specific @HasN2.WithSelf.N(constants.%Self.20b) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasN1(constants.%HasN1.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%HasN1.facet +// CHECK:STDOUT: %HasN1.WithSelf.N.type => constants.%HasN1.WithSelf.N.type.524 +// CHECK:STDOUT: %HasN1.WithSelf.N => constants.%HasN1.WithSelf.N.1bf +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasN1.WithSelf.N(constants.%HasN1.facet) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasN2(constants.%HasN2.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc13 => constants.%HasN2.facet +// CHECK:STDOUT: %HasN2.WithSelf.N.type => constants.%HasN2.WithSelf.N.type.4d2 +// CHECK:STDOUT: %HasN2.WithSelf.N => constants.%HasN2.WithSelf.N.b8c +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @HasN2.WithSelf.N(constants.%HasN2.facet) {} // CHECK:STDOUT: 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 438ddc8b5f62..b563ff71ce9e 100644 --- a/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/impl/no_definition_in_impl_file.carbon @@ -127,6 +127,7 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: interface @A { // CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -137,10 +138,13 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.A.impl: %.loc10_7.2 as %A.ref; // CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_decl_in_api_definition_in_impl.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] +// CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: } @@ -187,6 +191,8 @@ impl () as D; // CHECK:STDOUT: witness = // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- use_decl_in_api.carbon // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -230,6 +236,7 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: interface @B { // CHECK:STDOUT: %Self: %B.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @B [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -240,10 +247,13 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.B.impl: %.loc10_7.2 as %B.ref; // CHECK:STDOUT: +// CHECK:STDOUT: specific @B(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- decl_only_in_api.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete] +// CHECK:STDOUT: %Self: %B.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -272,6 +282,8 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.B.impl: imports.%Main.import_ref.e5c as imports.%Main.import_ref.9f2 [from "fail_decl_only_in_api.carbon"]; // CHECK:STDOUT: +// CHECK:STDOUT: specific @B(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_decl_in_api_decl_in_impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -295,6 +307,7 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: interface @C { // CHECK:STDOUT: %Self: %C.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @C [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -305,10 +318,13 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.C.impl: %.loc10_7.2 as %C.ref; // CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_decl_in_api_decl_in_impl.impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %C.type: type = facet_type <@C> [concrete] +// CHECK:STDOUT: %Self: %C.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: } @@ -345,6 +361,8 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.C.impl.2d264c.2: %.loc8_7.2 as %C.ref; // CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- decl_only_in_impl.carbon // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -376,6 +394,7 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: interface @D { // CHECK:STDOUT: %Self: %D.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @D [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -386,3 +405,5 @@ impl () as D; // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.D.impl: %.loc10_7.2 as %D.ref; // CHECK:STDOUT: +// CHECK:STDOUT: specific @D(constants.%Self) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/redeclaration.carbon b/toolchain/check/testdata/impl/redeclaration.carbon index 9d9966d7088a..1258ef90f0bf 100644 --- a/toolchain/check/testdata/impl/redeclaration.carbon +++ b/toolchain/check/testdata/impl/redeclaration.carbon @@ -35,6 +35,7 @@ impl i32 as I {} // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] +// CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, (%I.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -69,6 +70,7 @@ impl i32 as I {} // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -99,3 +101,11 @@ impl i32 as I {} // CHECK:STDOUT: .I = // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// 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 f0067d99060b..e6748914fbd1 100644 --- a/toolchain/check/testdata/impl/self_in_class.carbon +++ b/toolchain/check/testdata/impl/self_in_class.carbon @@ -34,10 +34,10 @@ class A { // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %.0ab: Core.Form = init_form %Self.binding.as_type, call_param0 [symbolic] // CHECK:STDOUT: %pattern_type.b09: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %DefaultConstructible.Make.type: type = fn_type @DefaultConstructible.Make [concrete] -// CHECK:STDOUT: %DefaultConstructible.Make: %DefaultConstructible.Make.type = struct_value () [concrete] +// CHECK:STDOUT: %DefaultConstructible.WithSelf.Make.type.17e: type = fn_type @DefaultConstructible.WithSelf.Make, @DefaultConstructible(%Self) [symbolic] +// CHECK:STDOUT: %DefaultConstructible.WithSelf.Make.cfb: %DefaultConstructible.WithSelf.Make.type.17e = struct_value () [symbolic] // CHECK:STDOUT: %DefaultConstructible.assoc_type: type = assoc_entity_type @DefaultConstructible [concrete] -// CHECK:STDOUT: %assoc0: %DefaultConstructible.assoc_type = assoc_entity element0, @DefaultConstructible.%DefaultConstructible.Make.decl [concrete] +// CHECK:STDOUT: %assoc0: %DefaultConstructible.assoc_type = assoc_entity element0, @DefaultConstructible.%DefaultConstructible.WithSelf.Make.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -48,6 +48,8 @@ class A { // CHECK:STDOUT: %C.as.DefaultConstructible.impl.Make.type: type = fn_type @C.as.DefaultConstructible.impl.Make [concrete] // CHECK:STDOUT: %C.as.DefaultConstructible.impl.Make: %C.as.DefaultConstructible.impl.Make.type = struct_value () [concrete] // CHECK:STDOUT: %DefaultConstructible.facet: %DefaultConstructible.type = facet_value %C, (%DefaultConstructible.impl_witness) [concrete] +// CHECK:STDOUT: %DefaultConstructible.WithSelf.Make.type.0cb: type = fn_type @DefaultConstructible.WithSelf.Make, @DefaultConstructible(%DefaultConstructible.facet) [concrete] +// CHECK:STDOUT: %DefaultConstructible.WithSelf.Make.49d: %DefaultConstructible.WithSelf.Make.type.0cb = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: } @@ -64,24 +66,27 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @DefaultConstructible { -// CHECK:STDOUT: %Self: %DefaultConstructible.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %DefaultConstructible.Make.decl: %DefaultConstructible.Make.type = fn_decl @DefaultConstructible.Make [concrete = constants.%DefaultConstructible.Make] { -// CHECK:STDOUT: %return.patt: @DefaultConstructible.Make.%pattern_type (%pattern_type.b09) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @DefaultConstructible.Make.%pattern_type (%pattern_type.b09) = out_param_pattern %return.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc15: %DefaultConstructible.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @DefaultConstructible [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %DefaultConstructible.WithSelf.Make.decl: @DefaultConstructible.%DefaultConstructible.WithSelf.Make.type (%DefaultConstructible.WithSelf.Make.type.17e) = fn_decl @DefaultConstructible.WithSelf.Make [symbolic = @DefaultConstructible.%DefaultConstructible.WithSelf.Make (constants.%DefaultConstructible.WithSelf.Make.cfb)] { +// CHECK:STDOUT: %return.patt: @DefaultConstructible.WithSelf.Make.%pattern_type (%pattern_type.b09) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @DefaultConstructible.WithSelf.Make.%pattern_type (%pattern_type.b09) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %DefaultConstructible.type = name_ref Self, @DefaultConstructible.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %DefaultConstructible.type = name_ref Self, @DefaultConstructible.%Self.loc15 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc16_16.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc16_16.3: Core.Form = init_form %.loc16_16.2, call_param0 [symbolic = %.loc16_16.1 (constants.%.0ab)] -// CHECK:STDOUT: %return.param: ref @DefaultConstructible.Make.%Self.binding.as_type (%Self.binding.as_type) = out_param call_param0 -// CHECK:STDOUT: %return: ref @DefaultConstructible.Make.%Self.binding.as_type (%Self.binding.as_type) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @DefaultConstructible.WithSelf.Make.%Self.binding.as_type (%Self.binding.as_type) = out_param call_param0 +// CHECK:STDOUT: %return: ref @DefaultConstructible.WithSelf.Make.%Self.binding.as_type (%Self.binding.as_type) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %DefaultConstructible.assoc_type = assoc_entity element0, %DefaultConstructible.Make.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %DefaultConstructible.assoc_type = assoc_entity element0, %DefaultConstructible.WithSelf.Make.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .Make = %assoc0 -// CHECK:STDOUT: witness = (%DefaultConstructible.Make.decl) +// CHECK:STDOUT: witness = (%DefaultConstructible.WithSelf.Make.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -126,13 +131,13 @@ class A { // CHECK:STDOUT: .DefaultConstructible = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @DefaultConstructible.Make(@DefaultConstructible.%Self: %DefaultConstructible.type) { +// CHECK:STDOUT: generic fn @DefaultConstructible.WithSelf.Make(@DefaultConstructible.%Self.loc15: %DefaultConstructible.type) { // CHECK:STDOUT: %Self: %DefaultConstructible.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc16_16.1: Core.Form = init_form %Self.binding.as_type, call_param0 [symbolic = %.loc16_16.1 (constants.%.0ab)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.b09)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @DefaultConstructible.Make.%Self.binding.as_type (%Self.binding.as_type); +// CHECK:STDOUT: fn() -> out %return.param: @DefaultConstructible.WithSelf.Make.%Self.binding.as_type (%Self.binding.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.DefaultConstructible.impl.Make() -> out %return.param: %C { @@ -143,14 +148,28 @@ class A { // CHECK:STDOUT: return %.loc25_34 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DefaultConstructible.Make(constants.%Self) { +// CHECK:STDOUT: specific @DefaultConstructible(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Self +// CHECK:STDOUT: %DefaultConstructible.WithSelf.Make.type => constants.%DefaultConstructible.WithSelf.Make.type.17e +// CHECK:STDOUT: %DefaultConstructible.WithSelf.Make => constants.%DefaultConstructible.WithSelf.Make.cfb +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @DefaultConstructible.WithSelf.Make(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %.loc16_16.1 => constants.%.0ab // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b09 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @DefaultConstructible.Make(constants.%DefaultConstructible.facet) { +// CHECK:STDOUT: specific @DefaultConstructible(constants.%DefaultConstructible.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%DefaultConstructible.facet +// CHECK:STDOUT: %DefaultConstructible.WithSelf.Make.type => constants.%DefaultConstructible.WithSelf.Make.type.0cb +// CHECK:STDOUT: %DefaultConstructible.WithSelf.Make => constants.%DefaultConstructible.WithSelf.Make.49d +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @DefaultConstructible.WithSelf.Make(constants.%DefaultConstructible.facet) { // CHECK:STDOUT: %Self => constants.%DefaultConstructible.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %.loc16_16.1 => constants.%.768 diff --git a/toolchain/check/testdata/impl/self_in_signature.carbon b/toolchain/check/testdata/impl/self_in_signature.carbon index 605803dde97a..0ad0ed490f8e 100644 --- a/toolchain/check/testdata/impl/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/self_in_signature.carbon @@ -48,11 +48,11 @@ impl D as SelfNested { // CHECK:STDOUT: %Self.binding.as_type.e3d: type = symbolic_binding_type Self, 0, %Self.f7b [symbolic] // CHECK:STDOUT: %pattern_type.431: type = pattern_type %Self.binding.as_type.e3d [symbolic] // CHECK:STDOUT: %.7fd: Core.Form = init_form %Self.binding.as_type.e3d, call_param2 [symbolic] -// CHECK:STDOUT: %UseSelf.F.type: type = fn_type @UseSelf.F [concrete] +// CHECK:STDOUT: %UseSelf.WithSelf.F.type.ad8: type = fn_type @UseSelf.WithSelf.F, @UseSelf(%Self.f7b) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %UseSelf.F: %UseSelf.F.type = struct_value () [concrete] +// CHECK:STDOUT: %UseSelf.WithSelf.F.de0: %UseSelf.WithSelf.F.type.ad8 = struct_value () [symbolic] // CHECK:STDOUT: %UseSelf.assoc_type: type = assoc_entity_type @UseSelf [concrete] -// CHECK:STDOUT: %assoc0.142: %UseSelf.assoc_type = assoc_entity element0, @UseSelf.%UseSelf.F.decl [concrete] +// CHECK:STDOUT: %assoc0.44b: %UseSelf.assoc_type = assoc_entity element0, @UseSelf.%UseSelf.WithSelf.F.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -63,6 +63,8 @@ impl D as SelfNested { // CHECK:STDOUT: %C.as.UseSelf.impl.F.type: type = fn_type @C.as.UseSelf.impl.F [concrete] // CHECK:STDOUT: %C.as.UseSelf.impl.F: %C.as.UseSelf.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %UseSelf.facet.d4d: %UseSelf.type = facet_value %C, (%UseSelf.impl_witness.3c4) [concrete] +// CHECK:STDOUT: %UseSelf.WithSelf.F.type.a7f: type = fn_type @UseSelf.WithSelf.F, @UseSelf(%UseSelf.facet.d4d) [concrete] +// CHECK:STDOUT: %UseSelf.WithSelf.F.67c: %UseSelf.WithSelf.F.type.a7f = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: %UseSelf.impl_witness.22d: = impl_witness @D.as.UseSelf.impl.%UseSelf.impl_witness_table [concrete] @@ -71,6 +73,8 @@ impl D as SelfNested { // CHECK:STDOUT: %D.as.UseSelf.impl.F.type: type = fn_type @D.as.UseSelf.impl.F [concrete] // CHECK:STDOUT: %D.as.UseSelf.impl.F: %D.as.UseSelf.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %UseSelf.facet.6f8: %UseSelf.type = facet_value %D, (%UseSelf.impl_witness.22d) [concrete] +// CHECK:STDOUT: %UseSelf.WithSelf.F.type.37f: type = fn_type @UseSelf.WithSelf.F, @UseSelf(%UseSelf.facet.6f8) [concrete] +// CHECK:STDOUT: %UseSelf.WithSelf.F.633: %UseSelf.WithSelf.F.type.37f = struct_value () [concrete] // CHECK:STDOUT: %D.val: %D = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [concrete] // CHECK:STDOUT: %Self.aed: %SelfNested.type = symbolic_binding Self, 0 [symbolic] @@ -82,10 +86,10 @@ impl D as SelfNested { // CHECK:STDOUT: %tuple.ceb: %tuple.type.24b = tuple_value (%ptr.d99, %struct_type.x.y.b54) [symbolic] // CHECK:STDOUT: %tuple.type.cbf: type = tuple_type (%ptr.d99, %struct_type.x.y.b54) [symbolic] // CHECK:STDOUT: %pattern_type.fb7: type = pattern_type %tuple.type.cbf [symbolic] -// CHECK:STDOUT: %SelfNested.F.type: type = fn_type @SelfNested.F [concrete] -// CHECK:STDOUT: %SelfNested.F: %SelfNested.F.type = struct_value () [concrete] +// CHECK:STDOUT: %SelfNested.WithSelf.F.type.430: type = fn_type @SelfNested.WithSelf.F, @SelfNested(%Self.aed) [symbolic] +// CHECK:STDOUT: %SelfNested.WithSelf.F.257: %SelfNested.WithSelf.F.type.430 = struct_value () [symbolic] // CHECK:STDOUT: %SelfNested.assoc_type: type = assoc_entity_type @SelfNested [concrete] -// CHECK:STDOUT: %assoc0.92f: %SelfNested.assoc_type = assoc_entity element0, @SelfNested.%SelfNested.F.decl [concrete] +// CHECK:STDOUT: %assoc0.da4: %SelfNested.assoc_type = assoc_entity element0, @SelfNested.%SelfNested.WithSelf.F.decl [concrete] // CHECK:STDOUT: %SelfNested.impl_witness.a03: = impl_witness @C.as.SelfNested.impl.%SelfNested.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.31e: type = ptr_type %C [concrete] // CHECK:STDOUT: %struct_type.x.y.710: type = struct_type {.x: %C, .y: %empty_tuple.type} [concrete] @@ -95,6 +99,8 @@ impl D as SelfNested { // CHECK:STDOUT: %C.as.SelfNested.impl.F.type: type = fn_type @C.as.SelfNested.impl.F [concrete] // CHECK:STDOUT: %C.as.SelfNested.impl.F: %C.as.SelfNested.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.facet.f22: %SelfNested.type = facet_value %C, (%SelfNested.impl_witness.a03) [concrete] +// CHECK:STDOUT: %SelfNested.WithSelf.F.type.f28: type = fn_type @SelfNested.WithSelf.F, @SelfNested(%SelfNested.facet.f22) [concrete] +// CHECK:STDOUT: %SelfNested.WithSelf.F.45f: %SelfNested.WithSelf.F.type.f28 = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.impl_witness.130: = impl_witness @D.as.SelfNested.impl.%SelfNested.impl_witness_table [concrete] // CHECK:STDOUT: %ptr.805: type = ptr_type %D [concrete] // CHECK:STDOUT: %struct_type.x.y.3e1: type = struct_type {.x: %D, .y: %empty_tuple.type} [concrete] @@ -104,6 +110,8 @@ impl D as SelfNested { // CHECK:STDOUT: %D.as.SelfNested.impl.F.type: type = fn_type @D.as.SelfNested.impl.F [concrete] // CHECK:STDOUT: %D.as.SelfNested.impl.F: %D.as.SelfNested.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %SelfNested.facet.372: %SelfNested.type = facet_value %D, (%SelfNested.impl_witness.130) [concrete] +// CHECK:STDOUT: %SelfNested.WithSelf.F.type.88c: type = fn_type @SelfNested.WithSelf.F, @SelfNested(%SelfNested.facet.372) [concrete] +// CHECK:STDOUT: %SelfNested.WithSelf.F.02f: %SelfNested.WithSelf.F.type.88c = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -136,75 +144,81 @@ impl D as SelfNested { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @UseSelf { -// CHECK:STDOUT: %Self: %UseSelf.type = symbolic_binding Self, 0 [symbolic = constants.%Self.f7b] -// CHECK:STDOUT: %UseSelf.F.decl: %UseSelf.F.type = fn_decl @UseSelf.F [concrete = constants.%UseSelf.F] { -// CHECK:STDOUT: %self.patt: @UseSelf.F.%pattern_type (%pattern_type.431) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @UseSelf.F.%pattern_type (%pattern_type.431) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %x.patt: @UseSelf.F.%pattern_type (%pattern_type.431) = value_binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @UseSelf.F.%pattern_type (%pattern_type.431) = value_param_pattern %x.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @UseSelf.F.%pattern_type (%pattern_type.431) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @UseSelf.F.%pattern_type (%pattern_type.431) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %Self.loc15: %UseSelf.type = symbolic_binding Self, 0 [symbolic = constants.%Self.f7b] +// CHECK:STDOUT: interface_with_self_decl @UseSelf [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %UseSelf.WithSelf.F.decl: @UseSelf.%UseSelf.WithSelf.F.type (%UseSelf.WithSelf.F.type.ad8) = fn_decl @UseSelf.WithSelf.F [symbolic = @UseSelf.%UseSelf.WithSelf.F (constants.%UseSelf.WithSelf.F.de0)] { +// CHECK:STDOUT: %self.patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type.431) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type.431) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %x.patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type.431) = value_binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type.431) = value_param_pattern %x.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type.431) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type.431) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc16_32: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.f7b)] +// CHECK:STDOUT: %Self.ref.loc16_32: %UseSelf.type = name_ref Self, @UseSelf.%Self.loc15 [symbolic = %Self (constants.%Self.f7b)] // CHECK:STDOUT: %Self.as_type.loc16_32: type = facet_access_type %Self.ref.loc16_32 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.e3d)] // CHECK:STDOUT: %.loc16_32.2: type = converted %Self.ref.loc16_32, %Self.as_type.loc16_32 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.e3d)] // CHECK:STDOUT: %.loc16_32.3: Core.Form = init_form %.loc16_32.2, call_param2 [symbolic = %.loc16_32.1 (constants.%.7fd)] -// CHECK:STDOUT: %self.param: @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d) = value_param call_param0 +// CHECK:STDOUT: %self.param: @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d) = value_param call_param0 // CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.e3d)] { -// CHECK:STDOUT: %Self.ref.loc16_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.f7b)] +// CHECK:STDOUT: %Self.ref.loc16_14: %UseSelf.type = name_ref Self, @UseSelf.%Self.loc15 [symbolic = %Self (constants.%Self.f7b)] // CHECK:STDOUT: %Self.as_type.loc16_14: type = facet_access_type %Self.ref.loc16_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.e3d)] // CHECK:STDOUT: %.loc16_14.2: type = converted %Self.ref.loc16_14, %Self.as_type.loc16_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.e3d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d) = value_binding self, %self.param -// CHECK:STDOUT: %x.param: @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d) = value_param call_param1 +// CHECK:STDOUT: %self: @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d) = value_binding self, %self.param +// CHECK:STDOUT: %x.param: @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d) = value_param call_param1 // CHECK:STDOUT: %.loc16_23.1: type = splice_block %.loc16_23.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.e3d)] { -// CHECK:STDOUT: %Self.ref.loc16_23: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.f7b)] +// CHECK:STDOUT: %Self.ref.loc16_23: %UseSelf.type = name_ref Self, @UseSelf.%Self.loc15 [symbolic = %Self (constants.%Self.f7b)] // CHECK:STDOUT: %Self.as_type.loc16_23: type = facet_access_type %Self.ref.loc16_23 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.e3d)] // CHECK:STDOUT: %.loc16_23.2: type = converted %Self.ref.loc16_23, %Self.as_type.loc16_23 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.e3d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d) = value_binding x, %x.param -// CHECK:STDOUT: %return.param: ref @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d) = out_param call_param2 -// CHECK:STDOUT: %return: ref @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d) = return_slot %return.param +// CHECK:STDOUT: %x: @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d) = value_binding x, %x.param +// CHECK:STDOUT: %return.param: ref @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d) = out_param call_param2 +// CHECK:STDOUT: %return: ref @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %UseSelf.assoc_type = assoc_entity element0, %UseSelf.F.decl [concrete = constants.%assoc0.142] +// CHECK:STDOUT: %assoc0: %UseSelf.assoc_type = assoc_entity element0, %UseSelf.WithSelf.F.decl [concrete = constants.%assoc0.44b] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%UseSelf.F.decl) +// CHECK:STDOUT: witness = (%UseSelf.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @SelfNested { -// CHECK:STDOUT: %Self: %SelfNested.type = symbolic_binding Self, 0 [symbolic = constants.%Self.aed] -// CHECK:STDOUT: %SelfNested.F.decl: %SelfNested.F.type = fn_decl @SelfNested.F [concrete = constants.%SelfNested.F] { -// CHECK:STDOUT: %x.patt: @SelfNested.F.%pattern_type (%pattern_type.fb7) = value_binding_pattern x [concrete] -// CHECK:STDOUT: %x.param_patt: @SelfNested.F.%pattern_type (%pattern_type.fb7) = value_param_pattern %x.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc31: %SelfNested.type = symbolic_binding Self, 0 [symbolic = constants.%Self.aed] +// CHECK:STDOUT: interface_with_self_decl @SelfNested [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %SelfNested.WithSelf.F.decl: @SelfNested.%SelfNested.WithSelf.F.type (%SelfNested.WithSelf.F.type.430) = fn_decl @SelfNested.WithSelf.F [symbolic = @SelfNested.%SelfNested.WithSelf.F (constants.%SelfNested.WithSelf.F.257)] { +// CHECK:STDOUT: %x.patt: @SelfNested.WithSelf.F.%pattern_type (%pattern_type.fb7) = value_binding_pattern x [concrete] +// CHECK:STDOUT: %x.param_patt: @SelfNested.WithSelf.F.%pattern_type (%pattern_type.fb7) = value_param_pattern %x.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %x.param: @SelfNested.F.%tuple.type (%tuple.type.cbf) = value_param call_param0 +// CHECK:STDOUT: %x.param: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.cbf) = value_param call_param0 // CHECK:STDOUT: %.loc32_37.1: type = splice_block %.loc32_37.3 [symbolic = %tuple.type (constants.%tuple.type.cbf)] { -// CHECK:STDOUT: %Self.ref.loc32_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.aed)] +// CHECK:STDOUT: %Self.ref.loc32_12: %SelfNested.type = name_ref Self, @SelfNested.%Self.loc31 [symbolic = %Self (constants.%Self.aed)] // CHECK:STDOUT: %Self.as_type.loc32_16: type = facet_access_type %Self.ref.loc32_12 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] // CHECK:STDOUT: %.loc32_16: type = converted %Self.ref.loc32_12, %Self.as_type.loc32_16 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] // CHECK:STDOUT: %ptr.loc32_16.2: type = ptr_type %.loc32_16 [symbolic = %ptr.loc32_16.1 (constants.%ptr.d99)] -// CHECK:STDOUT: %Self.ref.loc32_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.aed)] +// CHECK:STDOUT: %Self.ref.loc32_24: %SelfNested.type = name_ref Self, @SelfNested.%Self.loc31 [symbolic = %Self (constants.%Self.aed)] // CHECK:STDOUT: %Self.as_type.loc32_24: type = facet_access_type %Self.ref.loc32_24 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] // CHECK:STDOUT: %.loc32_24: type = converted %Self.ref.loc32_24, %Self.as_type.loc32_24 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] // CHECK:STDOUT: %.loc32_35.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc32_35.2: type = converted %.loc32_35.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.x.y.loc32_36.2: type = struct_type {.x: @SelfNested.F.%Self.binding.as_type (%Self.binding.as_type.07b), .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc32_36.1 (constants.%struct_type.x.y.b54)] +// CHECK:STDOUT: %struct_type.x.y.loc32_36.2: type = struct_type {.x: @SelfNested.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.07b), .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc32_36.1 (constants.%struct_type.x.y.b54)] // CHECK:STDOUT: %.loc32_37.2: %tuple.type.24b = tuple_literal (%ptr.loc32_16.2, %struct_type.x.y.loc32_36.2) [symbolic = %tuple (constants.%tuple.ceb)] // CHECK:STDOUT: %.loc32_37.3: type = converted %.loc32_37.2, constants.%tuple.type.cbf [symbolic = %tuple.type (constants.%tuple.type.cbf)] // CHECK:STDOUT: } -// CHECK:STDOUT: %x: @SelfNested.F.%tuple.type (%tuple.type.cbf) = value_binding x, %x.param +// CHECK:STDOUT: %x: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.cbf) = value_binding x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %SelfNested.assoc_type = assoc_entity element0, %SelfNested.F.decl [concrete = constants.%assoc0.92f] +// CHECK:STDOUT: %assoc0: %SelfNested.assoc_type = assoc_entity element0, %SelfNested.WithSelf.F.decl [concrete = constants.%assoc0.da4] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc31 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%SelfNested.F.decl) +// CHECK:STDOUT: witness = (%SelfNested.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -335,13 +349,13 @@ impl D as SelfNested { // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @UseSelf.F(@UseSelf.%Self: %UseSelf.type) { +// CHECK:STDOUT: generic fn @UseSelf.WithSelf.F(@UseSelf.%Self.loc15: %UseSelf.type) { // CHECK:STDOUT: %Self: %UseSelf.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.f7b)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.e3d)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.431)] // CHECK:STDOUT: %.loc16_32.1: Core.Form = init_form %Self.binding.as_type, call_param2 [symbolic = %.loc16_32.1 (constants.%.7fd)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d), %x.param: @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d)) -> out %return.param: @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d); +// CHECK:STDOUT: fn(%self.param: @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d), %x.param: @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d)) -> out %return.param: @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.e3d); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.UseSelf.impl.F(%self.param: %C, %x.param: %C) -> out %return.param: %C { @@ -360,44 +374,72 @@ impl D as SelfNested { // CHECK:STDOUT: return %.loc28_48 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @SelfNested.F(@SelfNested.%Self: %SelfNested.type) { +// CHECK:STDOUT: generic fn @SelfNested.WithSelf.F(@SelfNested.%Self.loc31: %SelfNested.type) { // CHECK:STDOUT: %Self: %SelfNested.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.aed)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.07b)] // CHECK:STDOUT: %ptr.loc32_16.1: type = ptr_type %Self.binding.as_type [symbolic = %ptr.loc32_16.1 (constants.%ptr.d99)] -// CHECK:STDOUT: %struct_type.x.y.loc32_36.1: type = struct_type {.x: @SelfNested.F.%Self.binding.as_type (%Self.binding.as_type.07b), .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc32_36.1 (constants.%struct_type.x.y.b54)] +// CHECK:STDOUT: %struct_type.x.y.loc32_36.1: type = struct_type {.x: @SelfNested.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.07b), .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc32_36.1 (constants.%struct_type.x.y.b54)] // CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%ptr.loc32_16.1, %struct_type.x.y.loc32_36.1) [symbolic = %tuple (constants.%tuple.ceb)] // CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc32_16.1, %struct_type.x.y.loc32_36.1) [symbolic = %tuple.type (constants.%tuple.type.cbf)] // CHECK:STDOUT: %pattern_type: type = pattern_type %tuple.type [symbolic = %pattern_type (constants.%pattern_type.fb7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param: @SelfNested.F.%tuple.type (%tuple.type.cbf)); +// CHECK:STDOUT: fn(%x.param: @SelfNested.WithSelf.F.%tuple.type (%tuple.type.cbf)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @C.as.SelfNested.impl.F(%x.param: %tuple.type.2f1); // CHECK:STDOUT: // CHECK:STDOUT: fn @D.as.SelfNested.impl.F(%x.param: %tuple.type.e0d); // CHECK:STDOUT: -// CHECK:STDOUT: specific @UseSelf.F(constants.%Self.f7b) { +// CHECK:STDOUT: specific @UseSelf(constants.%Self.f7b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Self.f7b +// CHECK:STDOUT: %UseSelf.WithSelf.F.type => constants.%UseSelf.WithSelf.F.type.ad8 +// CHECK:STDOUT: %UseSelf.WithSelf.F => constants.%UseSelf.WithSelf.F.de0 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @UseSelf.WithSelf.F(constants.%Self.f7b) { // CHECK:STDOUT: %Self => constants.%Self.f7b // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.e3d // CHECK:STDOUT: %pattern_type => constants.%pattern_type.431 // CHECK:STDOUT: %.loc16_32.1 => constants.%.7fd // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @UseSelf.F(constants.%UseSelf.facet.d4d) { +// CHECK:STDOUT: specific @UseSelf(constants.%UseSelf.facet.d4d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%UseSelf.facet.d4d +// CHECK:STDOUT: %UseSelf.WithSelf.F.type => constants.%UseSelf.WithSelf.F.type.a7f +// CHECK:STDOUT: %UseSelf.WithSelf.F => constants.%UseSelf.WithSelf.F.67c +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @UseSelf.WithSelf.F(constants.%UseSelf.facet.d4d) { // CHECK:STDOUT: %Self => constants.%UseSelf.facet.d4d // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7c7 // CHECK:STDOUT: %.loc16_32.1 => constants.%.92f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @UseSelf.F(constants.%UseSelf.facet.6f8) { +// CHECK:STDOUT: specific @UseSelf(constants.%UseSelf.facet.6f8) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%UseSelf.facet.6f8 +// CHECK:STDOUT: %UseSelf.WithSelf.F.type => constants.%UseSelf.WithSelf.F.type.37f +// CHECK:STDOUT: %UseSelf.WithSelf.F => constants.%UseSelf.WithSelf.F.633 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @UseSelf.WithSelf.F(constants.%UseSelf.facet.6f8) { // CHECK:STDOUT: %Self => constants.%UseSelf.facet.6f8 // CHECK:STDOUT: %Self.binding.as_type => constants.%D // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9c8 // CHECK:STDOUT: %.loc16_32.1 => constants.%.513 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SelfNested.F(constants.%Self.aed) { +// CHECK:STDOUT: specific @SelfNested(constants.%Self.aed) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc32 => constants.%Self.aed +// CHECK:STDOUT: %SelfNested.WithSelf.F.type => constants.%SelfNested.WithSelf.F.type.430 +// CHECK:STDOUT: %SelfNested.WithSelf.F => constants.%SelfNested.WithSelf.F.257 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @SelfNested.WithSelf.F(constants.%Self.aed) { // CHECK:STDOUT: %Self => constants.%Self.aed // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.07b // CHECK:STDOUT: %ptr.loc32_16.1 => constants.%ptr.d99 @@ -407,7 +449,14 @@ impl D as SelfNested { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fb7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SelfNested.F(constants.%SelfNested.facet.f22) { +// CHECK:STDOUT: specific @SelfNested(constants.%SelfNested.facet.f22) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc32 => constants.%SelfNested.facet.f22 +// CHECK:STDOUT: %SelfNested.WithSelf.F.type => constants.%SelfNested.WithSelf.F.type.f28 +// CHECK:STDOUT: %SelfNested.WithSelf.F => constants.%SelfNested.WithSelf.F.45f +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @SelfNested.WithSelf.F(constants.%SelfNested.facet.f22) { // CHECK:STDOUT: %Self => constants.%SelfNested.facet.f22 // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %ptr.loc32_16.1 => constants.%ptr.31e @@ -417,7 +466,14 @@ impl D as SelfNested { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.137 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @SelfNested.F(constants.%SelfNested.facet.372) { +// CHECK:STDOUT: specific @SelfNested(constants.%SelfNested.facet.372) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc32 => constants.%SelfNested.facet.372 +// CHECK:STDOUT: %SelfNested.WithSelf.F.type => constants.%SelfNested.WithSelf.F.type.88c +// CHECK:STDOUT: %SelfNested.WithSelf.F => constants.%SelfNested.WithSelf.F.02f +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @SelfNested.WithSelf.F(constants.%SelfNested.facet.372) { // CHECK:STDOUT: %Self => constants.%SelfNested.facet.372 // CHECK:STDOUT: %Self.binding.as_type => constants.%D // CHECK:STDOUT: %ptr.loc32_16.1 => constants.%ptr.805 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 1e10c19ea003..41b11d0ca8bc 100644 --- a/toolchain/check/testdata/impl/todo_impl_with_unrelated_fn.carbon +++ b/toolchain/check/testdata/impl/todo_impl_with_unrelated_fn.carbon @@ -30,10 +30,10 @@ class X { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %A.B.type: type = fn_type @A.B [concrete] -// CHECK:STDOUT: %A.B: %A.B.type = struct_value () [concrete] +// CHECK:STDOUT: %A.WithSelf.B.type.386: type = fn_type @A.WithSelf.B, @A(%Self) [symbolic] +// CHECK:STDOUT: %A.WithSelf.B.b88: %A.WithSelf.B.type.386 = struct_value () [symbolic] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete] -// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, @A.%A.B.decl [concrete] +// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, @A.%A.WithSelf.B.decl [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %A.impl_witness: = impl_witness @X.as.A.impl.%A.impl_witness_table [concrete] // CHECK:STDOUT: %X.as.A.impl.B.type: type = fn_type @X.as.A.impl.B [concrete] @@ -41,6 +41,8 @@ class X { // CHECK:STDOUT: %X.as.A.impl.F.type: type = fn_type @X.as.A.impl.F [concrete] // CHECK:STDOUT: %X.as.A.impl.F: %X.as.A.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %A.facet: %A.type = facet_value %X, (%A.impl_witness) [concrete] +// CHECK:STDOUT: %A.WithSelf.B.type.c6b: type = fn_type @A.WithSelf.B, @A(%A.facet) [concrete] +// CHECK:STDOUT: %A.WithSelf.B.f2a: %A.WithSelf.B.type.c6b = 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: } @@ -55,14 +57,17 @@ class X { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { -// CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %A.B.decl: %A.B.type = fn_decl @A.B [concrete = constants.%A.B] {} {} -// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.B.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc15: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %A.WithSelf.B.decl: @A.%A.WithSelf.B.type (%A.WithSelf.B.type.386) = fn_decl @A.WithSelf.B [symbolic = @A.%A.WithSelf.B (constants.%A.WithSelf.B.b88)] {} {} +// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.WithSelf.B.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .B = %assoc0 -// CHECK:STDOUT: witness = (%A.B.decl) +// CHECK:STDOUT: witness = (%A.WithSelf.B.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -92,7 +97,7 @@ class X { // CHECK:STDOUT: .A = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @A.B(@A.%Self: %A.type) { +// CHECK:STDOUT: generic fn @A.WithSelf.B(@A.%Self.loc15: %A.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -106,7 +111,21 @@ class X { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.B(constants.%Self) {} +// CHECK:STDOUT: specific @A(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%Self +// CHECK:STDOUT: %A.WithSelf.B.type => constants.%A.WithSelf.B.type.386 +// CHECK:STDOUT: %A.WithSelf.B => constants.%A.WithSelf.B.b88 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.B(constants.%A.facet) {} +// CHECK:STDOUT: specific @A.WithSelf.B(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%A.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc16 => constants.%A.facet +// CHECK:STDOUT: %A.WithSelf.B.type => constants.%A.WithSelf.B.type.c6b +// CHECK:STDOUT: %A.WithSelf.B => constants.%A.WithSelf.B.f2a +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.B(constants.%A.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/use_assoc_entity.carbon b/toolchain/check/testdata/impl/use_assoc_entity.carbon index 2cbb9e31465b..6abfe800d60d 100644 --- a/toolchain/check/testdata/impl/use_assoc_entity.carbon +++ b/toolchain/check/testdata/impl/use_assoc_entity.carbon @@ -352,19 +352,21 @@ 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.d5c: %J.assoc_type = assoc_entity element0, @J.%U [concrete] +// CHECK:STDOUT: %assoc0.ebd: %J.assoc_type = assoc_entity element0, @J.%U [concrete] // CHECK:STDOUT: %Self.binding.as_type.ed8: type = symbolic_binding_type Self, 0, %Self.8a1 [symbolic] // CHECK:STDOUT: %pattern_type.832: type = pattern_type %Self.binding.as_type.ed8 [symbolic] // 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: %.147: Core.Form = init_form %impl.elem0.335, call_param2 [symbolic] -// CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J(%Self.8a1) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1.a57: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [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.%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(%.Self.2fa) [symbolic_self] +// CHECK:STDOUT: %J.WithSelf.F.659: %J.WithSelf.F.type.e19 = struct_value () [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.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] @@ -381,25 +383,26 @@ fn F() { // CHECK:STDOUT: %empty_tuple.type.as.J.impl.F.type: type = fn_type @empty_tuple.type.as.J.impl.F [concrete] // CHECK:STDOUT: %empty_tuple.type.as.J.impl.F: %empty_tuple.type.as.J.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %J.facet.a51: %J.type = facet_value %empty_tuple.type, (%J.impl_witness.5bf) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.fd2: type = fn_type @J.WithSelf.F, @J(%J.facet.a51) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.497: %J.WithSelf.F.type.fd2 = struct_value () [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.type.5e6: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Negate.impl.Op.7f5: %Int.as.Negate.impl.Op.type.5e6 = struct_value () [symbolic] // CHECK:STDOUT: %Negate.impl_witness.11c: = impl_witness imports.%Negate.impl_witness_table, @Int.as.Negate.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.type.e60: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.e7f: %Int.as.Negate.impl.Op.type.e60 = struct_value () [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %i32, (%Negate.impl_witness.11c) [concrete] -// CHECK:STDOUT: %.dd4: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.140: type = fn_type @Negate.WithSelf.Op, @Negate(%Negate.facet) [concrete] +// CHECK:STDOUT: %.5dd: type = fn_type_with_self_type %Negate.WithSelf.Op.type.140, %Negate.facet [concrete] // CHECK:STDOUT: %.e54: Core.Form = init_form %i32, call_param1 [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.specific_fn: = specific_function %Int.as.Negate.impl.Op.e7f, @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: %.91f: type = fn_type_with_self_type %J.F.type, %J.facet.a51 [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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -407,7 +410,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_40.f80, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_40.f80, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -423,6 +427,8 @@ fn F() { // CHECK:STDOUT: %C.as.J.impl.F.type: type = fn_type @C.as.J.impl.F [concrete] // CHECK:STDOUT: %C.as.J.impl.F: %C.as.J.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %J.facet.05d: %J.type = facet_value %C, (%J.impl_witness.00b) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.24e: type = fn_type @J.WithSelf.F, @J(%J.facet.05d) [concrete] +// CHECK:STDOUT: %J.WithSelf.F.bd5: %J.WithSelf.F.type.24e = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -461,7 +467,7 @@ fn F() { // 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.binding.as_type] // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d5c] +// 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: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -496,7 +502,7 @@ fn F() { // 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.binding.as_type] // CHECK:STDOUT: %.loc21_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d5c] +// 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 %.Self [concrete = constants.%J_where.type.d0e] { @@ -507,52 +513,51 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: %Self.loc3: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: 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.%U [concrete = constants.%assoc0.d5c] +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.ebd] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] { -// CHECK:STDOUT: %self.patt: @J.F.%pattern_type.loc5_8 (%pattern_type.832) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @J.F.%pattern_type.loc5_8 (%pattern_type.832) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %u.patt: @J.F.%pattern_type.loc5_20 (%pattern_type.c1a) = value_binding_pattern u [concrete] -// CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type.loc5_20 (%pattern_type.c1a) = value_param_pattern %u.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @J.F.%pattern_type.loc5_20 (%pattern_type.c1a) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type.loc5_20 (%pattern_type.c1a) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %J.WithSelf.F.decl: @J.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { +// CHECK:STDOUT: %self.patt: @J.WithSelf.F.%pattern_type.loc5_8 (%pattern_type.832) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @J.WithSelf.F.%pattern_type.loc5_8 (%pattern_type.832) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type.loc5_20 (%pattern_type.c1a) = value_binding_pattern u [concrete] +// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type.loc5_20 (%pattern_type.c1a) = value_param_pattern %u.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type.loc5_20 (%pattern_type.c1a) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type.loc5_20 (%pattern_type.c1a) = out_param_pattern %return.patt, call_param2 [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, call_param2 [symbolic = %.loc5_29.1 (constants.%.147)] -// CHECK:STDOUT: %self.param: @J.F.%Self.binding.as_type (%Self.binding.as_type.ed8) = value_param call_param0 +// CHECK:STDOUT: %self.param: @J.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.ed8) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ed8)] { -// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.8a1)] +// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self.loc3 [symbolic = %Self (constants.%Self.8a1)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ed8)] // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ed8)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @J.F.%Self.binding.as_type (%Self.binding.as_type.ed8) = value_binding self, %self.param -// CHECK:STDOUT: %u.param: @J.F.%impl.elem0.loc5_23.1 (%impl.elem0.335) = value_param call_param1 +// CHECK:STDOUT: %self: @J.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.ed8) = 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: } -// CHECK:STDOUT: %u: @J.F.%impl.elem0.loc5_23.1 (%impl.elem0.335) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @J.F.%impl.elem0.loc5_23.1 (%impl.elem0.335) = out_param call_param2 -// CHECK:STDOUT: %return: ref @J.F.%impl.elem0.loc5_23.1 (%impl.elem0.335) = return_slot %return.param +// 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: } -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.F.decl [concrete = constants.%assoc1.a57] +// 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: .Self = %Self.loc3 // CHECK:STDOUT: .U = @U.%assoc0 // CHECK:STDOUT: .F = %assoc1 -// CHECK:STDOUT: witness = (%U, %J.F.decl) +// CHECK:STDOUT: witness = (%U, %J.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) { -// CHECK:STDOUT: assoc_const U:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.J.impl: %.loc8_7.2 as %.loc8_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.patt: %pattern_type.cb1 = value_binding_pattern self [concrete] @@ -627,7 +632,7 @@ fn F() { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self.loc3: %J.type) { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8a1)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ed8)] // CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.832)] @@ -636,13 +641,13 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc5_20: type = pattern_type %impl.elem0.loc5_23.1 [symbolic = %pattern_type.loc5_20 (constants.%pattern_type.c1a)] // CHECK:STDOUT: %.loc5_29.1: Core.Form = init_form %impl.elem0.loc5_23.1, call_param2 [symbolic = %.loc5_29.1 (constants.%.147)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @J.F.%Self.binding.as_type (%Self.binding.as_type.ed8), %u.param: @J.F.%impl.elem0.loc5_23.1 (%impl.elem0.335)) -> out %return.param: @J.F.%impl.elem0.loc5_23.1 (%impl.elem0.335); +// CHECK:STDOUT: fn(%self.param: @J.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.ed8), %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: } // 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: %.dd4 = impl_witness_access constants.%Negate.impl_witness.11c, element1 [concrete = constants.%Int.as.Negate.impl.Op.e7f] +// CHECK:STDOUT: %impl.elem1: %.5dd = impl_witness_access constants.%Negate.impl_witness.11c, element1 [concrete = constants.%Int.as.Negate.impl.Op.e7f] // CHECK:STDOUT: %bound_method.loc9_44.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_44.2: = bound_method %u.ref, %specific_fn @@ -654,11 +659,11 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x // 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.%assoc1 [concrete = constants.%assoc1.a57] -// CHECK:STDOUT: %impl.elem1: %.91f = impl_witness_access constants.%J.impl_witness.5bf, element1 [concrete = constants.%empty_tuple.type.as.J.impl.F] +// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%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: %int_40: Core.IntLiteral = int_value 40 [concrete = constants.%int_40.f80] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_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] @@ -679,9 +684,14 @@ fn F() { // CHECK:STDOUT: return %.loc22_44.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%Self.8a1) {} +// CHECK:STDOUT: specific @J(constants.%Self.8a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.F(constants.%Self.8a1) { +// CHECK:STDOUT: specific @J.WithSelf.F(constants.%Self.8a1) { // CHECK:STDOUT: %Self => constants.%Self.8a1 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.ed8 // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.832 @@ -691,9 +701,21 @@ fn F() { // CHECK:STDOUT: %.loc5_29.1 => constants.%.147 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%.Self.2fa) {} +// CHECK:STDOUT: specific @J(constants.%.Self.2fa) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.F(constants.%J.facet.a51) { +// CHECK:STDOUT: specific @J(constants.%J.facet.a51) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%J.facet.a51 +// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.fd2 +// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.497 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet.a51) { // CHECK:STDOUT: %Self => constants.%J.facet.a51 // CHECK:STDOUT: %Self.binding.as_type => constants.%empty_tuple.type // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.cb1 @@ -703,7 +725,14 @@ fn F() { // CHECK:STDOUT: %.loc5_29.1 => constants.%.8ef // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%J.facet.05d) { +// CHECK:STDOUT: specific @J(constants.%J.facet.05d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%J.facet.05d +// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.24e +// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.bd5 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.F(constants.%J.facet.05d) { // CHECK:STDOUT: %Self => constants.%J.facet.05d // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.7c7 @@ -719,18 +748,20 @@ 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.d5c: %J.assoc_type = assoc_entity element0, @J.%U [concrete] +// CHECK:STDOUT: %assoc0.ebd: %J.assoc_type = assoc_entity element0, @J.%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: %.a6a: Core.Form = init_form %impl.elem0.335, call_param1 [symbolic] -// CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete] -// CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1.a57: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J(%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.%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(%.Self.2fa) [symbolic_self] +// CHECK:STDOUT: %J.WithSelf.F.659: %J.WithSelf.F.type.e19 = struct_value () [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.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] @@ -746,25 +777,26 @@ fn F() { // 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(%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: %Negate.Op.type: type = fn_type @Negate.Op [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.type.5e6: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Negate.impl.Op.7f5: %Int.as.Negate.impl.Op.type.5e6 = struct_value () [symbolic] // CHECK:STDOUT: %Negate.impl_witness.11c: = impl_witness imports.%Negate.impl_witness_table, @Int.as.Negate.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.type.e60: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.e7f: %Int.as.Negate.impl.Op.type.e60 = struct_value () [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %i32, (%Negate.impl_witness.11c) [concrete] -// CHECK:STDOUT: %.dd4: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.140: type = fn_type @Negate.WithSelf.Op, @Negate(%Negate.facet) [concrete] +// CHECK:STDOUT: %.5dd: type = fn_type_with_self_type %Negate.WithSelf.Op.type.140, %Negate.facet [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.specific_fn: = specific_function %Int.as.Negate.impl.Op.e7f, @Int.as.Negate.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %.437: Core.Form = init_form %i32, call_param0 [concrete] // CHECK:STDOUT: %CallFunction.type: type = fn_type @CallFunction [concrete] // CHECK:STDOUT: %CallFunction: %CallFunction.type = struct_value () [concrete] -// CHECK:STDOUT: %.0e5: type = fn_type_with_self_type %J.F.type, %J.facet [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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -772,7 +804,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @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] @@ -814,7 +847,7 @@ fn F() { // 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.binding.as_type] // CHECK:STDOUT: %.loc10_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d5c] +// 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: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -836,43 +869,42 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: %Self.loc3: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: 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.%U [concrete = constants.%assoc0.d5c] +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.ebd] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] { -// CHECK:STDOUT: %u.patt: @J.F.%pattern_type (%pattern_type.c1a) = value_binding_pattern u [concrete] -// CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type (%pattern_type.c1a) = value_param_pattern %u.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @J.F.%pattern_type (%pattern_type.c1a) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type (%pattern_type.c1a) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %J.WithSelf.F.decl: @J.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { +// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = value_binding_pattern u [concrete] +// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = value_param_pattern %u.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = out_param_pattern %return.patt, call_param1 [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, call_param1 [symbolic = %.loc5_17.1 (constants.%.a6a)] -// CHECK:STDOUT: %u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_param call_param0 +// 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.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = out_param call_param1 -// CHECK:STDOUT: %return: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = return_slot %return.param +// 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.F.decl [concrete = constants.%assoc1.a57] +// 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: .Self = %Self.loc3 // CHECK:STDOUT: .U = @U.%assoc0 // CHECK:STDOUT: .F = %assoc1 -// CHECK:STDOUT: witness = (%U, %J.F.decl) +// CHECK:STDOUT: witness = (%U, %J.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) { -// CHECK:STDOUT: assoc_const U:! type; -// 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.patt: %pattern_type.7ce = value_binding_pattern u [concrete] @@ -909,20 +941,20 @@ fn F() { // CHECK:STDOUT: .Self = constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self.loc3: %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, call_param1 [symbolic = %.loc5_17.1 (constants.%.a6a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335)) -> out %return.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335); +// 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: %.dd4 = impl_witness_access constants.%Negate.impl_witness.11c, element1 [concrete = constants.%Int.as.Negate.impl.Op.e7f] +// CHECK:STDOUT: %impl.elem1: %.5dd = impl_witness_access constants.%Negate.impl_witness.11c, element1 [concrete = constants.%Int.as.Negate.impl.Op.e7f] // 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 @@ -934,12 +966,12 @@ fn F() { // 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.%assoc1 [concrete = constants.%assoc1.a57] +// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%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: %.0e5 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%D.as.J.impl.F] +// 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: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // 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] @@ -950,9 +982,14 @@ fn F() { // CHECK:STDOUT: return %D.as.J.impl.F.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%Self.8a1) {} +// CHECK:STDOUT: specific @J(constants.%Self.8a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.F(constants.%Self.8a1) { +// 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 @@ -960,9 +997,21 @@ fn F() { // CHECK:STDOUT: %.loc5_17.1 => constants.%.a6a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%.Self.2fa) {} +// CHECK:STDOUT: specific @J(constants.%.Self.2fa) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.F(constants.%J.facet) { +// CHECK:STDOUT: specific @J(constants.%J.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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 @@ -976,22 +1025,26 @@ 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.d5c: %J.assoc_type = assoc_entity element0, @J.%U [concrete] -// CHECK:STDOUT: %Self.binding.as_type.ed8: type = symbolic_binding_type Self, 0, %Self.8a1 [symbolic] +// CHECK:STDOUT: %assoc0.ebd: %J.assoc_type = assoc_entity element0, @J.%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: %.a6a: Core.Form = init_form %impl.elem0.335, call_param1 [symbolic] -// CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete] -// CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1.a57: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J(%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.%J.WithSelf.F.decl [concrete] +// CHECK:STDOUT: %Self.binding.as_type.ed8: type = symbolic_binding_type Self, 0, %Self.8a1 [symbolic] // CHECK:STDOUT: %pattern_type.832: type = pattern_type %Self.binding.as_type.ed8 [symbolic] // CHECK:STDOUT: %.147: Core.Form = init_form %impl.elem0.335, call_param2 [symbolic] -// CHECK:STDOUT: %J.G.type: type = fn_type @J.G [concrete] -// CHECK:STDOUT: %J.G: %J.G.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc2: %J.assoc_type = assoc_entity element2, @J.%J.G.decl [concrete] +// CHECK:STDOUT: %J.WithSelf.G.type.ace: type = fn_type @J.WithSelf.G, @J(%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.%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(%.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(%.Self.2fa) [symbolic_self] +// CHECK:STDOUT: %J.WithSelf.G.4f5: %J.WithSelf.G.type.2cf = struct_value () [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.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] @@ -1011,28 +1064,37 @@ fn F() { // 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(%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(%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: %Negate.Op.type: type = fn_type @Negate.Op [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.type.5e6: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Negate.impl.Op.7f5: %Int.as.Negate.impl.Op.type.5e6 = struct_value () [symbolic] // CHECK:STDOUT: %Negate.impl_witness.11c: = impl_witness imports.%Negate.impl_witness_table, @Int.as.Negate.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.type.e60: type = fn_type @Int.as.Negate.impl.Op, @Int.as.Negate.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.e7f: %Int.as.Negate.impl.Op.type.e60 = struct_value () [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %i32, (%Negate.impl_witness.11c) [concrete] -// CHECK:STDOUT: %.dd4: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.140: type = fn_type @Negate.WithSelf.Op, @Negate(%Negate.facet) [concrete] +// CHECK:STDOUT: %.5dd: type = fn_type_with_self_type %Negate.WithSelf.Op.type.140, %Negate.facet [concrete] // CHECK:STDOUT: %Int.as.Negate.impl.Op.specific_fn: = specific_function %Int.as.Negate.impl.Op.e7f, @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: %.013: type = fn_type_with_self_type %J.F.type, %J.facet [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(%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(%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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1040,12 +1102,13 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.646: = 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: %.35c: type = fn_type_with_self_type %J.G.type, %J.facet [concrete] +// CHECK:STDOUT: %.825: type = fn_type_with_self_type %J.WithSelf.G.type.caf, %J.facet [concrete] // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %bound_method.fa7: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1062,12 +1125,15 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.502: = bound_method %int_6.462, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %bound_method.bc2: = 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: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: %J.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.f76: type = pattern_type %J.type [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] // CHECK:STDOUT: %pattern_type.14f: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %J.WithSelf.F.type.41f: type = fn_type @J.WithSelf.F, @J(%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(%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] @@ -1076,10 +1142,10 @@ fn F() { // CHECK:STDOUT: %GenericCallF: %GenericCallF.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.19a: = require_complete_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %require_complete.06a: = require_complete_type %impl.elem0.560 [symbolic] -// CHECK:STDOUT: %.322: type = fn_type_with_self_type %J.F.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem1: %.322 = impl_witness_access %J.lookup_impl_witness.264, element1 [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: %.a84: Core.Form = init_form %impl.elem0.560, call_param1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @J.F(%T) [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] @@ -1135,7 +1201,7 @@ fn F() { // CHECK:STDOUT: %T.ref.loc28_41: %J.type = name_ref T, %T.loc28_17.2 [symbolic = %T.loc28_17.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc28_42: type = facet_access_type %T.ref.loc28_41 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc28_42.3: type = converted %T.ref.loc28_41, %T.as_type.loc28_42 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %U.ref.loc28_42: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d5c] +// 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, call_param2 [symbolic = %.loc28_42.2 (constants.%.0b0)] // CHECK:STDOUT: %.loc28_21: type = splice_block %J.ref [concrete = constants.%J.type] { @@ -1155,7 +1221,7 @@ fn F() { // CHECK:STDOUT: %T.ref.loc28_33: %J.type = name_ref T, %T.loc28_17.2 [symbolic = %T.loc28_17.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc28_34: type = facet_access_type %T.ref.loc28_33 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc28_34.2: type = converted %T.ref.loc28_33, %T.as_type.loc28_34 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %U.ref.loc28_34: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d5c] +// 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 @@ -1180,72 +1246,71 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: %Self.loc3: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: 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.%U [concrete = constants.%assoc0.d5c] +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.ebd] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] { -// CHECK:STDOUT: %u.patt: @J.F.%pattern_type (%pattern_type.c1a) = value_binding_pattern u [concrete] -// CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type (%pattern_type.c1a) = value_param_pattern %u.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @J.F.%pattern_type (%pattern_type.c1a) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type (%pattern_type.c1a) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %J.WithSelf.F.decl: @J.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { +// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = value_binding_pattern u [concrete] +// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = value_param_pattern %u.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = out_param_pattern %return.patt, call_param1 [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, call_param1 [symbolic = %.loc5_17.1 (constants.%.a6a)] -// CHECK:STDOUT: %u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_param call_param0 +// 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.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = out_param call_param1 -// CHECK:STDOUT: %return: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = return_slot %return.param +// 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.F.decl [concrete = constants.%assoc1.a57] -// CHECK:STDOUT: %J.G.decl: %J.G.type = fn_decl @J.G [concrete = constants.%J.G] { -// CHECK:STDOUT: %self.patt: @J.G.%pattern_type.loc6_8 (%pattern_type.832) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @J.G.%pattern_type.loc6_8 (%pattern_type.832) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %v.patt: @J.G.%pattern_type.loc6_20 (%pattern_type.c1a) = value_binding_pattern v [concrete] -// CHECK:STDOUT: %v.param_patt: @J.G.%pattern_type.loc6_20 (%pattern_type.c1a) = value_param_pattern %v.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @J.G.%pattern_type.loc6_20 (%pattern_type.c1a) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @J.G.%pattern_type.loc6_20 (%pattern_type.c1a) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %J.WithSelf.F.decl [concrete = constants.%assoc1.eeb] +// CHECK:STDOUT: %J.WithSelf.G.decl: @J.%J.WithSelf.G.type (%J.WithSelf.G.type.ace) = fn_decl @J.WithSelf.G [symbolic = @J.%J.WithSelf.G (constants.%J.WithSelf.G.6e7)] { +// CHECK:STDOUT: %self.patt: @J.WithSelf.G.%pattern_type.loc6_8 (%pattern_type.832) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @J.WithSelf.G.%pattern_type.loc6_8 (%pattern_type.832) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %v.patt: @J.WithSelf.G.%pattern_type.loc6_20 (%pattern_type.c1a) = value_binding_pattern v [concrete] +// CHECK:STDOUT: %v.param_patt: @J.WithSelf.G.%pattern_type.loc6_20 (%pattern_type.c1a) = value_param_pattern %v.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @J.WithSelf.G.%pattern_type.loc6_20 (%pattern_type.c1a) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @J.WithSelf.G.%pattern_type.loc6_20 (%pattern_type.c1a) = out_param_pattern %return.patt, call_param2 [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, call_param2 [symbolic = %.loc6_29.1 (constants.%.147)] -// CHECK:STDOUT: %self.param: @J.G.%Self.binding.as_type (%Self.binding.as_type.ed8) = value_param call_param0 +// CHECK:STDOUT: %self.param: @J.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type.ed8) = value_param call_param0 // CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ed8)] { -// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.8a1)] +// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self.loc3 [symbolic = %Self (constants.%Self.8a1)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ed8)] // CHECK:STDOUT: %.loc6_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ed8)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @J.G.%Self.binding.as_type (%Self.binding.as_type.ed8) = value_binding self, %self.param -// CHECK:STDOUT: %v.param: @J.G.%impl.elem0.loc6_23.1 (%impl.elem0.335) = value_param call_param1 +// CHECK:STDOUT: %self: @J.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type.ed8) = 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.G.%impl.elem0.loc6_23.1 (%impl.elem0.335) = value_binding v, %v.param -// CHECK:STDOUT: %return.param: ref @J.G.%impl.elem0.loc6_23.1 (%impl.elem0.335) = out_param call_param2 -// CHECK:STDOUT: %return: ref @J.G.%impl.elem0.loc6_23.1 (%impl.elem0.335) = return_slot %return.param +// 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.G.decl [concrete = constants.%assoc2] +// 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: .Self = %Self.loc3 // CHECK:STDOUT: .U = @U.%assoc0 // CHECK:STDOUT: .F = %assoc1 // CHECK:STDOUT: .G = %assoc2 -// CHECK:STDOUT: witness = (%U, %J.F.decl, %J.G.decl) +// CHECK:STDOUT: witness = (%U, %J.WithSelf.F.decl, %J.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) { -// CHECK:STDOUT: assoc_const U:! type; -// 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.patt: %pattern_type.7ce = value_binding_pattern u [concrete] @@ -1306,7 +1371,7 @@ fn F() { // 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.binding.as_type] // CHECK:STDOUT: %.loc10_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d5c] +// 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: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -1326,17 +1391,17 @@ fn F() { // CHECK:STDOUT: extend @E.as.J.impl.%.loc10_20 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self.loc3: %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, call_param1 [symbolic = %.loc5_17.1 (constants.%.a6a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335)) -> out %return.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335); +// 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.G(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.G(@J.%Self.loc3: %J.type) { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8a1)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.ed8)] // CHECK:STDOUT: %pattern_type.loc6_8: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc6_8 (constants.%pattern_type.832)] @@ -1345,13 +1410,13 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc6_20: type = pattern_type %impl.elem0.loc6_23.1 [symbolic = %pattern_type.loc6_20 (constants.%pattern_type.c1a)] // CHECK:STDOUT: %.loc6_29.1: Core.Form = init_form %impl.elem0.loc6_23.1, call_param2 [symbolic = %.loc6_29.1 (constants.%.147)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @J.G.%Self.binding.as_type (%Self.binding.as_type.ed8), %v.param: @J.G.%impl.elem0.loc6_23.1 (%impl.elem0.335)) -> out %return.param: @J.G.%impl.elem0.loc6_23.1 (%impl.elem0.335); +// CHECK:STDOUT: fn(%self.param: @J.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type.ed8), %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: %.dd4 = impl_witness_access constants.%Negate.impl_witness.11c, element1 [concrete = constants.%Int.as.Negate.impl.Op.e7f] +// CHECK:STDOUT: %impl.elem1: %.5dd = impl_witness_access constants.%Negate.impl_witness.11c, element1 [concrete = constants.%Int.as.Negate.impl.Op.e7f] // 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 @@ -1362,7 +1427,7 @@ fn F() { // 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: %.dd4 = impl_witness_access constants.%Negate.impl_witness.11c, element1 [concrete = constants.%Int.as.Negate.impl.Op.e7f] +// CHECK:STDOUT: %impl.elem1: %.5dd = impl_witness_access constants.%Negate.impl_witness.11c, element1 [concrete = constants.%Int.as.Negate.impl.Op.e7f] // 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 @@ -1376,10 +1441,10 @@ fn F() { // 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.%assoc1 [concrete = constants.%assoc1.a57] -// CHECK:STDOUT: %impl.elem1.loc21: %.013 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%E.as.J.impl.F] +// CHECK:STDOUT: %F.ref.loc21: %J.assoc_type = name_ref F, @J.%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: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc21: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc21: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc21_21.1: = bound_method %int_2, %impl.elem0.loc21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // 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_21.2: = bound_method %int_2, %specific_fn.loc21 [concrete = constants.%bound_method.646] @@ -1399,10 +1464,10 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: %e.ref.loc22: %E = name_ref e, %e // CHECK:STDOUT: %G.ref.loc22: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2] -// CHECK:STDOUT: %impl.elem2.loc22: %.35c = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%E.as.J.impl.G] +// 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_18: = bound_method %e.ref.loc22, %impl.elem2.loc22 // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc22: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc22_21.1: = bound_method %int_3, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // 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_21.2: = bound_method %int_3, %specific_fn.loc22 [concrete = constants.%bound_method.fa7] @@ -1421,10 +1486,10 @@ fn F() { // 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.%assoc1 [concrete = constants.%assoc1.a57] -// CHECK:STDOUT: %impl.elem1.loc23: %.013 = impl_witness_access constants.%J.impl_witness, element1 [concrete = constants.%E.as.J.impl.F] +// CHECK:STDOUT: %F.ref.loc23: %J.assoc_type = name_ref F, @J.%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: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc23: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc23: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc23_21.1: = bound_method %int_4, %impl.elem0.loc23 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // 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_21.2: = bound_method %int_4, %specific_fn.loc23 [concrete = constants.%bound_method.6d7] @@ -1445,10 +1510,10 @@ fn F() { // 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.%assoc2 [concrete = constants.%assoc2] -// CHECK:STDOUT: %impl.elem2.loc24: %.35c = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%E.as.J.impl.G] +// 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_18: = 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: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc24: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc24_25.1: = bound_method %int_5, %impl.elem0.loc24 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005] // 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_25.2: = bound_method %int_5, %specific_fn.loc24 [concrete = constants.%bound_method.e9d] @@ -1469,10 +1534,10 @@ fn F() { // 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: %G.ref.loc25: %J.assoc_type = name_ref G, @J.%assoc2 [concrete = constants.%assoc2] -// CHECK:STDOUT: %impl.elem2.loc25: %.35c = impl_witness_access constants.%J.impl_witness, element2 [concrete = constants.%E.as.J.impl.G] +// 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_18: = bound_method %e.ref.loc25, %impl.elem2.loc25 // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] -// CHECK:STDOUT: %impl.elem0.loc25: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc25_25.1: = bound_method %int_6, %impl.elem0.loc25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.502] // 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_25.2: = bound_method %int_6, %specific_fn.loc25 [concrete = constants.%bound_method.bc2] @@ -1502,20 +1567,21 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc28_25: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc28_25 (constants.%require_complete.19a)] // 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: %.loc29: type = fn_type_with_self_type constants.%J.F.type, %T.loc28_17.1 [symbolic = %.loc29 (constants.%.322)] -// CHECK:STDOUT: %impl.elem1.loc29_11.2: @GenericCallF.%.loc29 (%.322) = 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.F(%T.loc28_17.1) [symbolic = %specific_impl_fn.loc29_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %J.WithSelf.F.type: type = fn_type @J.WithSelf.F, @J(%T.loc28_17.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_17.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_17.1) [symbolic = %specific_impl_fn.loc29_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @GenericCallF.%T.binding.as_type (%T.binding.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.binding.as_type (%T.binding.as_type) = name_ref t, %t -// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.a57] -// CHECK:STDOUT: %impl.elem1.loc29_11.1: @GenericCallF.%.loc29 (%.322) = impl_witness_access constants.%J.lookup_impl_witness.264, element1 [symbolic = %impl.elem1.loc29_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%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.F(constants.%T) [symbolic = %specific_impl_fn.loc29_11.2 (constants.%specific_impl_fn)] +// 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.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.F.call to %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: @@ -1529,7 +1595,7 @@ fn F() { // CHECK:STDOUT: %J.facet.loc33_27.2: %J.type = facet_value constants.%E, (constants.%J.impl_witness) [concrete = constants.%J.facet] // CHECK:STDOUT: %.loc33_27.2: %J.type = converted constants.%E, %J.facet.loc33_27.2 [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: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc33_26.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // 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.646] @@ -1540,9 +1606,16 @@ fn F() { // CHECK:STDOUT: return %GenericCallF.call // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%Self.8a1) {} +// CHECK:STDOUT: specific @J(constants.%Self.8a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.F(constants.%Self.8a1) { +// 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 @@ -1550,7 +1623,7 @@ fn F() { // CHECK:STDOUT: %.loc5_17.1 => constants.%.a6a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.G(constants.%Self.8a1) { +// CHECK:STDOUT: specific @J.WithSelf.G(constants.%Self.8a1) { // CHECK:STDOUT: %Self => constants.%Self.8a1 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.ed8 // CHECK:STDOUT: %pattern_type.loc6_8 => constants.%pattern_type.832 @@ -1560,9 +1633,25 @@ fn F() { // CHECK:STDOUT: %.loc6_29.1 => constants.%.147 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%.Self.2fa) {} +// CHECK:STDOUT: specific @J(constants.%.Self.2fa) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.F(constants.%J.facet) { +// CHECK:STDOUT: specific @J(constants.%J.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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 @@ -1570,7 +1659,7 @@ fn F() { // CHECK:STDOUT: %.loc5_17.1 => constants.%.e54 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.G(constants.%J.facet) { +// CHECK:STDOUT: specific @J.WithSelf.G(constants.%J.facet) { // CHECK:STDOUT: %Self => constants.%J.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%E // CHECK:STDOUT: %pattern_type.loc6_8 => constants.%pattern_type.99f @@ -1580,7 +1669,23 @@ fn F() { // CHECK:STDOUT: %.loc6_29.1 => constants.%.8ef // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%T) {} +// CHECK:STDOUT: specific @J(constants.%E.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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_17.1 => constants.%T @@ -1592,7 +1697,7 @@ fn F() { // CHECK:STDOUT: %.loc28_42.2 => constants.%.0b0 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%T) { +// 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 @@ -1612,7 +1717,8 @@ fn F() { // 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: %.loc29 => constants.%.013 +// 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: } @@ -1625,11 +1731,11 @@ fn F() { // CHECK:STDOUT: %Self.binding.as_type.d31: type = symbolic_binding_type Self, 0, %Self.ab9 [symbolic] // CHECK:STDOUT: %pattern_type.fa0: type = pattern_type %Self.binding.as_type.d31 [symbolic] // CHECK:STDOUT: %.389: Core.Form = init_form %Self.binding.as_type.d31, call_param2 [symbolic] -// CHECK:STDOUT: %I.Op.type: type = fn_type @I.Op [concrete] +// CHECK:STDOUT: %I.WithSelf.Op.type.71c: type = fn_type @I.WithSelf.Op, @I(%Self.ab9) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %I.Op: %I.Op.type = struct_value () [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.20d: %I.assoc_type = assoc_entity element0, @I.%I.Op.decl [concrete] +// CHECK:STDOUT: %assoc0.aa8: %I.assoc_type = assoc_entity element0, @I.%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] @@ -1637,21 +1743,23 @@ fn F() { // 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.918: %J.assoc_type = assoc_entity element0, @J.%U [concrete] +// CHECK:STDOUT: %assoc0.445: %J.assoc_type = assoc_entity element0, @J.%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: %.3f3: Core.Form = init_form %as_type.d83, call_param1 [symbolic] -// CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete] -// CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J(%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.%J.WithSelf.F.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: %J.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.f76: type = pattern_type %J.type [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] // CHECK:STDOUT: %pattern_type.14f: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %J.WithSelf.F.type.41f: type = fn_type @J.WithSelf.F, @J(%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] @@ -1661,21 +1769,23 @@ fn F() { // CHECK:STDOUT: %GenericResult: %GenericResult.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.19a: = require_complete_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %require_complete.9b3: = require_complete_type %as_type.baf [symbolic] -// CHECK:STDOUT: %.322: type = fn_type_with_self_type %J.F.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem1: %.322 = impl_witness_access %J.lookup_impl_witness.264, element1 [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: %.c35: Core.Form = init_form %as_type.baf, call_param1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.c25: = specific_impl_function %impl.elem1, @J.F(%T) [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: %.74f: type = fn_type_with_self_type %I.Op.type, %I.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.aa5: %.74f = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.dcb: = specific_impl_function %impl.elem0.aa5, @I.Op(%I.facet) [symbolic] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] +// CHECK:STDOUT: %I.WithSelf.Op.type.25c: type = fn_type @I.WithSelf.Op, @I(%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: %.e48: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.1c5: %.e48 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.06e: = specific_impl_function %impl.elem0.1c5, @Destroy.Op(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.077: type = fn_type @Destroy.WithSelf.Op, @Destroy(%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 { @@ -1711,7 +1821,7 @@ fn F() { // CHECK:STDOUT: %T.ref.loc12_42: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc12_43: type = facet_access_type %T.ref.loc12_42 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc12_43.3: type = converted %T.ref.loc12_42, %T.as_type.loc12_43 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %U.ref.loc12_43: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.918] +// 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)] @@ -1733,7 +1843,7 @@ fn F() { // CHECK:STDOUT: %T.ref.loc12_34: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc12_35: type = facet_access_type %T.ref.loc12_34 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc12_35.2: type = converted %T.ref.loc12_34, %T.as_type.loc12_35 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %U.ref.loc12_35: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.918] +// 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)] @@ -1745,99 +1855,102 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %I.Op.decl: %I.Op.type = fn_decl @I.Op [concrete = constants.%I.Op] { -// CHECK:STDOUT: %self.patt: @I.Op.%pattern_type (%pattern_type.fa0) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.Op.%pattern_type (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %b.patt: @I.Op.%pattern_type (%pattern_type.fa0) = value_binding_pattern b [concrete] -// CHECK:STDOUT: %b.param_patt: @I.Op.%pattern_type (%pattern_type.fa0) = value_param_pattern %b.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @I.Op.%pattern_type (%pattern_type.fa0) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @I.Op.%pattern_type (%pattern_type.fa0) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %Self.loc3: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.Op.decl: @I.%I.WithSelf.Op.type (%I.WithSelf.Op.type.71c) = fn_decl @I.WithSelf.Op [symbolic = @I.%I.WithSelf.Op (constants.%I.WithSelf.Op.ae1)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.Op.%pattern_type (%pattern_type.fa0) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.Op.%pattern_type (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %b.patt: @I.WithSelf.Op.%pattern_type (%pattern_type.fa0) = value_binding_pattern b [concrete] +// CHECK:STDOUT: %b.param_patt: @I.WithSelf.Op.%pattern_type (%pattern_type.fa0) = value_param_pattern %b.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @I.WithSelf.Op.%pattern_type (%pattern_type.fa0) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @I.WithSelf.Op.%pattern_type (%pattern_type.fa0) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc4_33: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] +// CHECK:STDOUT: %Self.ref.loc4_33: %I.type = name_ref Self, @I.%Self.loc3 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %Self.as_type.loc4_33: type = facet_access_type %Self.ref.loc4_33 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %.loc4_33.2: type = converted %Self.ref.loc4_33, %Self.as_type.loc4_33 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %.loc4_33.3: Core.Form = init_form %.loc4_33.2, call_param2 [symbolic = %.loc4_33.1 (constants.%.389)] -// CHECK:STDOUT: %self.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type.d31) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.d31) = value_param call_param0 // CHECK:STDOUT: %.loc4_15.1: type = splice_block %.loc4_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] { -// CHECK:STDOUT: %Self.ref.loc4_15: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] +// CHECK:STDOUT: %Self.ref.loc4_15: %I.type = name_ref Self, @I.%Self.loc3 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %Self.as_type.loc4_15: type = facet_access_type %Self.ref.loc4_15 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %.loc4_15.2: type = converted %Self.ref.loc4_15, %Self.as_type.loc4_15 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.Op.%Self.binding.as_type (%Self.binding.as_type.d31) = value_binding self, %self.param -// CHECK:STDOUT: %b.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type.d31) = value_param call_param1 +// CHECK:STDOUT: %self: @I.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.d31) = value_binding self, %self.param +// CHECK:STDOUT: %b.param: @I.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.d31) = value_param call_param1 // CHECK:STDOUT: %.loc4_24.1: type = splice_block %.loc4_24.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] { -// CHECK:STDOUT: %Self.ref.loc4_24: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] +// CHECK:STDOUT: %Self.ref.loc4_24: %I.type = name_ref Self, @I.%Self.loc3 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %Self.as_type.loc4_24: type = facet_access_type %Self.ref.loc4_24 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %.loc4_24.2: type = converted %Self.ref.loc4_24, %Self.as_type.loc4_24 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: } -// CHECK:STDOUT: %b: @I.Op.%Self.binding.as_type (%Self.binding.as_type.d31) = value_binding b, %b.param -// CHECK:STDOUT: %return.param: ref @I.Op.%Self.binding.as_type (%Self.binding.as_type.d31) = out_param call_param2 -// CHECK:STDOUT: %return: ref @I.Op.%Self.binding.as_type (%Self.binding.as_type.d31) = return_slot %return.param +// CHECK:STDOUT: %b: @I.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.d31) = value_binding b, %b.param +// CHECK:STDOUT: %return.param: ref @I.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.d31) = out_param call_param2 +// CHECK:STDOUT: %return: ref @I.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.d31) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.Op.decl [concrete = constants.%assoc0.20d] +// 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: .Self = %Self.loc3 // CHECK:STDOUT: .Op = %assoc0 -// CHECK:STDOUT: witness = (%I.Op.decl) +// CHECK:STDOUT: witness = (%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: %Self.loc7: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: 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.%U [concrete = constants.%assoc0.918] +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.445] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] { -// CHECK:STDOUT: %u.patt: @J.F.%pattern_type (%pattern_type.d76) = value_binding_pattern u [concrete] -// CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type (%pattern_type.d76) = value_param_pattern %u.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @J.F.%pattern_type (%pattern_type.d76) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type (%pattern_type.d76) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %J.WithSelf.F.decl: @J.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { +// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type (%pattern_type.d76) = value_binding_pattern u [concrete] +// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.d76) = value_param_pattern %u.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type (%pattern_type.d76) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.d76) = out_param_pattern %return.patt, call_param1 [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, call_param1 [symbolic = %.loc9_17.1 (constants.%.3f3)] -// CHECK:STDOUT: %u.param: @J.F.%as_type (%as_type.d83) = value_param call_param0 +// 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.F.%as_type (%as_type.d83) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @J.F.%as_type (%as_type.d83) = out_param call_param1 -// CHECK:STDOUT: %return: ref @J.F.%as_type (%as_type.d83) = return_slot %return.param +// 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.F.decl [concrete = constants.%assoc1] +// 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: .Self = %Self.loc7 +// CHECK:STDOUT: .I = // CHECK:STDOUT: .I = // CHECK:STDOUT: .U = @U.%assoc0 // CHECK:STDOUT: .F = %assoc1 -// CHECK:STDOUT: witness = (%U, %J.F.decl) +// CHECK:STDOUT: witness = (%U, %J.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) { -// CHECK:STDOUT: assoc_const U:! %facet_type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.Op(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.Op(@I.%Self.loc3: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.fa0)] // CHECK:STDOUT: %.loc4_33.1: Core.Form = init_form %Self.binding.as_type, call_param2 [symbolic = %.loc4_33.1 (constants.%.389)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type.d31), %b.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type.d31)) -> out %return.param: @I.Op.%Self.binding.as_type (%Self.binding.as_type.d31); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.d31), %b.param: @I.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.d31)) -> out %return.param: @I.WithSelf.Op.%Self.binding.as_type (%Self.binding.as_type.d31); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self.loc7: %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)] @@ -1845,7 +1958,7 @@ fn F() { // 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, call_param1 [symbolic = %.loc9_17.1 (constants.%.3f3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @J.F.%as_type (%as_type.d83)) -> out %return.param: @J.F.%as_type (%as_type.d83); +// 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_18.2: %J.type) { @@ -1861,82 +1974,97 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc12_26: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc12_26 (constants.%require_complete.19a)] // 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: %.loc13_11: type = fn_type_with_self_type constants.%J.F.type, %T.loc12_18.1 [symbolic = %.loc13_11 (constants.%.322)] -// CHECK:STDOUT: %impl.elem1.loc13_11.2: @GenericResult.%.loc13_11 (%.322) = 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.F(%T.loc12_18.1) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.c25)] +// CHECK:STDOUT: %J.WithSelf.F.type: type = fn_type @J.WithSelf.F, @J(%T.loc12_18.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_18.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_18.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: %.loc13_16: type = fn_type_with_self_type constants.%I.Op.type, %I.facet.loc13_16 [symbolic = %.loc13_16 (constants.%.74f)] -// CHECK:STDOUT: %impl.elem0.loc13_16.2: @GenericResult.%.loc13_16 (%.74f) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.aa5)] -// CHECK:STDOUT: %specific_impl_fn.loc13_16.2: = specific_impl_function %impl.elem0.loc13_16.2, @I.Op(%I.facet.loc13_16) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.dcb)] +// CHECK:STDOUT: %I.WithSelf.Op.type: type = fn_type @I.WithSelf.Op, @I(%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: %.loc13_29.6: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc13_29.6 (constants.%.e48)] -// CHECK:STDOUT: %impl.elem0.loc13_29.2: @GenericResult.%.loc13_29.6 (%.e48) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.1c5)] -// CHECK:STDOUT: %specific_impl_fn.loc13_29.2: = specific_impl_function %impl.elem0.loc13_29.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.06e)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.077)] +// CHECK:STDOUT: %.loc13_29.6: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc13_29.6 (constants.%.0e3)] +// CHECK:STDOUT: %impl.elem0.loc13_29.2: @GenericResult.%.loc13_29.6 (%.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.binding.as_type (%T.binding.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.binding.as_type (%T.binding.as_type) = name_ref t, %t // CHECK:STDOUT: %F.ref.loc13_11: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc13_11.1: @GenericResult.%.loc13_11 (%.322) = impl_witness_access constants.%J.lookup_impl_witness.264, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)] +// 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: %.loc13_15.2: %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.F(constants.%T) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.c25)] +// 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.3: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = temporary_storage -// CHECK:STDOUT: %J.F.call.loc13_15: init @GenericResult.%as_type.loc12_35.1 (%as_type.baf) to %.loc13_15.3 = call %specific_impl_fn.loc13_11.1(%u.ref.loc13_14) +// CHECK:STDOUT: %J.WithSelf.F.call.loc13_15: init @GenericResult.%as_type.loc12_35.1 (%as_type.baf) to %.loc13_15.3 = 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.%assoc0 [concrete = constants.%assoc0.20d] -// CHECK:STDOUT: %impl.elem0.loc13_16.1: @GenericResult.%.loc13_16 (%.74f) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.aa5)] -// CHECK:STDOUT: %bound_method.loc13_16: = bound_method %J.F.call.loc13_15, %impl.elem0.loc13_16.1 +// CHECK:STDOUT: %Op.ref: %I.assoc_type = name_ref Op, @I.%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_18.2 [symbolic = %T.loc12_18.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc13: type = facet_access_type %T.ref.loc13 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc13_25: type = converted %T.ref.loc13, %T.as_type.loc13 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %F.ref.loc13_25: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc13_25: @GenericResult.%.loc13_11 (%.322) = impl_witness_access constants.%J.lookup_impl_witness.264, element1 [symbolic = %impl.elem1.loc13_11.2 (constants.%impl.elem1)] +// 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: %.loc13_29.2: %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.F(constants.%T) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.c25)] +// 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.3: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = temporary_storage -// CHECK:STDOUT: %J.F.call.loc13_29: init @GenericResult.%as_type.loc12_35.1 (%as_type.baf) to %.loc13_29.3 = call %specific_impl_fn.loc13_25(%u.ref.loc13_28) +// CHECK:STDOUT: %J.WithSelf.F.call.loc13_29: init @GenericResult.%as_type.loc12_35.1 (%as_type.baf) to %.loc13_29.3 = call %specific_impl_fn.loc13_25(%u.ref.loc13_28) // CHECK:STDOUT: %I.facet.loc13_30.1: %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.1: %I.type = converted constants.%as_type.baf, %I.facet.loc13_30.1 [symbolic = %I.facet.loc13_16 (constants.%I.facet)] // CHECK:STDOUT: %I.facet.loc13_30.2: %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.2: %I.type = converted constants.%as_type.baf, %I.facet.loc13_30.2 [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.Op(constants.%I.facet) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.dcb)] -// CHECK:STDOUT: %bound_method.loc13_30: = bound_method %J.F.call.loc13_15, %specific_impl_fn.loc13_16.1 +// 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.4: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = temporary %.loc13_15.3, %J.F.call.loc13_15 +// CHECK:STDOUT: %.loc13_15.4: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = temporary %.loc13_15.3, %J.WithSelf.F.call.loc13_15 // CHECK:STDOUT: %.loc13_15.5: @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = acquire_value %.loc13_15.4 -// CHECK:STDOUT: %.loc13_29.4: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = temporary %.loc13_29.3, %J.F.call.loc13_29 +// CHECK:STDOUT: %.loc13_29.4: ref @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = temporary %.loc13_29.3, %J.WithSelf.F.call.loc13_29 // CHECK:STDOUT: %.loc13_29.5: @GenericResult.%as_type.loc12_35.1 (%as_type.baf) = acquire_value %.loc13_29.4 -// CHECK:STDOUT: %I.Op.call: init @GenericResult.%as_type.loc12_35.1 (%as_type.baf) to %.loc12_43.1 = call %bound_method.loc13_30(%.loc13_15.5, %.loc13_29.5) -// CHECK:STDOUT: %impl.elem0.loc13_29.1: @GenericResult.%.loc13_29.6 (%.e48) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.1c5)] +// 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.5, %.loc13_29.5) +// CHECK:STDOUT: %impl.elem0.loc13_29.1: @GenericResult.%.loc13_29.6 (%.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.4, %impl.elem0.loc13_29.1 -// CHECK:STDOUT: %specific_impl_fn.loc13_29.1: = specific_impl_function %impl.elem0.loc13_29.1, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.06e)] +// 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.4, %specific_impl_fn.loc13_29.1 -// CHECK:STDOUT: %Destroy.Op.call.loc13_29: init %empty_tuple.type = call %bound_method.loc13_29.2(%.loc13_29.4) -// CHECK:STDOUT: %impl.elem0.loc13_15: @GenericResult.%.loc13_29.6 (%.e48) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.1c5)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.call.loc13_29: init %empty_tuple.type = call %bound_method.loc13_29.2(%.loc13_29.4) +// CHECK:STDOUT: %impl.elem0.loc13_15: @GenericResult.%.loc13_29.6 (%.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.4, %impl.elem0.loc13_15 -// CHECK:STDOUT: %specific_impl_fn.loc13_15: = specific_impl_function %impl.elem0.loc13_15, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.06e)] +// 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.4, %specific_impl_fn.loc13_15 -// CHECK:STDOUT: %Destroy.Op.call.loc13_15: init %empty_tuple.type = call %bound_method.loc13_15.2(%.loc13_15.4) -// CHECK:STDOUT: return %I.Op.call to %return.param +// CHECK:STDOUT: %Destroy.WithSelf.Op.call.loc13_15: init %empty_tuple.type = call %bound_method.loc13_15.2(%.loc13_15.4) +// CHECK:STDOUT: return %I.WithSelf.Op.call to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.Op(constants.%Self.ab9) { +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => 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.binding.as_type => constants.%Self.binding.as_type.d31 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fa0 // CHECK:STDOUT: %.loc4_33.1 => constants.%.389 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%Self.8a1) {} +// CHECK:STDOUT: specific @J(constants.%Self.8a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => 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.F(constants.%Self.8a1) { +// 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 @@ -1945,7 +2073,12 @@ fn F() { // CHECK:STDOUT: %.loc9_17.1 => constants.%.3f3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%T) {} +// CHECK:STDOUT: specific @J(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => 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_18.1 => constants.%T @@ -1958,7 +2091,7 @@ fn F() { // CHECK:STDOUT: %.loc12_43.2 => constants.%.2cc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%T) { +// 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 @@ -1967,7 +2100,14 @@ fn F() { // CHECK:STDOUT: %.loc9_17.1 => constants.%.c35 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.Op(constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => 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.binding.as_type => constants.%as_type.baf // CHECK:STDOUT: %pattern_type => constants.%pattern_type.bba @@ -1987,15 +2127,17 @@ fn F() { // 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: %.147: Core.Form = init_form %impl.elem0.335, call_param2 [symbolic] -// CHECK:STDOUT: %J.G.type: type = fn_type @J.G [concrete] -// CHECK:STDOUT: %J.G: %J.G.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%J.G.decl [concrete] +// CHECK:STDOUT: %J.WithSelf.G.type.ace: type = fn_type @J.WithSelf.G, @J(%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.%J.WithSelf.G.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: %J.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.f76: type = pattern_type %J.type [concrete] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] // CHECK:STDOUT: %pattern_type.14f: type = pattern_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %J.WithSelf.G.type.b2e: type = fn_type @J.WithSelf.G, @J(%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] @@ -2004,9 +2146,9 @@ fn F() { // CHECK:STDOUT: %GenericCallInterfaceQualified: %GenericCallInterfaceQualified.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.19a: = require_complete_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %require_complete.06a: = require_complete_type %impl.elem0.560 [symbolic] -// CHECK:STDOUT: %.588: type = fn_type_with_self_type %J.G.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem1: %.588 = impl_witness_access %J.lookup_impl_witness.264, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem1, @J.G(%T) [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 { @@ -2066,53 +2208,52 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self.loc3: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: 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.%U [concrete = constants.%assoc0] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.G.decl: %J.G.type = fn_decl @J.G [concrete = constants.%J.G] { -// CHECK:STDOUT: %self.patt: @J.G.%pattern_type.loc5_8 (%pattern_type.832) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @J.G.%pattern_type.loc5_8 (%pattern_type.832) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %v.patt: @J.G.%pattern_type.loc5_20 (%pattern_type.c1a) = value_binding_pattern v [concrete] -// CHECK:STDOUT: %v.param_patt: @J.G.%pattern_type.loc5_20 (%pattern_type.c1a) = value_param_pattern %v.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @J.G.%pattern_type.loc5_20 (%pattern_type.c1a) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @J.G.%pattern_type.loc5_20 (%pattern_type.c1a) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %J.WithSelf.G.decl: @J.%J.WithSelf.G.type (%J.WithSelf.G.type.ace) = fn_decl @J.WithSelf.G [symbolic = @J.%J.WithSelf.G (constants.%J.WithSelf.G.6e7)] { +// CHECK:STDOUT: %self.patt: @J.WithSelf.G.%pattern_type.loc5_8 (%pattern_type.832) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @J.WithSelf.G.%pattern_type.loc5_8 (%pattern_type.832) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %v.patt: @J.WithSelf.G.%pattern_type.loc5_20 (%pattern_type.c1a) = value_binding_pattern v [concrete] +// CHECK:STDOUT: %v.param_patt: @J.WithSelf.G.%pattern_type.loc5_20 (%pattern_type.c1a) = value_param_pattern %v.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @J.WithSelf.G.%pattern_type.loc5_20 (%pattern_type.c1a) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @J.WithSelf.G.%pattern_type.loc5_20 (%pattern_type.c1a) = out_param_pattern %return.patt, call_param2 [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, call_param2 [symbolic = %.loc5_29.1 (constants.%.147)] -// CHECK:STDOUT: %self.param: @J.G.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @J.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self.loc3 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @J.G.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param -// CHECK:STDOUT: %v.param: @J.G.%impl.elem0.loc5_23.1 (%impl.elem0.335) = value_param call_param1 +// CHECK:STDOUT: %self: @J.WithSelf.G.%Self.binding.as_type (%Self.binding.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.G.%impl.elem0.loc5_23.1 (%impl.elem0.335) = value_binding v, %v.param -// CHECK:STDOUT: %return.param: ref @J.G.%impl.elem0.loc5_23.1 (%impl.elem0.335) = out_param call_param2 -// CHECK:STDOUT: %return: ref @J.G.%impl.elem0.loc5_23.1 (%impl.elem0.335) = return_slot %return.param +// 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.G.decl [concrete = constants.%assoc1] +// 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: .Self = %Self.loc3 // CHECK:STDOUT: .U = @U.%assoc0 // CHECK:STDOUT: .G = %assoc1 -// CHECK:STDOUT: witness = (%U, %J.G.decl) +// CHECK:STDOUT: witness = (%U, %J.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) { -// CHECK:STDOUT: assoc_const U:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.G(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.G(@J.%Self.loc3: %J.type) { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.832)] @@ -2121,7 +2262,7 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc5_20: type = pattern_type %impl.elem0.loc5_23.1 [symbolic = %pattern_type.loc5_20 (constants.%pattern_type.c1a)] // CHECK:STDOUT: %.loc5_29.1: Core.Form = init_form %impl.elem0.loc5_23.1, call_param2 [symbolic = %.loc5_29.1 (constants.%.147)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @J.G.%Self.binding.as_type (%Self.binding.as_type), %v.param: @J.G.%impl.elem0.loc5_23.1 (%impl.elem0.335)) -> out %return.param: @J.G.%impl.elem0.loc5_23.1 (%impl.elem0.335); +// CHECK:STDOUT: fn(%self.param: @J.WithSelf.G.%Self.binding.as_type (%Self.binding.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_34.2: %J.type) { @@ -2136,29 +2277,35 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc8_42: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc8_42 (constants.%require_complete.19a)] // 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: %.loc9: type = fn_type_with_self_type constants.%J.G.type, %T.loc8_34.1 [symbolic = %.loc9 (constants.%.588)] -// CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallInterfaceQualified.%.loc9 (%.588) = 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.G(%T.loc8_34.1) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %J.WithSelf.G.type: type = fn_type @J.WithSelf.G, @J(%T.loc8_34.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_34.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_34.1) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @GenericCallInterfaceQualified.%T.binding.as_type (%T.binding.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.binding.as_type (%T.binding.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.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallInterfaceQualified.%.loc9 (%.588) = impl_witness_access constants.%J.lookup_impl_witness.264, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] +// 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.G(constants.%T) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] +// 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.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.G.call to %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 @U(constants.%Self) {} +// CHECK:STDOUT: specific @J(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.G(constants.%Self) { +// CHECK:STDOUT: specific @J.WithSelf.G(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.832 @@ -2168,7 +2315,12 @@ fn F() { // CHECK:STDOUT: %.loc5_29.1 => constants.%.147 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%T) {} +// CHECK:STDOUT: specific @J(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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_34.1 => constants.%T @@ -2180,7 +2332,7 @@ fn F() { // CHECK:STDOUT: %.loc8_59.2 => constants.%.0b0 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.G(constants.%T) { +// CHECK:STDOUT: specific @J.WithSelf.G(constants.%T) { // CHECK:STDOUT: %Self => constants.%T // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.14f @@ -2196,17 +2348,19 @@ 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.d5c: %J.assoc_type = assoc_entity element0, @J.%U [concrete] +// CHECK:STDOUT: %assoc0.ebd: %J.assoc_type = assoc_entity element0, @J.%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: %.a6a: Core.Form = init_form %impl.elem0.335, call_param1 [symbolic] -// CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete] -// CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J(%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.%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(%.Self.2fa) [symbolic_self] +// CHECK:STDOUT: %J.WithSelf.F.659: %J.WithSelf.F.type.e19 = struct_value () [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.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] @@ -2224,16 +2378,19 @@ fn F() { // CHECK:STDOUT: %GenericCallFI32.type: type = fn_type @GenericCallFI32 [concrete] // CHECK:STDOUT: %GenericCallFI32: %GenericCallFI32.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.226: = require_complete_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %J.WithSelf.F.type.4bb: type = fn_type @J.WithSelf.F, @J(%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.binding.as_type, (%J.lookup_impl_witness.74d) [symbolic] -// CHECK:STDOUT: %.0ba: type = fn_type_with_self_type %J.F.type, %J.facet [symbolic] -// CHECK:STDOUT: %impl.elem1: %.0ba = impl_witness_access %J.lookup_impl_witness.74d, element1 [symbolic] +// CHECK:STDOUT: %J.WithSelf.F.type.606: type = fn_type @J.WithSelf.F, @J(%J.facet) [symbolic] +// CHECK:STDOUT: %J.WithSelf.F.459: %J.WithSelf.F.type.606 = struct_value () [symbolic] +// CHECK:STDOUT: %.3ee: type = fn_type_with_self_type %J.WithSelf.F.type.606, %J.facet [symbolic] +// CHECK:STDOUT: %impl.elem1: %.3ee = 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.F(%J.facet) [symbolic] +// 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -2241,7 +2398,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @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] @@ -2286,7 +2444,7 @@ fn F() { // CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self.2 [symbolic_self = constants.%.Self.2fa] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc8_32: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d5c] +// 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: %int_32.loc8_37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc8_37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -2309,51 +2467,50 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: %Self.loc3: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: 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.%U [concrete = constants.%assoc0.d5c] +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.ebd] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] { -// CHECK:STDOUT: %u.patt: @J.F.%pattern_type (%pattern_type.c1a) = value_binding_pattern u [concrete] -// CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type (%pattern_type.c1a) = value_param_pattern %u.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @J.F.%pattern_type (%pattern_type.c1a) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type (%pattern_type.c1a) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %J.WithSelf.F.decl: @J.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { +// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = value_binding_pattern u [concrete] +// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = value_param_pattern %u.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = out_param_pattern %return.patt, call_param1 [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, call_param1 [symbolic = %.loc5_17.1 (constants.%.a6a)] -// CHECK:STDOUT: %u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_param call_param0 +// 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.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = out_param call_param1 -// CHECK:STDOUT: %return: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = return_slot %return.param +// 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.F.decl [concrete = constants.%assoc1] +// 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: .Self = %Self.loc3 // CHECK:STDOUT: .U = @U.%assoc0 // CHECK:STDOUT: .F = %assoc1 -// CHECK:STDOUT: witness = (%U, %J.F.decl) +// CHECK:STDOUT: witness = (%U, %J.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) { -// CHECK:STDOUT: assoc_const U:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self.loc3: %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, call_param1 [symbolic = %.loc5_17.1 (constants.%.a6a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335)) -> out %return.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335); +// 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_20.2: %J_where.type) { @@ -2365,32 +2522,38 @@ fn F() { // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.226)] // CHECK:STDOUT: %J.lookup_impl_witness: = lookup_impl_witness %T.loc8_20.1, @J [symbolic = %J.lookup_impl_witness (constants.%J.lookup_impl_witness.74d)] // CHECK:STDOUT: %J.facet: %J.type = facet_value %T.binding.as_type, (%J.lookup_impl_witness) [symbolic = %J.facet (constants.%J.facet)] -// CHECK:STDOUT: %.loc9_11: type = fn_type_with_self_type constants.%J.F.type, %J.facet [symbolic = %.loc9_11 (constants.%.0ba)] -// CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallFI32.%.loc9_11 (%.0ba) = 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.F(%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %J.WithSelf.F.type: type = fn_type @J.WithSelf.F, @J(%J.facet) [symbolic = %J.WithSelf.F.type (constants.%J.WithSelf.F.type.606)] +// CHECK:STDOUT: %.loc9_11: type = fn_type_with_self_type %J.WithSelf.F.type, %J.facet [symbolic = %.loc9_11 (constants.%.3ee)] +// CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallFI32.%.loc9_11 (%.3ee) = 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.binding.as_type (%T.binding.as_type)) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: @GenericCallFI32.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallFI32.%.loc9_11 (%.0ba) = impl_witness_access constants.%J.lookup_impl_witness.74d, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallFI32.%.loc9_11 (%.3ee) = 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.F(constants.%J.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %impl.elem0.loc9: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// 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: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // 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.F.call: init %i32 = call %specific_impl_fn.loc9_11.1(%.loc9_14.2) -// CHECK:STDOUT: return %J.F.call +// 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 @U(constants.%Self.8a1) {} +// CHECK:STDOUT: specific @J(constants.%Self.8a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.F(constants.%Self.8a1) { +// 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 @@ -2398,7 +2561,12 @@ fn F() { // CHECK:STDOUT: %.loc5_17.1 => constants.%.a6a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%.Self.2fa) {} +// CHECK:STDOUT: specific @J(constants.%.Self.2fa) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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_20.1 => constants.%T @@ -2406,7 +2574,21 @@ fn F() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.12a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%J.facet) { +// CHECK:STDOUT: specific @J(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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(constants.%J.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%J.facet +// CHECK:STDOUT: %J.WithSelf.F.type => constants.%J.WithSelf.F.type.606 +// CHECK:STDOUT: %J.WithSelf.F => constants.%J.WithSelf.F.459 +// 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 @@ -2420,16 +2602,18 @@ 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.d5c: %J.assoc_type = assoc_entity element0, @J.%U [concrete] +// CHECK:STDOUT: %assoc0.ebd: %J.assoc_type = assoc_entity element0, @J.%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: %.a6a: Core.Form = init_form %impl.elem0.335, call_param1 [symbolic] -// CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete] -// CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%J.F.decl [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J(%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.%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(%.Self) [symbolic_self] +// CHECK:STDOUT: %J.WithSelf.F.659: %J.WithSelf.F.type.e19 = struct_value () [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.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] @@ -2444,6 +2628,8 @@ fn F() { // 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(%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: %.e54: Core.Form = init_form %i32, call_param1 [concrete] // CHECK:STDOUT: %E.as.J.impl.F.type.4b5c2a.2: type = fn_type @E.as.J.impl.F.loc27_21.2 [concrete] @@ -2475,59 +2661,58 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: %Self.loc3: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: 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.%U [concrete = constants.%assoc0.d5c] +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.ebd] // CHECK:STDOUT: } -// CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] { -// CHECK:STDOUT: %u.patt: @J.F.%pattern_type (%pattern_type.c1a) = value_binding_pattern u [concrete] -// CHECK:STDOUT: %u.param_patt: @J.F.%pattern_type (%pattern_type.c1a) = value_param_pattern %u.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @J.F.%pattern_type (%pattern_type.c1a) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @J.F.%pattern_type (%pattern_type.c1a) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %J.WithSelf.F.decl: @J.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { +// CHECK:STDOUT: %u.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = value_binding_pattern u [concrete] +// CHECK:STDOUT: %u.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = value_param_pattern %u.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.c1a) = out_param_pattern %return.patt, call_param1 [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, call_param1 [symbolic = %.loc5_17.1 (constants.%.a6a)] -// CHECK:STDOUT: %u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_param call_param0 +// 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.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = out_param call_param1 -// CHECK:STDOUT: %return: ref @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335) = return_slot %return.param +// 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.F.decl [concrete = constants.%assoc1] +// 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: .Self = %Self.loc3 // CHECK:STDOUT: .U = @U.%assoc0 // CHECK:STDOUT: .F = %assoc1 -// CHECK:STDOUT: witness = (%U, %J.F.decl) +// CHECK:STDOUT: witness = (%U, %J.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) { -// CHECK:STDOUT: assoc_const U:! type; -// 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.patt: = value_binding_pattern u [concrete] // CHECK:STDOUT: %u.param_patt: = value_param_pattern %u.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %U.ref.loc27_19: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d5c] +// 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.d5c] +// 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, %u.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5_17.1: type = specific_constant @J.F.%U.ref.loc5_17, @J.F(constants.%J.facet) [concrete = constants.%i32] -// CHECK:STDOUT: %.loc5_17.2: type = specific_constant @J.F.%.loc5_17.2, @J.F(constants.%J.facet) [concrete = constants.%.e54] +// 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.%.e54] // 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: %u.patt: %pattern_type.7ce = value_binding_pattern u [concrete] // CHECK:STDOUT: %u.param_patt: %pattern_type.7ce = value_param_pattern %u.patt, call_param0 [concrete] @@ -2557,7 +2742,7 @@ fn F() { // 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.binding.as_type] // CHECK:STDOUT: %.loc9_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.d5c] +// 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: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] @@ -2576,14 +2761,14 @@ fn F() { // CHECK:STDOUT: extend @E.as.J.impl.%.loc9_20 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self.loc3: %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, call_param1 [symbolic = %.loc5_17.1 (constants.%.a6a)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335)) -> out %return.param: @J.F.%impl.elem0.loc5_11.1 (%impl.elem0.335); +// 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: ) -> { @@ -2601,9 +2786,14 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%Self.8a1) {} +// CHECK:STDOUT: specific @J(constants.%Self.8a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.F(constants.%Self.8a1) { +// 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 @@ -2611,9 +2801,21 @@ fn F() { // CHECK:STDOUT: %.loc5_17.1 => constants.%.a6a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%.Self) {} +// CHECK:STDOUT: specific @J(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.F(constants.%J.facet) { +// CHECK:STDOUT: specific @J(constants.%J.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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 @@ -2626,15 +2828,17 @@ fn F() { // 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.F.type: type = fn_type @J.F [concrete] -// CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J(%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.%J.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%J.WithSelf.F.decl [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(%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] @@ -2660,14 +2864,17 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] {} {} -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc3: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @J [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %J.WithSelf.F.decl: @J.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.%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: .Self = %Self.loc3 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%J.F.decl) +// CHECK:STDOUT: witness = (%J.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -2699,7 +2906,7 @@ fn F() { // CHECK:STDOUT: extend @E.as.J.impl.%J.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self.loc3: %J.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -2719,9 +2926,23 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%Self) {} +// CHECK:STDOUT: specific @J(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => 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.F(constants.%J.facet) {} +// CHECK:STDOUT: specific @J.WithSelf.F(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%J.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => 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: @@ -2730,11 +2951,11 @@ fn F() { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.832: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type.adb: type = fn_type @J.WithSelf.F, @J(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %J.F: %J.F.type = struct_value () [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.%J.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%J.WithSelf.F.decl [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.binding.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] @@ -2742,11 +2963,17 @@ fn F() { // 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(%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: %.772: type = fn_type_with_self_type %J.F.type, %J.facet [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(%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 { @@ -2768,25 +2995,28 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] { -// CHECK:STDOUT: %self.patt: @J.F.%pattern_type (%pattern_type.832) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @J.F.%pattern_type (%pattern_type.832) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc3: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @J [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %J.WithSelf.F.decl: @J.%J.WithSelf.F.type (%J.WithSelf.F.type.adb) = fn_decl @J.WithSelf.F [symbolic = @J.%J.WithSelf.F (constants.%J.WithSelf.F.569)] { +// CHECK:STDOUT: %self.patt: @J.WithSelf.F.%pattern_type (%pattern_type.832) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @J.WithSelf.F.%pattern_type (%pattern_type.832) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @J.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @J.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc4_14.1: type = splice_block %.loc4_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self.loc3 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc4_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @J.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @J.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.F.decl [concrete = constants.%assoc0] +// 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: .Self = %Self.loc3 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%J.F.decl) +// CHECK:STDOUT: witness = (%J.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -2832,7 +3062,7 @@ fn F() { // CHECK:STDOUT: extend @E.as.J.impl.%J.ref // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self.loc3: %J.type) { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.832)] @@ -2840,7 +3070,7 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %Self.binding.as_type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @J.F.%Self.binding.as_type (%Self.binding.as_type)) { +// CHECK:STDOUT: fn(%self.param: @J.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2855,31 +3085,52 @@ fn F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %E = name_ref self, %self // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.772 = impl_witness_access constants.%J.impl_witness, element0 [concrete = constants.%E.as.J.impl.F] +// 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: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%Self) { +// CHECK:STDOUT: specific @J(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => 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.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.832 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%J.facet) { +// CHECK:STDOUT: specific @J(constants.%J.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => 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.binding.as_type => constants.%E // CHECK:STDOUT: %pattern_type => constants.%pattern_type.99f // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%E.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => 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: // 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.cab: %J.assoc_type = assoc_entity element0, @J.%X [concrete] +// CHECK:STDOUT: %assoc0.df0: %J.assoc_type = assoc_entity element0, @J.%X [concrete] // CHECK:STDOUT: %E: type = class_type @E [concrete] // CHECK:STDOUT: %.Self: %J.type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] @@ -2889,6 +3140,7 @@ fn F() { // 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: %E.G.type: type = fn_type @E.G [concrete] @@ -2919,8 +3171,11 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @J { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: 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.%X [concrete = constants.%assoc0.cab] +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%X [concrete = constants.%assoc0.df0] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -2931,10 +3186,6 @@ fn F() { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @X(@J.%Self: %J.type) { -// CHECK:STDOUT: assoc_const X:! type; -// 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] @@ -2952,7 +3203,7 @@ fn F() { // 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.binding.as_type] // CHECK:STDOUT: %.loc8_26: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %X.ref: %J.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.cab] +// 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] @@ -2962,7 +3213,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: %E.G.decl: %E.G.type = fn_decl @E.G [concrete = constants.%E.G] {} { -// CHECK:STDOUT: %X.ref: %J.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.cab] +// 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: } // CHECK:STDOUT: %complete_type: = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type] @@ -2982,9 +3233,17 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%Self.8a1) {} +// CHECK:STDOUT: specific @J(constants.%Self.8a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%.Self) {} +// CHECK:STDOUT: specific @J(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%J.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_self_period_associated_type.carbon // CHECK:STDOUT: @@ -2996,11 +3255,13 @@ fn F() { // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.21d: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %J2.F.type: type = fn_type @J2.F [concrete] -// CHECK:STDOUT: %J2.F: %J2.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %J2.assoc_type = assoc_entity element1, @J2.%J2.F.decl [concrete] +// CHECK:STDOUT: %J2.WithSelf.F.type.68c: type = fn_type @J2.WithSelf.F, @J2(%Self) [symbolic] +// CHECK:STDOUT: %J2.WithSelf.F.643: %J2.WithSelf.F.type.68c = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1: %J2.assoc_type = assoc_entity element1, @J2.%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(%.Self) [symbolic_self] +// CHECK:STDOUT: %J2.WithSelf.F.99a: %J2.WithSelf.F.type.30c = struct_value () [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.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] @@ -3014,6 +3275,8 @@ fn F() { // CHECK:STDOUT: %empty_tuple.type.as.J2.impl.F.type.56bdaf.1: type = fn_type @empty_tuple.type.as.J2.impl.F.loc23_33.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(%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_33.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] @@ -3025,6 +3288,8 @@ fn F() { // CHECK:STDOUT: %C2.as.J2.impl.F.type.d2a210.1: type = fn_type @C2.as.J2.impl.F.loc32_33.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(%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_33.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] @@ -3081,51 +3346,50 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J2 { -// CHECK:STDOUT: %Self: %J2.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self.loc3: %J2.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: 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.%U2 [concrete = constants.%assoc0] // CHECK:STDOUT: } -// CHECK:STDOUT: %J2.F.decl: %J2.F.type = fn_decl @J2.F [concrete = constants.%J2.F] { -// CHECK:STDOUT: %self.patt: @J2.F.%pattern_type (%pattern_type.21d) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @J2.F.%pattern_type (%pattern_type.21d) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %J2.WithSelf.F.decl: @J2.%J2.WithSelf.F.type (%J2.WithSelf.F.type.68c) = fn_decl @J2.WithSelf.F [symbolic = @J2.%J2.WithSelf.F (constants.%J2.WithSelf.F.643)] { +// CHECK:STDOUT: %self.patt: @J2.WithSelf.F.%pattern_type (%pattern_type.21d) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @J2.WithSelf.F.%pattern_type (%pattern_type.21d) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %z.patt: = value_binding_pattern z [concrete] // CHECK:STDOUT: %z.param_patt: = value_param_pattern %z.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc19_35: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc19_35: %J2.type = name_ref Self, @J2.%Self.loc3 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc19_39: type = facet_access_type %Self.ref.loc19_35 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc19_39: type = converted %Self.ref.loc19_35, %Self.as_type.loc19_39 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %U2.ref.loc19_39: = name_ref U2, [concrete = ] -// CHECK:STDOUT: %self.param: @J2.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @J2.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc19_14.1: type = splice_block %.loc19_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref.loc19_14: %J2.type = name_ref Self, @J2.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc19_14: %J2.type = name_ref Self, @J2.%Self.loc3 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc19_14: type = facet_access_type %Self.ref.loc19_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc19_14.2: type = converted %Self.ref.loc19_14, %Self.as_type.loc19_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @J2.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @J2.WithSelf.F.%Self.binding.as_type (%Self.binding.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.ref.loc19_23: %J2.type = name_ref Self, @J2.%Self.loc3 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc19_27: type = facet_access_type %Self.ref.loc19_23 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc19_27: type = converted %Self.ref.loc19_23, %Self.as_type.loc19_27 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %U2.ref.loc19_27: = name_ref U2, [concrete = ] // CHECK:STDOUT: } // CHECK:STDOUT: %z: = value_binding z, %z.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %J2.assoc_type = assoc_entity element1, %J2.F.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %J2.assoc_type = assoc_entity element1, %J2.WithSelf.F.decl [concrete = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 // CHECK:STDOUT: .U2 = @U2.%assoc0 // CHECK:STDOUT: .F = %assoc1 -// CHECK:STDOUT: witness = (%U2, %J2.F.decl) +// CHECK:STDOUT: witness = (%U2, %J2.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @U2(@J2.%Self: %J2.type) { -// CHECK:STDOUT: assoc_const U2:! type; -// 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_33.1: %empty_tuple.type.as.J2.impl.F.type.56bdaf.1 = fn_decl @empty_tuple.type.as.J2.impl.F.loc23_33.1 [concrete = constants.%empty_tuple.type.as.J2.impl.F.7b8679.1] { // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = value_binding_pattern self [concrete] @@ -3150,8 +3414,8 @@ fn F() { // 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.F(constants.%J2.facet.6c9) [concrete = ] -// CHECK:STDOUT: %.2: type = specific_constant , @J2.F(constants.%J2.facet.6c9) [concrete = ] +// 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_33.2: %empty_tuple.type.as.J2.impl.F.type.56bdaf.2 = fn_decl @empty_tuple.type.as.J2.impl.F.loc23_33.2 [concrete = constants.%empty_tuple.type.as.J2.impl.F.7b8679.2] { // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete] @@ -3190,8 +3454,8 @@ fn F() { // 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.F(constants.%J2.facet.f19) [concrete = ] -// CHECK:STDOUT: %.2: type = specific_constant , @J2.F(constants.%J2.facet.f19) [concrete = ] +// 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_33.2: %C2.as.J2.impl.F.type.d2a210.2 = fn_decl @C2.as.J2.impl.F.loc32_33.2 [concrete = constants.%C2.as.J2.impl.F.720bb2.2] { // CHECK:STDOUT: %self.patt: %pattern_type.8df = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.8df = value_param_pattern %self.patt, call_param0 [concrete] @@ -3222,12 +3486,12 @@ fn F() { // CHECK:STDOUT: .Self = constants.%C2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J2.F(@J2.%Self: %J2.type) { +// CHECK:STDOUT: generic fn @J2.WithSelf.F(@J2.%Self.loc3: %J2.type) { // CHECK:STDOUT: %Self: %J2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.21d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @J2.F.%Self.binding.as_type (%Self.binding.as_type), %z.param: ) -> ; +// CHECK:STDOUT: fn(%self.param: @J2.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type), %z.param: ) -> ; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @empty_tuple.type.as.J2.impl.F.loc23_33.1(%self.param: %empty_tuple.type, %z.param: %empty_struct_type) -> out %return.param: %empty_struct_type { @@ -3268,23 +3532,47 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U2(constants.%Self) {} +// CHECK:STDOUT: specific @J2(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc19 => 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.F(constants.%Self) { +// CHECK:STDOUT: specific @J2.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.21d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U2(constants.%.Self) {} +// CHECK:STDOUT: specific @J2(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc19 => 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.F(constants.%J2.facet.6c9) { +// CHECK:STDOUT: specific @J2(constants.%J2.facet.6c9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc19 => 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.binding.as_type => constants.%empty_tuple.type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J2.F(constants.%J2.facet.f19) { +// CHECK:STDOUT: specific @J2(constants.%J2.facet.f19) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc19 => 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.binding.as_type => constants.%C2 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.8df @@ -3296,19 +3584,21 @@ fn F() { // 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.d6c: %K.assoc_type = assoc_entity element0, @K.%V [concrete] +// CHECK:STDOUT: %assoc0.6cb: %K.assoc_type = assoc_entity element0, @K.%V [concrete] // CHECK:STDOUT: %Self.binding.as_type.87a: type = symbolic_binding_type Self, 0, %Self.44d [symbolic] // CHECK:STDOUT: %pattern_type.bcd: type = pattern_type %Self.binding.as_type.87a [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: %.bf0: Core.Form = init_form %impl.elem0.c23, call_param2 [symbolic] -// CHECK:STDOUT: %K.F.type: type = fn_type @K.F [concrete] +// CHECK:STDOUT: %K.WithSelf.F.type.d74: type = fn_type @K.WithSelf.F, @K(%Self.44d) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %K.F: %K.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %K.assoc_type = assoc_entity element1, @K.%K.F.decl [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.%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(%.Self) [symbolic_self] +// CHECK:STDOUT: %K.WithSelf.F.40c: %K.WithSelf.F.type.262 = struct_value () [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.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] @@ -3322,6 +3612,8 @@ fn F() { // CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.type.1710d5.1: type = fn_type @empty_tuple.type.as.K.impl.F.loc26_45.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(%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: %.074: Core.Form = init_form %struct_type.a, call_param2 [concrete] // CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.type.1710d5.2: type = fn_type @empty_tuple.type.as.K.impl.F.loc26_45.2 [concrete] @@ -3356,7 +3648,7 @@ fn F() { // 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.binding.as_type] // CHECK:STDOUT: %.loc11_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %V.ref: %K.assoc_type = name_ref V, @V.%assoc0 [concrete = constants.%assoc0.d6c] +// 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] @@ -3369,52 +3661,51 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @K { -// CHECK:STDOUT: %Self: %K.type = symbolic_binding Self, 0 [symbolic = constants.%Self.44d] +// CHECK:STDOUT: %Self.loc3: %K.type = symbolic_binding Self, 0 [symbolic = constants.%Self.44d] +// CHECK:STDOUT: 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.%V [concrete = constants.%assoc0.d6c] +// CHECK:STDOUT: %assoc0: %K.assoc_type = assoc_entity element0, @K.%V [concrete = constants.%assoc0.6cb] // CHECK:STDOUT: } -// CHECK:STDOUT: %K.F.decl: %K.F.type = fn_decl @K.F [concrete = constants.%K.F] { -// CHECK:STDOUT: %self.patt: @K.F.%pattern_type.loc8_8 (%pattern_type.bcd) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @K.F.%pattern_type.loc8_8 (%pattern_type.bcd) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %v.patt: @K.F.%pattern_type.loc8_20 (%pattern_type.9fa) = value_binding_pattern v [concrete] -// CHECK:STDOUT: %v.param_patt: @K.F.%pattern_type.loc8_20 (%pattern_type.9fa) = value_param_pattern %v.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @K.F.%pattern_type.loc8_20 (%pattern_type.9fa) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @K.F.%pattern_type.loc8_20 (%pattern_type.9fa) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %K.WithSelf.F.decl: @K.%K.WithSelf.F.type (%K.WithSelf.F.type.d74) = fn_decl @K.WithSelf.F [symbolic = @K.%K.WithSelf.F (constants.%K.WithSelf.F.f53)] { +// CHECK:STDOUT: %self.patt: @K.WithSelf.F.%pattern_type.loc8_8 (%pattern_type.bcd) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @K.WithSelf.F.%pattern_type.loc8_8 (%pattern_type.bcd) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %v.patt: @K.WithSelf.F.%pattern_type.loc8_20 (%pattern_type.9fa) = value_binding_pattern v [concrete] +// CHECK:STDOUT: %v.param_patt: @K.WithSelf.F.%pattern_type.loc8_20 (%pattern_type.9fa) = value_param_pattern %v.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @K.WithSelf.F.%pattern_type.loc8_20 (%pattern_type.9fa) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @K.WithSelf.F.%pattern_type.loc8_20 (%pattern_type.9fa) = out_param_pattern %return.patt, call_param2 [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, call_param2 [symbolic = %.loc8_29.1 (constants.%.bf0)] -// CHECK:STDOUT: %self.param: @K.F.%Self.binding.as_type (%Self.binding.as_type.87a) = value_param call_param0 +// CHECK:STDOUT: %self.param: @K.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87a) = value_param call_param0 // CHECK:STDOUT: %.loc8_14.1: type = splice_block %.loc8_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87a)] { -// CHECK:STDOUT: %Self.ref: %K.type = name_ref Self, @K.%Self [symbolic = %Self (constants.%Self.44d)] +// CHECK:STDOUT: %Self.ref: %K.type = name_ref Self, @K.%Self.loc3 [symbolic = %Self (constants.%Self.44d)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87a)] // CHECK:STDOUT: %.loc8_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @K.F.%Self.binding.as_type (%Self.binding.as_type.87a) = value_binding self, %self.param -// CHECK:STDOUT: %v.param: @K.F.%impl.elem0.loc8_23.1 (%impl.elem0.c23) = value_param call_param1 +// CHECK:STDOUT: %self: @K.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87a) = 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.F.%impl.elem0.loc8_23.1 (%impl.elem0.c23) = value_binding v, %v.param -// CHECK:STDOUT: %return.param: ref @K.F.%impl.elem0.loc8_23.1 (%impl.elem0.c23) = out_param call_param2 -// CHECK:STDOUT: %return: ref @K.F.%impl.elem0.loc8_23.1 (%impl.elem0.c23) = return_slot %return.param +// 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.F.decl [concrete = constants.%assoc1] +// 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: .Self = %Self.loc3 // CHECK:STDOUT: .V = @V.%assoc0 // CHECK:STDOUT: .F = %assoc1 -// CHECK:STDOUT: witness = (%V, %K.F.decl) +// CHECK:STDOUT: witness = (%V, %K.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @V(@K.%Self: %K.type) { -// CHECK:STDOUT: assoc_const V:! type; -// 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_45.1: %empty_tuple.type.as.K.impl.F.type.1710d5.1 = fn_decl @empty_tuple.type.as.K.impl.F.loc26_45.1 [concrete = constants.%empty_tuple.type.as.K.impl.F.907e52.1] { // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = value_binding_pattern self [concrete] @@ -3441,8 +3732,8 @@ fn F() { // 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.F.%V.ref.loc8_29, @K.F(constants.%K.facet) [concrete = constants.%struct_type.a] -// CHECK:STDOUT: %.loc8_29.2: type = specific_constant @K.F.%.loc8_29.2, @K.F(constants.%K.facet) [concrete = constants.%.074] +// 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.%.074] // CHECK:STDOUT: %empty_tuple.type.as.K.impl.F.decl.loc26_45.2: %empty_tuple.type.as.K.impl.F.type.1710d5.2 = fn_decl @empty_tuple.type.as.K.impl.F.loc26_45.2 [concrete = constants.%empty_tuple.type.as.K.impl.F.907e52.2] { // CHECK:STDOUT: %self.patt: %pattern_type.cb1 = value_binding_pattern self [concrete] // CHECK:STDOUT: %self.param_patt: %pattern_type.cb1 = value_param_pattern %self.patt, call_param0 [concrete] @@ -3467,7 +3758,7 @@ fn F() { // CHECK:STDOUT: witness = %K.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @K.F(@K.%Self: %K.type) { +// CHECK:STDOUT: generic fn @K.WithSelf.F(@K.%Self.loc3: %K.type) { // CHECK:STDOUT: %Self: %K.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.44d)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87a)] // CHECK:STDOUT: %pattern_type.loc8_8: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc8_8 (constants.%pattern_type.bcd)] @@ -3476,7 +3767,7 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc8_20: type = pattern_type %impl.elem0.loc8_23.1 [symbolic = %pattern_type.loc8_20 (constants.%pattern_type.9fa)] // CHECK:STDOUT: %.loc8_29.1: Core.Form = init_form %impl.elem0.loc8_23.1, call_param2 [symbolic = %.loc8_29.1 (constants.%.bf0)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @K.F.%Self.binding.as_type (%Self.binding.as_type.87a), %v.param: @K.F.%impl.elem0.loc8_23.1 (%impl.elem0.c23)) -> out %return.param: @K.F.%impl.elem0.loc8_23.1 (%impl.elem0.c23); +// CHECK:STDOUT: fn(%self.param: @K.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.87a), %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_45.1(%self.param: %empty_tuple.type, %v.param: %struct_type.x) -> out %return.param: %struct_type.x { @@ -3507,9 +3798,14 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %struct_type.x) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%Self.44d) {} +// CHECK:STDOUT: specific @K(constants.%Self.44d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc8 => 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.F(constants.%Self.44d) { +// CHECK:STDOUT: specific @K.WithSelf.F(constants.%Self.44d) { // CHECK:STDOUT: %Self => constants.%Self.44d // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.87a // CHECK:STDOUT: %pattern_type.loc8_8 => constants.%pattern_type.bcd @@ -3519,9 +3815,21 @@ fn F() { // CHECK:STDOUT: %.loc8_29.1 => constants.%.bf0 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @V(constants.%.Self) {} +// CHECK:STDOUT: specific @K(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc8 => 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.F(constants.%K.facet) { +// CHECK:STDOUT: specific @K(constants.%K.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc8 => 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.binding.as_type => constants.%empty_tuple.type // CHECK:STDOUT: %pattern_type.loc8_8 => constants.%pattern_type.cb1 @@ -3544,11 +3852,13 @@ fn F() { // CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete] // CHECK:STDOUT: %.dde: Core.Form = init_form %empty_struct_type, call_param0 [concrete] // CHECK:STDOUT: %pattern_type: type = pattern_type %empty_struct_type [concrete] -// CHECK:STDOUT: %M.G.type: type = fn_type @M.G [concrete] -// CHECK:STDOUT: %M.G: %M.G.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%M.G.decl [concrete] +// CHECK:STDOUT: %M.WithSelf.G.type.e2f: type = fn_type @M.WithSelf.G, @M(%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.%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(%.Self) [symbolic_self] +// CHECK:STDOUT: %M.WithSelf.G.6c7: %M.WithSelf.G.type.a84 = struct_value () [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.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] @@ -3558,6 +3868,8 @@ fn F() { // 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(%M.facet) [concrete] +// CHECK:STDOUT: %M.WithSelf.G.986: %M.WithSelf.G.type.5a0 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3598,11 +3910,14 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @M { -// CHECK:STDOUT: %Self: %M.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self.loc3: %M.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: 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.%Z [concrete = constants.%assoc0] // CHECK:STDOUT: } -// CHECK:STDOUT: %M.G.decl: %M.G.type = fn_decl @M.G [concrete = constants.%M.G] { +// CHECK:STDOUT: %M.WithSelf.G.decl: @M.%M.WithSelf.G.type (%M.WithSelf.G.type.e2f) = fn_decl @M.WithSelf.G [symbolic = @M.%M.WithSelf.G (constants.%M.WithSelf.G.020)] { // CHECK:STDOUT: %return.patt: %pattern_type = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { @@ -3612,21 +3927,17 @@ fn F() { // 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.G.decl [concrete = constants.%assoc1] +// 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: .Self = %Self.loc3 // CHECK:STDOUT: .Z = @Z.%assoc0 // CHECK:STDOUT: .G = %assoc1 -// CHECK:STDOUT: witness = (%Z, %M.G.decl) +// CHECK:STDOUT: witness = (%Z, %M.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @Z(@M.%Self: %M.type) { -// CHECK:STDOUT: assoc_const Z:! %struct_type.b.347; -// 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.patt: %pattern_type = return_slot_pattern [concrete] @@ -3648,7 +3959,7 @@ fn F() { // CHECK:STDOUT: witness = %M.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @M.G(@M.%Self: %M.type) { +// CHECK:STDOUT: generic fn @M.WithSelf.G(@M.%Self.loc3: %M.type) { // CHECK:STDOUT: fn() -> out %return.param: %empty_struct_type; // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3668,15 +3979,30 @@ fn F() { // CHECK:STDOUT: return %.loc10_27 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%Self) {} +// CHECK:STDOUT: specific @M(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.G(constants.%Self) {} +// CHECK:STDOUT: specific @M.WithSelf.G(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%.Self) {} +// CHECK:STDOUT: specific @M(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.G(constants.%M.facet) {} +// CHECK:STDOUT: specific @M(constants.%M.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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 @Z(constants.%M.facet) {} +// CHECK:STDOUT: specific @M.WithSelf.G(constants.%M.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- self_as_uses_correct_rewrite_constraint.carbon // CHECK:STDOUT: @@ -3695,14 +4021,16 @@ fn F() { // 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.5f4: %M.assoc_type = assoc_entity element0, @M.%Z [concrete] +// CHECK:STDOUT: %assoc0.ed2: %M.assoc_type = assoc_entity element0, @M.%Z [concrete] // CHECK:STDOUT: %.824: Core.Form = init_form type, call_param0 [concrete] -// CHECK:STDOUT: %M.G.type: type = fn_type @M.G [concrete] -// CHECK:STDOUT: %M.G: %M.G.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%M.G.decl [concrete] +// CHECK:STDOUT: %M.WithSelf.G.type.e2f: type = fn_type @M.WithSelf.G, @M(%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.%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(%.Self.b4d) [symbolic_self] +// CHECK:STDOUT: %M.WithSelf.G.6c7: %M.WithSelf.G.type.a84 = struct_value () [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.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] @@ -3715,11 +4043,13 @@ fn F() { // 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(%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.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.b47: = impl_witness imports.%Copy.impl_witness_table.b1c [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value type, (%Copy.impl_witness.b47) [concrete] -// CHECK:STDOUT: %.436: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.a4f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.070: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a4f, %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.bca: = bound_method %empty_struct_type, %type.as.Copy.impl.Op [concrete] @@ -3732,6 +4062,8 @@ fn F() { // 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(%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.f05: = bound_method %empty_tuple.type, %type.as.Copy.impl.Op [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3770,7 +4102,7 @@ fn F() { // 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.binding.as_type] // CHECK:STDOUT: %.loc10_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0.5f4] +// 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] @@ -3792,7 +4124,7 @@ fn F() { // 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.binding.as_type] // CHECK:STDOUT: %.loc16_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0.5f4] +// 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] @@ -3807,11 +4139,14 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @M { -// CHECK:STDOUT: %Self: %M.type = symbolic_binding Self, 0 [symbolic = constants.%Self.0c7] +// CHECK:STDOUT: %Self.loc5: %M.type = symbolic_binding Self, 0 [symbolic = constants.%Self.0c7] +// CHECK:STDOUT: 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.%Z [concrete = constants.%assoc0.5f4] +// CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete = constants.%assoc0.ed2] // CHECK:STDOUT: } -// CHECK:STDOUT: %M.G.decl: %M.G.type = fn_decl @M.G [concrete = constants.%M.G] { +// CHECK:STDOUT: %M.WithSelf.G.decl: @M.%M.WithSelf.G.type (%M.WithSelf.G.type.e2f) = fn_decl @M.WithSelf.G [symbolic = @M.%M.WithSelf.G (constants.%M.WithSelf.G.020)] { // CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { @@ -3819,21 +4154,17 @@ fn F() { // 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.G.decl [concrete = constants.%assoc1] +// 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: .Self = %Self.loc5 // CHECK:STDOUT: .Z = @Z.%assoc0 // CHECK:STDOUT: .G = %assoc1 -// CHECK:STDOUT: witness = (%Z, %M.G.decl) +// CHECK:STDOUT: witness = (%Z, %M.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @Z(@M.%Self: %M.type) { -// CHECK:STDOUT: assoc_const Z:! %struct_type.b.86f; -// 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.patt: %pattern_type.98f = return_slot_pattern [concrete] @@ -3886,7 +4217,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @M.G(@M.%Self: %M.type) { +// CHECK:STDOUT: generic fn @M.WithSelf.G(@M.%Self.loc5: %M.type) { // CHECK:STDOUT: fn() -> out %return.param: type; // CHECK:STDOUT: } // CHECK:STDOUT: @@ -3898,10 +4229,10 @@ fn F() { // 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.5f4] +// 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: %.436 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc12_25: %.070 = impl_witness_access constants.%Copy.impl_witness.b47, 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.bca] // 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 @@ -3915,10 +4246,10 @@ fn F() { // 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.5f4] +// 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: %.436 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc18_25: %.070 = impl_witness_access constants.%Copy.impl_witness.b47, 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.f05] // 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 @@ -3928,27 +4259,47 @@ fn F() { // CHECK:STDOUT: %T.loc3_9.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%Self.0c7) {} +// CHECK:STDOUT: specific @M(constants.%Self.0c7) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc7 => 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.G(constants.%Self.0c7) {} +// CHECK:STDOUT: specific @M.WithSelf.G(constants.%Self.0c7) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%empty_struct_type) { // CHECK:STDOUT: %T.loc3_9.1 => constants.%empty_struct_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z(constants.%.Self.b4d) {} +// CHECK:STDOUT: specific @M(constants.%.Self.b4d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc7 => 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.G(constants.%M.facet.9e0) {} +// CHECK:STDOUT: specific @M(constants.%M.facet.9e0) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc7 => 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 @Z(constants.%M.facet.9e0) {} +// CHECK:STDOUT: specific @M.WithSelf.G(constants.%M.facet.9e0) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%empty_tuple.type) { // CHECK:STDOUT: %T.loc3_9.1 => constants.%empty_tuple.type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @M.G(constants.%M.facet.586) {} +// CHECK:STDOUT: specific @M(constants.%M.facet.586) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc7 => 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 @Z(constants.%M.facet.586) {} +// CHECK:STDOUT: specific @M.WithSelf.G(constants.%M.facet.586) {} // CHECK:STDOUT: // CHECK:STDOUT: --- associated_int_in_array.carbon // CHECK:STDOUT: @@ -3961,7 +4312,7 @@ fn F() { // 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.607: %I.assoc_type = assoc_entity element0, @I.%N [concrete] +// CHECK:STDOUT: %assoc0.d72: %I.assoc_type = assoc_entity element0, @I.%N [concrete] // CHECK:STDOUT: %Self.binding.as_type.d31: type = symbolic_binding_type Self, 0, %Self.ab9 [symbolic] // CHECK:STDOUT: %pattern_type.fa0: type = pattern_type %Self.binding.as_type.d31 [symbolic] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] @@ -3971,7 +4322,6 @@ fn F() { // 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: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -3982,7 +4332,8 @@ fn F() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.290: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete] -// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.290 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.290) [concrete] +// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet.290 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound.0e7: = bound_method %impl.elem0.f83, %Int.as.ImplicitAs.impl.Convert.dd4 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.2a2: = bound_method %impl.elem0.f83, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic] @@ -3990,22 +4341,24 @@ fn F() { // CHECK:STDOUT: %array_type.d35: type = array_type %Int.as.ImplicitAs.impl.Convert.call, bool [symbolic] // CHECK:STDOUT: %.d61: Core.Form = init_form %array_type.d35, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.3e2: type = pattern_type %array_type.d35 [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I(%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.%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(%.Self) [symbolic_self] +// CHECK:STDOUT: %I.WithSelf.F.8ec: %I.WithSelf.F.type.29d = struct_value () [symbolic_self] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.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.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.6bc: = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.646: = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -4019,6 +4372,8 @@ fn F() { // 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(%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.075: = bound_method %int_2.ef8, %Int.as.ImplicitAs.impl.Convert.dd4 [concrete] // CHECK:STDOUT: %bound_method.bea: = bound_method %int_2.ef8, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] @@ -4027,10 +4382,10 @@ fn F() { // 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.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.348: = impl_witness imports.%Copy.impl_witness_table.3cc [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value bool, (%Copy.impl_witness.348) [concrete] -// CHECK:STDOUT: %.56b: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.6dd: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.86d: type = fn_type_with_self_type %Copy.WithSelf.Op.type.6dd, %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.12b: = bound_method %true, %bool.as.Copy.impl.Op [concrete] @@ -4075,10 +4430,10 @@ fn F() { // 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.binding.as_type] // CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %N.ref: %I.assoc_type = name_ref N, @N.%assoc0 [concrete = constants.%assoc0.607] +// 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: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // 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.646] @@ -4093,22 +4448,25 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: %Self.loc3: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: 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.%N [concrete = constants.%assoc0.607] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%N [concrete = constants.%assoc0.d72] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { -// CHECK:STDOUT: %self.patt: @I.F.%pattern_type.loc5_8 (%pattern_type.fa0) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type.loc5_8 (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @I.F.%pattern_type.loc5_22 (%pattern_type.3e2) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @I.F.%pattern_type.loc5_22 (%pattern_type.3e2) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.705)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type.loc5_8 (%pattern_type.fa0) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type.loc5_8 (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @I.WithSelf.F.%pattern_type.loc5_22 (%pattern_type.3e2) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @I.WithSelf.F.%pattern_type.loc5_22 (%pattern_type.3e2) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %Bool.call: init type = call constants.%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: %.loc5_31.1: type = value_of_initializer %Bool.call [concrete = bool] // CHECK:STDOUT: %.loc5_31.2: type = converted %Bool.call, %.loc5_31.1 [concrete = bool] -// CHECK:STDOUT: %impl.elem0.loc5_37.3: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %impl.elem0.loc5_37.3: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] // 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.0e7)] // 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.2a2)] @@ -4117,31 +4475,27 @@ fn F() { // 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.2 [symbolic = %array_type.loc5_38.1 (constants.%array_type.d35)] // CHECK:STDOUT: %.loc5_38.2: Core.Form = init_form %array_type.loc5_38.2, call_param1 [symbolic = %.loc5_38.1 (constants.%.d61)] -// CHECK:STDOUT: %self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.d31) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.ab9)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self.loc3 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31) = value_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @I.F.%array_type.loc5_38.1 (%array_type.d35) = out_param call_param1 -// CHECK:STDOUT: %return: ref @I.F.%array_type.loc5_38.1 (%array_type.d35) = return_slot %return.param +// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.d31) = value_binding self, %self.param +// CHECK:STDOUT: %return.param: ref @I.WithSelf.F.%array_type.loc5_38.1 (%array_type.d35) = out_param call_param1 +// CHECK:STDOUT: %return: ref @I.WithSelf.F.%array_type.loc5_38.1 (%array_type.d35) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %I.F.decl [concrete = constants.%assoc1] +// 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: .Self = %Self.loc3 // CHECK:STDOUT: .N = @N.%assoc0 // CHECK:STDOUT: .F = %assoc1 -// CHECK:STDOUT: witness = (%N, %I.F.decl) +// CHECK:STDOUT: witness = (%N, %I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @N(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const N:! %i32; -// 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.patt: %pattern_type.cb1 = value_binding_pattern self [concrete] @@ -4170,7 +4524,7 @@ fn F() { // CHECK:STDOUT: witness = %I.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc3: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.ab9)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.d31)] // CHECK:STDOUT: %pattern_type.loc5_8: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc5_8 (constants.%pattern_type.fa0)] @@ -4183,7 +4537,7 @@ fn F() { // CHECK:STDOUT: %.loc5_38.1: Core.Form = init_form %array_type.loc5_38.1, call_param1 [symbolic = %.loc5_38.1 (constants.%.d61)] // CHECK:STDOUT: %pattern_type.loc5_22: type = pattern_type %array_type.loc5_38.1 [symbolic = %pattern_type.loc5_22 (constants.%pattern_type.3e2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.d31)) -> out %return.param: @I.F.%array_type.loc5_38.1 (%array_type.d35); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.d31)) -> out %return.param: @I.WithSelf.F.%array_type.loc5_38.1 (%array_type.d35); // 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 { @@ -4191,13 +4545,13 @@ fn F() { // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: %.loc9_61.1: %tuple.type.784 = tuple_literal (%true, %false) [concrete = constants.%tuple.a9a] -// CHECK:STDOUT: %impl.elem0.loc9_50: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc9_50: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc9_50: = bound_method %true, %impl.elem0.loc9_50 [concrete = constants.%bool.as.Copy.impl.Op.bound.12b] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc9_50: init bool = call %bound_method.loc9_50(%true) [concrete = constants.%true] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc9_61.2: ref bool = array_index %return.param, %int_0 // CHECK:STDOUT: %.loc9_61.3: init bool to %.loc9_61.2 = in_place_init %bool.as.Copy.impl.Op.call.loc9_50 [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc9_56: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc9_56: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc9_56: = bound_method %false, %impl.elem0.loc9_56 [concrete = constants.%bool.as.Copy.impl.Op.bound.082] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc9_56: init bool = call %bound_method.loc9_56(%false) [concrete = constants.%false] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] @@ -4208,9 +4562,14 @@ fn F() { // CHECK:STDOUT: return %.loc9_62 to %return.param // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%Self.ab9) {} +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.F(constants.%Self.ab9) { +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.ab9) { // CHECK:STDOUT: %Self => constants.%Self.ab9 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.d31 // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.fa0 @@ -4224,9 +4583,21 @@ fn F() { // CHECK:STDOUT: %pattern_type.loc5_22 => constants.%pattern_type.3e2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.F(constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => 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.binding.as_type => constants.%empty_tuple.type // CHECK:STDOUT: %pattern_type.loc5_8 => constants.%pattern_type.cb1 @@ -4246,7 +4617,7 @@ fn F() { // 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.bdb: %Z.assoc_type = assoc_entity element0, @Z.%X [concrete] +// CHECK:STDOUT: %assoc0.cdf: %Z.assoc_type = assoc_entity element0, @Z.%X [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] @@ -4265,13 +4636,14 @@ fn F() { // 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: %Z.type = facet_value %D, (%Z.impl_witness.63b) [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] @@ -4315,7 +4687,7 @@ fn F() { // CHECK:STDOUT: %.Self.ref: %Z.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.aac] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc9_37: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %X.ref: %Z.assoc_type = name_ref X, @X.%assoc0 [concrete = constants.%assoc0.bdb] +// 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.loc9_44: type = name_ref T, %T.loc9_14.1 [symbolic = %T.loc9_14.2 (constants.%T)] @@ -4332,8 +4704,11 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] +// CHECK:STDOUT: 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.%X [concrete = constants.%assoc0.bdb] +// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, @Z.%X [concrete = constants.%assoc0.cdf] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -4344,10 +4719,6 @@ fn F() { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @X(@Z.%Self: %Z.type) { -// CHECK:STDOUT: assoc_const X:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic impl @T.as.Z.impl(%T.loc9_14.1: type) { // CHECK:STDOUT: %T.loc9_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc9_14.2 (constants.%T)] // CHECK:STDOUT: %C.loc9_45.2: type = class_type @C, @C(%T.loc9_14.2) [symbolic = %C.loc9_45.2 (constants.%C.5a3)] @@ -4405,9 +4776,9 @@ fn F() { // CHECK:STDOUT: %.loc12_11.1: type = splice_block %impl.elem0 [concrete = constants.%C.302] { // CHECK:STDOUT: %D.ref.loc12_10: 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.bdb] -// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %D.ref.loc12_10, (constants.%Z.impl_witness.63b) [concrete = constants.%Z.facet] -// CHECK:STDOUT: %.loc12_11.2: %Z.type = converted %D.ref.loc12_10, %Z.facet [concrete = constants.%Z.facet] +// 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.loc12_10, (constants.%Z.impl_witness.63b) [concrete = constants.%Z.facet.59e] +// CHECK:STDOUT: %.loc12_11.2: %Z.type = converted %D.ref.loc12_10, %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: %.loc12_23.2: %C.302 = acquire_value %.loc12_23.1 @@ -4419,13 +4790,17 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %C.302) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%Self.c59) {} +// CHECK:STDOUT: specific @Z(constants.%Self.c59) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%T) { // CHECK:STDOUT: %T.loc6_9.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%.Self.aac) {} +// CHECK:STDOUT: specific @Z(constants.%.Self.aac) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.Z.impl(constants.%T) { // CHECK:STDOUT: %T.loc9_14.2 => constants.%T @@ -4434,6 +4809,10 @@ fn F() { // CHECK:STDOUT: %Z.impl_witness.loc9_47.2 => constants.%Z.impl_witness.8d2 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Z.facet.49c) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @T.as.Z.impl(constants.%D) { // CHECK:STDOUT: %T.loc9_14.2 => constants.%D // CHECK:STDOUT: %C.loc9_45.2 => constants.%C.302 @@ -4450,5 +4829,7 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%Z.facet) {} +// CHECK:STDOUT: specific @Z(constants.%Z.facet.59e) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index c0157ac6f703..82a472e25681 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -36,7 +36,6 @@ var d: i32 = a[b]; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -44,7 +43,8 @@ var d: i32 = a[b]; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.230: = bound_method %int_12.6a3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -62,14 +62,14 @@ var d: i32 = a[b]; // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -148,7 +148,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %int_24: Core.IntLiteral = int_value 24 [concrete = constants.%int_24.e3c] // CHECK:STDOUT: %.loc15_31.1: %tuple.type.f94 = tuple_literal (%int_12, %int_24) [concrete = constants.%tuple.dac] -// CHECK:STDOUT: %impl.elem0.loc15_31.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15_31.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_31.1: = bound_method %int_12, %impl.elem0.loc15_31.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.230] // CHECK:STDOUT: %specific_fn.loc15_31.1: = specific_function %impl.elem0.loc15_31.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_31.2: = bound_method %int_12, %specific_fn.loc15_31.1 [concrete = constants.%bound_method.906] @@ -157,7 +157,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_0.loc15: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc15_31.3: ref %i32 = array_index file.%a.var, %int_0.loc15 // CHECK:STDOUT: %.loc15_31.4: init %i32 to %.loc15_31.3 = in_place_init %.loc15_31.2 [concrete = constants.%int_12.1e1] -// CHECK:STDOUT: %impl.elem0.loc15_31.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15_31.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_31.3: = bound_method %int_24, %impl.elem0.loc15_31.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.3b2] // CHECK:STDOUT: %specific_fn.loc15_31.2: = specific_function %impl.elem0.loc15_31.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_31.4: = bound_method %int_24, %specific_fn.loc15_31.2 [concrete = constants.%bound_method.0bd] @@ -170,7 +170,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %.loc15_1: init %array_type = converted %.loc15_31.1, %.loc15_31.8 [concrete = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc15_1 // CHECK:STDOUT: %int_1.loc16: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_1.1: = bound_method %int_1.loc16, %impl.elem0.loc16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_1.2: = bound_method %int_1.loc16, %specific_fn.loc16 [concrete = constants.%bound_method.38b] @@ -181,7 +181,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_0.loc17: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc17_16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc17_16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc17_16.1: = bound_method %int_0.loc17, %impl.elem0.loc17_16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc17_16: = specific_function %impl.elem0.loc17_16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_16.2: = bound_method %int_0.loc17, %specific_fn.loc17_16 [concrete = constants.%bound_method.d2e] @@ -190,7 +190,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %.loc17_16.2: %i32 = converted %int_0.loc17, %.loc17_16.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc17_17.1: ref %i32 = array_index %a.ref.loc17, %.loc17_16.2 // CHECK:STDOUT: %.loc17_17.2: %i32 = acquire_value %.loc17_17.1 -// CHECK:STDOUT: %impl.elem0.loc17_17: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc17_17: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc17_17.1: = bound_method %.loc17_17.2, %impl.elem0.loc17_17 // CHECK:STDOUT: %specific_fn.loc17_17: = specific_function %impl.elem0.loc17_17, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_17.2: = bound_method %.loc17_17.2, %specific_fn.loc17_17 @@ -203,7 +203,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %.loc18_16: %i32 = acquire_value %b.ref // CHECK:STDOUT: %.loc18_17.1: ref %i32 = array_index %a.ref.loc18, %.loc18_16 // CHECK:STDOUT: %.loc18_17.2: %i32 = acquire_value %.loc18_17.1 -// CHECK:STDOUT: %impl.elem0.loc18: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc18: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc18_17.1: = bound_method %.loc18_17.2, %impl.elem0.loc18 // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc18_17.2: = bound_method %.loc18_17.2, %specific_fn.loc18 diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index 65c74110e1c1..63db7042d0a4 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -56,7 +56,6 @@ fn ValueBinding(b: array(i32, 3)) { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -64,7 +63,8 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -82,7 +82,6 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -90,7 +89,8 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.c3c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] @@ -185,7 +185,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_2.loc18_30: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc18_33: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc18_34.1: %tuple.type.37f = tuple_literal (%int_1.loc18_27, %int_2.loc18_30, %int_3.loc18_33) [concrete = constants.%tuple.2d5] -// CHECK:STDOUT: %impl.elem0.loc18_34.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_34.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_34.1: = bound_method %int_1.loc18_27, %impl.elem0.loc18_34.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc18_34.1: = specific_function %impl.elem0.loc18_34.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_34.2: = bound_method %int_1.loc18_27, %specific_fn.loc18_34.1 [concrete = constants.%bound_method.38b] @@ -194,7 +194,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc18_34.3: ref %i32 = array_index %a.var, %int_0.loc18 // CHECK:STDOUT: %.loc18_34.4: init %i32 to %.loc18_34.3 = in_place_init %.loc18_34.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc18_34.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_34.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_34.3: = bound_method %int_2.loc18_30, %impl.elem0.loc18_34.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc18_34.2: = specific_function %impl.elem0.loc18_34.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_34.4: = bound_method %int_2.loc18_30, %specific_fn.loc18_34.2 [concrete = constants.%bound_method.646] @@ -203,7 +203,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_1.loc18_34: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc18_34.6: ref %i32 = array_index %a.var, %int_1.loc18_34 // CHECK:STDOUT: %.loc18_34.7: init %i32 to %.loc18_34.6 = in_place_init %.loc18_34.5 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc18_34.3: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_34.3: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_34.5: = bound_method %int_3.loc18_33, %impl.elem0.loc18_34.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc18_34.3: = specific_function %impl.elem0.loc18_34.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_34.6: = bound_method %int_3.loc18_33, %specific_fn.loc18_34.3 [concrete = constants.%bound_method.fa7] @@ -231,7 +231,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc21: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc21_22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc21_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc21_21: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc21_21: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc21_21.1: = bound_method %int_0.loc21, %impl.elem0.loc21_21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc21_21: = specific_function %impl.elem0.loc21_21, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_21.2: = bound_method %int_0.loc21, %specific_fn.loc21_21 [concrete = constants.%bound_method.d2e] @@ -240,7 +240,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc21_21.2: %i32 = converted %int_0.loc21, %.loc21_21.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc21_22: ref %i32 = array_index %a.ref.loc21, %.loc21_21.2 // CHECK:STDOUT: %addr: %ptr.235 = addr_of %.loc21_22 -// CHECK:STDOUT: %impl.elem0.loc21_18: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc21_18: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc21_18.1: = bound_method %addr, %impl.elem0.loc21_18 // CHECK:STDOUT: %specific_fn.loc21_18: = specific_function %impl.elem0.loc21_18, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc21_18.2: = bound_method %addr, %specific_fn.loc21_18 @@ -256,7 +256,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc22_5: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc22_5: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc22_5.1: = bound_method %int_0.loc22, %impl.elem0.loc22_5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc22_5: = specific_function %impl.elem0.loc22_5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_5.2: = bound_method %int_0.loc22, %specific_fn.loc22_5 [concrete = constants.%bound_method.d2e] @@ -265,7 +265,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc22_5.2: %i32 = converted %int_0.loc22, %.loc22_5.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc22_6: ref %i32 = array_index %a.ref.loc22, %.loc22_5.2 // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc22_8: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc22_8: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc22_8.1: = bound_method %int_4, %impl.elem0.loc22_8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc22_8: = specific_function %impl.elem0.loc22_8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc22_8.2: = bound_method %int_4, %specific_fn.loc22_8 [concrete = constants.%bound_method.6d7] @@ -294,7 +294,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_2.loc26_30: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc26_33: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc26_34.1: %tuple.type.37f = tuple_literal (%int_1.loc26_27, %int_2.loc26_30, %int_3.loc26_33) [concrete = constants.%tuple.2d5] -// CHECK:STDOUT: %impl.elem0.loc26_34.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc26_34.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc26_34.1: = bound_method %int_1.loc26_27, %impl.elem0.loc26_34.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc26_34.1: = specific_function %impl.elem0.loc26_34.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_34.2: = bound_method %int_1.loc26_27, %specific_fn.loc26_34.1 [concrete = constants.%bound_method.38b] @@ -303,7 +303,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc26: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc26_34.3: ref %i32 = array_index %a.var, %int_0.loc26 // CHECK:STDOUT: %.loc26_34.4: init %i32 to %.loc26_34.3 = in_place_init %.loc26_34.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc26_34.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc26_34.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc26_34.3: = bound_method %int_2.loc26_30, %impl.elem0.loc26_34.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc26_34.2: = specific_function %impl.elem0.loc26_34.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_34.4: = bound_method %int_2.loc26_30, %specific_fn.loc26_34.2 [concrete = constants.%bound_method.646] @@ -312,7 +312,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_1.loc26_34: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc26_34.6: ref %i32 = array_index %a.var, %int_1.loc26_34 // CHECK:STDOUT: %.loc26_34.7: init %i32 to %.loc26_34.6 = in_place_init %.loc26_34.5 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc26_34.3: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc26_34.3: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc26_34.5: = bound_method %int_3.loc26_33, %impl.elem0.loc26_34.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc26_34.3: = specific_function %impl.elem0.loc26_34.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_34.6: = bound_method %int_3.loc26_33, %specific_fn.loc26_34.3 [concrete = constants.%bound_method.fa7] @@ -335,7 +335,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc30: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc30: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc30: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc30: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc30_5.1: = bound_method %int_0.loc30, %impl.elem0.loc30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc30_5.2: = bound_method %int_0.loc30, %specific_fn.loc30 [concrete = constants.%bound_method.d2e] @@ -347,7 +347,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc31: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc31: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc31: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc31: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc31: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc31_5.1: = bound_method %int_0.loc31, %impl.elem0.loc31 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc31: = specific_function %impl.elem0.loc31, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc31_5.2: = bound_method %int_0.loc31, %specific_fn.loc31 [concrete = constants.%bound_method.d2e] @@ -364,7 +364,7 @@ fn ValueBinding(b: array(i32, 3)) { // CHECK:STDOUT: %.loc32_5.2: ref %array_type = temporary %.loc32_5.1, %F.call // CHECK:STDOUT: %int_32.loc32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc32: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc32: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc32_7.1: = bound_method %int_0.loc32, %impl.elem0.loc32 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc32_7.2: = bound_method %int_0.loc32, %specific_fn.loc32 [concrete = constants.%bound_method.d2e] diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index bfbc8a785d24..3a13b54eb6cf 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -44,7 +44,6 @@ var c: i32 = a[0x7FFF_FFFF]; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -52,7 +51,8 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.230: = bound_method %int_12.6a3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -63,14 +63,14 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %int_2147483647.d89: Core.IntLiteral = int_value 2147483647 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5e6: = bound_method %int_2147483647.d89, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] @@ -141,7 +141,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %.loc15_28.1: %tuple.type.985 = tuple_literal (%int_12) [concrete = constants.%tuple.3bc] -// CHECK:STDOUT: %impl.elem0.loc15: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_28.1: = bound_method %int_12, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.230] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_28.2: = bound_method %int_12, %specific_fn.loc15 [concrete = constants.%bound_method.906] @@ -157,7 +157,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc21_16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc21_16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc21_16.1: = bound_method %int_1, %impl.elem0.loc21_16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc21_16: = specific_function %impl.elem0.loc21_16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_16.2: = bound_method %int_1, %specific_fn.loc21_16 [concrete = constants.%bound_method.38b] @@ -166,7 +166,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %.loc21_16.2: %i32 = converted %int_1, %.loc21_16.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc21_17.1: ref %i32 = array_index %a.ref.loc21, %.loc21_16.2 [concrete = ] // CHECK:STDOUT: %.loc21_17.2: %i32 = acquire_value %.loc21_17.1 [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc21_17: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc21_17: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc21_17.1: = bound_method %.loc21_17.2, %impl.elem0.loc21_17 [concrete = ] // CHECK:STDOUT: %specific_fn.loc21_17: = specific_function %impl.elem0.loc21_17, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc21_17.2: = bound_method %.loc21_17.2, %specific_fn.loc21_17 [concrete = ] @@ -176,7 +176,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [concrete = constants.%int_2147483647.d89] // CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc27_16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc27_16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc27_16.1: = bound_method %int_2147483647, %impl.elem0.loc27_16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5e6] // CHECK:STDOUT: %specific_fn.loc27_16: = specific_function %impl.elem0.loc27_16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_16.2: = bound_method %int_2147483647, %specific_fn.loc27_16 [concrete = constants.%bound_method.076] @@ -185,7 +185,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %.loc27_16.2: %i32 = converted %int_2147483647, %.loc27_16.1 [concrete = constants.%int_2147483647.a74] // CHECK:STDOUT: %.loc27_27.1: ref %i32 = array_index %a.ref.loc27, %.loc27_16.2 [concrete = ] // CHECK:STDOUT: %.loc27_27.2: %i32 = acquire_value %.loc27_27.1 [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc27_27: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc27_27: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc27_27.1: = bound_method %.loc27_27.2, %impl.elem0.loc27_27 [concrete = ] // CHECK:STDOUT: %specific_fn.loc27_27: = specific_function %impl.elem0.loc27_27, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc27_27.2: = bound_method %.loc27_27.2, %specific_fn.loc27_27 [concrete = ] diff --git a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon index bf9361930183..a24bc5f40f38 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -40,7 +40,6 @@ var b: i32 = a[2.6]; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -48,7 +47,8 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_12.6a3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -57,14 +57,14 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.1e1) [concrete] // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 26e-1 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -120,7 +120,7 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %.loc15_28.1: %tuple.type.985 = tuple_literal (%int_12) [concrete = constants.%tuple.3bc] -// CHECK:STDOUT: %impl.elem0.loc15: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_28.1: = bound_method %int_12, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_28.2: = bound_method %int_12, %specific_fn.loc15 [concrete = constants.%bound_method] @@ -139,7 +139,7 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %.loc23_16: %i32 = converted %float, [concrete = ] // CHECK:STDOUT: %.loc23_19.1: ref %i32 = array_index %a.ref, [concrete = ] // CHECK:STDOUT: %.loc23_19.2: %i32 = acquire_value %.loc23_19.1 [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc23: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc23: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc23_19.1: = bound_method %.loc23_19.2, %impl.elem0.loc23 [concrete = ] // CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc23_19.2: = bound_method %.loc23_19.2, %specific_fn.loc23 [concrete = ] diff --git a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon index 93f46331ff91..229f43a1fa58 100644 --- a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon @@ -37,7 +37,6 @@ var b: i32 = a[1]; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -45,7 +44,8 @@ var b: i32 = a[1]; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.230: = bound_method %int_12.6a3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -56,14 +56,14 @@ var b: i32 = a[1]; // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -119,7 +119,7 @@ var b: i32 = a[1]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] // CHECK:STDOUT: %.loc15_28.1: %tuple.type.985 = tuple_literal (%int_12) [concrete = constants.%tuple.3bc] -// CHECK:STDOUT: %impl.elem0.loc15: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_28.1: = bound_method %int_12, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.230] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_28.2: = bound_method %int_12, %specific_fn.loc15 [concrete = constants.%bound_method.906] @@ -135,7 +135,7 @@ var b: i32 = a[1]; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc20_16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc20_16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc20_16.1: = bound_method %int_1, %impl.elem0.loc20_16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc20_16: = specific_function %impl.elem0.loc20_16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_16.2: = bound_method %int_1, %specific_fn.loc20_16 [concrete = constants.%bound_method.38b] @@ -144,7 +144,7 @@ var b: i32 = a[1]; // CHECK:STDOUT: %.loc20_16.2: %i32 = converted %int_1, %.loc20_16.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc20_17.1: ref %i32 = array_index %a.ref, %.loc20_16.2 [concrete = ] // CHECK:STDOUT: %.loc20_17.2: %i32 = acquire_value %.loc20_17.1 [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc20_17: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc20_17: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc20_17.1: = bound_method %.loc20_17.2, %impl.elem0.loc20_17 [concrete = ] // CHECK:STDOUT: %specific_fn.loc20_17: = specific_function %impl.elem0.loc20_17, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc20_17.2: = bound_method %.loc20_17.2, %specific_fn.loc20_17 [concrete = ] diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 8960f0870efc..5199c805d17f 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -63,7 +63,6 @@ fn G(b: array(i32, 3)) { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -71,13 +70,13 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -85,7 +84,8 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.c3c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] @@ -164,7 +164,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc23: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc23_22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc23_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc23_21: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc23_21: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc23_21.1: = bound_method %int_0.loc23, %impl.elem0.loc23_21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc23_21: = specific_function %impl.elem0.loc23_21, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_21.2: = bound_method %int_0.loc23, %specific_fn.loc23_21 [concrete = constants.%bound_method.d2e] @@ -175,7 +175,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %.loc23_22.2: ref %i32 = array_index %.loc23_22.1, %.loc23_21.2 // CHECK:STDOUT: %.loc23_22.3: %i32 = acquire_value %.loc23_22.2 // CHECK:STDOUT: %addr.loc23: %ptr.235 = addr_of [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc23_18: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc23_18: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc23_18.1: = bound_method %addr.loc23, %impl.elem0.loc23_18 [concrete = ] // CHECK:STDOUT: %specific_fn.loc23_18: = specific_function %impl.elem0.loc23_18, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc23_18.2: = bound_method %addr.loc23, %specific_fn.loc23_18 [concrete = ] @@ -191,7 +191,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %int_0.loc28: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc28: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc28_5: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc28_5: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc28_5.1: = bound_method %int_0.loc28, %impl.elem0.loc28_5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc28_5: = specific_function %impl.elem0.loc28_5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc28_5.2: = bound_method %int_0.loc28, %specific_fn.loc28_5 [concrete = constants.%bound_method.d2e] @@ -202,7 +202,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %.loc28_6.2: ref %i32 = array_index %.loc28_6.1, %.loc28_5.2 // CHECK:STDOUT: %.loc28_6.3: %i32 = acquire_value %.loc28_6.2 // CHECK:STDOUT: %int_4.loc28: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc28_8: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc28_8: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc28_8.1: = bound_method %int_4.loc28, %impl.elem0.loc28_8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc28_8: = specific_function %impl.elem0.loc28_8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc28_8.2: = bound_method %int_4.loc28, %specific_fn.loc28_8 [concrete = constants.%bound_method.6d7] @@ -221,7 +221,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %.loc36_21.2: ref %array_type = temporary %.loc36_21.1, %F.call.loc36 // CHECK:STDOUT: %int_32.loc36_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc36_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc36_23: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc36_23: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc36_23.1: = bound_method %int_0.loc36, %impl.elem0.loc36_23 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc36_23: = specific_function %impl.elem0.loc36_23, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc36_23.2: = bound_method %int_0.loc36, %specific_fn.loc36_23 [concrete = constants.%bound_method.d2e] @@ -231,7 +231,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %.loc36_24.1: ref %i32 = array_index %.loc36_21.2, %.loc36_23.2 // CHECK:STDOUT: %.loc36_24.2: %i32 = acquire_value %.loc36_24.1 // CHECK:STDOUT: %addr.loc36: %ptr.235 = addr_of [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc36_18: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc36_18: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc36_18.1: = bound_method %addr.loc36, %impl.elem0.loc36_18 [concrete = ] // CHECK:STDOUT: %specific_fn.loc36_18: = specific_function %impl.elem0.loc36_18, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc36_18.2: = bound_method %addr.loc36, %specific_fn.loc36_18 [concrete = ] @@ -250,7 +250,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %.loc41_5.2: ref %array_type = temporary %.loc41_5.1, %F.call.loc41 // CHECK:STDOUT: %int_32.loc41: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc41: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc41_7: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc41_7: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc41_7.1: = bound_method %int_0.loc41, %impl.elem0.loc41_7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc41_7: = specific_function %impl.elem0.loc41_7, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc41_7.2: = bound_method %int_0.loc41, %specific_fn.loc41_7 [concrete = constants.%bound_method.d2e] @@ -260,7 +260,7 @@ fn G(b: array(i32, 3)) { // CHECK:STDOUT: %.loc41_8.1: ref %i32 = array_index %.loc41_5.2, %.loc41_7.2 // CHECK:STDOUT: %.loc41_8.2: %i32 = acquire_value %.loc41_8.1 // CHECK:STDOUT: %int_4.loc41: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc41_10: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc41_10: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc41_10.1: = bound_method %int_4.loc41, %impl.elem0.loc41_10 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc41_10: = specific_function %impl.elem0.loc41_10, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc41_10.2: = bound_method %int_4.loc41, %specific_fn.loc41_10 [concrete = constants.%bound_method.6d7] diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index 681a3637dc51..e88178b32e8d 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -38,7 +38,6 @@ var d: i32 = c[-10]; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -46,7 +45,8 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.c83: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -56,10 +56,10 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %array: %array_type = tuple_value (%int_42.c68, %int_42.c68) [concrete] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete] // CHECK:STDOUT: %Negate.impl_witness: = impl_witness imports.%Negate.impl_witness_table [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness) [concrete] -// CHECK:STDOUT: %.826: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.4dd: type = fn_type @Negate.WithSelf.Op, @Negate(%Negate.facet) [concrete] +// CHECK:STDOUT: %.b42: type = fn_type_with_self_type %Negate.WithSelf.Op.type.4dd, %Negate.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.type: type = fn_type @Core.IntLiteral.as.Negate.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op: %Core.IntLiteral.as.Negate.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.bound: = bound_method %int_10, %Core.IntLiteral.as.Negate.impl.Op [concrete] @@ -68,14 +68,14 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %bound_method.bb6: = bound_method %int_-10.06d, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_-10.c17: %i32 = int_value -10 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -137,7 +137,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %int_42.loc15_25: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %int_42.loc15_29: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %.loc15_31.1: %tuple.type.f94 = tuple_literal (%int_42.loc15_25, %int_42.loc15_29) [concrete = constants.%tuple.df5] -// CHECK:STDOUT: %impl.elem0.loc15_31.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15_31.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_31.1: = bound_method %int_42.loc15_25, %impl.elem0.loc15_31.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.c83] // CHECK:STDOUT: %specific_fn.loc15_31.1: = specific_function %impl.elem0.loc15_31.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_31.2: = bound_method %int_42.loc15_25, %specific_fn.loc15_31.1 [concrete = constants.%bound_method.cb9] @@ -146,7 +146,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc15_31.3: ref %i32 = array_index file.%c.var, %int_0 // CHECK:STDOUT: %.loc15_31.4: init %i32 to %.loc15_31.3 = in_place_init %.loc15_31.2 [concrete = constants.%int_42.c68] -// CHECK:STDOUT: %impl.elem0.loc15_31.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15_31.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_31.3: = bound_method %int_42.loc15_29, %impl.elem0.loc15_31.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.c83] // CHECK:STDOUT: %specific_fn.loc15_31.2: = specific_function %impl.elem0.loc15_31.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_31.4: = bound_method %int_42.loc15_29, %specific_fn.loc15_31.2 [concrete = constants.%bound_method.cb9] @@ -160,12 +160,12 @@ var d: i32 = c[-10]; // CHECK:STDOUT: assign file.%c.var, %.loc15_1 // CHECK:STDOUT: %c.ref: ref %array_type = name_ref c, file.%c [concrete = file.%c.var] // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10] -// CHECK:STDOUT: %impl.elem1: %.826 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.b42 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] // CHECK:STDOUT: %bound_method.loc20_16.1: = bound_method %int_10, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op.bound] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.call: init Core.IntLiteral = call %bound_method.loc20_16.1(%int_10) [concrete = constants.%int_-10.06d] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc20_16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc20_16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc20_16.2: = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %impl.elem0.loc20_16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.920] // CHECK:STDOUT: %specific_fn.loc20_16: = specific_function %impl.elem0.loc20_16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_16.3: = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %specific_fn.loc20_16 [concrete = constants.%bound_method.bb6] @@ -176,7 +176,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %.loc20_16.4: %i32 = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc20_16.3 [concrete = constants.%int_-10.c17] // CHECK:STDOUT: %.loc20_19.1: ref %i32 = array_index %c.ref, %.loc20_16.4 [concrete = ] // CHECK:STDOUT: %.loc20_19.2: %i32 = acquire_value %.loc20_19.1 [concrete = ] -// CHECK:STDOUT: %impl.elem0.loc20_19: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc20_19: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc20_19.1: = bound_method %.loc20_19.2, %impl.elem0.loc20_19 [concrete = ] // CHECK:STDOUT: %specific_fn.loc20_19: = specific_function %impl.elem0.loc20_19, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc20_19.2: = bound_method %.loc20_19.2, %specific_fn.loc20_19 [concrete = ] diff --git a/toolchain/check/testdata/interface/as_type.carbon b/toolchain/check/testdata/interface/as_type.carbon index e4ffe794824d..a93c79399606 100644 --- a/toolchain/check/testdata/interface/as_type.carbon +++ b/toolchain/check/testdata/interface/as_type.carbon @@ -44,6 +44,7 @@ fn F(e: Empty) {} // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { // CHECK:STDOUT: %Self: %Empty.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Empty [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -57,3 +58,7 @@ fn F(e: Empty) {} // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%Self) { +// CHECK:STDOUT: !definition: +// 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 3108693d4d06..456bca165f13 100644 --- a/toolchain/check/testdata/interface/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/as_type_of_type.carbon @@ -31,6 +31,7 @@ fn F(T:! Empty) { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %Empty.impl_witness: = impl_witness @C.as.Empty.impl.%Empty.impl_witness_table [concrete] +// CHECK:STDOUT: %Empty.facet: %Empty.type = facet_value %C, (%Empty.impl_witness) [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: %Empty.type = symbolic_binding T, 0 [symbolic] @@ -43,12 +44,12 @@ fn F(T:! Empty) { // CHECK:STDOUT: %require_complete: = require_complete_type %ptr [symbolic] // CHECK:STDOUT: %pattern_type.fd9: type = pattern_type %ptr [symbolic] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.85c: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.85c = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.Op(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.4bc: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic] +// CHECK:STDOUT: %.40e: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.4bc, %Destroy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.40e = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -87,6 +88,7 @@ fn F(T:! Empty) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { // CHECK:STDOUT: %Self: %Empty.type = symbolic_binding Self, 0 [symbolic = constants.%Self.61e] +// CHECK:STDOUT: interface_with_self_decl @Empty [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -121,9 +123,10 @@ fn F(T:! Empty) { // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc22_11.2 [symbolic = %pattern_type (constants.%pattern_type.fd9)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %ptr.loc22_11.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %ptr.loc22_11.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)] -// CHECK:STDOUT: %.loc22_3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc22_3 (constants.%.85c)] -// CHECK:STDOUT: %impl.elem0.loc22_3.2: @F.%.loc22_3 (%.85c) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_3.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc22_3.2: = specific_impl_function %impl.elem0.loc22_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc22_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.4bc)] +// CHECK:STDOUT: %.loc22_3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc22_3 (constants.%.40e)] +// CHECK:STDOUT: %impl.elem0.loc22_3.2: @F.%.loc22_3 (%.40e) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc22_3.2: = specific_impl_function %impl.elem0.loc22_3.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc22_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -139,15 +142,23 @@ fn F(T:! Empty) { // CHECK:STDOUT: %ptr.loc22_11.1: type = ptr_type %.loc22_11.2 [symbolic = %ptr.loc22_11.2 (constants.%ptr)] // CHECK:STDOUT: } // CHECK:STDOUT: %x: ref @F.%ptr.loc22_11.2 (%ptr) = ref_binding x, %x.var -// CHECK:STDOUT: %impl.elem0.loc22_3.1: @F.%.loc22_3 (%.85c) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_3.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc22_3.1: @F.%.loc22_3 (%.40e) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc22_3.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc22_3.1: = bound_method %x.var, %impl.elem0.loc22_3.1 -// CHECK:STDOUT: %specific_impl_fn.loc22_3.1: = specific_impl_function %impl.elem0.loc22_3.1, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc22_3.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc22_3.1: = specific_impl_function %impl.elem0.loc22_3.1, @Destroy.WithSelf.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc22_3.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc22_3.2: = bound_method %x.var, %specific_impl_fn.loc22_3.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc22_3.2(%x.var) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc22_3.2(%x.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%Self.61e) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%Empty.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc21_6.1 => constants.%T // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/assoc_const.carbon b/toolchain/check/testdata/interface/assoc_const.carbon index ea55348953f3..109ffcaa9bfb 100644 --- a/toolchain/check/testdata/interface/assoc_const.carbon +++ b/toolchain/check/testdata/interface/assoc_const.carbon @@ -54,6 +54,9 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -74,21 +77,5 @@ interface I { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @N(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const N:! %i32; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @Empty(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const Empty:! %empty_tuple.type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Empty(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/assoc_const_in_generic.carbon b/toolchain/check/testdata/interface/assoc_const_in_generic.carbon index be6073add5a7..75d3b02178d7 100644 --- a/toolchain/check/testdata/interface/assoc_const_in_generic.carbon +++ b/toolchain/check/testdata/interface/assoc_const_in_generic.carbon @@ -42,10 +42,10 @@ fn H() { // CHECK:STDOUT: %U: type = symbolic_binding U, 2 [symbolic] // CHECK:STDOUT: %.f4a: Core.Form = init_form %U, call_param0 [symbolic] // CHECK:STDOUT: %pattern_type.62e: type = pattern_type %U [symbolic] -// CHECK:STDOUT: %I.F.type.937: type = fn_type @I.F, @I(%T) [symbolic] -// CHECK:STDOUT: %I.F.a37: %I.F.type.937 = struct_value () [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.1d6: type = fn_type @I.WithSelf.F, @I(%T, %Self.fdb) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.cd4: %I.WithSelf.F.type.1d6 = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type.76c: type = assoc_entity_type @I, @I(%T) [symbolic] -// CHECK:STDOUT: %assoc0.6a6: %I.assoc_type.76c = assoc_entity element0, @I.%I.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.203: %I.assoc_type.76c = assoc_entity element0, @I.%I.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [concrete] // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.e36: = require_complete_type %I.type.1ab [symbolic] @@ -57,10 +57,10 @@ fn H() { // CHECK:STDOUT: %G.specific_fn: = specific_function %G, @G(%empty_struct_type) [concrete] // CHECK:STDOUT: %I.type.ab5: type = facet_type <@I, @I(%empty_struct_type)> [concrete] // CHECK:STDOUT: %Self.7ae: %I.type.ab5 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %I.F.type.550: type = fn_type @I.F, @I(%empty_struct_type) [concrete] -// CHECK:STDOUT: %I.F.a1c: %I.F.type.550 = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.3f5: type = fn_type @I.WithSelf.F, @I(%empty_struct_type, %Self.fdb) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.02c: %I.WithSelf.F.type.3f5 = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type.294: type = assoc_entity_type @I, @I(%empty_struct_type) [concrete] -// CHECK:STDOUT: %assoc0.130: %I.assoc_type.294 = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0.c64: %I.assoc_type.294 = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %complete_type.5b1: = complete_type_witness %I.type.ab5 [concrete] // CHECK:STDOUT: %complete_type.7fc: = complete_type_witness %I.assoc_type.294 [concrete] // CHECK:STDOUT: } @@ -90,44 +90,43 @@ fn H() { // CHECK:STDOUT: %T.loc15_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc15_13.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc15_13.1)> [symbolic = %I.type (constants.%I.type.1ab)] -// CHECK:STDOUT: %Self.loc15_23.2: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc15_23.2 (constants.%Self.fdb)] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F, @I(%T.loc15_13.1) [symbolic = %I.F.type (constants.%I.F.type.937)] -// CHECK:STDOUT: %I.F: @I.%I.F.type (%I.F.type.937) = struct_value () [symbolic = %I.F (constants.%I.F.a37)] -// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc15_13.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.76c)] -// CHECK:STDOUT: %assoc0.loc16_22.2: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, %I.F.decl [symbolic = %assoc0.loc16_22.2 (constants.%assoc0.6a6)] +// CHECK:STDOUT: %I.type.loc15: type = facet_type <@I, @I(%T.loc15_13.1)> [symbolic = %I.type.loc15 (constants.%I.type.1ab)] +// CHECK:STDOUT: %Self.loc15_23.2: @I.%I.type.loc15 (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc15_23.2 (constants.%Self.fdb)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc15_23.1: @I.%I.type (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc15_23.2 (constants.%Self.fdb)] -// CHECK:STDOUT: %I.F.decl: @I.%I.F.type (%I.F.type.937) = fn_decl @I.F [symbolic = @I.%I.F (constants.%I.F.a37)] { +// CHECK:STDOUT: %Self.loc15_23.1: @I.%I.type.loc15 (%I.type.1ab) = symbolic_binding Self, 1 [symbolic = %Self.loc15_23.2 (constants.%Self.fdb)] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.1d6) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.cd4)] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 2 [concrete] -// CHECK:STDOUT: %return.patt: @I.F.%pattern_type (%pattern_type.62e) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @I.F.%pattern_type (%pattern_type.62e) = out_param_pattern %return.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.62e) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc16_8.2 [symbolic = %U.loc16_8.1 (constants.%U)] // CHECK:STDOUT: %.loc16_21.2: Core.Form = init_form %U.ref, call_param0 [symbolic = %.loc16_21.1 (constants.%.f4a)] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc16_8.2: type = symbolic_binding U, 2 [symbolic = %U.loc16_8.1 (constants.%U)] -// CHECK:STDOUT: %return.param: ref @I.F.%U.loc16_8.1 (%U) = out_param call_param0 -// CHECK:STDOUT: %return: ref @I.F.%U.loc16_8.1 (%U) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @I.WithSelf.F.%U.loc16_8.1 (%U) = out_param call_param0 +// CHECK:STDOUT: %return: ref @I.WithSelf.F.%U.loc16_8.1 (%U) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc16_22.1: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, %I.F.decl [symbolic = %assoc0.loc16_22.2 (constants.%assoc0.6a6)] +// CHECK:STDOUT: %assoc0.loc16_22.1: @I.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, %I.WithSelf.F.decl [symbolic = %assoc0.loc16_22.2 (constants.%assoc0.203)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc15_23.1 // CHECK:STDOUT: .F = %assoc0.loc16_22.1 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%T.loc15_13.2: type, @I.%Self.loc15_23.1: @I.%I.type (%I.type.1ab), %U.loc16_8.2: type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%T.loc15_13.2: type, @I.%Self.loc15_23.1: @I.%I.type.loc15 (%I.type.1ab), %U.loc16_8.2: type) { // CHECK:STDOUT: %U.loc16_8.1: type = symbolic_binding U, 2 [symbolic = %U.loc16_8.1 (constants.%U)] // CHECK:STDOUT: %.loc16_21.1: Core.Form = init_form %U.loc16_8.1, call_param0 [symbolic = %.loc16_21.1 (constants.%.f4a)] // CHECK:STDOUT: %pattern_type: type = pattern_type %U.loc16_8.1 [symbolic = %pattern_type (constants.%pattern_type.62e)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @I.F.%U.loc16_8.1 (%U); +// CHECK:STDOUT: fn() -> out %return.param: @I.WithSelf.F.%U.loc16_8.1 (%U); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G(%T.loc19_6.2: type) { @@ -137,7 +136,7 @@ fn H() { // CHECK:STDOUT: %I.type.loc23_6.2: type = facet_type <@I, @I(%T.loc19_6.1)> [symbolic = %I.type.loc23_6.2 (constants.%I.type.1ab)] // CHECK:STDOUT: %require_complete.loc23_7.1: = require_complete_type %I.type.loc23_6.2 [symbolic = %require_complete.loc23_7.1 (constants.%require_complete.e36)] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I, @I(%T.loc19_6.1) [symbolic = %I.assoc_type (constants.%I.assoc_type.76c)] -// CHECK:STDOUT: %assoc0: @G.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, @I.%I.F.decl [symbolic = %assoc0 (constants.%assoc0.6a6)] +// CHECK:STDOUT: %assoc0: @G.%I.assoc_type (%I.assoc_type.76c) = assoc_entity element0, @I.%I.WithSelf.F.decl [symbolic = %assoc0 (constants.%assoc0.203)] // CHECK:STDOUT: %require_complete.loc23_7.2: = require_complete_type %I.assoc_type [symbolic = %require_complete.loc23_7.2 (constants.%require_complete.ac0)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -145,8 +144,8 @@ fn H() { // CHECK:STDOUT: %I.ref: %I.type.609 = name_ref I, file.%I.decl [concrete = constants.%I.generic] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_6.2 [symbolic = %T.loc19_6.1 (constants.%T)] // CHECK:STDOUT: %I.type.loc23_6.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc23_6.2 (constants.%I.type.1ab)] -// CHECK:STDOUT: %.loc23: @G.%I.assoc_type (%I.assoc_type.76c) = specific_constant @I.%assoc0.loc16_22.1, @I(constants.%T) [symbolic = %assoc0 (constants.%assoc0.6a6)] -// CHECK:STDOUT: %F.ref: @G.%I.assoc_type (%I.assoc_type.76c) = name_ref F, %.loc23 [symbolic = %assoc0 (constants.%assoc0.6a6)] +// CHECK:STDOUT: %.loc23: @G.%I.assoc_type (%I.assoc_type.76c) = specific_constant @I.%assoc0.loc16_22.1, @I(constants.%T, constants.%Self.fdb) [symbolic = %assoc0 (constants.%assoc0.203)] +// CHECK:STDOUT: %F.ref: @G.%I.assoc_type (%I.assoc_type.76c) = name_ref F, %.loc23 [symbolic = %assoc0 (constants.%assoc0.203)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -165,15 +164,22 @@ fn H() { // CHECK:STDOUT: %T.loc15_13.1 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type => constants.%I.type.1ab +// CHECK:STDOUT: %I.type.loc15 => constants.%I.type.1ab // CHECK:STDOUT: %Self.loc15_23.2 => constants.%Self.fdb -// CHECK:STDOUT: %I.F.type => constants.%I.F.type.937 -// CHECK:STDOUT: %I.F => constants.%I.F.a37 -// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.76c -// CHECK:STDOUT: %assoc0.loc16_22.2 => constants.%assoc0.6a6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%T, constants.%Self.fdb, constants.%U) { +// CHECK:STDOUT: specific @I(constants.%T, constants.%Self.fdb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc16 => constants.%T +// CHECK:STDOUT: %I.type.loc16 => constants.%I.type.1ab +// CHECK:STDOUT: %Self.loc16 => constants.%Self.fdb +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.1d6 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.cd4 +// CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.76c +// CHECK:STDOUT: %assoc0.loc16_22.2 => constants.%assoc0.203 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%T, constants.%Self.fdb, constants.%U) { // CHECK:STDOUT: %U.loc16_8.1 => constants.%U // CHECK:STDOUT: %.loc16_21.1 => constants.%.f4a // CHECK:STDOUT: %pattern_type => constants.%pattern_type.62e @@ -190,7 +196,7 @@ fn H() { // CHECK:STDOUT: %I.type.loc23_6.2 => constants.%I.type.ab5 // CHECK:STDOUT: %require_complete.loc23_7.1 => constants.%complete_type.5b1 // CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.294 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.130 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.c64 // CHECK:STDOUT: %require_complete.loc23_7.2 => constants.%complete_type.7fc // CHECK:STDOUT: } // CHECK:STDOUT: @@ -198,11 +204,18 @@ fn H() { // CHECK:STDOUT: %T.loc15_13.1 => constants.%empty_struct_type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type => constants.%I.type.ab5 +// CHECK:STDOUT: %I.type.loc15 => constants.%I.type.ab5 // CHECK:STDOUT: %Self.loc15_23.2 => constants.%Self.7ae -// CHECK:STDOUT: %I.F.type => constants.%I.F.type.550 -// CHECK:STDOUT: %I.F => constants.%I.F.a1c +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%Self.fdb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc16 => constants.%empty_struct_type +// CHECK:STDOUT: %I.type.loc16 => constants.%I.type.ab5 +// CHECK:STDOUT: %Self.loc16 => constants.%Self.fdb +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.3f5 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.02c // CHECK:STDOUT: %I.assoc_type => constants.%I.assoc_type.294 -// CHECK:STDOUT: %assoc0.loc16_22.2 => constants.%assoc0.130 +// CHECK:STDOUT: %assoc0.loc16_22.2 => constants.%assoc0.c64 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/basic.carbon b/toolchain/check/testdata/interface/basic.carbon index ca8437addc35..fda6da8e099b 100644 --- a/toolchain/check/testdata/interface/basic.carbon +++ b/toolchain/check/testdata/interface/basic.carbon @@ -28,10 +28,10 @@ interface ForwardDeclared { // CHECK:STDOUT: %Self.61e: %Empty.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %ForwardDeclared.type: type = facet_type <@ForwardDeclared> [concrete] // CHECK:STDOUT: %Self.8e7: %ForwardDeclared.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %ForwardDeclared.F.type: type = fn_type @ForwardDeclared.F [concrete] -// CHECK:STDOUT: %ForwardDeclared.F: %ForwardDeclared.F.type = struct_value () [concrete] +// CHECK:STDOUT: %ForwardDeclared.WithSelf.F.type: type = fn_type @ForwardDeclared.WithSelf.F, @ForwardDeclared(%Self.8e7) [symbolic] +// CHECK:STDOUT: %ForwardDeclared.WithSelf.F: %ForwardDeclared.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %ForwardDeclared.assoc_type: type = assoc_entity_type @ForwardDeclared [concrete] -// CHECK:STDOUT: %assoc0: %ForwardDeclared.assoc_type = assoc_entity element0, @ForwardDeclared.%ForwardDeclared.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %ForwardDeclared.assoc_type = assoc_entity element0, @ForwardDeclared.%ForwardDeclared.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -46,6 +46,7 @@ interface ForwardDeclared { // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { // CHECK:STDOUT: %Self: %Empty.type = symbolic_binding Self, 0 [symbolic = constants.%Self.61e] +// CHECK:STDOUT: interface_with_self_decl @Empty [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -55,21 +56,28 @@ interface ForwardDeclared { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @ForwardDeclared { -// CHECK:STDOUT: %Self: %ForwardDeclared.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8e7] -// CHECK:STDOUT: %ForwardDeclared.F.decl: %ForwardDeclared.F.type = fn_decl @ForwardDeclared.F [concrete = constants.%ForwardDeclared.F] {} {} -// CHECK:STDOUT: %assoc0: %ForwardDeclared.assoc_type = assoc_entity element0, %ForwardDeclared.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc20: %ForwardDeclared.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8e7] +// CHECK:STDOUT: interface_with_self_decl @ForwardDeclared [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %ForwardDeclared.WithSelf.F.decl: @ForwardDeclared.%ForwardDeclared.WithSelf.F.type (%ForwardDeclared.WithSelf.F.type) = fn_decl @ForwardDeclared.WithSelf.F [symbolic = @ForwardDeclared.%ForwardDeclared.WithSelf.F (constants.%ForwardDeclared.WithSelf.F)] {} {} +// CHECK:STDOUT: %assoc0: %ForwardDeclared.assoc_type = assoc_entity element0, %ForwardDeclared.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc20 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%ForwardDeclared.F.decl) +// CHECK:STDOUT: witness = (%ForwardDeclared.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ForwardDeclared.F(@ForwardDeclared.%Self: %ForwardDeclared.type) { +// CHECK:STDOUT: generic fn @ForwardDeclared.WithSelf.F(@ForwardDeclared.%Self.loc20: %ForwardDeclared.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ForwardDeclared.F(constants.%Self.8e7) {} +// CHECK:STDOUT: specific @Empty(constants.%Self.61e) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ForwardDeclared(constants.%Self.8e7) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ForwardDeclared.WithSelf.F(constants.%Self.8e7) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/compound_member_access.carbon b/toolchain/check/testdata/interface/compound_member_access.carbon index 78a4d0ded687..f484376abc93 100644 --- a/toolchain/check/testdata/interface/compound_member_access.carbon +++ b/toolchain/check/testdata/interface/compound_member_access.carbon @@ -273,6 +273,9 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: interface @J { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: 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.%U [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -285,10 +288,6 @@ fn Works() { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) { -// CHECK:STDOUT: assoc_const U:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic fn @Simple1(%T.loc8_12.2: %J.type, %S.loc8_19.2: @Simple1.%impl.elem0.loc8_24.1 (%impl.elem0.5607ef.1)) { // CHECK:STDOUT: %T.loc8_12.1: %J.type = symbolic_binding T, 0 [symbolic = %T.loc8_12.1 (constants.%T)] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc8_12.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] @@ -320,9 +319,13 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%Self) {} +// CHECK:STDOUT: specific @J(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%T) {} +// CHECK:STDOUT: specific @J(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Simple1(constants.%T, constants.%S) { // CHECK:STDOUT: %T.loc8_12.1 => constants.%T @@ -333,7 +336,9 @@ fn Works() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.ad6d12.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%V) {} +// CHECK:STDOUT: specific @J(constants.%V) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Compound1(constants.%V, constants.%W) { // CHECK:STDOUT: %V.loc11_14.1 => constants.%V @@ -348,29 +353,33 @@ fn Works() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %K1.type: type = facet_type <@K1> [concrete] // CHECK:STDOUT: %Self: %K1.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %K1.Q1.type: type = fn_type @K1.Q1 [concrete] +// CHECK:STDOUT: %K1.WithSelf.Q1.type.cab: type = fn_type @K1.WithSelf.Q1, @K1(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %K1.Q1: %K1.Q1.type = struct_value () [concrete] +// CHECK:STDOUT: %K1.WithSelf.Q1.d38: %K1.WithSelf.Q1.type.cab = struct_value () [symbolic] // CHECK:STDOUT: %K1.assoc_type: type = assoc_entity_type @K1 [concrete] -// CHECK:STDOUT: %assoc0: %K1.assoc_type = assoc_entity element0, @K1.%K1.Q1.decl [concrete] +// CHECK:STDOUT: %assoc0: %K1.assoc_type = assoc_entity element0, @K1.%K1.WithSelf.Q1.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: %K1.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %K1.type [concrete] // CHECK:STDOUT: %Simple2.type: type = fn_type @Simple2 [concrete] // CHECK:STDOUT: %Simple2: %Simple2.type = struct_value () [concrete] +// CHECK:STDOUT: %K1.WithSelf.Q1.type.0b941d.1: type = fn_type @K1.WithSelf.Q1, @K1(%T) [symbolic] +// CHECK:STDOUT: %K1.WithSelf.Q1.2b1e8b.1: %K1.WithSelf.Q1.type.0b941d.1 = struct_value () [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] // CHECK:STDOUT: %K1.lookup_impl_witness.962f78.1: = lookup_impl_witness %T, @K1 [symbolic] -// CHECK:STDOUT: %.4b0e63.1: type = fn_type_with_self_type %K1.Q1.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem0.4d339b.1: %.4b0e63.1 = impl_witness_access %K1.lookup_impl_witness.962f78.1, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.3e1ee8.1: = specific_impl_function %impl.elem0.4d339b.1, @K1.Q1(%T) [symbolic] +// CHECK:STDOUT: %.838067.1: type = fn_type_with_self_type %K1.WithSelf.Q1.type.0b941d.1, %T [symbolic] +// CHECK:STDOUT: %impl.elem0.6aa105.1: %.838067.1 = impl_witness_access %K1.lookup_impl_witness.962f78.1, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.c7d99a.1: = specific_impl_function %impl.elem0.6aa105.1, @K1.WithSelf.Q1(%T) [symbolic] // CHECK:STDOUT: %V: %K1.type = symbolic_binding V, 0 [symbolic] // CHECK:STDOUT: %Compound2.type: type = fn_type @Compound2 [concrete] // CHECK:STDOUT: %Compound2: %Compound2.type = struct_value () [concrete] // CHECK:STDOUT: %K1.lookup_impl_witness.962f78.2: = lookup_impl_witness %V, @K1 [symbolic] -// CHECK:STDOUT: %.4b0e63.2: type = fn_type_with_self_type %K1.Q1.type, %V [symbolic] -// CHECK:STDOUT: %impl.elem0.4d339b.2: %.4b0e63.2 = impl_witness_access %K1.lookup_impl_witness.962f78.2, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.3e1ee8.2: = specific_impl_function %impl.elem0.4d339b.2, @K1.Q1(%V) [symbolic] +// CHECK:STDOUT: %K1.WithSelf.Q1.type.0b941d.2: type = fn_type @K1.WithSelf.Q1, @K1(%V) [symbolic] +// CHECK:STDOUT: %K1.WithSelf.Q1.2b1e8b.2: %K1.WithSelf.Q1.type.0b941d.2 = struct_value () [symbolic] +// CHECK:STDOUT: %.838067.2: type = fn_type_with_self_type %K1.WithSelf.Q1.type.0b941d.2, %V [symbolic] +// CHECK:STDOUT: %impl.elem0.6aa105.2: %.838067.2 = impl_witness_access %K1.lookup_impl_witness.962f78.2, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.c7d99a.2: = specific_impl_function %impl.elem0.6aa105.2, @K1.WithSelf.Q1(%V) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -410,19 +419,22 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @K1 { -// CHECK:STDOUT: %Self: %K1.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %K1.Q1.decl: %K1.Q1.type = fn_decl @K1.Q1 [concrete = constants.%K1.Q1] {} {} -// CHECK:STDOUT: %assoc0: %K1.assoc_type = assoc_entity element0, %K1.Q1.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc3: %K1.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @K1 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %K1.WithSelf.Q1.decl: @K1.%K1.WithSelf.Q1.type (%K1.WithSelf.Q1.type.cab) = fn_decl @K1.WithSelf.Q1 [symbolic = @K1.%K1.WithSelf.Q1 (constants.%K1.WithSelf.Q1.d38)] {} {} +// CHECK:STDOUT: %assoc0: %K1.assoc_type = assoc_entity element0, %K1.WithSelf.Q1.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 // CHECK:STDOUT: .Q1 = %assoc0 -// CHECK:STDOUT: witness = (%K1.Q1.decl) +// CHECK:STDOUT: witness = (%K1.WithSelf.Q1.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @K1.Q1(@K1.%Self: %K1.type) { +// CHECK:STDOUT: generic fn @K1.WithSelf.Q1(@K1.%Self.loc3: %K1.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -432,9 +444,10 @@ fn Works() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc8_12.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %K1.lookup_impl_witness: = lookup_impl_witness %T.loc8_12.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.962f78.1)] -// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type constants.%K1.Q1.type, %T.loc8_12.1 [symbolic = %.loc9_4.2 (constants.%.4b0e63.1)] -// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple2.%.loc9_4.2 (%.4b0e63.1) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.4d339b.1)] -// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @K1.Q1(%T.loc8_12.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.3e1ee8.1)] +// CHECK:STDOUT: %K1.WithSelf.Q1.type: type = fn_type @K1.WithSelf.Q1, @K1(%T.loc8_12.1) [symbolic = %K1.WithSelf.Q1.type (constants.%K1.WithSelf.Q1.type.0b941d.1)] +// CHECK:STDOUT: %.loc9_4.2: type = fn_type_with_self_type %K1.WithSelf.Q1.type, %T.loc8_12.1 [symbolic = %.loc9_4.2 (constants.%.838067.1)] +// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple2.%.loc9_4.2 (%.838067.1) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.6aa105.1)] +// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @K1.WithSelf.Q1(%T.loc8_12.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.c7d99a.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -442,9 +455,9 @@ fn Works() { // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc9_4.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple2.%.loc9_4.2 (%.4b0e63.1) = impl_witness_access constants.%K1.lookup_impl_witness.962f78.1, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.4d339b.1)] -// CHECK:STDOUT: %specific_impl_fn.loc9_4.1: = specific_impl_function %impl.elem0.loc9_4.1, @K1.Q1(constants.%T) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.3e1ee8.1)] -// CHECK:STDOUT: %K1.Q1.call: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1() +// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple2.%.loc9_4.2 (%.838067.1) = impl_witness_access constants.%K1.lookup_impl_witness.962f78.1, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.6aa105.1)] +// CHECK:STDOUT: %specific_impl_fn.loc9_4.1: = specific_impl_function %impl.elem0.loc9_4.1, @K1.WithSelf.Q1(constants.%T) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.c7d99a.1)] +// CHECK:STDOUT: %K1.WithSelf.Q1.call: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -454,46 +467,68 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %K1.lookup_impl_witness: = lookup_impl_witness %V.loc13_14.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.962f78.2)] -// CHECK:STDOUT: %.loc14: type = fn_type_with_self_type constants.%K1.Q1.type, %V.loc13_14.1 [symbolic = %.loc14 (constants.%.4b0e63.2)] -// CHECK:STDOUT: %impl.elem0.loc14_4.2: @Compound2.%.loc14 (%.4b0e63.2) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.4d339b.2)] -// CHECK:STDOUT: %specific_impl_fn.loc14_4.2: = specific_impl_function %impl.elem0.loc14_4.2, @K1.Q1(%V.loc13_14.1) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.3e1ee8.2)] +// CHECK:STDOUT: %K1.WithSelf.Q1.type: type = fn_type @K1.WithSelf.Q1, @K1(%V.loc13_14.1) [symbolic = %K1.WithSelf.Q1.type (constants.%K1.WithSelf.Q1.type.0b941d.2)] +// CHECK:STDOUT: %.loc14: type = fn_type_with_self_type %K1.WithSelf.Q1.type, %V.loc13_14.1 [symbolic = %.loc14 (constants.%.838067.2)] +// CHECK:STDOUT: %impl.elem0.loc14_4.2: @Compound2.%.loc14 (%.838067.2) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.6aa105.2)] +// CHECK:STDOUT: %specific_impl_fn.loc14_4.2: = specific_impl_function %impl.elem0.loc14_4.2, @K1.WithSelf.Q1(%V.loc13_14.1) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.c7d99a.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %V.ref: %K1.type = name_ref V, %V.loc13_14.2 [symbolic = %V.loc13_14.1 (constants.%V)] // CHECK:STDOUT: %K1.ref.loc14: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type] // CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc14_4.1: @Compound2.%.loc14 (%.4b0e63.2) = impl_witness_access constants.%K1.lookup_impl_witness.962f78.2, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.4d339b.2)] -// CHECK:STDOUT: %specific_impl_fn.loc14_4.1: = specific_impl_function %impl.elem0.loc14_4.1, @K1.Q1(constants.%V) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.3e1ee8.2)] -// CHECK:STDOUT: %K1.Q1.call: init %empty_tuple.type = call %specific_impl_fn.loc14_4.1() +// CHECK:STDOUT: %impl.elem0.loc14_4.1: @Compound2.%.loc14 (%.838067.2) = impl_witness_access constants.%K1.lookup_impl_witness.962f78.2, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.6aa105.2)] +// CHECK:STDOUT: %specific_impl_fn.loc14_4.1: = specific_impl_function %impl.elem0.loc14_4.1, @K1.WithSelf.Q1(constants.%V) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.c7d99a.2)] +// CHECK:STDOUT: %K1.WithSelf.Q1.call: init %empty_tuple.type = call %specific_impl_fn.loc14_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @K1.Q1(constants.%Self) {} +// CHECK:STDOUT: specific @K1(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Self +// CHECK:STDOUT: %K1.WithSelf.Q1.type => constants.%K1.WithSelf.Q1.type.cab +// CHECK:STDOUT: %K1.WithSelf.Q1 => constants.%K1.WithSelf.Q1.d38 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @K1.WithSelf.Q1(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Simple2(constants.%T) { // CHECK:STDOUT: %T.loc8_12.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @K1.Q1(constants.%T) {} +// CHECK:STDOUT: specific @K1(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%T +// CHECK:STDOUT: %K1.WithSelf.Q1.type => constants.%K1.WithSelf.Q1.type.0b941d.1 +// CHECK:STDOUT: %K1.WithSelf.Q1 => constants.%K1.WithSelf.Q1.2b1e8b.1 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @K1.WithSelf.Q1(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Compound2(constants.%V) { // CHECK:STDOUT: %V.loc13_14.1 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @K1.Q1(constants.%V) {} +// CHECK:STDOUT: specific @K1(constants.%V) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%V +// CHECK:STDOUT: %K1.WithSelf.Q1.type => constants.%K1.WithSelf.Q1.type.0b941d.2 +// CHECK:STDOUT: %K1.WithSelf.Q1 => constants.%K1.WithSelf.Q1.2b1e8b.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @K1.WithSelf.Q1(constants.%V) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_caller_instance_interface_not.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %K2.type: type = facet_type <@K2> [concrete] // CHECK:STDOUT: %Self.404: %K2.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %K2.Q2.type: type = fn_type @K2.Q2 [concrete] +// CHECK:STDOUT: %K2.WithSelf.Q2.type.0f8: type = fn_type @K2.WithSelf.Q2, @K2(%Self.404) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %K2.Q2: %K2.Q2.type = struct_value () [concrete] +// CHECK:STDOUT: %K2.WithSelf.Q2.c3d: %K2.WithSelf.Q2.type.0f8 = struct_value () [symbolic] // CHECK:STDOUT: %K2.assoc_type: type = assoc_entity_type @K2 [concrete] -// CHECK:STDOUT: %assoc0.927: %K2.assoc_type = assoc_entity element0, @K2.%K2.Q2.decl [concrete] +// CHECK:STDOUT: %assoc0.5ff: %K2.assoc_type = assoc_entity element0, @K2.%K2.WithSelf.Q2.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: %K2.type = symbolic_binding T, 0 [symbolic] @@ -503,10 +538,12 @@ fn Works() { // CHECK:STDOUT: %Simple3.type: type = fn_type @Simple3 [concrete] // CHECK:STDOUT: %Simple3: %Simple3.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.57854f.1: = require_complete_type %T.binding.as_type [symbolic] +// CHECK:STDOUT: %K2.WithSelf.Q2.type.3af: type = fn_type @K2.WithSelf.Q2, @K2(%T) [symbolic] +// CHECK:STDOUT: %K2.WithSelf.Q2.c9a: %K2.WithSelf.Q2.type.3af = struct_value () [symbolic] // CHECK:STDOUT: %K2.lookup_impl_witness: = lookup_impl_witness %T, @K2 [symbolic] -// CHECK:STDOUT: %.d88: type = fn_type_with_self_type %K2.Q2.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem0: %.d88 = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @K2.Q2(%T) [symbolic] +// CHECK:STDOUT: %.02c: type = fn_type_with_self_type %K2.WithSelf.Q2.type.3af, %T [symbolic] +// CHECK:STDOUT: %impl.elem0: %.02c = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @K2.WithSelf.Q2(%T) [symbolic] // CHECK:STDOUT: %V: %K2.type = symbolic_binding V, 0 [symbolic] // CHECK:STDOUT: %V.binding.as_type: type = symbolic_binding_type V, 0, %V [symbolic] // CHECK:STDOUT: %pattern_type.6a7df6.2: type = pattern_type %V.binding.as_type [symbolic] @@ -574,19 +611,22 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @K2 { -// CHECK:STDOUT: %Self: %K2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.404] -// CHECK:STDOUT: %K2.Q2.decl: %K2.Q2.type = fn_decl @K2.Q2 [concrete = constants.%K2.Q2] {} {} -// CHECK:STDOUT: %assoc0: %K2.assoc_type = assoc_entity element0, %K2.Q2.decl [concrete = constants.%assoc0.927] +// CHECK:STDOUT: %Self.loc3: %K2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.404] +// CHECK:STDOUT: interface_with_self_decl @K2 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %K2.WithSelf.Q2.decl: @K2.%K2.WithSelf.Q2.type (%K2.WithSelf.Q2.type.0f8) = fn_decl @K2.WithSelf.Q2 [symbolic = @K2.%K2.WithSelf.Q2 (constants.%K2.WithSelf.Q2.c3d)] {} {} +// CHECK:STDOUT: %assoc0: %K2.assoc_type = assoc_entity element0, %K2.WithSelf.Q2.decl [concrete = constants.%assoc0.5ff] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 // CHECK:STDOUT: .Q2 = %assoc0 -// CHECK:STDOUT: witness = (%K2.Q2.decl) +// CHECK:STDOUT: witness = (%K2.WithSelf.Q2.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @K2.Q2(@K2.%Self: %K2.type) { +// CHECK:STDOUT: generic fn @K2.WithSelf.Q2(@K2.%Self.loc3: %K2.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -598,17 +638,18 @@ fn Works() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.57854f.1)] // CHECK:STDOUT: %K2.lookup_impl_witness: = lookup_impl_witness %T.loc8_12.1, @K2 [symbolic = %K2.lookup_impl_witness (constants.%K2.lookup_impl_witness)] -// CHECK:STDOUT: %.loc9: type = fn_type_with_self_type constants.%K2.Q2.type, %T.loc8_12.1 [symbolic = %.loc9 (constants.%.d88)] -// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple3.%.loc9 (%.d88) = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @K2.Q2(%T.loc8_12.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %K2.WithSelf.Q2.type: type = fn_type @K2.WithSelf.Q2, @K2(%T.loc8_12.1) [symbolic = %K2.WithSelf.Q2.type (constants.%K2.WithSelf.Q2.type.3af)] +// CHECK:STDOUT: %.loc9: type = fn_type_with_self_type %K2.WithSelf.Q2.type, %T.loc8_12.1 [symbolic = %.loc9 (constants.%.02c)] +// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple3.%.loc9 (%.02c) = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @K2.WithSelf.Q2(%T.loc8_12.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Simple3.%T.binding.as_type (%T.binding.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @Simple3.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x -// CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.%assoc0 [concrete = constants.%assoc0.927] -// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple3.%.loc9 (%.d88) = impl_witness_access constants.%K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc9_4.1: = specific_impl_function %impl.elem0.loc9_4.1, @K2.Q2(constants.%T) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %K2.Q2.call: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1() +// CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.%assoc0 [concrete = constants.%assoc0.5ff] +// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple3.%.loc9 (%.02c) = impl_witness_access constants.%K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc9_4.1: = specific_impl_function %impl.elem0.loc9_4.1, @K2.WithSelf.Q2(constants.%T) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %K2.WithSelf.Q2.call: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -625,13 +666,20 @@ fn Works() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %y.ref: @Compound3.%V.binding.as_type (%V.binding.as_type) = name_ref y, %y // CHECK:STDOUT: %K2.ref.loc22: type = name_ref K2, file.%K2.decl [concrete = constants.%K2.type] -// CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.%assoc0 [concrete = constants.%assoc0.927] +// CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.%assoc0 [concrete = constants.%assoc0.5ff] // CHECK:STDOUT: %.loc22: %K2.type = converted %y.ref, [concrete = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @K2.Q2(constants.%Self.404) {} +// CHECK:STDOUT: specific @K2(constants.%Self.404) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Self.404 +// CHECK:STDOUT: %K2.WithSelf.Q2.type => constants.%K2.WithSelf.Q2.type.0f8 +// CHECK:STDOUT: %K2.WithSelf.Q2 => constants.%K2.WithSelf.Q2.c3d +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @K2.WithSelf.Q2(constants.%Self.404) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Simple3(constants.%T) { // CHECK:STDOUT: %T.loc8_12.1 => constants.%T @@ -639,7 +687,14 @@ fn Works() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.6a7df6.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @K2.Q2(constants.%T) {} +// CHECK:STDOUT: specific @K2(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%T +// CHECK:STDOUT: %K2.WithSelf.Q2.type => constants.%K2.WithSelf.Q2.type.3af +// CHECK:STDOUT: %K2.WithSelf.Q2 => constants.%K2.WithSelf.Q2.c9a +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @K2.WithSelf.Q2(constants.%T) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Compound3(constants.%V) { // CHECK:STDOUT: %V.loc14_14.1 => constants.%V @@ -654,14 +709,14 @@ fn Works() { // CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.9c1: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %L1.R1.type: type = fn_type @L1.R1 [concrete] +// CHECK:STDOUT: %L1.WithSelf.R1.type.504: type = fn_type @L1.WithSelf.R1, @L1(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %L1.R1: %L1.R1.type = struct_value () [concrete] +// CHECK:STDOUT: %L1.WithSelf.R1.aa4: %L1.WithSelf.R1.type.504 = struct_value () [symbolic] // CHECK:STDOUT: %L1.assoc_type: type = assoc_entity_type @L1 [concrete] -// CHECK:STDOUT: %assoc0: %L1.assoc_type = assoc_entity element0, @L1.%L1.R1.decl [concrete] -// CHECK:STDOUT: %L1.S1.type: type = fn_type @L1.S1 [concrete] -// CHECK:STDOUT: %L1.S1: %L1.S1.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %L1.assoc_type = assoc_entity element1, @L1.%L1.S1.decl [concrete] +// CHECK:STDOUT: %assoc0: %L1.assoc_type = assoc_entity element0, @L1.%L1.WithSelf.R1.decl [concrete] +// CHECK:STDOUT: %L1.WithSelf.S1.type.e03: type = fn_type @L1.WithSelf.S1, @L1(%Self) [symbolic] +// CHECK:STDOUT: %L1.WithSelf.S1.480: %L1.WithSelf.S1.type.e03 = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1: %L1.assoc_type = assoc_entity element1, @L1.%L1.WithSelf.S1.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: %L1.type = symbolic_binding T, 0 [symbolic] @@ -674,13 +729,17 @@ fn Works() { // CHECK:STDOUT: %Simple4: %Simple4.type = struct_value () [concrete] // CHECK:STDOUT: %require_complete.592d00.1: = require_complete_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %require_complete.94a5f1.1: = require_complete_type %ptr.6c1f8e.1 [symbolic] +// CHECK:STDOUT: %L1.WithSelf.R1.type.0d7469.1: type = fn_type @L1.WithSelf.R1, @L1(%T) [symbolic] +// CHECK:STDOUT: %L1.WithSelf.R1.f22128.1: %L1.WithSelf.R1.type.0d7469.1 = struct_value () [symbolic] +// CHECK:STDOUT: %L1.WithSelf.S1.type.79e6b4.1: type = fn_type @L1.WithSelf.S1, @L1(%T) [symbolic] +// CHECK:STDOUT: %L1.WithSelf.S1.cd5111.1: %L1.WithSelf.S1.type.79e6b4.1 = struct_value () [symbolic] // CHECK:STDOUT: %L1.lookup_impl_witness.297fbf.1: = lookup_impl_witness %T, @L1 [symbolic] -// CHECK:STDOUT: %.1a90aa.1: type = fn_type_with_self_type %L1.R1.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem0.cbe2e1.1: %.1a90aa.1 = impl_witness_access %L1.lookup_impl_witness.297fbf.1, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.996232.1: = specific_impl_function %impl.elem0.cbe2e1.1, @L1.R1(%T) [symbolic] -// CHECK:STDOUT: %.70c7a3.1: type = fn_type_with_self_type %L1.S1.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem1.d4e3ba.1: %.70c7a3.1 = impl_witness_access %L1.lookup_impl_witness.297fbf.1, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2a2692.1: = specific_impl_function %impl.elem1.d4e3ba.1, @L1.S1(%T) [symbolic] +// CHECK:STDOUT: %.69b631.1: type = fn_type_with_self_type %L1.WithSelf.R1.type.0d7469.1, %T [symbolic] +// CHECK:STDOUT: %impl.elem0.60b493.1: %.69b631.1 = impl_witness_access %L1.lookup_impl_witness.297fbf.1, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.f023e9.1: = specific_impl_function %impl.elem0.60b493.1, @L1.WithSelf.R1(%T) [symbolic] +// CHECK:STDOUT: %.917578.1: type = fn_type_with_self_type %L1.WithSelf.S1.type.79e6b4.1, %T [symbolic] +// CHECK:STDOUT: %impl.elem1.e3fe4c.1: %.917578.1 = impl_witness_access %L1.lookup_impl_witness.297fbf.1, element1 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.2cc093.1: = specific_impl_function %impl.elem1.e3fe4c.1, @L1.WithSelf.S1(%T) [symbolic] // CHECK:STDOUT: %V: %L1.type = symbolic_binding V, 0 [symbolic] // CHECK:STDOUT: %V.binding.as_type: type = symbolic_binding_type V, 0, %V [symbolic] // CHECK:STDOUT: %pattern_type.352a62.2: type = pattern_type %V.binding.as_type [symbolic] @@ -691,12 +750,16 @@ fn Works() { // CHECK:STDOUT: %require_complete.592d00.2: = require_complete_type %V.binding.as_type [symbolic] // CHECK:STDOUT: %require_complete.94a5f1.2: = require_complete_type %ptr.6c1f8e.2 [symbolic] // CHECK:STDOUT: %L1.lookup_impl_witness.297fbf.2: = lookup_impl_witness %V, @L1 [symbolic] -// CHECK:STDOUT: %.1a90aa.2: type = fn_type_with_self_type %L1.R1.type, %V [symbolic] -// CHECK:STDOUT: %impl.elem0.cbe2e1.2: %.1a90aa.2 = impl_witness_access %L1.lookup_impl_witness.297fbf.2, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.996232.2: = specific_impl_function %impl.elem0.cbe2e1.2, @L1.R1(%V) [symbolic] -// CHECK:STDOUT: %.70c7a3.2: type = fn_type_with_self_type %L1.S1.type, %V [symbolic] -// CHECK:STDOUT: %impl.elem1.d4e3ba.2: %.70c7a3.2 = impl_witness_access %L1.lookup_impl_witness.297fbf.2, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.2a2692.2: = specific_impl_function %impl.elem1.d4e3ba.2, @L1.S1(%V) [symbolic] +// CHECK:STDOUT: %L1.WithSelf.R1.type.0d7469.2: type = fn_type @L1.WithSelf.R1, @L1(%V) [symbolic] +// CHECK:STDOUT: %L1.WithSelf.R1.f22128.2: %L1.WithSelf.R1.type.0d7469.2 = struct_value () [symbolic] +// CHECK:STDOUT: %L1.WithSelf.S1.type.79e6b4.2: type = fn_type @L1.WithSelf.S1, @L1(%V) [symbolic] +// CHECK:STDOUT: %L1.WithSelf.S1.cd5111.2: %L1.WithSelf.S1.type.79e6b4.2 = struct_value () [symbolic] +// CHECK:STDOUT: %.69b631.2: type = fn_type_with_self_type %L1.WithSelf.R1.type.0d7469.2, %V [symbolic] +// CHECK:STDOUT: %impl.elem0.60b493.2: %.69b631.2 = impl_witness_access %L1.lookup_impl_witness.297fbf.2, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.f023e9.2: = specific_impl_function %impl.elem0.60b493.2, @L1.WithSelf.R1(%V) [symbolic] +// CHECK:STDOUT: %.917578.2: type = fn_type_with_self_type %L1.WithSelf.S1.type.79e6b4.2, %V [symbolic] +// CHECK:STDOUT: %impl.elem1.e3fe4c.2: %.917578.2 = impl_witness_access %L1.lookup_impl_witness.297fbf.2, element1 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.2cc093.2: = specific_impl_function %impl.elem1.e3fe4c.2, @L1.WithSelf.S1(%V) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -774,57 +837,60 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @L1 { -// CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %L1.R1.decl: %L1.R1.type = fn_decl @L1.R1 [concrete = constants.%L1.R1] { -// CHECK:STDOUT: %self.patt: @L1.R1.%pattern_type (%pattern_type.9c1) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @L1.R1.%pattern_type (%pattern_type.9c1) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc3: %L1.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @L1 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %L1.WithSelf.R1.decl: @L1.%L1.WithSelf.R1.type (%L1.WithSelf.R1.type.504) = fn_decl @L1.WithSelf.R1 [symbolic = @L1.%L1.WithSelf.R1 (constants.%L1.WithSelf.R1.aa4)] { +// CHECK:STDOUT: %self.patt: @L1.WithSelf.R1.%pattern_type (%pattern_type.9c1) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @L1.WithSelf.R1.%pattern_type (%pattern_type.9c1) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @L1.R1.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @L1.WithSelf.R1.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc4_15.1: type = splice_block %.loc4_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %L1.type = name_ref Self, @L1.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %L1.type = name_ref Self, @L1.%Self.loc3 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc4_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @L1.R1.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @L1.WithSelf.R1.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %L1.assoc_type = assoc_entity element0, %L1.R1.decl [concrete = constants.%assoc0] -// CHECK:STDOUT: %L1.S1.decl: %L1.S1.type = fn_decl @L1.S1 [concrete = constants.%L1.S1] { -// CHECK:STDOUT: %self.patt: @L1.S1.%pattern_type (%pattern_type.9c1) = ref_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @L1.S1.%pattern_type (%pattern_type.9c1) = ref_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %assoc0: %L1.assoc_type = assoc_entity element0, %L1.WithSelf.R1.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %L1.WithSelf.S1.decl: @L1.%L1.WithSelf.S1.type (%L1.WithSelf.S1.type.e03) = fn_decl @L1.WithSelf.S1 [symbolic = @L1.%L1.WithSelf.S1 (constants.%L1.WithSelf.S1.480)] { +// CHECK:STDOUT: %self.patt: @L1.WithSelf.S1.%pattern_type (%pattern_type.9c1) = ref_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @L1.WithSelf.S1.%pattern_type (%pattern_type.9c1) = ref_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref @L1.S1.%Self.binding.as_type (%Self.binding.as_type) = ref_param call_param0 +// CHECK:STDOUT: %self.param: ref @L1.WithSelf.S1.%Self.binding.as_type (%Self.binding.as_type) = ref_param call_param0 // CHECK:STDOUT: %.loc5_19.1: type = splice_block %.loc5_19.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %L1.type = name_ref Self, @L1.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %L1.type = name_ref Self, @L1.%Self.loc3 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_19.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: ref @L1.S1.%Self.binding.as_type (%Self.binding.as_type) = ref_binding self, %self.param +// CHECK:STDOUT: %self: ref @L1.WithSelf.S1.%Self.binding.as_type (%Self.binding.as_type) = ref_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %L1.assoc_type = assoc_entity element1, %L1.S1.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %L1.assoc_type = assoc_entity element1, %L1.WithSelf.S1.decl [concrete = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 // CHECK:STDOUT: .R1 = %assoc0 // CHECK:STDOUT: .S1 = %assoc1 -// CHECK:STDOUT: witness = (%L1.R1.decl, %L1.S1.decl) +// CHECK:STDOUT: witness = (%L1.WithSelf.R1.decl, %L1.WithSelf.S1.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @L1.R1(@L1.%Self: %L1.type) { +// CHECK:STDOUT: generic fn @L1.WithSelf.R1(@L1.%Self.loc3: %L1.type) { // CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9c1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @L1.R1.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @L1.WithSelf.R1.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @L1.S1(@L1.%Self: %L1.type) { +// CHECK:STDOUT: generic fn @L1.WithSelf.S1(@L1.%Self.loc3: %L1.type) { // CHECK:STDOUT: %Self: %L1.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.9c1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: ref @L1.S1.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: ref @L1.WithSelf.S1.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Simple4(%T.loc9_12.2: %L1.type) { @@ -838,30 +904,32 @@ fn Works() { // CHECK:STDOUT: %require_complete.loc9_21: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc9_21 (constants.%require_complete.592d00.1)] // CHECK:STDOUT: %require_complete.loc9_27: = require_complete_type %ptr.loc9_30.1 [symbolic = %require_complete.loc9_27 (constants.%require_complete.94a5f1.1)] // CHECK:STDOUT: %L1.lookup_impl_witness: = lookup_impl_witness %T.loc9_12.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.297fbf.1)] -// CHECK:STDOUT: %.loc10: type = fn_type_with_self_type constants.%L1.R1.type, %T.loc9_12.1 [symbolic = %.loc10 (constants.%.1a90aa.1)] -// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Simple4.%.loc10 (%.1a90aa.1) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.cbe2e1.1)] -// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @L1.R1(%T.loc9_12.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.996232.1)] -// CHECK:STDOUT: %.loc11_4.2: type = fn_type_with_self_type constants.%L1.S1.type, %T.loc9_12.1 [symbolic = %.loc11_4.2 (constants.%.70c7a3.1)] -// CHECK:STDOUT: %impl.elem1.loc11_4.2: @Simple4.%.loc11_4.2 (%.70c7a3.1) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.d4e3ba.1)] -// CHECK:STDOUT: %specific_impl_fn.loc11_4.2: = specific_impl_function %impl.elem1.loc11_4.2, @L1.S1(%T.loc9_12.1) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.2a2692.1)] +// CHECK:STDOUT: %L1.WithSelf.R1.type: type = fn_type @L1.WithSelf.R1, @L1(%T.loc9_12.1) [symbolic = %L1.WithSelf.R1.type (constants.%L1.WithSelf.R1.type.0d7469.1)] +// CHECK:STDOUT: %.loc10: type = fn_type_with_self_type %L1.WithSelf.R1.type, %T.loc9_12.1 [symbolic = %.loc10 (constants.%.69b631.1)] +// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Simple4.%.loc10 (%.69b631.1) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.60b493.1)] +// CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @L1.WithSelf.R1(%T.loc9_12.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.f023e9.1)] +// CHECK:STDOUT: %L1.WithSelf.S1.type: type = fn_type @L1.WithSelf.S1, @L1(%T.loc9_12.1) [symbolic = %L1.WithSelf.S1.type (constants.%L1.WithSelf.S1.type.79e6b4.1)] +// CHECK:STDOUT: %.loc11_4.2: type = fn_type_with_self_type %L1.WithSelf.S1.type, %T.loc9_12.1 [symbolic = %.loc11_4.2 (constants.%.917578.1)] +// CHECK:STDOUT: %impl.elem1.loc11_4.2: @Simple4.%.loc11_4.2 (%.917578.1) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.e3fe4c.1)] +// CHECK:STDOUT: %specific_impl_fn.loc11_4.2: = specific_impl_function %impl.elem1.loc11_4.2, @L1.WithSelf.S1(%T.loc9_12.1) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.2cc093.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Simple4.%T.binding.as_type (%T.binding.as_type), %p.param: @Simple4.%ptr.loc9_30.1 (%ptr.6c1f8e.1)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @Simple4.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x // CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Simple4.%.loc10 (%.1a90aa.1) = impl_witness_access constants.%L1.lookup_impl_witness.297fbf.1, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.cbe2e1.1)] +// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Simple4.%.loc10 (%.69b631.1) = impl_witness_access constants.%L1.lookup_impl_witness.297fbf.1, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.60b493.1)] // CHECK:STDOUT: %bound_method.loc10_4: = bound_method %x.ref, %impl.elem0.loc10_4.1 -// CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = specific_impl_function %impl.elem0.loc10_4.1, @L1.R1(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.996232.1)] +// CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = specific_impl_function %impl.elem0.loc10_4.1, @L1.WithSelf.R1(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.f023e9.1)] // CHECK:STDOUT: %bound_method.loc10_8: = bound_method %x.ref, %specific_impl_fn.loc10_4.1 -// CHECK:STDOUT: %L1.R1.call: init %empty_tuple.type = call %bound_method.loc10_8(%x.ref) +// CHECK:STDOUT: %L1.WithSelf.R1.call: init %empty_tuple.type = call %bound_method.loc10_8(%x.ref) // CHECK:STDOUT: %p.ref: @Simple4.%ptr.loc9_30.1 (%ptr.6c1f8e.1) = name_ref p, %p // CHECK:STDOUT: %.loc11_4.1: ref @Simple4.%T.binding.as_type (%T.binding.as_type) = deref %p.ref // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc11_4.1: @Simple4.%.loc11_4.2 (%.70c7a3.1) = impl_witness_access constants.%L1.lookup_impl_witness.297fbf.1, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.d4e3ba.1)] +// CHECK:STDOUT: %impl.elem1.loc11_4.1: @Simple4.%.loc11_4.2 (%.917578.1) = impl_witness_access constants.%L1.lookup_impl_witness.297fbf.1, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.e3fe4c.1)] // CHECK:STDOUT: %bound_method.loc11_4: = bound_method %.loc11_4.1, %impl.elem1.loc11_4.1 -// CHECK:STDOUT: %specific_impl_fn.loc11_4.1: = specific_impl_function %impl.elem1.loc11_4.1, @L1.S1(constants.%T) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.2a2692.1)] +// CHECK:STDOUT: %specific_impl_fn.loc11_4.1: = specific_impl_function %impl.elem1.loc11_4.1, @L1.WithSelf.S1(constants.%T) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.2cc093.1)] // CHECK:STDOUT: %bound_method.loc11_9: = bound_method %.loc11_4.1, %specific_impl_fn.loc11_4.1 -// CHECK:STDOUT: %L1.S1.call: init %empty_tuple.type = call %bound_method.loc11_9(%.loc11_4.1) +// CHECK:STDOUT: %L1.WithSelf.S1.call: init %empty_tuple.type = call %bound_method.loc11_9(%.loc11_4.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -877,43 +945,54 @@ fn Works() { // CHECK:STDOUT: %require_complete.loc15_23: = require_complete_type %V.binding.as_type [symbolic = %require_complete.loc15_23 (constants.%require_complete.592d00.2)] // CHECK:STDOUT: %require_complete.loc15_29: = require_complete_type %ptr.loc15_32.1 [symbolic = %require_complete.loc15_29 (constants.%require_complete.94a5f1.2)] // CHECK:STDOUT: %L1.lookup_impl_witness: = lookup_impl_witness %V.loc15_14.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.297fbf.2)] -// CHECK:STDOUT: %.loc16: type = fn_type_with_self_type constants.%L1.R1.type, %V.loc15_14.1 [symbolic = %.loc16 (constants.%.1a90aa.2)] -// CHECK:STDOUT: %impl.elem0.loc16_4.2: @Compound4.%.loc16 (%.1a90aa.2) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.cbe2e1.2)] -// CHECK:STDOUT: %specific_impl_fn.loc16_4.2: = specific_impl_function %impl.elem0.loc16_4.2, @L1.R1(%V.loc15_14.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.996232.2)] -// CHECK:STDOUT: %.loc17_4.2: type = fn_type_with_self_type constants.%L1.S1.type, %V.loc15_14.1 [symbolic = %.loc17_4.2 (constants.%.70c7a3.2)] -// CHECK:STDOUT: %impl.elem1.loc17_4.2: @Compound4.%.loc17_4.2 (%.70c7a3.2) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.d4e3ba.2)] -// CHECK:STDOUT: %specific_impl_fn.loc17_4.2: = specific_impl_function %impl.elem1.loc17_4.2, @L1.S1(%V.loc15_14.1) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.2a2692.2)] +// CHECK:STDOUT: %L1.WithSelf.R1.type: type = fn_type @L1.WithSelf.R1, @L1(%V.loc15_14.1) [symbolic = %L1.WithSelf.R1.type (constants.%L1.WithSelf.R1.type.0d7469.2)] +// CHECK:STDOUT: %.loc16: type = fn_type_with_self_type %L1.WithSelf.R1.type, %V.loc15_14.1 [symbolic = %.loc16 (constants.%.69b631.2)] +// CHECK:STDOUT: %impl.elem0.loc16_4.2: @Compound4.%.loc16 (%.69b631.2) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.60b493.2)] +// CHECK:STDOUT: %specific_impl_fn.loc16_4.2: = specific_impl_function %impl.elem0.loc16_4.2, @L1.WithSelf.R1(%V.loc15_14.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.f023e9.2)] +// CHECK:STDOUT: %L1.WithSelf.S1.type: type = fn_type @L1.WithSelf.S1, @L1(%V.loc15_14.1) [symbolic = %L1.WithSelf.S1.type (constants.%L1.WithSelf.S1.type.79e6b4.2)] +// CHECK:STDOUT: %.loc17_4.2: type = fn_type_with_self_type %L1.WithSelf.S1.type, %V.loc15_14.1 [symbolic = %.loc17_4.2 (constants.%.917578.2)] +// CHECK:STDOUT: %impl.elem1.loc17_4.2: @Compound4.%.loc17_4.2 (%.917578.2) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.e3fe4c.2)] +// CHECK:STDOUT: %specific_impl_fn.loc17_4.2: = specific_impl_function %impl.elem1.loc17_4.2, @L1.WithSelf.S1(%V.loc15_14.1) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.2cc093.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%y.param: @Compound4.%V.binding.as_type (%V.binding.as_type), %p.param: @Compound4.%ptr.loc15_32.1 (%ptr.6c1f8e.2)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %y.ref: @Compound4.%V.binding.as_type (%V.binding.as_type) = name_ref y, %y // CHECK:STDOUT: %L1.ref.loc16: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] // CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc16_4.1: @Compound4.%.loc16 (%.1a90aa.2) = impl_witness_access constants.%L1.lookup_impl_witness.297fbf.2, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.cbe2e1.2)] +// CHECK:STDOUT: %impl.elem0.loc16_4.1: @Compound4.%.loc16 (%.69b631.2) = impl_witness_access constants.%L1.lookup_impl_witness.297fbf.2, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.60b493.2)] // CHECK:STDOUT: %bound_method.loc16_4: = bound_method %y.ref, %impl.elem0.loc16_4.1 -// CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = specific_impl_function %impl.elem0.loc16_4.1, @L1.R1(constants.%V) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.996232.2)] +// CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = specific_impl_function %impl.elem0.loc16_4.1, @L1.WithSelf.R1(constants.%V) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.f023e9.2)] // CHECK:STDOUT: %bound_method.loc16_13: = bound_method %y.ref, %specific_impl_fn.loc16_4.1 -// CHECK:STDOUT: %L1.R1.call: init %empty_tuple.type = call %bound_method.loc16_13(%y.ref) +// CHECK:STDOUT: %L1.WithSelf.R1.call: init %empty_tuple.type = call %bound_method.loc16_13(%y.ref) // CHECK:STDOUT: %p.ref: @Compound4.%ptr.loc15_32.1 (%ptr.6c1f8e.2) = name_ref p, %p // CHECK:STDOUT: %L1.ref.loc17: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %.loc17_4.1: ref @Compound4.%V.binding.as_type (%V.binding.as_type) = deref %p.ref -// CHECK:STDOUT: %impl.elem1.loc17_4.1: @Compound4.%.loc17_4.2 (%.70c7a3.2) = impl_witness_access constants.%L1.lookup_impl_witness.297fbf.2, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.d4e3ba.2)] +// CHECK:STDOUT: %impl.elem1.loc17_4.1: @Compound4.%.loc17_4.2 (%.917578.2) = impl_witness_access constants.%L1.lookup_impl_witness.297fbf.2, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.e3fe4c.2)] // CHECK:STDOUT: %bound_method.loc17_4: = bound_method %.loc17_4.1, %impl.elem1.loc17_4.1 -// CHECK:STDOUT: %specific_impl_fn.loc17_4.1: = specific_impl_function %impl.elem1.loc17_4.1, @L1.S1(constants.%V) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.2a2692.2)] +// CHECK:STDOUT: %specific_impl_fn.loc17_4.1: = specific_impl_function %impl.elem1.loc17_4.1, @L1.WithSelf.S1(constants.%V) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.2cc093.2)] // CHECK:STDOUT: %bound_method.loc17_14: = bound_method %.loc17_4.1, %specific_impl_fn.loc17_4.1 -// CHECK:STDOUT: %L1.S1.call: init %empty_tuple.type = call %bound_method.loc17_14(%.loc17_4.1) +// CHECK:STDOUT: %L1.WithSelf.S1.call: init %empty_tuple.type = call %bound_method.loc17_14(%.loc17_4.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @L1.R1(constants.%Self) { +// CHECK:STDOUT: specific @L1(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Self +// CHECK:STDOUT: %L1.WithSelf.R1.type => constants.%L1.WithSelf.R1.type.504 +// CHECK:STDOUT: %L1.WithSelf.R1 => constants.%L1.WithSelf.R1.aa4 +// CHECK:STDOUT: %L1.WithSelf.S1.type => constants.%L1.WithSelf.S1.type.e03 +// CHECK:STDOUT: %L1.WithSelf.S1 => constants.%L1.WithSelf.S1.480 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @L1.WithSelf.R1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9c1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @L1.S1(constants.%Self) { +// CHECK:STDOUT: specific @L1.WithSelf.S1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.9c1 @@ -927,13 +1006,22 @@ fn Works() { // CHECK:STDOUT: %pattern_type.loc9_26 => constants.%pattern_type.740d56.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @L1.R1(constants.%T) { +// CHECK:STDOUT: specific @L1(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%T +// CHECK:STDOUT: %L1.WithSelf.R1.type => constants.%L1.WithSelf.R1.type.0d7469.1 +// CHECK:STDOUT: %L1.WithSelf.R1 => constants.%L1.WithSelf.R1.f22128.1 +// CHECK:STDOUT: %L1.WithSelf.S1.type => constants.%L1.WithSelf.S1.type.79e6b4.1 +// CHECK:STDOUT: %L1.WithSelf.S1 => constants.%L1.WithSelf.S1.cd5111.1 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @L1.WithSelf.R1(constants.%T) { // CHECK:STDOUT: %Self => constants.%T // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.352a62.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @L1.S1(constants.%T) { +// CHECK:STDOUT: specific @L1.WithSelf.S1(constants.%T) { // CHECK:STDOUT: %Self => constants.%T // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.352a62.1 @@ -947,13 +1035,22 @@ fn Works() { // CHECK:STDOUT: %pattern_type.loc15_28 => constants.%pattern_type.740d56.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @L1.R1(constants.%V) { +// CHECK:STDOUT: specific @L1(constants.%V) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%V +// CHECK:STDOUT: %L1.WithSelf.R1.type => constants.%L1.WithSelf.R1.type.0d7469.2 +// CHECK:STDOUT: %L1.WithSelf.R1 => constants.%L1.WithSelf.R1.f22128.2 +// CHECK:STDOUT: %L1.WithSelf.S1.type => constants.%L1.WithSelf.S1.type.79e6b4.2 +// CHECK:STDOUT: %L1.WithSelf.S1 => constants.%L1.WithSelf.S1.cd5111.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @L1.WithSelf.R1(constants.%V) { // CHECK:STDOUT: %Self => constants.%V // CHECK:STDOUT: %Self.binding.as_type => constants.%V.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.352a62.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @L1.S1(constants.%V) { +// CHECK:STDOUT: specific @L1.WithSelf.S1(constants.%V) { // CHECK:STDOUT: %Self => constants.%V // CHECK:STDOUT: %Self.binding.as_type => constants.%V.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.352a62.2 @@ -966,29 +1063,33 @@ fn Works() { // CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.73b: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %L2.R2.type: type = fn_type @L2.R2 [concrete] +// CHECK:STDOUT: %L2.WithSelf.R2.type.e38: type = fn_type @L2.WithSelf.R2, @L2(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %L2.R2: %L2.R2.type = struct_value () [concrete] +// CHECK:STDOUT: %L2.WithSelf.R2.f23: %L2.WithSelf.R2.type.e38 = struct_value () [symbolic] // CHECK:STDOUT: %L2.assoc_type: type = assoc_entity_type @L2 [concrete] -// CHECK:STDOUT: %assoc0: %L2.assoc_type = assoc_entity element0, @L2.%L2.R2.decl [concrete] -// CHECK:STDOUT: %L2.S2.type: type = fn_type @L2.S2 [concrete] -// CHECK:STDOUT: %L2.S2: %L2.S2.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %L2.assoc_type = assoc_entity element1, @L2.%L2.S2.decl [concrete] +// CHECK:STDOUT: %assoc0: %L2.assoc_type = assoc_entity element0, @L2.%L2.WithSelf.R2.decl [concrete] +// CHECK:STDOUT: %L2.WithSelf.S2.type.7f8: type = fn_type @L2.WithSelf.S2, @L2(%Self) [symbolic] +// CHECK:STDOUT: %L2.WithSelf.S2.827: %L2.WithSelf.S2.type.7f8 = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1: %L2.assoc_type = assoc_entity element1, @L2.%L2.WithSelf.S2.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: %L2.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.5a0: type = pattern_type %L2.type [concrete] // CHECK:STDOUT: %Simple5.type: type = fn_type @Simple5 [concrete] // CHECK:STDOUT: %Simple5: %Simple5.type = struct_value () [concrete] +// CHECK:STDOUT: %L2.WithSelf.R2.type.ba3: type = fn_type @L2.WithSelf.R2, @L2(%T) [symbolic] +// CHECK:STDOUT: %L2.WithSelf.R2.c61: %L2.WithSelf.R2.type.ba3 = struct_value () [symbolic] +// CHECK:STDOUT: %L2.WithSelf.S2.type.68b: type = fn_type @L2.WithSelf.S2, @L2(%T) [symbolic] +// CHECK:STDOUT: %L2.WithSelf.S2.470: %L2.WithSelf.S2.type.68b = struct_value () [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] // CHECK:STDOUT: %L2.lookup_impl_witness: = lookup_impl_witness %T, @L2 [symbolic] -// CHECK:STDOUT: %.bd0: type = fn_type_with_self_type %L2.R2.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem0: %.bd0 = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %.f8e: type = fn_type_with_self_type %L2.WithSelf.R2.type.ba3, %T [symbolic] +// CHECK:STDOUT: %impl.elem0: %.f8e = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %pattern_type.0fc: type = pattern_type %T.binding.as_type [symbolic] -// CHECK:STDOUT: %specific_impl_fn.c6b: = specific_impl_function %impl.elem0, @L2.R2(%T) [symbolic] -// CHECK:STDOUT: %.91b: type = fn_type_with_self_type %L2.S2.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem1: %.91b = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.761: = specific_impl_function %impl.elem1, @L2.S2(%T) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.b6c: = specific_impl_function %impl.elem0, @L2.WithSelf.R2(%T) [symbolic] +// CHECK:STDOUT: %.b1c: type = fn_type_with_self_type %L2.WithSelf.S2.type.68b, %T [symbolic] +// CHECK:STDOUT: %impl.elem1: %.b1c = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.b67: = specific_impl_function %impl.elem1, @L2.WithSelf.S2(%T) [symbolic] // CHECK:STDOUT: %V: %L2.type = symbolic_binding V, 0 [symbolic] // CHECK:STDOUT: %Compound5.type: type = fn_type @Compound5 [concrete] // CHECK:STDOUT: %Compound5: %Compound5.type = struct_value () [concrete] @@ -1031,57 +1132,60 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @L2 { -// CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %L2.R2.decl: %L2.R2.type = fn_decl @L2.R2 [concrete = constants.%L2.R2] { -// CHECK:STDOUT: %self.patt: @L2.R2.%pattern_type (%pattern_type.73b) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @L2.R2.%pattern_type (%pattern_type.73b) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4: %L2.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @L2 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %L2.WithSelf.R2.decl: @L2.%L2.WithSelf.R2.type (%L2.WithSelf.R2.type.e38) = fn_decl @L2.WithSelf.R2 [symbolic = @L2.%L2.WithSelf.R2 (constants.%L2.WithSelf.R2.f23)] { +// CHECK:STDOUT: %self.patt: @L2.WithSelf.R2.%pattern_type (%pattern_type.73b) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @L2.WithSelf.R2.%pattern_type (%pattern_type.73b) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @L2.R2.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @L2.WithSelf.R2.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %L2.type = name_ref Self, @L2.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %L2.type = name_ref Self, @L2.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @L2.R2.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @L2.WithSelf.R2.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %L2.assoc_type = assoc_entity element0, %L2.R2.decl [concrete = constants.%assoc0] -// CHECK:STDOUT: %L2.S2.decl: %L2.S2.type = fn_decl @L2.S2 [concrete = constants.%L2.S2] { -// CHECK:STDOUT: %self.patt: @L2.S2.%pattern_type (%pattern_type.73b) = ref_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @L2.S2.%pattern_type (%pattern_type.73b) = ref_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %assoc0: %L2.assoc_type = assoc_entity element0, %L2.WithSelf.R2.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %L2.WithSelf.S2.decl: @L2.%L2.WithSelf.S2.type (%L2.WithSelf.S2.type.7f8) = fn_decl @L2.WithSelf.S2 [symbolic = @L2.%L2.WithSelf.S2 (constants.%L2.WithSelf.S2.827)] { +// CHECK:STDOUT: %self.patt: @L2.WithSelf.S2.%pattern_type (%pattern_type.73b) = ref_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @L2.WithSelf.S2.%pattern_type (%pattern_type.73b) = ref_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: ref @L2.S2.%Self.binding.as_type (%Self.binding.as_type) = ref_param call_param0 +// CHECK:STDOUT: %self.param: ref @L2.WithSelf.S2.%Self.binding.as_type (%Self.binding.as_type) = ref_param call_param0 // CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %L2.type = name_ref Self, @L2.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %L2.type = name_ref Self, @L2.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc6_19.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: ref @L2.S2.%Self.binding.as_type (%Self.binding.as_type) = ref_binding self, %self.param +// CHECK:STDOUT: %self: ref @L2.WithSelf.S2.%Self.binding.as_type (%Self.binding.as_type) = ref_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %L2.assoc_type = assoc_entity element1, %L2.S2.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %L2.assoc_type = assoc_entity element1, %L2.WithSelf.S2.decl [concrete = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .R2 = %assoc0 // CHECK:STDOUT: .S2 = %assoc1 -// CHECK:STDOUT: witness = (%L2.R2.decl, %L2.S2.decl) +// CHECK:STDOUT: witness = (%L2.WithSelf.R2.decl, %L2.WithSelf.S2.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @L2.R2(@L2.%Self: %L2.type) { +// CHECK:STDOUT: generic fn @L2.WithSelf.R2(@L2.%Self.loc4: %L2.type) { // CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.73b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @L2.R2.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @L2.WithSelf.R2.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @L2.S2(@L2.%Self: %L2.type) { +// CHECK:STDOUT: generic fn @L2.WithSelf.S2(@L2.%Self.loc4: %L2.type) { // CHECK:STDOUT: %Self: %L2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.73b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: ref @L2.S2.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: ref @L2.WithSelf.S2.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Simple5(%T.loc10_12.2: %L2.type) { @@ -1090,12 +1194,14 @@ fn Works() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc10_12.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %L2.lookup_impl_witness: = lookup_impl_witness %T.loc10_12.1, @L2 [symbolic = %L2.lookup_impl_witness (constants.%L2.lookup_impl_witness)] -// CHECK:STDOUT: %.loc18_4.2: type = fn_type_with_self_type constants.%L2.R2.type, %T.loc10_12.1 [symbolic = %.loc18_4.2 (constants.%.bd0)] -// CHECK:STDOUT: %impl.elem0.loc18_4.2: @Simple5.%.loc18_4.2 (%.bd0) = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc18_4.2: = specific_impl_function %impl.elem0.loc18_4.2, @L2.R2(%T.loc10_12.1) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.c6b)] -// CHECK:STDOUT: %.loc26_4.2: type = fn_type_with_self_type constants.%L2.S2.type, %T.loc10_12.1 [symbolic = %.loc26_4.2 (constants.%.91b)] -// CHECK:STDOUT: %impl.elem1.loc26_4.2: @Simple5.%.loc26_4.2 (%.91b) = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc26_4.2: = specific_impl_function %impl.elem1.loc26_4.2, @L2.S2(%T.loc10_12.1) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.761)] +// CHECK:STDOUT: %L2.WithSelf.R2.type: type = fn_type @L2.WithSelf.R2, @L2(%T.loc10_12.1) [symbolic = %L2.WithSelf.R2.type (constants.%L2.WithSelf.R2.type.ba3)] +// CHECK:STDOUT: %.loc18_4.2: type = fn_type_with_self_type %L2.WithSelf.R2.type, %T.loc10_12.1 [symbolic = %.loc18_4.2 (constants.%.f8e)] +// CHECK:STDOUT: %impl.elem0.loc18_4.2: @Simple5.%.loc18_4.2 (%.f8e) = impl_witness_access %L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc18_4.2: = specific_impl_function %impl.elem0.loc18_4.2, @L2.WithSelf.R2(%T.loc10_12.1) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.b6c)] +// CHECK:STDOUT: %L2.WithSelf.S2.type: type = fn_type @L2.WithSelf.S2, @L2(%T.loc10_12.1) [symbolic = %L2.WithSelf.S2.type (constants.%L2.WithSelf.S2.type.68b)] +// CHECK:STDOUT: %.loc26_4.2: type = fn_type_with_self_type %L2.WithSelf.S2.type, %T.loc10_12.1 [symbolic = %.loc26_4.2 (constants.%.b1c)] +// CHECK:STDOUT: %impl.elem1.loc26_4.2: @Simple5.%.loc26_4.2 (%.b1c) = impl_witness_access %L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %specific_impl_fn.loc26_4.2: = specific_impl_function %impl.elem1.loc26_4.2, @L2.WithSelf.S2(%T.loc10_12.1) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.b67)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -1103,16 +1209,16 @@ fn Works() { // CHECK:STDOUT: %T.as_type.loc18: type = facet_access_type %T.ref.loc18 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc18_4.1: type = converted %T.ref.loc18, %T.as_type.loc18 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %R2.ref: %L2.assoc_type = name_ref R2, @L2.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc18_4.1: @Simple5.%.loc18_4.2 (%.bd0) = impl_witness_access constants.%L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc18_4.1: = specific_impl_function %impl.elem0.loc18_4.1, @L2.R2(constants.%T) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.c6b)] -// CHECK:STDOUT: %L2.R2.call: init %empty_tuple.type = call %specific_impl_fn.loc18_4.1() +// CHECK:STDOUT: %impl.elem0.loc18_4.1: @Simple5.%.loc18_4.2 (%.f8e) = impl_witness_access constants.%L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc18_4.1: = specific_impl_function %impl.elem0.loc18_4.1, @L2.WithSelf.R2(constants.%T) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.b6c)] +// CHECK:STDOUT: %L2.WithSelf.R2.call: init %empty_tuple.type = call %specific_impl_fn.loc18_4.1() // CHECK:STDOUT: %T.ref.loc26: %L2.type = name_ref T, %T.loc10_12.2 [symbolic = %T.loc10_12.1 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc26_4.1: type = converted %T.ref.loc26, %T.as_type.loc26 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc26_4.1: @Simple5.%.loc26_4.2 (%.91b) = impl_witness_access constants.%L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)] -// CHECK:STDOUT: %specific_impl_fn.loc26_4.1: = specific_impl_function %impl.elem1.loc26_4.1, @L2.S2(constants.%T) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.761)] -// CHECK:STDOUT: %L2.S2.call: init %empty_tuple.type = call %specific_impl_fn.loc26_4.1() +// CHECK:STDOUT: %impl.elem1.loc26_4.1: @Simple5.%.loc26_4.2 (%.b1c) = impl_witness_access constants.%L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %specific_impl_fn.loc26_4.1: = specific_impl_function %impl.elem1.loc26_4.1, @L2.WithSelf.S2(constants.%T) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.b67)] +// CHECK:STDOUT: %L2.WithSelf.S2.call: init %empty_tuple.type = call %specific_impl_fn.loc26_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1134,13 +1240,22 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @L2.R2(constants.%Self) { +// CHECK:STDOUT: specific @L2(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self +// CHECK:STDOUT: %L2.WithSelf.R2.type => constants.%L2.WithSelf.R2.type.e38 +// CHECK:STDOUT: %L2.WithSelf.R2 => constants.%L2.WithSelf.R2.f23 +// CHECK:STDOUT: %L2.WithSelf.S2.type => constants.%L2.WithSelf.S2.type.7f8 +// CHECK:STDOUT: %L2.WithSelf.S2 => constants.%L2.WithSelf.S2.827 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @L2.WithSelf.R2(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.73b // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @L2.S2(constants.%Self) { +// CHECK:STDOUT: specific @L2.WithSelf.S2(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.73b @@ -1150,13 +1265,22 @@ fn Works() { // CHECK:STDOUT: %T.loc10_12.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @L2.R2(constants.%T) { +// CHECK:STDOUT: specific @L2(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%T +// CHECK:STDOUT: %L2.WithSelf.R2.type => constants.%L2.WithSelf.R2.type.ba3 +// CHECK:STDOUT: %L2.WithSelf.R2 => constants.%L2.WithSelf.R2.c61 +// CHECK:STDOUT: %L2.WithSelf.S2.type => constants.%L2.WithSelf.S2.type.68b +// CHECK:STDOUT: %L2.WithSelf.S2 => constants.%L2.WithSelf.S2.470 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @L2.WithSelf.R2(constants.%T) { // CHECK:STDOUT: %Self => constants.%T // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.0fc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @L2.S2(constants.%T) { +// CHECK:STDOUT: specific @L2.WithSelf.S2(constants.%T) { // CHECK:STDOUT: %Self => constants.%T // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.0fc @@ -1171,11 +1295,11 @@ fn Works() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %Self.c51: %A.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %A.G.type: type = fn_type @A.G [concrete] +// CHECK:STDOUT: %A.WithSelf.G.type.e1d: type = fn_type @A.WithSelf.G, @A(%Self.c51) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %A.G: %A.G.type = struct_value () [concrete] +// CHECK:STDOUT: %A.WithSelf.G.552: %A.WithSelf.G.type.e1d = struct_value () [symbolic] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete] -// CHECK:STDOUT: %assoc0.3d5: %A.assoc_type = assoc_entity element0, @A.%A.G.decl [concrete] +// CHECK:STDOUT: %assoc0.eb1: %A.assoc_type = assoc_entity element0, @A.%A.WithSelf.G.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -1183,6 +1307,8 @@ fn Works() { // CHECK:STDOUT: %C.as.A.impl.G.type: type = fn_type @C.as.A.impl.G [concrete] // CHECK:STDOUT: %C.as.A.impl.G: %C.as.A.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: %A.facet: %A.type = facet_value %C, (%A.impl_witness) [concrete] +// CHECK:STDOUT: %A.WithSelf.G.type.f93: type = fn_type @A.WithSelf.G, @A(%A.facet) [concrete] +// CHECK:STDOUT: %A.WithSelf.G.9b2: %A.WithSelf.G.type.f93 = struct_value () [concrete] // CHECK:STDOUT: %Fails.type: type = fn_type @Fails [concrete] // CHECK:STDOUT: %Fails: %Fails.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -1190,10 +1316,10 @@ fn Works() { // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %A.type, %type.as.BitAndWith.impl.Op [concrete] @@ -1237,14 +1363,17 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { -// CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c51] -// CHECK:STDOUT: %A.G.decl: %A.G.type = fn_decl @A.G [concrete = constants.%A.G] {} {} -// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.G.decl [concrete = constants.%assoc0.3d5] +// CHECK:STDOUT: %Self.loc3: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c51] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %A.WithSelf.G.decl: @A.%A.WithSelf.G.type (%A.WithSelf.G.type.e1d) = fn_decl @A.WithSelf.G [symbolic = @A.%A.WithSelf.G (constants.%A.WithSelf.G.552)] {} {} +// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.WithSelf.G.decl [concrete = constants.%assoc0.eb1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 // CHECK:STDOUT: .G = %assoc0 -// CHECK:STDOUT: witness = (%A.G.decl) +// CHECK:STDOUT: witness = (%A.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -1267,7 +1396,7 @@ fn Works() { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @A.G(@A.%Self: %A.type) { +// CHECK:STDOUT: generic fn @A.WithSelf.G(@A.%Self.loc3: %A.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1286,10 +1415,10 @@ fn Works() { // CHECK:STDOUT: %.loc22_7: ref %C = converted %.loc22_5.1, %.loc22_5.4 // CHECK:STDOUT: %A.ref.loc22_15: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc22_19: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc22: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc22: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc22: = bound_method %A.ref.loc22_15, %impl.elem0.loc22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc22: init type = call %bound_method.loc22(%A.ref.loc22_15, %A.ref.loc22_19) [concrete = constants.%A.type] -// CHECK:STDOUT: %G.ref.loc22: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.3d5] +// CHECK:STDOUT: %G.ref.loc22: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.eb1] // CHECK:STDOUT: %.loc22_12: %A.type = converted %.loc22_7, [concrete = ] // CHECK:STDOUT: %.loc30_6.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %C.ref.loc30_11: type = name_ref C, file.%C.decl [concrete = constants.%C] @@ -1300,7 +1429,7 @@ fn Works() { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc30_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc30_28: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc30_26: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc30_26: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc30_26: = bound_method %A.ref.loc30_24, %impl.elem0.loc30_26 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc30_26: init type = call %bound_method.loc30_26(%A.ref.loc30_24, %A.ref.loc30_28) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc30_29.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc30_26 [concrete = constants.%A.type] @@ -1311,10 +1440,10 @@ fn Works() { // CHECK:STDOUT: %.loc30_30: type = converted %.loc30_20, %as_type.loc30 [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc30_35: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc30_39: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc30_37: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc30_37: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc30_37: = bound_method %A.ref.loc30_35, %impl.elem0.loc30_37 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc30_37: init type = call %bound_method.loc30_37(%A.ref.loc30_35, %A.ref.loc30_39) [concrete = constants.%A.type] -// CHECK:STDOUT: %G.ref.loc30: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.3d5] +// CHECK:STDOUT: %G.ref.loc30: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.eb1] // CHECK:STDOUT: %.loc30_32: %A.type = converted %.loc30_8, [concrete = ] // CHECK:STDOUT: %.loc38_6.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %C.ref.loc38_11: type = name_ref C, file.%C.decl [concrete = constants.%C] @@ -1325,7 +1454,7 @@ fn Works() { // CHECK:STDOUT: %C.ref.loc38_18: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc38_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc38_28: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc38: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc38: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc38: = bound_method %A.ref.loc38_24, %impl.elem0.loc38 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc38: init type = call %bound_method.loc38(%A.ref.loc38_24, %A.ref.loc38_28) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc38_29.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc38 [concrete = constants.%A.type] @@ -1335,7 +1464,7 @@ fn Works() { // CHECK:STDOUT: %as_type.loc38: type = facet_access_type %.loc38_20 [concrete = constants.%C] // CHECK:STDOUT: %.loc38_30: type = converted %.loc38_20, %as_type.loc38 [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc38_34: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %G.ref.loc38: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.3d5] +// CHECK:STDOUT: %G.ref.loc38: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.eb1] // CHECK:STDOUT: %.loc38_32: %A.type = converted %.loc38_8, [concrete = ] // CHECK:STDOUT: %DestroyOp.bound.loc38: = bound_method %.loc38_6.4, constants.%DestroyOp // CHECK:STDOUT: %DestroyOp.call.loc38: init %empty_tuple.type = call %DestroyOp.bound.loc38(%.loc38_6.4) @@ -1348,20 +1477,34 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.G(constants.%Self.c51) {} +// CHECK:STDOUT: specific @A(constants.%Self.c51) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Self.c51 +// CHECK:STDOUT: %A.WithSelf.G.type => constants.%A.WithSelf.G.type.e1d +// CHECK:STDOUT: %A.WithSelf.G => constants.%A.WithSelf.G.552 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.G(constants.%A.facet) {} +// CHECK:STDOUT: specific @A.WithSelf.G(constants.%Self.c51) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%A.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%A.facet +// CHECK:STDOUT: %A.WithSelf.G.type => constants.%A.WithSelf.G.type.f93 +// CHECK:STDOUT: %A.WithSelf.G => constants.%A.WithSelf.G.9b2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.G(constants.%A.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: --- allowed_combine_non_instance.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete] // CHECK:STDOUT: %Self.c51: %A.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %A.G.type: type = fn_type @A.G [concrete] +// CHECK:STDOUT: %A.WithSelf.G.type.e1d: type = fn_type @A.WithSelf.G, @A(%Self.c51) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %A.G: %A.G.type = struct_value () [concrete] +// CHECK:STDOUT: %A.WithSelf.G.552: %A.WithSelf.G.type.e1d = struct_value () [symbolic] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete] -// CHECK:STDOUT: %assoc0.3d5: %A.assoc_type = assoc_entity element0, @A.%A.G.decl [concrete] +// CHECK:STDOUT: %assoc0.eb1: %A.assoc_type = assoc_entity element0, @A.%A.WithSelf.G.decl [concrete] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] @@ -1369,19 +1512,21 @@ fn Works() { // CHECK:STDOUT: %C.as.A.impl.G.type: type = fn_type @C.as.A.impl.G [concrete] // CHECK:STDOUT: %C.as.A.impl.G: %C.as.A.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: %A.facet: %A.type = facet_value %C, (%A.impl_witness) [concrete] +// CHECK:STDOUT: %A.WithSelf.G.type.f93: type = fn_type @A.WithSelf.G, @A(%A.facet) [concrete] +// CHECK:STDOUT: %A.WithSelf.G.9b2: %A.WithSelf.G.type.f93 = struct_value () [concrete] // CHECK:STDOUT: %Works.type: type = fn_type @Works [concrete] // CHECK:STDOUT: %Works: %Works.type = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.f2e: type = generic_interface_type @BitAndWith [concrete] // CHECK:STDOUT: %BitAndWith.generic: %BitAndWith.type.f2e = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %A.type, %type.as.BitAndWith.impl.Op [concrete] -// CHECK:STDOUT: %.d0f: type = fn_type_with_self_type %A.G.type, %A.facet [concrete] +// CHECK:STDOUT: %.05a: type = fn_type_with_self_type %A.WithSelf.G.type.f93, %A.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1413,14 +1558,17 @@ fn Works() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { -// CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c51] -// CHECK:STDOUT: %A.G.decl: %A.G.type = fn_decl @A.G [concrete = constants.%A.G] {} {} -// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.G.decl [concrete = constants.%assoc0.3d5] +// CHECK:STDOUT: %Self.loc3: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c51] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %A.WithSelf.G.decl: @A.%A.WithSelf.G.type (%A.WithSelf.G.type.e1d) = fn_decl @A.WithSelf.G [symbolic = @A.%A.WithSelf.G (constants.%A.WithSelf.G.552)] {} {} +// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.WithSelf.G.decl [concrete = constants.%assoc0.eb1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 // CHECK:STDOUT: .G = %assoc0 -// CHECK:STDOUT: witness = (%A.G.decl) +// CHECK:STDOUT: witness = (%A.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -1443,7 +1591,7 @@ fn Works() { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @A.G(@A.%Self: %A.type) { +// CHECK:STDOUT: generic fn @A.WithSelf.G(@A.%Self.loc3: %A.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1457,18 +1605,18 @@ fn Works() { // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc13_7: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc13_11: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc13_9: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc13_9: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc13: = bound_method %A.ref.loc13_7, %impl.elem0.loc13_9 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc13: init type = call %bound_method.loc13(%A.ref.loc13_7, %A.ref.loc13_11) [concrete = constants.%A.type] -// CHECK:STDOUT: %G.ref.loc13: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.3d5] +// CHECK:STDOUT: %G.ref.loc13: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.eb1] // CHECK:STDOUT: %A.facet.loc13: %A.type = facet_value %C.ref.loc13, (constants.%A.impl_witness) [concrete = constants.%A.facet] // CHECK:STDOUT: %.loc13: %A.type = converted %C.ref.loc13, %A.facet.loc13 [concrete = constants.%A.facet] -// CHECK:STDOUT: %impl.elem0.loc13_4: %.d0f = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%C.as.A.impl.G] +// CHECK:STDOUT: %impl.elem0.loc13_4: %.05a = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%C.as.A.impl.G] // CHECK:STDOUT: %C.as.A.impl.G.call.loc13: init %empty_tuple.type = call %impl.elem0.loc13_4() // CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc14_10: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc14_14: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc14_12: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc14_12: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc14_12: = bound_method %A.ref.loc14_10, %impl.elem0.loc14_12 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc14_12: init type = call %bound_method.loc14_12(%A.ref.loc14_10, %A.ref.loc14_14) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc14_15.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc14_12 [concrete = constants.%A.type] @@ -1477,16 +1625,16 @@ fn Works() { // CHECK:STDOUT: %.loc14_6: %A.type = converted %C.ref.loc14, %A.facet.loc14 [concrete = constants.%A.facet] // CHECK:STDOUT: %A.ref.loc14_20: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc14_24: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc14_22: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc14_22: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc14_22: = bound_method %A.ref.loc14_20, %impl.elem0.loc14_22 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc14_22: init type = call %bound_method.loc14_22(%A.ref.loc14_20, %A.ref.loc14_24) [concrete = constants.%A.type] -// CHECK:STDOUT: %G.ref.loc14: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.3d5] -// CHECK:STDOUT: %impl.elem0.loc14_17: %.d0f = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%C.as.A.impl.G] +// CHECK:STDOUT: %G.ref.loc14: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.eb1] +// CHECK:STDOUT: %impl.elem0.loc14_17: %.05a = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%C.as.A.impl.G] // CHECK:STDOUT: %C.as.A.impl.G.call.loc14: init %empty_tuple.type = call %impl.elem0.loc14_17() // CHECK:STDOUT: %C.ref.loc15: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %A.ref.loc15_10: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %A.ref.loc15_14: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %impl.elem0.loc15_12: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc15_12: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method.loc15: = bound_method %A.ref.loc15_10, %impl.elem0.loc15_12 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call.loc15: init type = call %bound_method.loc15(%A.ref.loc15_10, %A.ref.loc15_14) [concrete = constants.%A.type] // CHECK:STDOUT: %.loc15_15.1: type = value_of_initializer %type.as.BitAndWith.impl.Op.call.loc15 [concrete = constants.%A.type] @@ -1494,13 +1642,27 @@ fn Works() { // CHECK:STDOUT: %A.facet.loc15: %A.type = facet_value %C.ref.loc15, (constants.%A.impl_witness) [concrete = constants.%A.facet] // CHECK:STDOUT: %.loc15_6: %A.type = converted %C.ref.loc15, %A.facet.loc15 [concrete = constants.%A.facet] // CHECK:STDOUT: %A.ref.loc15_19: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %G.ref.loc15: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.3d5] -// CHECK:STDOUT: %impl.elem0.loc15_17: %.d0f = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%C.as.A.impl.G] +// CHECK:STDOUT: %G.ref.loc15: %A.assoc_type = name_ref G, @A.%assoc0 [concrete = constants.%assoc0.eb1] +// CHECK:STDOUT: %impl.elem0.loc15_17: %.05a = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%C.as.A.impl.G] // CHECK:STDOUT: %C.as.A.impl.G.call.loc15: init %empty_tuple.type = call %impl.elem0.loc15_17() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.G(constants.%Self.c51) {} +// CHECK:STDOUT: specific @A(constants.%Self.c51) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Self.c51 +// CHECK:STDOUT: %A.WithSelf.G.type => constants.%A.WithSelf.G.type.e1d +// CHECK:STDOUT: %A.WithSelf.G => constants.%A.WithSelf.G.552 +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.G(constants.%A.facet) {} +// CHECK:STDOUT: specific @A.WithSelf.G(constants.%Self.c51) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%A.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%A.facet +// CHECK:STDOUT: %A.WithSelf.G.type => constants.%A.WithSelf.G.type.f93 +// CHECK:STDOUT: %A.WithSelf.G => constants.%A.WithSelf.G.9b2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.G(constants.%A.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/default_fn.carbon b/toolchain/check/testdata/interface/default_fn.carbon index 4d6feea8e99e..e9a92f7a2a75 100644 --- a/toolchain/check/testdata/interface/default_fn.carbon +++ b/toolchain/check/testdata/interface/default_fn.carbon @@ -35,22 +35,24 @@ class C { // CHECK:STDOUT: %Self.849: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type.5c6: type = symbolic_binding_type Self, 0, %Self.849 [symbolic] // CHECK:STDOUT: %pattern_type.b59: type = pattern_type %Self.binding.as_type.5c6 [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.b26: type = fn_type @I.WithSelf.F, @I(%Self.849) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.983: %I.WithSelf.F.type.b26 = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.ab7: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0.1f8: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %I.impl_witness: = impl_witness @C.as.I.impl.%I.impl_witness_table [concrete] // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] // CHECK:STDOUT: %C.as.I.impl.F.type: type = fn_type @C.as.I.impl.F [concrete] // CHECK:STDOUT: %C.as.I.impl.F: %C.as.I.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.1f2: type = fn_type @I.WithSelf.F, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.F.860: %I.WithSelf.F.type.1f2 = 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: %require_complete: = require_complete_type %Self.binding.as_type.5c6 [symbolic] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %.24e: type = fn_type_with_self_type %I.F.type, %I.facet [concrete] +// CHECK:STDOUT: %.fae: type = fn_type_with_self_type %I.WithSelf.F.type.1f2, %I.facet [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] @@ -75,27 +77,32 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.849] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { -// CHECK:STDOUT: %self.patt: @I.F.%pattern_type (%pattern_type.b59) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type (%pattern_type.b59) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc16: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.849] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.b26) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.983)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type.b59) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.b59) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.5c6) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.5c6) = value_param call_param0 // CHECK:STDOUT: %.loc18_16.1: type = splice_block %.loc18_16.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.5c6)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.849)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self.loc16 [symbolic = %Self (constants.%Self.849)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.5c6)] // CHECK:STDOUT: %.loc18_16.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.5c6)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.F.%Self.binding.as_type (%Self.binding.as_type.5c6) = value_binding self, %self.param +// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.5c6) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0.ab7] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0.1f8] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc16 +// CHECK:STDOUT: .C = +// CHECK:STDOUT: .I = // CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: .C = // CHECK:STDOUT: .I = -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -132,7 +139,7 @@ class C { // CHECK:STDOUT: .C = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc16: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.849)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.5c6)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.b59)] @@ -140,7 +147,7 @@ class C { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %Self.binding.as_type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type.5c6)) { +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.5c6)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %c.patt: %pattern_type.7c7 = ref_binding_pattern c [concrete] @@ -155,8 +162,8 @@ class C { // CHECK:STDOUT: %c: ref %C = ref_binding c, %c.var // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0.ab7] -// CHECK:STDOUT: %impl.elem0: %.24e = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F] +// CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0.1f8] +// CHECK:STDOUT: %impl.elem0: %.fae = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C.as.I.impl.F] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %.loc21: %C = acquire_value %c.ref // CHECK:STDOUT: %C.as.I.impl.F.call: init %empty_tuple.type = call %bound_method(%.loc21) @@ -173,13 +180,27 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.849) { +// CHECK:STDOUT: specific @I(constants.%Self.849) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc18 => constants.%Self.849 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.b26 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.983 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.849) { // CHECK:STDOUT: %Self => constants.%Self.849 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.5c6 // CHECK:STDOUT: %pattern_type => constants.%pattern_type.b59 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc18 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.1f2 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.860 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet) { // CHECK:STDOUT: %Self => constants.%I.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%C // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7c7 diff --git a/toolchain/check/testdata/interface/export_name.carbon b/toolchain/check/testdata/interface/export_name.carbon index 5558a538f7b7..1d22a579dd7e 100644 --- a/toolchain/check/testdata/interface/export_name.carbon +++ b/toolchain/check/testdata/interface/export_name.carbon @@ -58,6 +58,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -66,15 +67,18 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- export.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] +// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//base, I, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %Main.import_ref = import_ref Main//base, loc4_13, unloaded +// CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//base, loc4_13, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -87,16 +91,19 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: // CHECK:STDOUT: interface @I [from "base.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Main.import_ref +// CHECK:STDOUT: .Self = imports.%Main.import_ref.c82 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- use_export.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] +// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %I.type [concrete] // CHECK:STDOUT: %UseEmpty.type: type = fn_type @UseEmpty [concrete] // CHECK:STDOUT: %UseEmpty: %UseEmpty.type = struct_value () [concrete] @@ -104,7 +111,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//export, I, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %Main.import_ref = import_ref Main//export, inst{{[0-9A-F]+}} [indirect], unloaded +// CHECK:STDOUT: %Main.import_ref.30a = import_ref Main//export, inst{{[0-9A-F]+}} [indirect], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -125,7 +132,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: // CHECK:STDOUT: interface @I [from "export.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Main.import_ref +// CHECK:STDOUT: .Self = imports.%Main.import_ref.30a // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -136,3 +143,7 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_add_member_outside_definition.carbon b/toolchain/check/testdata/interface/fail_add_member_outside_definition.carbon index 7d3e88a1e2c6..0638515e5d0c 100644 --- a/toolchain/check/testdata/interface/fail_add_member_outside_definition.carbon +++ b/toolchain/check/testdata/interface/fail_add_member_outside_definition.carbon @@ -41,16 +41,16 @@ interface Outer { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface> [concrete] // CHECK:STDOUT: %Self.887: %Interface.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Interface.F.type: type = fn_type @Interface.F [concrete] -// CHECK:STDOUT: %Interface.F: %Interface.F.type = struct_value () [concrete] +// CHECK:STDOUT: %Interface.WithSelf.F.type: type = fn_type @Interface.WithSelf.F, @Interface(%Self.887) [symbolic] +// CHECK:STDOUT: %Interface.WithSelf.F: %Interface.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %Outer.type: type = facet_type <@Outer> [concrete] // CHECK:STDOUT: %Self.672: %Outer.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%Self.672)> [symbolic] -// CHECK:STDOUT: %Self.eac: %Inner.type = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %Inner.F.type.4b0134.1: type = fn_type @Inner.F.loc30, @Inner(%Self.672) [symbolic] -// CHECK:STDOUT: %Inner.F.a5d5f7.1: %Inner.F.type.4b0134.1 = struct_value () [symbolic] -// CHECK:STDOUT: %Inner.F.type.4b0134.2: type = fn_type @Inner.F.loc36, @Inner(%Self.672) [symbolic] -// CHECK:STDOUT: %Inner.F.a5d5f7.2: %Inner.F.type.4b0134.2 = struct_value () [symbolic] +// CHECK:STDOUT: %Self.920: %Inner.type = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.type.fc250e.1: type = fn_type @Inner.WithSelf.F.loc30, @Inner(%Self.672, %Self.920) [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.cf79c3.1: %Inner.WithSelf.F.type.fc250e.1 = struct_value () [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.type.fc250e.2: type = fn_type @Inner.WithSelf.F.loc36, @Inner(%Self.672, %Self.920) [symbolic] +// CHECK:STDOUT: %Inner.WithSelf.F.cf79c3.2: %Inner.WithSelf.F.type.fc250e.2 = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -59,56 +59,61 @@ interface Outer { // CHECK:STDOUT: .Outer = %Outer.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [concrete = constants.%Interface.type] {} {} -// CHECK:STDOUT: %Interface.F.decl: %Interface.F.type = fn_decl @Interface.F [concrete = constants.%Interface.F] {} {} +// CHECK:STDOUT: %Interface.WithSelf.F.decl: %Interface.WithSelf.F.type = fn_decl @Interface.WithSelf.F [symbolic = constants.%Interface.WithSelf.F] {} {} // CHECK:STDOUT: %Outer.decl: type = interface_decl @Outer [concrete = constants.%Outer.type] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { // CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self.887] +// CHECK:STDOUT: interface_with_self_decl @Interface [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self -// CHECK:STDOUT: .F = file.%Interface.F.decl +// CHECK:STDOUT: .F = file.%Interface.WithSelf.F.decl // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Outer { -// CHECK:STDOUT: %Self: %Outer.type = symbolic_binding Self, 0 [symbolic = constants.%Self.672] -// CHECK:STDOUT: %Inner.decl: type = interface_decl @Inner [symbolic = constants.%Inner.type] {} {} -// CHECK:STDOUT: %Inner.F.decl: %Inner.F.type.4b0134.2 = fn_decl @Inner.F.loc36 [symbolic = constants.%Inner.F.a5d5f7.2] {} {} +// CHECK:STDOUT: %Self.loc24: %Outer.type = symbolic_binding Self, 0 [symbolic = constants.%Self.672] +// CHECK:STDOUT: interface_with_self_decl @Outer [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Inner.decl: type = interface_decl @Inner [symbolic = @Outer.%Inner.type (constants.%Inner.type)] {} {} +// CHECK:STDOUT: %Inner.WithSelf.F.decl: @Outer.%Inner.WithSelf.F.type (%Inner.WithSelf.F.type.fc250e.2) = fn_decl @Inner.WithSelf.F.loc36 [symbolic = @Outer.%Inner.WithSelf.F (constants.%Inner.WithSelf.F.cf79c3.2)] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc24 // CHECK:STDOUT: .Inner = %Inner.decl // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @Inner(@Outer.%Self: %Outer.type) { +// CHECK:STDOUT: generic interface @Inner(@Outer.%Self.loc24: %Outer.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Self.loc25_19.2: %Outer.type = symbolic_binding Self, 0 [symbolic = %Self.loc25_19.2 (constants.%Self.672)] -// CHECK:STDOUT: %Inner.type: type = facet_type <@Inner, @Inner(%Self.loc25_19.2)> [symbolic = %Inner.type (constants.%Inner.type)] -// CHECK:STDOUT: %Self.loc25_19.3: @Inner.%Inner.type (%Inner.type) = symbolic_binding Self, 1 [symbolic = %Self.loc25_19.3 (constants.%Self.eac)] -// CHECK:STDOUT: %Inner.F.type: type = fn_type @Inner.F.loc30, @Inner(%Self.loc25_19.2) [symbolic = %Inner.F.type (constants.%Inner.F.type.4b0134.1)] -// CHECK:STDOUT: %Inner.F: @Inner.%Inner.F.type (%Inner.F.type.4b0134.1) = struct_value () [symbolic = %Inner.F (constants.%Inner.F.a5d5f7.1)] +// CHECK:STDOUT: %Inner.type.loc25: type = facet_type <@Inner, @Inner(%Self.loc25_19.2)> [symbolic = %Inner.type.loc25 (constants.%Inner.type)] +// CHECK:STDOUT: %Self.loc25_19.3: @Inner.%Inner.type.loc25 (%Inner.type) = symbolic_binding Self, 1 [symbolic = %Self.loc25_19.3 (constants.%Self.920)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc25_19.1: @Inner.%Inner.type (%Inner.type) = symbolic_binding Self, 1 [symbolic = %Self.loc25_19.3 (constants.%Self.eac)] -// CHECK:STDOUT: %Inner.F.decl: @Inner.%Inner.F.type (%Inner.F.type.4b0134.1) = fn_decl @Inner.F.loc30 [symbolic = @Inner.%Inner.F (constants.%Inner.F.a5d5f7.1)] {} {} +// CHECK:STDOUT: %Self.loc25_19.1: @Inner.%Inner.type.loc25 (%Inner.type) = symbolic_binding Self, 1 [symbolic = %Self.loc25_19.3 (constants.%Self.920)] +// CHECK:STDOUT: interface_with_self_decl @Inner [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Inner.WithSelf.F.decl: @Inner.%Inner.WithSelf.F.type (%Inner.WithSelf.F.type.fc250e.1) = fn_decl @Inner.WithSelf.F.loc30 [symbolic = @Inner.%Inner.WithSelf.F (constants.%Inner.WithSelf.F.cf79c3.1)] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc25_19.1 -// CHECK:STDOUT: .F = @Outer.%Inner.F.decl +// CHECK:STDOUT: .F = @Outer.%Inner.WithSelf.F.decl // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Interface.F(@Interface.%Self: %Interface.type) { +// CHECK:STDOUT: generic fn @Interface.WithSelf.F(@Interface.%Self: %Interface.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -117,26 +122,30 @@ interface Outer { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Inner.F.loc30(@Outer.%Self: %Outer.type, @Inner.%Self.loc25_19.1: @Inner.%Inner.type (%Inner.type)) { +// CHECK:STDOUT: generic fn @Inner.WithSelf.F.loc30(@Outer.%Self.loc24: %Outer.type, @Inner.%Self.loc25_19.1: @Inner.%Inner.type.loc25 (%Inner.type)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Inner.F.loc36(@Outer.%Self: %Outer.type, @Inner.%Self.loc25_19.1: @Inner.%Inner.type (%Inner.type)) { +// CHECK:STDOUT: generic fn @Inner.WithSelf.F.loc36(@Outer.%Self.loc24: %Outer.type, @Inner.%Self.loc25_19.1: @Inner.%Inner.type.loc25 (%Inner.type)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface.F(constants.%Self.887) {} +// CHECK:STDOUT: specific @Interface(constants.%Self.887) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface.WithSelf.F(constants.%Self.887) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Outer(constants.%Self.672) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(constants.%Self.672) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Self.loc25_19.2 => constants.%Self.672 -// CHECK:STDOUT: %Inner.type => constants.%Inner.type -// CHECK:STDOUT: %Self.loc25_19.3 => constants.%Self.eac -// CHECK:STDOUT: %Inner.F.type => constants.%Inner.F.type.4b0134.1 -// CHECK:STDOUT: %Inner.F => constants.%Inner.F.a5d5f7.1 +// CHECK:STDOUT: %Inner.type.loc25 => constants.%Inner.type +// CHECK:STDOUT: %Self.loc25_19.3 => constants.%Self.920 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.F.loc30(constants.%Self.672, constants.%Self.eac) {} +// CHECK:STDOUT: specific @Inner(constants.%Self.672, constants.%Self.920) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Inner.F.loc36(constants.%Self.672, constants.%Self.eac) {} +// CHECK:STDOUT: specific @Inner.WithSelf.F.loc30(constants.%Self.672, constants.%Self.920) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Inner.WithSelf.F.loc36(constants.%Self.672, constants.%Self.920) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon b/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon index 9394af4abc1e..bbc9085d0b47 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon @@ -101,10 +101,10 @@ interface C { // CHECK:STDOUT: %pattern_type.8de: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.3cf: Core.Form = init_form %Dest, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %Dest [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert.type: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %ImplicitAs.Convert: %ImplicitAs.Convert.type = struct_value () [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Dest, %Self) [symbolic] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert: %ImplicitAs.WithSelf.Convert.type = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic] -// CHECK:STDOUT: %assoc0: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%ImplicitAs.Convert.decl [symbolic] +// CHECK:STDOUT: %assoc0: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%ImplicitAs.WithSelf.Convert.decl [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -123,63 +123,65 @@ interface C { // CHECK:STDOUT: %Dest.loc3_22.1: type = symbolic_binding Dest, 0 [symbolic = %Dest.loc3_22.1 (constants.%Dest)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_22.1)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.9fe)] -// CHECK:STDOUT: %Self.loc3_35.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] -// CHECK:STDOUT: %ImplicitAs.Convert.type: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Dest.loc3_22.1) [symbolic = %ImplicitAs.Convert.type (constants.%ImplicitAs.Convert.type)] -// CHECK:STDOUT: %ImplicitAs.Convert: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type) = struct_value () [symbolic = %ImplicitAs.Convert (constants.%ImplicitAs.Convert)] -// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest.loc3_22.1) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type)] -// CHECK:STDOUT: %assoc0.loc4_35.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] +// CHECK:STDOUT: %ImplicitAs.type.loc3: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_22.1)> [symbolic = %ImplicitAs.type.loc3 (constants.%ImplicitAs.type.9fe)] +// CHECK:STDOUT: %Self.loc3_35.2: @ImplicitAs.%ImplicitAs.type.loc3 (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] -// CHECK:STDOUT: %ImplicitAs.Convert.decl: @ImplicitAs.%ImplicitAs.Convert.type (%ImplicitAs.Convert.type) = fn_decl @ImplicitAs.Convert [symbolic = @ImplicitAs.%ImplicitAs.Convert (constants.%ImplicitAs.Convert)] { -// CHECK:STDOUT: %self.patt: @ImplicitAs.Convert.%pattern_type.loc4_14 (%pattern_type.8de) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @ImplicitAs.Convert.%pattern_type.loc4_14 (%pattern_type.8de) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @ImplicitAs.Convert.%pattern_type.loc4_28 (%pattern_type.51d) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @ImplicitAs.Convert.%pattern_type.loc4_28 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type.loc3 (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self.loc3_35.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @ImplicitAs [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.decl: @ImplicitAs.%ImplicitAs.WithSelf.Convert.type (%ImplicitAs.WithSelf.Convert.type) = fn_decl @ImplicitAs.WithSelf.Convert [symbolic = @ImplicitAs.%ImplicitAs.WithSelf.Convert (constants.%ImplicitAs.WithSelf.Convert)] { +// CHECK:STDOUT: %self.patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_14 (%pattern_type.8de) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_14 (%pattern_type.8de) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_28 (%pattern_type.51d) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @ImplicitAs.WithSelf.Convert.%pattern_type.loc4_28 (%pattern_type.51d) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @ImplicitAs.%Dest.loc3_22.2 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %.loc4_31.2: Core.Form = init_form %Dest.ref, call_param1 [symbolic = %.loc4_31.1 (constants.%.3cf)] -// CHECK:STDOUT: %self.param: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %.loc4_20.2: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = specific_constant @ImplicitAs.%Self.loc3_35.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = name_ref Self, %.loc4_20.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc4_20.2: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = specific_constant @ImplicitAs.%Self.loc3_35.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = name_ref Self, %.loc4_20.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc4_20.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @ImplicitAs.Convert.%Dest (%Dest) = out_param call_param1 -// CHECK:STDOUT: %return: ref @ImplicitAs.Convert.%Dest (%Dest) = return_slot %return.param +// CHECK:STDOUT: %self: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %return.param: ref @ImplicitAs.WithSelf.Convert.%Dest (%Dest) = out_param call_param1 +// CHECK:STDOUT: %return: ref @ImplicitAs.WithSelf.Convert.%Dest (%Dest) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc4_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] +// CHECK:STDOUT: %assoc0.loc4_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %ImplicitAs.WithSelf.Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc3_35.1 // CHECK:STDOUT: .Dest = +// CHECK:STDOUT: .Dest = // CHECK:STDOUT: .Convert = %assoc0.loc4_35.1 -// CHECK:STDOUT: witness = (%ImplicitAs.Convert.decl) +// CHECK:STDOUT: witness = (%ImplicitAs.WithSelf.Convert.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ImplicitAs.Convert(@ImplicitAs.%Dest.loc3_22.2: type, @ImplicitAs.%Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.9fe)) { +// CHECK:STDOUT: generic fn @ImplicitAs.WithSelf.Convert(@ImplicitAs.%Dest.loc3_22.2: type, @ImplicitAs.%Self.loc3_35.1: @ImplicitAs.%ImplicitAs.type.loc3 (%ImplicitAs.type.9fe)) { // CHECK:STDOUT: %Dest: type = symbolic_binding Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.9fe)] -// CHECK:STDOUT: %Self: @ImplicitAs.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self: @ImplicitAs.WithSelf.Convert.%ImplicitAs.type (%ImplicitAs.type.9fe) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type.loc4_14: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc4_14 (constants.%pattern_type.8de)] // CHECK:STDOUT: %.loc4_31.1: Core.Form = init_form %Dest, call_param1 [symbolic = %.loc4_31.1 (constants.%.3cf)] // CHECK:STDOUT: %pattern_type.loc4_28: type = pattern_type %Dest [symbolic = %pattern_type.loc4_28 (constants.%pattern_type.51d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @ImplicitAs.Convert.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @ImplicitAs.Convert.%Dest (%Dest); +// CHECK:STDOUT: fn(%self.param: @ImplicitAs.WithSelf.Convert.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @ImplicitAs.WithSelf.Convert.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) { // CHECK:STDOUT: %Dest.loc3_22.1 => constants.%Dest // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @ImplicitAs.Convert(constants.%Dest, constants.%Self) { +// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest, constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ImplicitAs.WithSelf.Convert(constants.%Dest, constants.%Self) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9fe // CHECK:STDOUT: %Self => constants.%Self @@ -195,14 +197,14 @@ interface C { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.e06: %I.assoc_type = assoc_entity element0, @I.%T [concrete] +// CHECK:STDOUT: %assoc0.2e7: %I.assoc_type = assoc_entity element0, @I.%T [concrete] // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self.8a1: %J.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.8a1 [symbolic] -// CHECK:STDOUT: %J.F.type: type = fn_type @J.F [concrete] -// CHECK:STDOUT: %J.F: %J.F.type = struct_value () [concrete] +// CHECK:STDOUT: %J.WithSelf.F.type: type = fn_type @J.WithSelf.F, @J(%Self.8a1) [symbolic] +// CHECK:STDOUT: %J.WithSelf.F: %J.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type @J [concrete] -// CHECK:STDOUT: %assoc0.5fd: %J.assoc_type = assoc_entity element0, @J.%J.F.decl [concrete] +// CHECK:STDOUT: %assoc0.481: %J.assoc_type = assoc_entity element0, @J.%J.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -224,8 +226,11 @@ interface C { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.e06] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.2e7] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -237,40 +242,44 @@ interface C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J { -// CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: %Self.loc9: %J.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8a1] +// CHECK:STDOUT: interface_with_self_decl @J [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] -// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0.e06] -// CHECK:STDOUT: %U: %I.assoc_type = alias_binding U, @T.%assoc0 [concrete = constants.%assoc0.e06] -// CHECK:STDOUT: %J.F.decl: %J.F.type = fn_decl @J.F [concrete = constants.%J.F] {} { -// CHECK:STDOUT: %Self.as_type: type = facet_access_type @J.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] +// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0.2e7] +// CHECK:STDOUT: %U: %I.assoc_type = alias_binding U, @T.%assoc0 [concrete = constants.%assoc0.2e7] +// CHECK:STDOUT: %J.WithSelf.F.decl: @J.%J.WithSelf.F.type (%J.WithSelf.F.type) = fn_decl @J.WithSelf.F [symbolic = @J.%J.WithSelf.F (constants.%J.WithSelf.F)] {} { +// CHECK:STDOUT: %Self.as_type: type = facet_access_type @J.%Self.loc9 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %U.ref: = name_ref U, [concrete = ] // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.F.decl [concrete = constants.%assoc0.5fd] +// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %J.WithSelf.F.decl [concrete = constants.%assoc0.481] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc9 +// CHECK:STDOUT: .I = // CHECK:STDOUT: .I = // CHECK:STDOUT: .U = %U // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%J.F.decl) +// CHECK:STDOUT: witness = (%J.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J.F(@J.%Self: %J.type) { +// CHECK:STDOUT: generic fn @J.WithSelf.F(@J.%Self.loc9: %J.type) { // CHECK:STDOUT: %Self: %J.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8a1)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> ; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self.ab9) {} +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J.F(constants.%Self.8a1) { +// CHECK:STDOUT: specific @J(constants.%Self.8a1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J.WithSelf.F(constants.%Self.8a1) { // CHECK:STDOUT: %Self => constants.%Self.8a1 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: } @@ -281,7 +290,7 @@ interface C { // CHECK:STDOUT: %I2.type: type = facet_type <@I2> [concrete] // CHECK:STDOUT: %Self.36e: %I2.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %I2.assoc_type: type = assoc_entity_type @I2 [concrete] -// CHECK:STDOUT: %assoc0.e09: %I2.assoc_type = assoc_entity element0, @I2.%T2 [concrete] +// CHECK:STDOUT: %assoc0.7c1: %I2.assoc_type = assoc_entity element0, @I2.%T2 [concrete] // CHECK:STDOUT: %J2.type: type = facet_type <@J2> [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self.c39: %type = symbolic_binding .Self [symbolic_self] @@ -296,19 +305,20 @@ interface C { // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %I2_where.type: type = facet_type <@I2 where %impl.elem0.f1d = %empty_tuple.type> [concrete] // CHECK:STDOUT: %I2.impl_witness.364: = impl_witness @V.binding.as_type.as.I2.impl.%I2.impl_witness_table, @V.binding.as_type.as.I2.impl(%V) [symbolic] +// CHECK:STDOUT: %I2.facet.beb: %I2.type = facet_value %V.binding.as_type, (%I2.impl_witness.364) [symbolic] // CHECK:STDOUT: %Self.4a7: %J2.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.4a7 [symbolic] // CHECK:STDOUT: %I2.impl_witness.ddb: = impl_witness @V.binding.as_type.as.I2.impl.%I2.impl_witness_table, @V.binding.as_type.as.I2.impl(%Self.4a7) [symbolic] // CHECK:STDOUT: %.ef7: require_specific_def_type = require_specific_def @V.binding.as_type.as.I2.impl(%Self.4a7) [symbolic] // CHECK:STDOUT: %I2.lookup_impl_witness.d97: = lookup_impl_witness %Self.4a7, @I2 [symbolic] -// CHECK:STDOUT: %I2.facet: %I2.type = facet_value %Self.binding.as_type, (%I2.lookup_impl_witness.d97) [symbolic] +// CHECK:STDOUT: %I2.facet.7a5: %I2.type = facet_value %Self.binding.as_type, (%I2.lookup_impl_witness.d97) [symbolic] // CHECK:STDOUT: %impl.elem0.006: type = impl_witness_access %I2.lookup_impl_witness.d97, element0 [symbolic] // CHECK:STDOUT: %.d9a: Core.Form = init_form %impl.elem0.006, call_param0 [symbolic] // CHECK:STDOUT: %pattern_type.a14: type = pattern_type %impl.elem0.006 [symbolic] -// CHECK:STDOUT: %J2.F2.type: type = fn_type @J2.F2 [concrete] -// CHECK:STDOUT: %J2.F2: %J2.F2.type = struct_value () [concrete] +// CHECK:STDOUT: %J2.WithSelf.F2.type: type = fn_type @J2.WithSelf.F2, @J2(%Self.4a7) [symbolic] +// CHECK:STDOUT: %J2.WithSelf.F2: %J2.WithSelf.F2.type = struct_value () [symbolic] // CHECK:STDOUT: %J2.assoc_type: type = assoc_entity_type @J2 [concrete] -// CHECK:STDOUT: %assoc0.2a0: %J2.assoc_type = assoc_entity element0, @J2.%J2.F2.decl [concrete] +// CHECK:STDOUT: %assoc0.41c: %J2.assoc_type = assoc_entity element0, @J2.%J2.WithSelf.F2.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -337,7 +347,7 @@ interface C { // CHECK:STDOUT: %.Self.ref: %I2.type = name_ref .Self, %.Self.1 [symbolic_self = constants.%.Self.feb] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc11_36: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %T2.ref: %I2.assoc_type = name_ref T2, @T2.%assoc0 [concrete = constants.%assoc0.e09] +// CHECK:STDOUT: %T2.ref: %I2.assoc_type = name_ref T2, @T2.%assoc0 [concrete = constants.%assoc0.7c1] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I2.lookup_impl_witness.c47, element0 [symbolic_self = constants.%impl.elem0.f1d] // CHECK:STDOUT: %.loc11_43.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc11_43.2: type = converted %.loc11_43.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type] @@ -356,8 +366,11 @@ interface C { // CHECK:STDOUT: // CHECK:STDOUT: interface @I2 { // CHECK:STDOUT: %Self: %I2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.36e] +// CHECK:STDOUT: interface_with_self_decl @I2 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T2: type = assoc_const_decl @T2 [concrete] { -// CHECK:STDOUT: %assoc0: %I2.assoc_type = assoc_entity element0, @I2.%T2 [concrete = constants.%assoc0.e09] +// CHECK:STDOUT: %assoc0: %I2.assoc_type = assoc_entity element0, @I2.%T2 [concrete = constants.%assoc0.7c1] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -369,39 +382,39 @@ interface C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @J2 { -// CHECK:STDOUT: %Self: %J2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.4a7] +// CHECK:STDOUT: %Self.loc13: %J2.type = symbolic_binding Self, 0 [symbolic = constants.%Self.4a7] +// CHECK:STDOUT: interface_with_self_decl @J2 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %I2.ref: type = name_ref I2, file.%I2.decl [concrete = constants.%I2.type] -// CHECK:STDOUT: %T2.ref: %I2.assoc_type = name_ref T2, @T2.%assoc0 [concrete = constants.%assoc0.e09] -// CHECK:STDOUT: %U2: %I2.assoc_type = alias_binding U2, @T2.%assoc0 [concrete = constants.%assoc0.e09] -// CHECK:STDOUT: %J2.F2.decl: %J2.F2.type = fn_decl @J2.F2 [concrete = constants.%J2.F2] { -// CHECK:STDOUT: %return.patt: @J2.F2.%pattern_type (%pattern_type.a14) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @J2.F2.%pattern_type (%pattern_type.a14) = out_param_pattern %return.patt, call_param0 [concrete] +// CHECK:STDOUT: %T2.ref: %I2.assoc_type = name_ref T2, @T2.%assoc0 [concrete = constants.%assoc0.7c1] +// CHECK:STDOUT: %U2: %I2.assoc_type = alias_binding U2, @T2.%assoc0 [concrete = constants.%assoc0.7c1] +// CHECK:STDOUT: %J2.WithSelf.F2.decl: @J2.%J2.WithSelf.F2.type (%J2.WithSelf.F2.type) = fn_decl @J2.WithSelf.F2 [symbolic = @J2.%J2.WithSelf.F2 (constants.%J2.WithSelf.F2)] { +// CHECK:STDOUT: %return.patt: @J2.WithSelf.F2.%pattern_type (%pattern_type.a14) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @J2.WithSelf.F2.%pattern_type (%pattern_type.a14) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_type: type = facet_access_type @J2.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] -// CHECK:STDOUT: %I2.facet.loc15_14.2: %I2.type = facet_value %Self.as_type, (constants.%I2.lookup_impl_witness.d97) [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet)] -// CHECK:STDOUT: %.loc15_14.3: %I2.type = converted @J2.%Self, %I2.facet.loc15_14.2 [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet)] +// CHECK:STDOUT: %Self.as_type: type = facet_access_type @J2.%Self.loc13 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] +// CHECK:STDOUT: %I2.facet.loc15_14.2: %I2.type = facet_value %Self.as_type, (constants.%I2.lookup_impl_witness.d97) [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet.7a5)] +// CHECK:STDOUT: %.loc15_14.3: %I2.type = converted @J2.%Self.loc13, %I2.facet.loc15_14.2 [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet.7a5)] // CHECK:STDOUT: %impl.elem0.loc15_14.2: type = impl_witness_access constants.%I2.lookup_impl_witness.d97, element0 [symbolic = %impl.elem0.loc15_14.1 (constants.%impl.elem0.006)] // CHECK:STDOUT: %U2.ref: type = name_ref U2, %impl.elem0.loc15_14.2 [symbolic = %impl.elem0.loc15_14.1 (constants.%impl.elem0.006)] // CHECK:STDOUT: %.loc15_14.4: Core.Form = init_form %U2.ref, call_param0 [symbolic = %.loc15_14.2 (constants.%.d9a)] -// CHECK:STDOUT: %return.param: ref @J2.F2.%impl.elem0.loc15_14.1 (%impl.elem0.006) = out_param call_param0 -// CHECK:STDOUT: %return: ref @J2.F2.%impl.elem0.loc15_14.1 (%impl.elem0.006) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @J2.WithSelf.F2.%impl.elem0.loc15_14.1 (%impl.elem0.006) = out_param call_param0 +// CHECK:STDOUT: %return: ref @J2.WithSelf.F2.%impl.elem0.loc15_14.1 (%impl.elem0.006) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, %J2.F2.decl [concrete = constants.%assoc0.2a0] +// CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, %J2.WithSelf.F2.decl [concrete = constants.%assoc0.41c] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc13 +// CHECK:STDOUT: .I2 = // CHECK:STDOUT: .I2 = // CHECK:STDOUT: .U2 = %U2 // CHECK:STDOUT: .F2 = %assoc0 -// CHECK:STDOUT: witness = (%J2.F2.decl) +// CHECK:STDOUT: witness = (%J2.WithSelf.F2.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T2(@I2.%Self: %I2.type) { -// CHECK:STDOUT: assoc_const T2:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic impl @V.binding.as_type.as.I2.impl(%V.loc11_14.1: %J2.type) { // CHECK:STDOUT: %V.loc11_14.2: %J2.type = symbolic_binding V, 0 [symbolic = %V.loc11_14.2 (constants.%V)] // CHECK:STDOUT: %V.binding.as_type: type = symbolic_binding_type V, 0, %V.loc11_14.2 [symbolic = %V.binding.as_type (constants.%V.binding.as_type)] @@ -419,22 +432,26 @@ interface C { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @J2.F2(@J2.%Self: %J2.type) { +// CHECK:STDOUT: generic fn @J2.WithSelf.F2(@J2.%Self.loc13: %J2.type) { // CHECK:STDOUT: %Self: %J2.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.4a7)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc15_14.1: require_specific_def_type = require_specific_def @V.binding.as_type.as.I2.impl(%Self) [symbolic = %.loc15_14.1 (constants.%.ef7)] // CHECK:STDOUT: %I2.lookup_impl_witness: = lookup_impl_witness %Self, @I2 [symbolic = %I2.lookup_impl_witness (constants.%I2.lookup_impl_witness.d97)] -// CHECK:STDOUT: %I2.facet.loc15_14.1: %I2.type = facet_value %Self.binding.as_type, (%I2.lookup_impl_witness) [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet)] +// CHECK:STDOUT: %I2.facet.loc15_14.1: %I2.type = facet_value %Self.binding.as_type, (%I2.lookup_impl_witness) [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet.7a5)] // CHECK:STDOUT: %impl.elem0.loc15_14.1: type = impl_witness_access %I2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_14.1 (constants.%impl.elem0.006)] // CHECK:STDOUT: %.loc15_14.2: Core.Form = init_form %impl.elem0.loc15_14.1, call_param0 [symbolic = %.loc15_14.2 (constants.%.d9a)] // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc15_14.1 [symbolic = %pattern_type (constants.%pattern_type.a14)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @J2.F2.%impl.elem0.loc15_14.1 (%impl.elem0.006); +// CHECK:STDOUT: fn() -> out %return.param: @J2.WithSelf.F2.%impl.elem0.loc15_14.1 (%impl.elem0.006); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T2(constants.%Self.36e) {} +// CHECK:STDOUT: specific @I2(constants.%Self.36e) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T2(constants.%.Self.feb) {} +// CHECK:STDOUT: specific @I2(constants.%.Self.feb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @V.binding.as_type.as.I2.impl(constants.%V) { // CHECK:STDOUT: %V.loc11_14.2 => constants.%V @@ -442,6 +459,12 @@ interface C { // CHECK:STDOUT: %I2.impl_witness.loc11_45.2 => constants.%I2.impl_witness.364 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I2(constants.%I2.facet.beb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @J2(constants.%Self.4a7) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @V.binding.as_type.as.I2.impl(constants.%Self.4a7) { // CHECK:STDOUT: %V.loc11_14.2 => constants.%Self.4a7 // CHECK:STDOUT: %V.binding.as_type => constants.%Self.binding.as_type @@ -450,14 +473,16 @@ interface C { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T2(constants.%I2.facet) {} +// CHECK:STDOUT: specific @I2(constants.%I2.facet.7a5) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @J2.F2(constants.%Self.4a7) { +// CHECK:STDOUT: specific @J2.WithSelf.F2(constants.%Self.4a7) { // CHECK:STDOUT: %Self => constants.%Self.4a7 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %.loc15_14.1 => constants.%.ef7 // CHECK:STDOUT: %I2.lookup_impl_witness => constants.%I2.lookup_impl_witness.d97 -// CHECK:STDOUT: %I2.facet.loc15_14.1 => constants.%I2.facet +// CHECK:STDOUT: %I2.facet.loc15_14.1 => constants.%I2.facet.7a5 // CHECK:STDOUT: %impl.elem0.loc15_14.1 => constants.%impl.elem0.006 // CHECK:STDOUT: %.loc15_14.2 => constants.%.d9a // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a14 @@ -472,17 +497,17 @@ interface C { // CHECK:STDOUT: %pattern_type.df1: type = pattern_type %Self.binding.as_type.55a [symbolic] // CHECK:STDOUT: %.b38: Core.Form = init_form type, call_param1 [concrete] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] -// CHECK:STDOUT: %A.F.type: type = fn_type @A.F [concrete] -// CHECK:STDOUT: %A.F: %A.F.type = struct_value () [concrete] +// CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A(%Self.c51) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F: %A.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A [concrete] -// CHECK:STDOUT: %assoc0.e44: %A.assoc_type = assoc_entity element0, @A.%A.F.decl [concrete] +// CHECK:STDOUT: %assoc0.24a: %A.assoc_type = assoc_entity element0, @A.%A.WithSelf.F.decl [concrete] // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete] // CHECK:STDOUT: %Self.d0b: %B.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type.8ee: type = symbolic_binding_type Self, 0, %Self.d0b [symbolic] -// CHECK:STDOUT: %B.G.type: type = fn_type @B.G [concrete] -// CHECK:STDOUT: %B.G: %B.G.type = struct_value () [concrete] +// CHECK:STDOUT: %B.WithSelf.G.type: type = fn_type @B.WithSelf.G, @B(%Self.d0b) [symbolic] +// CHECK:STDOUT: %B.WithSelf.G: %B.WithSelf.G.type = struct_value () [symbolic] // CHECK:STDOUT: %B.assoc_type: type = assoc_entity_type @B [concrete] -// CHECK:STDOUT: %assoc0.606: %B.assoc_type = assoc_entity element0, @B.%B.G.decl [concrete] +// CHECK:STDOUT: %assoc0.864: %B.assoc_type = assoc_entity element0, @B.%B.WithSelf.G.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -503,77 +528,93 @@ interface C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { -// CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c51] -// CHECK:STDOUT: %A.F.decl: %A.F.type = fn_decl @A.F [concrete = constants.%A.F] { -// CHECK:STDOUT: %self.patt: @A.F.%pattern_type (%pattern_type.df1) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @A.F.%pattern_type (%pattern_type.df1) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc5: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c51] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %A.WithSelf.F.decl: @A.%A.WithSelf.F.type (%A.WithSelf.F.type) = fn_decl @A.WithSelf.F [symbolic = @A.%A.WithSelf.F (constants.%A.WithSelf.F)] { +// CHECK:STDOUT: %self.patt: @A.WithSelf.F.%pattern_type (%pattern_type.df1) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @A.WithSelf.F.%pattern_type (%pattern_type.df1) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc6_25: Core.Form = init_form type, call_param1 [concrete = constants.%.b38] -// CHECK:STDOUT: %self.param: @A.F.%Self.binding.as_type (%Self.binding.as_type.55a) = value_param call_param0 +// CHECK:STDOUT: %self.param: @A.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.55a) = value_param call_param0 // CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.55a)] { -// CHECK:STDOUT: %Self.ref: %A.type = name_ref Self, @A.%Self [symbolic = %Self (constants.%Self.c51)] +// CHECK:STDOUT: %Self.ref: %A.type = name_ref Self, @A.%Self.loc5 [symbolic = %Self (constants.%Self.c51)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.55a)] // CHECK:STDOUT: %.loc6_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.55a)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @A.F.%Self.binding.as_type (%Self.binding.as_type.55a) = value_binding self, %self.param +// CHECK:STDOUT: %self: @A.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.55a) = value_binding self, %self.param // CHECK:STDOUT: %return.param: ref type = out_param call_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.F.decl [concrete = constants.%assoc0.e44] +// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %A.WithSelf.F.decl [concrete = constants.%assoc0.24a] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc5 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%A.F.decl) +// CHECK:STDOUT: witness = (%A.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @B { -// CHECK:STDOUT: %Self: %B.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d0b] +// CHECK:STDOUT: %Self.loc8: %B.type = symbolic_binding Self, 0 [symbolic = constants.%Self.d0b] +// CHECK:STDOUT: interface_with_self_decl @B [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type] -// CHECK:STDOUT: %F.ref: %A.assoc_type = name_ref F, @A.%assoc0 [concrete = constants.%assoc0.e44] -// CHECK:STDOUT: %F: %A.assoc_type = alias_binding F, @A.%assoc0 [concrete = constants.%assoc0.e44] -// CHECK:STDOUT: %B.G.decl: %B.G.type = fn_decl @B.G [concrete = constants.%B.G] {} { -// CHECK:STDOUT: %Self.as_type: type = facet_access_type @B.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.8ee)] +// CHECK:STDOUT: %F.ref: %A.assoc_type = name_ref F, @A.%assoc0 [concrete = constants.%assoc0.24a] +// CHECK:STDOUT: %F: %A.assoc_type = alias_binding F, @A.%assoc0 [concrete = constants.%assoc0.24a] +// CHECK:STDOUT: %B.WithSelf.G.decl: @B.%B.WithSelf.G.type (%B.WithSelf.G.type) = fn_decl @B.WithSelf.G [symbolic = @B.%B.WithSelf.G (constants.%B.WithSelf.G)] {} { +// CHECK:STDOUT: %Self.as_type: type = facet_access_type @B.%Self.loc8 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.8ee)] // CHECK:STDOUT: %F.ref: = name_ref F, [concrete = ] // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %B.assoc_type = assoc_entity element0, %B.G.decl [concrete = constants.%assoc0.606] +// CHECK:STDOUT: %assoc0: %B.assoc_type = assoc_entity element0, %B.WithSelf.G.decl [concrete = constants.%assoc0.864] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc8 +// CHECK:STDOUT: .A = // CHECK:STDOUT: .A = // CHECK:STDOUT: .F = %F // CHECK:STDOUT: .G = %assoc0 -// CHECK:STDOUT: witness = (%B.G.decl) +// CHECK:STDOUT: witness = (%B.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @A.F(@A.%Self: %A.type) { +// CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%Self.loc5: %A.type) { // CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c51)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.55a)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.df1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @A.F.%Self.binding.as_type (%Self.binding.as_type.55a)) -> out %return.param: type; +// CHECK:STDOUT: fn(%self.param: @A.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type.55a)) -> out %return.param: type; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @B.G(@B.%Self: %B.type) { +// CHECK:STDOUT: generic fn @B.WithSelf.G(@B.%Self.loc8: %B.type) { // CHECK:STDOUT: %Self: %B.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.d0b)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.8ee)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> ; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.F(constants.%Self.c51) { +// CHECK:STDOUT: specific @A(constants.%Self.c51) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc6 => constants.%Self.c51 +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.F(constants.%Self.c51) { // CHECK:STDOUT: %Self => constants.%Self.c51 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.55a // CHECK:STDOUT: %pattern_type => constants.%pattern_type.df1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @B.G(constants.%Self.d0b) { +// CHECK:STDOUT: specific @B(constants.%Self.d0b) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @B.WithSelf.G(constants.%Self.d0b) { // CHECK:STDOUT: %Self => constants.%Self.d0b // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.8ee // CHECK:STDOUT: } @@ -585,19 +626,19 @@ interface C { // CHECK:STDOUT: %Self: %C.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %C.F.type: type = fn_type @C.F [concrete] +// CHECK:STDOUT: %C.WithSelf.F.type: type = fn_type @C.WithSelf.F, @C(%Self) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %C.F: %C.F.type = struct_value () [concrete] +// CHECK:STDOUT: %C.WithSelf.F: %C.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %C.assoc_type: type = assoc_entity_type @C [concrete] -// CHECK:STDOUT: %assoc0: %C.assoc_type = assoc_entity element0, @C.%C.F.decl [concrete] -// CHECK:STDOUT: %C.G.type: type = fn_type @C.G [concrete] -// CHECK:STDOUT: %C.G: %C.G.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %C.assoc_type = assoc_entity element1, @C.%C.G.decl [concrete] +// CHECK:STDOUT: %assoc0: %C.assoc_type = assoc_entity element0, @C.%C.WithSelf.F.decl [concrete] +// CHECK:STDOUT: %C.WithSelf.G.type: type = fn_type @C.WithSelf.G, @C(%Self) [symbolic] +// CHECK:STDOUT: %C.WithSelf.G: %C.WithSelf.G.type = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1: %C.assoc_type = assoc_entity element1, @C.%C.WithSelf.G.decl [concrete] // CHECK:STDOUT: %require_complete: = require_complete_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %C.lookup_impl_witness: = lookup_impl_witness %Self, @C [symbolic] -// CHECK:STDOUT: %.52c: type = fn_type_with_self_type %C.F.type, %Self [symbolic] -// CHECK:STDOUT: %impl.elem0: %.52c = impl_witness_access %C.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @C.F(%Self) [symbolic] +// CHECK:STDOUT: %.018: type = fn_type_with_self_type %C.WithSelf.F.type, %Self [symbolic] +// CHECK:STDOUT: %impl.elem0: %.018 = impl_witness_access %C.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @C.WithSelf.F(%Self) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -616,52 +657,55 @@ interface C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @C { -// CHECK:STDOUT: %Self: %C.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %C.F.decl: %C.F.type = fn_decl @C.F [concrete = constants.%C.F] { -// CHECK:STDOUT: %self.patt: @C.F.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @C.F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc5: %C.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @C [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %C.WithSelf.F.decl: @C.%C.WithSelf.F.type (%C.WithSelf.F.type) = fn_decl @C.WithSelf.F [symbolic = @C.%C.WithSelf.F (constants.%C.WithSelf.F)] { +// CHECK:STDOUT: %self.patt: @C.WithSelf.F.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @C.WithSelf.F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @C.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @C.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %C.type = name_ref Self, @C.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %C.type = name_ref Self, @C.%Self.loc5 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc6_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @C.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @C.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %C.assoc_type = assoc_entity element0, %C.F.decl [concrete = constants.%assoc0] -// CHECK:STDOUT: %C.G.decl: %C.G.type = fn_decl @C.G [concrete = constants.%C.G] { -// CHECK:STDOUT: %self.patt: @C.G.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @C.G.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %assoc0: %C.assoc_type = assoc_entity element0, %C.WithSelf.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %C.WithSelf.G.decl: @C.%C.WithSelf.G.type (%C.WithSelf.G.type) = fn_decl @C.WithSelf.G [symbolic = @C.%C.WithSelf.G (constants.%C.WithSelf.G)] { +// CHECK:STDOUT: %self.patt: @C.WithSelf.G.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @C.WithSelf.G.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @C.G.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @C.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc8_14.1: type = splice_block %.loc8_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %C.type = name_ref Self, @C.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %C.type = name_ref Self, @C.%Self.loc5 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc8_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @C.G.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @C.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %C.assoc_type = assoc_entity element1, %C.G.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %C.assoc_type = assoc_entity element1, %C.WithSelf.G.decl [concrete = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc5 // CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: .G = %assoc1 -// CHECK:STDOUT: witness = (%C.F.decl, %C.G.decl) +// CHECK:STDOUT: witness = (%C.WithSelf.F.decl, %C.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @C.F(@C.%Self: %C.type) { +// CHECK:STDOUT: generic fn @C.WithSelf.F(@C.%Self.loc5: %C.type) { // CHECK:STDOUT: %Self: %C.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @C.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @C.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @C.G(@C.%Self: %C.type) { +// CHECK:STDOUT: generic fn @C.WithSelf.G(@C.%Self.loc5: %C.type) { // CHECK:STDOUT: %Self: %C.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type)] @@ -669,37 +713,47 @@ interface C { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %Self.binding.as_type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %C.lookup_impl_witness: = lookup_impl_witness %Self, @C [symbolic = %C.lookup_impl_witness (constants.%C.lookup_impl_witness)] -// CHECK:STDOUT: %.loc9: type = fn_type_with_self_type constants.%C.F.type, %Self [symbolic = %.loc9 (constants.%.52c)] -// CHECK:STDOUT: %impl.elem0.loc9_9.2: @C.G.%.loc9 (%.52c) = impl_witness_access %C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc9_9.2: = specific_impl_function %impl.elem0.loc9_9.2, @C.F(%Self) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %C.WithSelf.F.type: type = fn_type @C.WithSelf.F, @C(%Self) [symbolic = %C.WithSelf.F.type (constants.%C.WithSelf.F.type)] +// CHECK:STDOUT: %.loc9: type = fn_type_with_self_type %C.WithSelf.F.type, %Self [symbolic = %.loc9 (constants.%.018)] +// CHECK:STDOUT: %impl.elem0.loc9_9.2: @C.WithSelf.G.%.loc9 (%.018) = impl_witness_access %C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc9_9.2: = specific_impl_function %impl.elem0.loc9_9.2, @C.WithSelf.F(%Self) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @C.G.%Self.binding.as_type (%Self.binding.as_type)) { +// CHECK:STDOUT: fn(%self.param: @C.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref.loc9: @C.G.%Self.binding.as_type (%Self.binding.as_type) = name_ref self, %self +// CHECK:STDOUT: %self.ref.loc9: @C.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type) = name_ref self, %self // CHECK:STDOUT: %F.ref.loc9: %C.assoc_type = name_ref F, @C.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc9_9.1: @C.G.%.loc9 (%.52c) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc9_9.1: @C.WithSelf.G.%.loc9 (%.018) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc9_9: = bound_method %self.ref.loc9, %impl.elem0.loc9_9.1 -// CHECK:STDOUT: %specific_impl_fn.loc9_9.1: = specific_impl_function %impl.elem0.loc9_9.1, @C.F(constants.%Self) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc9_9.1: = specific_impl_function %impl.elem0.loc9_9.1, @C.WithSelf.F(constants.%Self) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc9_12: = bound_method %self.ref.loc9, %specific_impl_fn.loc9_9.1 -// CHECK:STDOUT: %C.F.call.loc9: init %empty_tuple.type = call %bound_method.loc9_12(%self.ref.loc9) -// CHECK:STDOUT: %self.ref.loc10: @C.G.%Self.binding.as_type (%Self.binding.as_type) = name_ref self, %self -// CHECK:STDOUT: %impl.elem0.loc10: @C.G.%.loc9 (%.52c) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %F.ref.loc10: @C.G.%.loc9 (%.52c) = name_ref F, %impl.elem0.loc10 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %C.WithSelf.F.call.loc9: init %empty_tuple.type = call %bound_method.loc9_12(%self.ref.loc9) +// CHECK:STDOUT: %self.ref.loc10: @C.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type) = name_ref self, %self +// CHECK:STDOUT: %impl.elem0.loc10: @C.WithSelf.G.%.loc9 (%.018) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %F.ref.loc10: @C.WithSelf.G.%.loc9 (%.018) = name_ref F, %impl.elem0.loc10 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc10_9: = bound_method %self.ref.loc10, %F.ref.loc10 -// CHECK:STDOUT: %specific_impl_fn.loc10: = specific_impl_function %F.ref.loc10, @C.F(constants.%Self) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %specific_impl_fn.loc10: = specific_impl_function %F.ref.loc10, @C.WithSelf.F(constants.%Self) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc10_14: = bound_method %self.ref.loc10, %specific_impl_fn.loc10 -// CHECK:STDOUT: %C.F.call.loc10: init %empty_tuple.type = call %bound_method.loc10_14(%self.ref.loc10) +// CHECK:STDOUT: %C.WithSelf.F.call.loc10: init %empty_tuple.type = call %bound_method.loc10_14(%self.ref.loc10) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C.F(constants.%Self) { +// CHECK:STDOUT: specific @C(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc6 => constants.%Self +// CHECK:STDOUT: %C.WithSelf.F.type => constants.%C.WithSelf.F.type +// CHECK:STDOUT: %C.WithSelf.F => constants.%C.WithSelf.F +// CHECK:STDOUT: %C.WithSelf.G.type => constants.%C.WithSelf.G.type +// CHECK:STDOUT: %C.WithSelf.G => constants.%C.WithSelf.G +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C.G(constants.%Self) { +// CHECK:STDOUT: specific @C.WithSelf.G(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type diff --git a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon index 63710e423a10..01fb6c18ea71 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon @@ -29,7 +29,7 @@ interface I { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.e06: %I.assoc_type = assoc_entity element0, @I.%T [concrete] +// CHECK:STDOUT: %assoc0.2e7: %I.assoc_type = assoc_entity element0, @I.%T [concrete] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete] // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete] @@ -55,8 +55,11 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.e06] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.2e7] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42] // CHECK:STDOUT: %.loc23: type = converted %int_42, [concrete = ] // CHECK:STDOUT: } @@ -69,11 +72,5 @@ interface I { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const T:! type = ; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self.ab9) {} +// CHECK:STDOUT: specific @I(constants.%Self.ab9) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon b/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon index 5896601d120d..7926ba0442a3 100644 --- a/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_fn_invalid_use.carbon @@ -35,21 +35,23 @@ fn Use(T:! I) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.fa0: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.705: %I.WithSelf.F.type.08c = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: %I.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.9d9: type = pattern_type %I.type [concrete] // CHECK:STDOUT: %Use.type: type = fn_type @Use [concrete] // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.a1f: type = fn_type @I.WithSelf.F, @I(%T) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.cc3: %I.WithSelf.F.type.a1f = struct_value () [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T, @I [symbolic] -// CHECK:STDOUT: %.354: type = fn_type_with_self_type %I.F.type, %T [symbolic] -// CHECK:STDOUT: %impl.elem0: %.354 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %require_complete: = require_complete_type %.354 [symbolic] +// CHECK:STDOUT: %.7d0: type = fn_type_with_self_type %I.WithSelf.F.type.a1f, %T [symbolic] +// CHECK:STDOUT: %impl.elem0: %.7d0 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %require_complete: = require_complete_type %.7d0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -70,35 +72,38 @@ fn Use(T:! I) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { -// CHECK:STDOUT: %self.patt: @I.F.%pattern_type (%pattern_type.fa0) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.705)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type.fa0) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.fa0) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc4: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.fa0)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Use(%T.loc8_8.2: %I.type) { @@ -107,8 +112,9 @@ fn Use(T:! I) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc8_8.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_8.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %.loc13_4.2: type = fn_type_with_self_type constants.%I.F.type, %T.loc8_8.1 [symbolic = %.loc13_4.2 (constants.%.354)] -// CHECK:STDOUT: %impl.elem0.loc13_4.2: @Use.%.loc13_4.2 (%.354) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%T.loc8_8.1) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.a1f)] +// CHECK:STDOUT: %.loc13_4.2: type = fn_type_with_self_type %I.WithSelf.F.type, %T.loc8_8.1 [symbolic = %.loc13_4.2 (constants.%.7d0)] +// CHECK:STDOUT: %impl.elem0.loc13_4.2: @Use.%.loc13_4.2 (%.7d0) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %require_complete: = require_complete_type %.loc13_4.2 [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -117,12 +123,19 @@ fn Use(T:! I) { // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc13_4.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc13_4.1: @Use.%.loc13_4.2 (%.354) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc13_4.1: @Use.%.loc13_4.2 (%.7d0) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) { +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%Self +// 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) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.fa0 @@ -132,3 +145,10 @@ fn Use(T:! I) { // CHECK:STDOUT: %T.loc8_8.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc5 => constants.%T +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.a1f +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.cc3 +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_definition_imported.carbon b/toolchain/check/testdata/interface/fail_definition_imported.carbon index 0a97929f1826..71b1d396fbcd 100644 --- a/toolchain/check/testdata/interface/fail_definition_imported.carbon +++ b/toolchain/check/testdata/interface/fail_definition_imported.carbon @@ -72,6 +72,7 @@ interface I {} // CHECK:STDOUT: // CHECK:STDOUT: interface @I.loc13 { // CHECK:STDOUT: %Self: %I.type.c787dc.2 = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I.loc13 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -80,3 +81,5 @@ interface I {} // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I.loc13(constants.%Self) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_duplicate.carbon b/toolchain/check/testdata/interface/fail_duplicate.carbon index 0f0560b4191b..7cb7c36fabd3 100644 --- a/toolchain/check/testdata/interface/fail_duplicate.carbon +++ b/toolchain/check/testdata/interface/fail_duplicate.carbon @@ -81,10 +81,10 @@ interface Class { } // CHECK:STDOUT: %Self.8875a4.1: %Interface.type.6f2e43.1 = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Interface.type.6f2e43.2: type = facet_type <@Interface.loc13> [concrete] // CHECK:STDOUT: %Self.8875a4.2: %Interface.type.6f2e43.2 = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Interface.F.type: type = fn_type @Interface.F [concrete] -// CHECK:STDOUT: %Interface.F: %Interface.F.type = struct_value () [concrete] +// CHECK:STDOUT: %Interface.WithSelf.F.type: type = fn_type @Interface.WithSelf.F, @Interface.loc13(%Self.8875a4.2) [symbolic] +// CHECK:STDOUT: %Interface.WithSelf.F: %Interface.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface.loc13 [concrete] -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, @Interface.loc13.%Interface.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, @Interface.loc13.%Interface.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -97,6 +97,7 @@ interface Class { } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface.loc4 { // CHECK:STDOUT: %Self: %Interface.type.6f2e43.1 = symbolic_binding Self, 0 [symbolic = constants.%Self.8875a4.1] +// CHECK:STDOUT: interface_with_self_decl @Interface.loc4 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -106,23 +107,30 @@ interface Class { } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface.loc13 { -// CHECK:STDOUT: %Self: %Interface.type.6f2e43.2 = symbolic_binding Self, 0 [symbolic = constants.%Self.8875a4.2] -// CHECK:STDOUT: %Interface.F.decl: %Interface.F.type = fn_decl @Interface.F [concrete = constants.%Interface.F] {} {} -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc13: %Interface.type.6f2e43.2 = symbolic_binding Self, 0 [symbolic = constants.%Self.8875a4.2] +// CHECK:STDOUT: interface_with_self_decl @Interface.loc13 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Interface.WithSelf.F.decl: @Interface.loc13.%Interface.WithSelf.F.type (%Interface.WithSelf.F.type) = fn_decl @Interface.WithSelf.F [symbolic = @Interface.loc13.%Interface.WithSelf.F (constants.%Interface.WithSelf.F)] {} {} +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc13 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%Interface.F.decl) +// CHECK:STDOUT: witness = (%Interface.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Interface.F(@Interface.loc13.%Self: %Interface.type.6f2e43.2) { +// CHECK:STDOUT: generic fn @Interface.WithSelf.F(@Interface.loc13.%Self.loc13: %Interface.type.6f2e43.2) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface.F(constants.%Self.8875a4.2) {} +// CHECK:STDOUT: specific @Interface.loc4(constants.%Self.8875a4.1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface.loc13(constants.%Self.8875a4.2) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface.WithSelf.F(constants.%Self.8875a4.2) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_redefine_with_dependents.carbon // CHECK:STDOUT: @@ -133,10 +141,10 @@ interface Class { } // CHECK:STDOUT: %Self.8875a4.2: %Interface.type.6f2e43.2 = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.8875a4.2 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %Interface.F.type: type = fn_type @Interface.F [concrete] -// CHECK:STDOUT: %Interface.F: %Interface.F.type = struct_value () [concrete] +// CHECK:STDOUT: %Interface.WithSelf.F.type: type = fn_type @Interface.WithSelf.F, @Interface.loc13(%Self.8875a4.2) [symbolic] +// CHECK:STDOUT: %Interface.WithSelf.F: %Interface.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface.loc13 [concrete] -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, @Interface.loc13.%Interface.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, @Interface.loc13.%Interface.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -149,6 +157,7 @@ interface Class { } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface.loc4 { // CHECK:STDOUT: %Self: %Interface.type.6f2e43.1 = symbolic_binding Self, 0 [symbolic = constants.%Self.8875a4.1] +// CHECK:STDOUT: interface_with_self_decl @Interface.loc4 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -158,38 +167,45 @@ interface Class { } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface.loc13 { -// CHECK:STDOUT: %Self: %Interface.type.6f2e43.2 = symbolic_binding Self, 0 [symbolic = constants.%Self.8875a4.2] -// CHECK:STDOUT: %Interface.F.decl: %Interface.F.type = fn_decl @Interface.F [concrete = constants.%Interface.F] { -// CHECK:STDOUT: %self.patt: @Interface.F.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @Interface.F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc13: %Interface.type.6f2e43.2 = symbolic_binding Self, 0 [symbolic = constants.%Self.8875a4.2] +// CHECK:STDOUT: interface_with_self_decl @Interface.loc13 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Interface.WithSelf.F.decl: @Interface.loc13.%Interface.WithSelf.F.type (%Interface.WithSelf.F.type) = fn_decl @Interface.WithSelf.F [symbolic = @Interface.loc13.%Interface.WithSelf.F (constants.%Interface.WithSelf.F)] { +// CHECK:STDOUT: %self.patt: @Interface.WithSelf.F.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @Interface.WithSelf.F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @Interface.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @Interface.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc14_14.1: type = splice_block %.loc14_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %Interface.type.6f2e43.2 = name_ref Self, @Interface.loc13.%Self [symbolic = %Self (constants.%Self.8875a4.2)] +// CHECK:STDOUT: %Self.ref: %Interface.type.6f2e43.2 = name_ref Self, @Interface.loc13.%Self.loc13 [symbolic = %Self (constants.%Self.8875a4.2)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc14_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @Interface.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @Interface.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc13 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%Interface.F.decl) +// CHECK:STDOUT: witness = (%Interface.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Interface.F(@Interface.loc13.%Self: %Interface.type.6f2e43.2) { +// CHECK:STDOUT: generic fn @Interface.WithSelf.F(@Interface.loc13.%Self.loc13: %Interface.type.6f2e43.2) { // CHECK:STDOUT: %Self: %Interface.type.6f2e43.2 = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.8875a4.2)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @Interface.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @Interface.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface.F(constants.%Self.8875a4.2) { +// CHECK:STDOUT: specific @Interface.loc4(constants.%Self.8875a4.1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface.loc13(constants.%Self.8875a4.2) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface.WithSelf.F(constants.%Self.8875a4.2) { // CHECK:STDOUT: %Self => constants.%Self.8875a4.2 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type @@ -233,6 +249,7 @@ interface Class { } // CHECK:STDOUT: // CHECK:STDOUT: interface @Class.loc11 { // CHECK:STDOUT: %Self: %Class.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Class.loc11 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -243,3 +260,5 @@ interface Class { } // CHECK:STDOUT: // CHECK:STDOUT: class @Class.loc2; // CHECK:STDOUT: +// CHECK:STDOUT: specific @Class.loc11(constants.%Self) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon b/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon index 1992b3675a6a..1ceea41b5dfb 100644 --- a/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/fail_generic_redeclaration.carbon @@ -119,6 +119,7 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc23_32.1: @NotGeneric.loc23.%NotGeneric.type (%NotGeneric.type.b27) = symbolic_binding Self, 1 [symbolic = %Self.loc23_32.2 (constants.%Self.b1e)] +// CHECK:STDOUT: interface_with_self_decl @NotGeneric.loc23 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc23_32.1 @@ -136,6 +137,7 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: // CHECK:STDOUT: interface @Generic.loc33 { // CHECK:STDOUT: %Self: %Generic.type.aac = symbolic_binding Self, 0 [symbolic = constants.%Self.863] +// CHECK:STDOUT: interface_with_self_decl @Generic.loc33 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -159,6 +161,7 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc43_35.1: @DifferentParams.loc43.%DifferentParams.type (%DifferentParams.type.7f1) = symbolic_binding Self, 1 [symbolic = %Self.loc43_35.2 (constants.%Self.afe)] +// CHECK:STDOUT: interface_with_self_decl @DifferentParams.loc43 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc43_35.1 @@ -172,10 +175,14 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.loc23_22.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @NotGeneric.loc23(constants.%T.67d, constants.%Self.b1e) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @Generic.loc25(constants.%T.67d) { // CHECK:STDOUT: %T.loc25_19.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic.loc33(constants.%Self.863) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @DifferentParams.loc35(constants.%T.67d) { // CHECK:STDOUT: %T.loc35_27.1 => constants.%T.67d // CHECK:STDOUT: } @@ -184,3 +191,5 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.loc43_27.1 => constants.%T.d5f // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @DifferentParams.loc43(constants.%T.d5f, constants.%Self.afe) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_lookup_undefined.carbon b/toolchain/check/testdata/interface/fail_lookup_undefined.carbon index fd4d41ff93f1..d808dae80f87 100644 --- a/toolchain/check/testdata/interface/fail_lookup_undefined.carbon +++ b/toolchain/check/testdata/interface/fail_lookup_undefined.carbon @@ -60,12 +60,12 @@ interface BeingDefined { // CHECK:STDOUT: %Test: %Test.type = struct_value () [concrete] // CHECK:STDOUT: %BeingDefined.type: type = facet_type <@BeingDefined> [concrete] // CHECK:STDOUT: %Self: %BeingDefined.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %BeingDefined.H.type: type = fn_type @BeingDefined.H [concrete] -// CHECK:STDOUT: %BeingDefined.H: %BeingDefined.H.type = struct_value () [concrete] +// CHECK:STDOUT: %BeingDefined.WithSelf.H.type: type = fn_type @BeingDefined.WithSelf.H, @BeingDefined(%Self) [symbolic] +// CHECK:STDOUT: %BeingDefined.WithSelf.H: %BeingDefined.WithSelf.H.type = struct_value () [symbolic] // CHECK:STDOUT: %BeingDefined.assoc_type: type = assoc_entity_type @BeingDefined [concrete] -// CHECK:STDOUT: %assoc0: %BeingDefined.assoc_type = assoc_entity element0, @BeingDefined.%BeingDefined.H.decl [concrete] -// CHECK:STDOUT: %BeingDefined.I.type: type = fn_type @BeingDefined.I [concrete] -// CHECK:STDOUT: %BeingDefined.I: %BeingDefined.I.type = struct_value () [concrete] +// CHECK:STDOUT: %assoc0: %BeingDefined.assoc_type = assoc_entity element0, @BeingDefined.%BeingDefined.WithSelf.H.decl [concrete] +// CHECK:STDOUT: %BeingDefined.WithSelf.I.type: type = fn_type @BeingDefined.WithSelf.I, @BeingDefined(%Self) [symbolic] +// CHECK:STDOUT: %BeingDefined.WithSelf.I: %BeingDefined.WithSelf.I.type = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -83,19 +83,23 @@ interface BeingDefined { // CHECK:STDOUT: interface @Undefined; // CHECK:STDOUT: // CHECK:STDOUT: interface @BeingDefined { -// CHECK:STDOUT: %Self: %BeingDefined.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %BeingDefined.H.decl: %BeingDefined.H.type = fn_decl @BeingDefined.H [concrete = constants.%BeingDefined.H] {} { +// CHECK:STDOUT: %Self.loc37: %BeingDefined.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @BeingDefined [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %BeingDefined.WithSelf.H.decl: @BeingDefined.%BeingDefined.WithSelf.H.type (%BeingDefined.WithSelf.H.type) = fn_decl @BeingDefined.WithSelf.H [symbolic = @BeingDefined.%BeingDefined.WithSelf.H (constants.%BeingDefined.WithSelf.H)] {} { // CHECK:STDOUT: %BeingDefined.ref: type = name_ref BeingDefined, file.%BeingDefined.decl [concrete = constants.%BeingDefined.type] // CHECK:STDOUT: %T.ref: = name_ref T, [concrete = ] // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %BeingDefined.assoc_type = assoc_entity element0, %BeingDefined.H.decl [concrete = constants.%assoc0] -// CHECK:STDOUT: %BeingDefined.I.decl: %BeingDefined.I.type = fn_decl @BeingDefined.I [concrete = constants.%BeingDefined.I] {} {} +// CHECK:STDOUT: %assoc0: %BeingDefined.assoc_type = assoc_entity element0, %BeingDefined.WithSelf.H.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %BeingDefined.WithSelf.I.decl: @BeingDefined.%BeingDefined.WithSelf.I.type (%BeingDefined.WithSelf.I.type) = fn_decl @BeingDefined.WithSelf.I [symbolic = @BeingDefined.%BeingDefined.WithSelf.I (constants.%BeingDefined.WithSelf.I)] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc37 +// CHECK:STDOUT: .BeingDefined = // CHECK:STDOUT: .BeingDefined = // CHECK:STDOUT: .H = %assoc0 -// CHECK:STDOUT: witness = (%BeingDefined.H.decl) +// CHECK:STDOUT: witness = (%BeingDefined.WithSelf.H.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -109,15 +113,17 @@ interface BeingDefined { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @BeingDefined.H(@BeingDefined.%Self: %BeingDefined.type) { +// CHECK:STDOUT: generic fn @BeingDefined.WithSelf.H(@BeingDefined.%Self.loc37: %BeingDefined.type) { // CHECK:STDOUT: fn() -> ; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @BeingDefined.I(@BeingDefined.%Self: %BeingDefined.type) { +// CHECK:STDOUT: generic fn @BeingDefined.WithSelf.I(@BeingDefined.%Self.loc37: %BeingDefined.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @BeingDefined.H(constants.%Self) {} +// CHECK:STDOUT: specific @BeingDefined(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @BeingDefined.I(constants.%Self) {} +// CHECK:STDOUT: specific @BeingDefined.WithSelf.H(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @BeingDefined.WithSelf.I(constants.%Self) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_member_lookup.carbon b/toolchain/check/testdata/interface/fail_member_lookup.carbon index 97f6745638e4..c05f17ee4c76 100644 --- a/toolchain/check/testdata/interface/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/fail_member_lookup.carbon @@ -51,10 +51,10 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface> [concrete] // CHECK:STDOUT: %Self.887: %Interface.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Interface.F.type: type = fn_type @Interface.F [concrete] -// CHECK:STDOUT: %Interface.F: %Interface.F.type = struct_value () [concrete] +// CHECK:STDOUT: %Interface.WithSelf.F.type: type = fn_type @Interface.WithSelf.F, @Interface(%Self.887) [symbolic] +// CHECK:STDOUT: %Interface.WithSelf.F: %Interface.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface [concrete] -// CHECK:STDOUT: %assoc0.fcf: %Interface.assoc_type = assoc_entity element0, @Interface.%Interface.F.decl [concrete] +// CHECK:STDOUT: %assoc0.5cb: %Interface.assoc_type = assoc_entity element0, @Interface.%Interface.WithSelf.F.decl [concrete] // CHECK:STDOUT: %assoc1: %Interface.assoc_type = assoc_entity element1, @Interface.%T [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] @@ -111,24 +111,28 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self.887] -// CHECK:STDOUT: %Interface.F.decl: %Interface.F.type = fn_decl @Interface.F [concrete = constants.%Interface.F] {} {} -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.F.decl [concrete = constants.%assoc0.fcf] +// CHECK:STDOUT: %Self.loc3: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self.887] +// CHECK:STDOUT: interface_with_self_decl @Interface [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Interface.WithSelf.F.decl: @Interface.%Interface.WithSelf.F.type (%Interface.WithSelf.F.type) = fn_decl @Interface.WithSelf.F [symbolic = @Interface.%Interface.WithSelf.F (constants.%Interface.WithSelf.F)] {} {} +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.WithSelf.F.decl [concrete = constants.%assoc0.5cb] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc1: %Interface.assoc_type = assoc_entity element1, @Interface.%T [concrete = constants.%assoc1] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc3 // CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: .T = @T.%assoc1 -// CHECK:STDOUT: witness = (%Interface.F.decl, %T) +// CHECK:STDOUT: witness = (%Interface.WithSelf.F.decl, %T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Different { // CHECK:STDOUT: %Self: %Different.type = symbolic_binding Self, 0 [symbolic = constants.%Self.b4f] +// CHECK:STDOUT: interface_with_self_decl @Different [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -137,18 +141,14 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@Interface.%Self: %Interface.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Interface.F(@Interface.%Self: %Interface.type) { +// CHECK:STDOUT: generic fn @Interface.WithSelf.F(@Interface.%Self.loc3: %Interface.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Interface.ref.loc14: type = name_ref Interface, file.%Interface.decl [concrete = constants.%Interface.type] -// CHECK:STDOUT: %F.ref: %Interface.assoc_type = name_ref F, @Interface.%assoc0 [concrete = constants.%assoc0.fcf] +// CHECK:STDOUT: %F.ref: %Interface.assoc_type = name_ref F, @Interface.%assoc0 [concrete = constants.%assoc0.5cb] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %v.patt: = ref_binding_pattern v [concrete] // CHECK:STDOUT: %v.var_patt: = var_pattern %v.patt [concrete] @@ -170,9 +170,18 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: fn() -> ; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface.F(constants.%Self.887) {} +// CHECK:STDOUT: specific @Interface(constants.%Self.887) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4 => constants.%Self.887 +// CHECK:STDOUT: %Interface.WithSelf.F.type => constants.%Interface.WithSelf.F.type +// CHECK:STDOUT: %Interface.WithSelf.F => constants.%Interface.WithSelf.F +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self.887) {} +// CHECK:STDOUT: specific @Interface.WithSelf.F(constants.%Self.887) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Different(constants.%Self.b4f) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @G(constants.%U) { // CHECK:STDOUT: %U.loc32_6.1 => constants.%U diff --git a/toolchain/check/testdata/interface/fail_modifiers.carbon b/toolchain/check/testdata/interface/fail_modifiers.carbon index a58fb978d796..332a847e20bc 100644 --- a/toolchain/check/testdata/interface/fail_modifiers.carbon +++ b/toolchain/check/testdata/interface/fail_modifiers.carbon @@ -94,6 +94,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @Abstract { // CHECK:STDOUT: %Self: %Abstract.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Abstract [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -102,6 +103,8 @@ interface I { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Abstract(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_default.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -133,6 +136,7 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @Virtual { // CHECK:STDOUT: %Self: %Virtual.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Virtual [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -141,6 +145,8 @@ interface I { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Virtual(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_protected.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -163,10 +169,10 @@ interface I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F: %I.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -177,38 +183,43 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { -// CHECK:STDOUT: %self.patt: @I.F.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc9_22.1: type = splice_block %.loc9_22.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc9_22.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc4: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) { +// CHECK:STDOUT: specific @I(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type @@ -221,10 +232,10 @@ interface I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F: %I.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -235,38 +246,43 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { -// CHECK:STDOUT: %self.patt: @I.F.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc4: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.F.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc9_24.1: type = splice_block %.loc9_24.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self.loc4 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc9_24.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc4: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.F.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) { +// CHECK:STDOUT: specific @I(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type diff --git a/toolchain/check/testdata/interface/fail_redeclare_member.carbon b/toolchain/check/testdata/interface/fail_redeclare_member.carbon index 70983cee5892..9ab6a8cff6f1 100644 --- a/toolchain/check/testdata/interface/fail_redeclare_member.carbon +++ b/toolchain/check/testdata/interface/fail_redeclare_member.carbon @@ -29,10 +29,10 @@ interface Interface { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface> [concrete] // CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Interface.F.type: type = fn_type @Interface.F [concrete] -// CHECK:STDOUT: %Interface.F: %Interface.F.type = struct_value () [concrete] +// CHECK:STDOUT: %Interface.WithSelf.F.type: type = fn_type @Interface.WithSelf.F, @Interface(%Self) [symbolic] +// CHECK:STDOUT: %Interface.WithSelf.F: %Interface.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface [concrete] -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, @Interface.%Interface.F.decl.loc16 [concrete] +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, @Interface.%Interface.WithSelf.F.decl.loc16 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -43,22 +43,27 @@ interface Interface { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Interface.F.decl.loc16: %Interface.F.type = fn_decl @Interface.F [concrete = constants.%Interface.F] {} {} -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.F.decl.loc16 [concrete = constants.%assoc0] -// CHECK:STDOUT: %Interface.F.decl.loc24: %Interface.F.type = fn_decl @Interface.F [concrete = constants.%Interface.F] {} {} +// CHECK:STDOUT: %Self.loc15: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Interface [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Interface.WithSelf.F.decl.loc16: @Interface.%Interface.WithSelf.F.type (%Interface.WithSelf.F.type) = fn_decl @Interface.WithSelf.F [symbolic = @Interface.%Interface.WithSelf.F (constants.%Interface.WithSelf.F)] {} {} +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.WithSelf.F.decl.loc16 [concrete = constants.%assoc0] +// CHECK:STDOUT: %Interface.WithSelf.F.decl.loc24: @Interface.%Interface.WithSelf.F.type (%Interface.WithSelf.F.type) = fn_decl @Interface.WithSelf.F [symbolic = @Interface.%Interface.WithSelf.F (constants.%Interface.WithSelf.F)] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%Interface.F.decl.loc16) +// CHECK:STDOUT: witness = (%Interface.WithSelf.F.decl.loc16) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Interface.F(@Interface.%Self: %Interface.type) { +// CHECK:STDOUT: generic fn @Interface.WithSelf.F(@Interface.%Self.loc15: %Interface.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface.F(constants.%Self) {} +// CHECK:STDOUT: specific @Interface(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface.WithSelf.F(constants.%Self) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon index 2e8aca50f462..96331705da73 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -31,7 +31,7 @@ interface I { // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] // CHECK:STDOUT: %Self.ab9: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.e06: %I.assoc_type = assoc_entity element0, @I.%T [concrete] +// CHECK:STDOUT: %assoc0.2e7: %I.assoc_type = assoc_entity element0, @I.%T [concrete] // 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] @@ -44,7 +44,6 @@ interface I { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -52,7 +51,8 @@ interface I { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -83,8 +83,11 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.e06] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.2e7] // CHECK:STDOUT: %int_32.loc20_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc20_27: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %int_32.loc20_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -95,7 +98,7 @@ interface I { // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] { // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%N [concrete = constants.%assoc1] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc25_27.1: = bound_method %int_42, %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.loc25_27.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] @@ -113,19 +116,5 @@ interface I { // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const T:! type = %.loc20_36; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @N(@I.%Self: %I.type) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const N:! %i32 = %.loc25_27.2; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self.ab9) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%Self.ab9) {} +// CHECK:STDOUT: specific @I(constants.%Self.ab9) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon index b2b904a2f89f..1ff503a7281b 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon @@ -31,19 +31,19 @@ interface Interface { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface> [concrete] // CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Interface.F.type: type = fn_type @Interface.F [concrete] -// CHECK:STDOUT: %Interface.F: %Interface.F.type = struct_value () [concrete] +// CHECK:STDOUT: %Interface.WithSelf.F.type: type = fn_type @Interface.WithSelf.F, @Interface(%Self) [symbolic] +// CHECK:STDOUT: %Interface.WithSelf.F: %Interface.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface [concrete] -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, @Interface.%Interface.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, @Interface.%Interface.WithSelf.F.decl [concrete] // 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: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %.8ef: Core.Form = init_form %i32, call_param2 [concrete] -// CHECK:STDOUT: %Interface.G.type: type = fn_type @Interface.G [concrete] -// CHECK:STDOUT: %Interface.G: %Interface.G.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %Interface.assoc_type = assoc_entity element1, @Interface.%Interface.G.decl [concrete] +// CHECK:STDOUT: %Interface.WithSelf.G.type: type = fn_type @Interface.WithSelf.G, @Interface(%Self) [symbolic] +// CHECK:STDOUT: %Interface.WithSelf.G: %Interface.WithSelf.G.type = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1: %Interface.assoc_type = assoc_entity element1, @Interface.%Interface.WithSelf.G.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,10 +65,13 @@ interface Interface { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Interface.F.decl: %Interface.F.type = fn_decl @Interface.F [concrete = constants.%Interface.F] {} {} -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.F.decl [concrete = constants.%assoc0] -// CHECK:STDOUT: %Interface.G.decl: %Interface.G.type = fn_decl @Interface.G [concrete = constants.%Interface.G] { +// CHECK:STDOUT: %Self.loc15: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Interface [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Interface.WithSelf.F.decl: @Interface.%Interface.WithSelf.F.type (%Interface.WithSelf.F.type) = fn_decl @Interface.WithSelf.F [symbolic = @Interface.%Interface.WithSelf.F (constants.%Interface.WithSelf.F)] {} {} +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.WithSelf.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Interface.WithSelf.G.decl: @Interface.%Interface.WithSelf.G.type (%Interface.WithSelf.G.type) = fn_decl @Interface.WithSelf.G [symbolic = @Interface.%Interface.WithSelf.G (constants.%Interface.WithSelf.G)] { // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.7ce = value_binding_pattern b [concrete] @@ -94,18 +97,18 @@ interface Interface { // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %Interface.assoc_type = assoc_entity element1, %Interface.G.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %Interface.assoc_type = assoc_entity element1, %Interface.WithSelf.G.decl [concrete = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: .G = %assoc1 -// CHECK:STDOUT: witness = (%Interface.F.decl, %Interface.G.decl) +// CHECK:STDOUT: witness = (%Interface.WithSelf.F.decl, %Interface.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Interface.F(@Interface.%Self: %Interface.type) { +// CHECK:STDOUT: generic fn @Interface.WithSelf.F(@Interface.%Self.loc15: %Interface.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -114,13 +117,22 @@ interface Interface { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Interface.G(@Interface.%Self: %Interface.type) { +// CHECK:STDOUT: generic fn @Interface.WithSelf.G(@Interface.%Self.loc15: %Interface.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn(%a.param: %i32, %b.param: %i32) -> out %return.param: %i32 = "int.sadd"; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface.F(constants.%Self) {} +// CHECK:STDOUT: specific @Interface(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc20 => constants.%Self +// CHECK:STDOUT: %Interface.WithSelf.F.type => constants.%Interface.WithSelf.F.type +// CHECK:STDOUT: %Interface.WithSelf.F => constants.%Interface.WithSelf.F +// CHECK:STDOUT: %Interface.WithSelf.G.type => constants.%Interface.WithSelf.G.type +// CHECK:STDOUT: %Interface.WithSelf.G => constants.%Interface.WithSelf.G +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface.G(constants.%Self) {} +// CHECK:STDOUT: specific @Interface.WithSelf.F(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface.WithSelf.G(constants.%Self) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index acc9751ac987..1f013b951178 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -59,19 +59,19 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: constants { // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface> [concrete] // CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Interface.F.type: type = fn_type @Interface.F [concrete] -// CHECK:STDOUT: %Interface.F: %Interface.F.type = struct_value () [concrete] +// CHECK:STDOUT: %Interface.WithSelf.F.type: type = fn_type @Interface.WithSelf.F, @Interface(%Self) [symbolic] +// CHECK:STDOUT: %Interface.WithSelf.F: %Interface.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface [concrete] -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, @Interface.%Interface.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, @Interface.%Interface.WithSelf.F.decl [concrete] // 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: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %.8ef: Core.Form = init_form %i32, call_param2 [concrete] -// CHECK:STDOUT: %Interface.G.type: type = fn_type @Interface.G [concrete] -// CHECK:STDOUT: %Interface.G: %Interface.G.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %Interface.assoc_type = assoc_entity element1, @Interface.%Interface.G.decl [concrete] +// CHECK:STDOUT: %Interface.WithSelf.G.type: type = fn_type @Interface.WithSelf.G, @Interface(%Self) [symbolic] +// CHECK:STDOUT: %Interface.WithSelf.G: %Interface.WithSelf.G.type = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1: %Interface.assoc_type = assoc_entity element1, @Interface.%Interface.WithSelf.G.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -90,8 +90,8 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [concrete = constants.%Interface.type] {} {} -// CHECK:STDOUT: %Interface.F.decl: %Interface.F.type = fn_decl @Interface.F [concrete = constants.%Interface.F] {} {} -// CHECK:STDOUT: %Interface.G.decl: %Interface.G.type = fn_decl @Interface.G [concrete = constants.%Interface.G] { +// CHECK:STDOUT: %Interface.WithSelf.F.decl: %Interface.WithSelf.F.type = fn_decl @Interface.WithSelf.F [symbolic = constants.%Interface.WithSelf.F] {} {} +// CHECK:STDOUT: %Interface.WithSelf.G.decl: %Interface.WithSelf.G.type = fn_decl @Interface.WithSelf.G [symbolic = constants.%Interface.WithSelf.G] { // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.7ce = value_binding_pattern b [concrete] @@ -120,10 +120,13 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Interface.F.decl: %Interface.F.type = fn_decl @Interface.F [concrete = constants.%Interface.F] {} {} -// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.F.decl [concrete = constants.%assoc0] -// CHECK:STDOUT: %Interface.G.decl: %Interface.G.type = fn_decl @Interface.G [concrete = constants.%Interface.G] { +// CHECK:STDOUT: %Self.loc2: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Interface [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Interface.WithSelf.F.decl: @Interface.%Interface.WithSelf.F.type (%Interface.WithSelf.F.type) = fn_decl @Interface.WithSelf.F [symbolic = @Interface.%Interface.WithSelf.F (constants.%Interface.WithSelf.F)] {} {} +// CHECK:STDOUT: %assoc0: %Interface.assoc_type = assoc_entity element0, %Interface.WithSelf.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Interface.WithSelf.G.decl: @Interface.%Interface.WithSelf.G.type (%Interface.WithSelf.G.type) = fn_decl @Interface.WithSelf.G [symbolic = @Interface.%Interface.WithSelf.G (constants.%Interface.WithSelf.G)] { // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.7ce = value_binding_pattern b [concrete] @@ -149,18 +152,18 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: %return.param.loc13: ref %i32 = out_param call_param2 // CHECK:STDOUT: %return.loc13: ref %i32 = return_slot %return.param.loc13 // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %Interface.assoc_type = assoc_entity element1, %Interface.G.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %Interface.assoc_type = assoc_entity element1, %Interface.WithSelf.G.decl [concrete = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc2 // CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: .G = %assoc1 -// CHECK:STDOUT: witness = (%Interface.F.decl, %Interface.G.decl) +// CHECK:STDOUT: witness = (%Interface.WithSelf.F.decl, %Interface.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Interface.F(@Interface.%Self: %Interface.type) { +// CHECK:STDOUT: generic fn @Interface.WithSelf.F(@Interface.%Self.loc2: %Interface.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -169,15 +172,17 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Interface.G(@Interface.%Self: %Interface.type) { +// CHECK:STDOUT: generic fn @Interface.WithSelf.G(@Interface.%Self.loc2: %Interface.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn(%a.param.loc18: %i32, %b.param.loc18: %i32) -> out %return.param.loc18: %i32 = "int.sadd"; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface.F(constants.%Self) {} +// CHECK:STDOUT: specific @Interface(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Interface.G(constants.%Self) {} +// CHECK:STDOUT: specific @Interface.WithSelf.F(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface.WithSelf.G(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: --- dependent_return_type.carbon // CHECK:STDOUT: @@ -185,7 +190,7 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface> [concrete] // CHECK:STDOUT: %Self.887: %Interface.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self.887) [symbolic] -// CHECK:STDOUT: %pattern_type.68e: type = pattern_type %C [symbolic] +// CHECK:STDOUT: %pattern_type.968: type = pattern_type %C [symbolic] // CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %U.091: type = symbolic_binding U, 1 [symbolic] @@ -197,16 +202,16 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: %C.F: %C.F.type = struct_value () [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] -// CHECK:STDOUT: %require_complete.03c: = require_complete_type %C [symbolic] +// CHECK:STDOUT: %require_complete.a31: = require_complete_type %C [symbolic] // CHECK:STDOUT: %require_complete.56d: = require_complete_type %ptr.18e [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %.f1d: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.091) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.484: = lookup_impl_witness %ptr.18e, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.18e, (%Copy.lookup_impl_witness.484) [symbolic] -// CHECK:STDOUT: %.ee1: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [symbolic] -// CHECK:STDOUT: %impl.elem0.d81: %.ee1 = impl_witness_access %Copy.lookup_impl_witness.484, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.9f4: = specific_impl_function %impl.elem0.d81, @Copy.Op(%Copy.facet) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.be8: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic] +// CHECK:STDOUT: %.e5c: type = fn_type_with_self_type %Copy.WithSelf.Op.type.be8, %Copy.facet [symbolic] +// CHECK:STDOUT: %impl.elem0.375: %.e5c = impl_witness_access %Copy.lookup_impl_witness.484, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.389: = specific_impl_function %impl.elem0.375, @Copy.WithSelf.Op(%Copy.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -226,8 +231,8 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Interface.decl: type = interface_decl @Interface [concrete = constants.%Interface.type] {} {} // CHECK:STDOUT: %C.F.decl: %C.F.type = fn_decl @C.F [symbolic = constants.%C.F] { -// CHECK:STDOUT: %self.patt: @C.F.%pattern_type.loc14_10 (%pattern_type.68e) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @C.F.%pattern_type.loc14_10 (%pattern_type.68e) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %self.patt: @C.F.%pattern_type.loc14_10 (%pattern_type.968) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @C.F.%pattern_type.loc14_10 (%pattern_type.968) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: %u.patt: @C.F.%pattern_type.loc14_32 (%pattern_type.423) = value_binding_pattern u [concrete] // CHECK:STDOUT: %u.param_patt: @C.F.%pattern_type.loc14_32 (%pattern_type.423) = value_param_pattern %u.patt, call_param1 [concrete] @@ -257,18 +262,21 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Interface { -// CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self.887] -// CHECK:STDOUT: %C.decl: type = class_decl @C [symbolic = constants.%C] {} {} +// CHECK:STDOUT: %Self.loc8: %Interface.type = symbolic_binding Self, 0 [symbolic = constants.%Self.887] +// CHECK:STDOUT: interface_with_self_decl @Interface [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %C.decl: type = class_decl @C [symbolic = @Interface.%C (constants.%C)] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc8 // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(@Interface.%Self: %Interface.type) { +// CHECK:STDOUT: generic class @C(@Interface.%Self.loc8: %Interface.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.887)] // CHECK:STDOUT: %C.F.type: type = fn_type @C.F, @C(%Self) [symbolic = %C.F.type (constants.%C.F.type)] @@ -276,8 +284,8 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %C.F.decl: @C.%C.F.type (%C.F.type) = fn_decl @C.F [symbolic = @C.%C.F (constants.%C.F)] { -// CHECK:STDOUT: %self.patt: @C.F.%pattern_type.loc14_10 (%pattern_type.68e) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @C.F.%pattern_type.loc14_10 (%pattern_type.68e) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %self.patt: @C.F.%pattern_type.loc14_10 (%pattern_type.968) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @C.F.%pattern_type.loc14_10 (%pattern_type.968) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete] // CHECK:STDOUT: %u.patt: @C.F.%pattern_type.loc14_32 (%pattern_type.423) = value_binding_pattern u [concrete] // CHECK:STDOUT: %u.param_patt: @C.F.%pattern_type.loc14_32 (%pattern_type.423) = value_param_pattern %u.patt, call_param1 [concrete] @@ -313,37 +321,40 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @C.F(@Interface.%Self: %Interface.type, %U.loc14_22.2: type) { +// CHECK:STDOUT: generic fn @C.F(@Interface.%Self.loc8: %Interface.type, %U.loc14_22.2: type) { // CHECK:STDOUT: %Self: %Interface.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.887)] // CHECK:STDOUT: %C: type = class_type @C, @C(%Self) [symbolic = %C (constants.%C)] -// CHECK:STDOUT: %pattern_type.loc14_10: type = pattern_type %C [symbolic = %pattern_type.loc14_10 (constants.%pattern_type.68e)] +// CHECK:STDOUT: %pattern_type.loc14_10: type = pattern_type %C [symbolic = %pattern_type.loc14_10 (constants.%pattern_type.968)] // CHECK:STDOUT: %U.loc14_22.1: type = symbolic_binding U, 1 [symbolic = %U.loc14_22.1 (constants.%U.091)] // CHECK:STDOUT: %ptr.loc14_36.1: type = ptr_type %U.loc14_22.1 [symbolic = %ptr.loc14_36.1 (constants.%ptr.18e)] // CHECK:STDOUT: %pattern_type.loc14_32: type = pattern_type %ptr.loc14_36.1 [symbolic = %pattern_type.loc14_32 (constants.%pattern_type.423)] // CHECK:STDOUT: %.loc14_43.1: Core.Form = init_form %ptr.loc14_36.1, call_param2 [symbolic = %.loc14_43.1 (constants.%.ddc)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete.loc20_22: = require_complete_type %C [symbolic = %require_complete.loc20_22 (constants.%require_complete.03c)] +// CHECK:STDOUT: %require_complete.loc20_22: = require_complete_type %C [symbolic = %require_complete.loc20_22 (constants.%require_complete.a31)] // CHECK:STDOUT: %require_complete.loc20_41: = require_complete_type %ptr.loc14_36.1 [symbolic = %require_complete.loc20_41 (constants.%require_complete.56d)] // CHECK:STDOUT: %.loc20_62.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc14_22.1) [symbolic = %.loc20_62.1 (constants.%.f1d)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc14_36.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.484)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc14_36.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc20_62.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc20_62.2 (constants.%.ee1)] -// CHECK:STDOUT: %impl.elem0.loc20_62.2: @C.F.%.loc20_62.2 (%.ee1) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_62.2 (constants.%impl.elem0.d81)] -// CHECK:STDOUT: %specific_impl_fn.loc20_62.2: = specific_impl_function %impl.elem0.loc20_62.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc20_62.2 (constants.%specific_impl_fn.9f4)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.be8)] +// CHECK:STDOUT: %.loc20_62.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc20_62.2 (constants.%.e5c)] +// CHECK:STDOUT: %impl.elem0.loc20_62.2: @C.F.%.loc20_62.2 (%.e5c) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_62.2 (constants.%impl.elem0.375)] +// CHECK:STDOUT: %specific_impl_fn.loc20_62.2: = specific_impl_function %impl.elem0.loc20_62.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc20_62.2 (constants.%specific_impl_fn.389)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param.loc20: @C.F.%C (%C), %u.param.loc20: @C.F.%ptr.loc14_36.1 (%ptr.18e)) -> out %return.param.loc20: @C.F.%ptr.loc14_36.1 (%ptr.18e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %u.ref: @C.F.%ptr.loc14_36.1 (%ptr.18e) = name_ref u, %u.loc20 -// CHECK:STDOUT: %impl.elem0.loc20_62.1: @C.F.%.loc20_62.2 (%.ee1) = impl_witness_access constants.%Copy.lookup_impl_witness.484, element0 [symbolic = %impl.elem0.loc20_62.2 (constants.%impl.elem0.d81)] +// CHECK:STDOUT: %impl.elem0.loc20_62.1: @C.F.%.loc20_62.2 (%.e5c) = impl_witness_access constants.%Copy.lookup_impl_witness.484, element0 [symbolic = %impl.elem0.loc20_62.2 (constants.%impl.elem0.375)] // CHECK:STDOUT: %bound_method.loc20_62.1: = bound_method %u.ref, %impl.elem0.loc20_62.1 -// CHECK:STDOUT: %specific_impl_fn.loc20_62.1: = specific_impl_function %impl.elem0.loc20_62.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc20_62.2 (constants.%specific_impl_fn.9f4)] +// CHECK:STDOUT: %specific_impl_fn.loc20_62.1: = specific_impl_function %impl.elem0.loc20_62.1, @Copy.WithSelf.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc20_62.2 (constants.%specific_impl_fn.389)] // CHECK:STDOUT: %bound_method.loc20_62.2: = bound_method %u.ref, %specific_impl_fn.loc20_62.1 -// CHECK:STDOUT: %Copy.Op.call: init @C.F.%ptr.loc14_36.1 (%ptr.18e) = call %bound_method.loc20_62.2(%u.ref) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @C.F.%ptr.loc14_36.1 (%ptr.18e) = call %bound_method.loc20_62.2(%u.ref) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface(constants.%Self.887) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%Self.887) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Self => constants.%Self.887 @@ -354,7 +365,7 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: specific @C.F(constants.%Self.887, constants.%U.091) { // CHECK:STDOUT: %Self => constants.%Self.887 // CHECK:STDOUT: %C => constants.%C -// CHECK:STDOUT: %pattern_type.loc14_10 => constants.%pattern_type.68e +// CHECK:STDOUT: %pattern_type.loc14_10 => constants.%pattern_type.968 // CHECK:STDOUT: %U.loc14_22.1 => constants.%U.091 // CHECK:STDOUT: %ptr.loc14_36.1 => constants.%ptr.18e // CHECK:STDOUT: %pattern_type.loc14_32 => constants.%pattern_type.423 diff --git a/toolchain/check/testdata/interface/fail_todo_modifiers.carbon b/toolchain/check/testdata/interface/fail_todo_modifiers.carbon index d246fdc8434c..e9f949c32e77 100644 --- a/toolchain/check/testdata/interface/fail_todo_modifiers.carbon +++ b/toolchain/check/testdata/interface/fail_todo_modifiers.carbon @@ -30,13 +30,13 @@ interface Modifiers { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Modifiers.type: type = facet_type <@Modifiers> [concrete] // CHECK:STDOUT: %Self: %Modifiers.type = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %Modifiers.Final.type: type = fn_type @Modifiers.Final [concrete] -// CHECK:STDOUT: %Modifiers.Final: %Modifiers.Final.type = struct_value () [concrete] +// CHECK:STDOUT: %Modifiers.WithSelf.Final.type: type = fn_type @Modifiers.WithSelf.Final, @Modifiers(%Self) [symbolic] +// CHECK:STDOUT: %Modifiers.WithSelf.Final: %Modifiers.WithSelf.Final.type = struct_value () [symbolic] // CHECK:STDOUT: %Modifiers.assoc_type: type = assoc_entity_type @Modifiers [concrete] -// CHECK:STDOUT: %assoc0: %Modifiers.assoc_type = assoc_entity element0, @Modifiers.%Modifiers.Final.decl [concrete] -// CHECK:STDOUT: %Modifiers.Default.type: type = fn_type @Modifiers.Default [concrete] -// CHECK:STDOUT: %Modifiers.Default: %Modifiers.Default.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %Modifiers.assoc_type = assoc_entity element1, @Modifiers.%Modifiers.Default.decl [concrete] +// CHECK:STDOUT: %assoc0: %Modifiers.assoc_type = assoc_entity element0, @Modifiers.%Modifiers.WithSelf.Final.decl [concrete] +// CHECK:STDOUT: %Modifiers.WithSelf.Default.type: type = fn_type @Modifiers.WithSelf.Default, @Modifiers(%Self) [symbolic] +// CHECK:STDOUT: %Modifiers.WithSelf.Default: %Modifiers.WithSelf.Default.type = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1: %Modifiers.assoc_type = assoc_entity element1, @Modifiers.%Modifiers.WithSelf.Default.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -47,22 +47,25 @@ interface Modifiers { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Modifiers { -// CHECK:STDOUT: %Self: %Modifiers.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %Modifiers.Final.decl: %Modifiers.Final.type = fn_decl @Modifiers.Final [concrete = constants.%Modifiers.Final] {} {} -// CHECK:STDOUT: %assoc0: %Modifiers.assoc_type = assoc_entity element0, %Modifiers.Final.decl [concrete = constants.%assoc0] -// CHECK:STDOUT: %Modifiers.Default.decl: %Modifiers.Default.type = fn_decl @Modifiers.Default [concrete = constants.%Modifiers.Default] {} {} -// CHECK:STDOUT: %assoc1: %Modifiers.assoc_type = assoc_entity element1, %Modifiers.Default.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %Self.loc15: %Modifiers.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Modifiers [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Modifiers.WithSelf.Final.decl: @Modifiers.%Modifiers.WithSelf.Final.type (%Modifiers.WithSelf.Final.type) = fn_decl @Modifiers.WithSelf.Final [symbolic = @Modifiers.%Modifiers.WithSelf.Final (constants.%Modifiers.WithSelf.Final)] {} {} +// CHECK:STDOUT: %assoc0: %Modifiers.assoc_type = assoc_entity element0, %Modifiers.WithSelf.Final.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Modifiers.WithSelf.Default.decl: @Modifiers.%Modifiers.WithSelf.Default.type (%Modifiers.WithSelf.Default.type) = fn_decl @Modifiers.WithSelf.Default [symbolic = @Modifiers.%Modifiers.WithSelf.Default (constants.%Modifiers.WithSelf.Default)] {} {} +// CHECK:STDOUT: %assoc1: %Modifiers.assoc_type = assoc_entity element1, %Modifiers.WithSelf.Default.decl [concrete = constants.%assoc1] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .Final = %assoc0 // CHECK:STDOUT: .Default = %assoc1 -// CHECK:STDOUT: witness = (%Modifiers.Final.decl, %Modifiers.Default.decl) +// CHECK:STDOUT: witness = (%Modifiers.WithSelf.Final.decl, %Modifiers.WithSelf.Default.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Modifiers.Final(@Modifiers.%Self: %Modifiers.type) { +// CHECK:STDOUT: generic fn @Modifiers.WithSelf.Final(@Modifiers.%Self.loc15: %Modifiers.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -71,7 +74,7 @@ interface Modifiers { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Modifiers.Default(@Modifiers.%Self: %Modifiers.type) { +// CHECK:STDOUT: generic fn @Modifiers.WithSelf.Default(@Modifiers.%Self.loc15: %Modifiers.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -80,7 +83,16 @@ interface Modifiers { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Modifiers.Final(constants.%Self) {} +// CHECK:STDOUT: specific @Modifiers(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc20 => constants.%Self +// CHECK:STDOUT: %Modifiers.WithSelf.Final.type => constants.%Modifiers.WithSelf.Final.type +// CHECK:STDOUT: %Modifiers.WithSelf.Final => constants.%Modifiers.WithSelf.Final +// CHECK:STDOUT: %Modifiers.WithSelf.Default.type => constants.%Modifiers.WithSelf.Default.type +// CHECK:STDOUT: %Modifiers.WithSelf.Default => constants.%Modifiers.WithSelf.Default +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Modifiers.Default(constants.%Self) {} +// CHECK:STDOUT: specific @Modifiers.WithSelf.Final(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Modifiers.WithSelf.Default(constants.%Self) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/final.carbon b/toolchain/check/testdata/interface/final.carbon index fc555c068fff..cb90dbbe840d 100644 --- a/toolchain/check/testdata/interface/final.carbon +++ b/toolchain/check/testdata/interface/final.carbon @@ -33,11 +33,11 @@ fn Use() { UseJ(C); } // 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: %I.F.type: type = fn_type @I.F [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.08c: type = fn_type @I.WithSelf.F, @I(%Self.ab9) [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.705: %I.WithSelf.F.type.08c = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete] // CHECK:STDOUT: %Self.8a1: %J.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %type: type = facet_type [concrete] @@ -49,15 +49,19 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: %T.binding.as_type.as.I.impl.F.type.060: type = fn_type @T.binding.as_type.as.I.impl.F, @T.binding.as_type.as.I.impl(%T.612) [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.I.impl.F.ded: %T.binding.as_type.as.I.impl.F.type.060 = struct_value () [symbolic] // CHECK:STDOUT: %I.facet.af5: %I.type = facet_value %T.binding.as_type.50b, (%I.impl_witness.ada) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.type.7d2: type = fn_type @I.WithSelf.F, @I(%I.facet.af5) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.bc8: %I.WithSelf.F.type.7d2 = struct_value () [symbolic] // CHECK:STDOUT: %T.651: %I.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.9d9: type = pattern_type %I.type [concrete] // CHECK:STDOUT: %UseI.type: type = fn_type @UseI [concrete] // CHECK:STDOUT: %UseI: %UseI.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.a1f: type = fn_type @I.WithSelf.F, @I(%T.651) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F.cc3: %I.WithSelf.F.type.a1f = struct_value () [symbolic] // CHECK:STDOUT: %T.binding.as_type.3af: type = symbolic_binding_type T, 0, %T.651 [symbolic] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.651, @I [symbolic] -// CHECK:STDOUT: %.354: type = fn_type_with_self_type %I.F.type, %T.651 [symbolic] -// CHECK:STDOUT: %impl.elem0: %.354 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.F(%T.651) [symbolic] +// CHECK:STDOUT: %.7d0: type = fn_type_with_self_type %I.WithSelf.F.type.a1f, %T.651 [symbolic] +// CHECK:STDOUT: %impl.elem0: %.7d0 = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @I.WithSelf.F(%T.651) [symbolic] // CHECK:STDOUT: %UseJ.type: type = fn_type @UseJ [concrete] // CHECK:STDOUT: %UseJ: %UseJ.type = struct_value () [concrete] // CHECK:STDOUT: %.f66: require_specific_def_type = require_specific_def @T.binding.as_type.as.I.impl(%T.612) [symbolic] @@ -66,11 +70,11 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %J.impl_witness: = impl_witness @C.as.J.impl.%J.impl_witness_table [concrete] +// CHECK:STDOUT: %J.facet: %J.type = facet_value %C, (%J.impl_witness) [concrete] // CHECK:STDOUT: %Use.type: type = fn_type @Use [concrete] // CHECK:STDOUT: %Use: %Use.type = struct_value () [concrete] -// CHECK:STDOUT: %J.facet: %J.type = facet_value %C, (%J.impl_witness) [concrete] // CHECK:STDOUT: %UseJ.specific_fn: = specific_function %UseJ, @UseJ(%J.facet) [concrete] -// CHECK:STDOUT: %.e68: type = fn_type_with_self_type %I.F.type, %I.facet.af5 [symbolic] +// CHECK:STDOUT: %.623: type = fn_type_with_self_type %I.WithSelf.F.type.7d2, %I.facet.af5 [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.I.impl.F.specific_fn.95b: = specific_function %T.binding.as_type.as.I.impl.F.ded, @T.binding.as_type.as.I.impl.F(%T.612) [symbolic] // CHECK:STDOUT: %I.impl_witness.9a0: = impl_witness @T.binding.as_type.as.I.impl.%I.impl_witness_table, @T.binding.as_type.as.I.impl(%J.facet) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.I.impl.F.type.9f7: type = fn_type @T.binding.as_type.as.I.impl.F, @T.binding.as_type.as.I.impl(%J.facet) [concrete] @@ -78,7 +82,8 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: %.d61: require_specific_def_type = require_specific_def @T.binding.as_type.as.I.impl(%J.facet) [concrete] // CHECK:STDOUT: %I.facet.2df: %I.type = facet_value %C, (%I.impl_witness.9a0) [concrete] // CHECK:STDOUT: %UseI.specific_fn.163: = specific_function %UseI, @UseI(%I.facet.2df) [concrete] -// CHECK:STDOUT: %.9fc: type = fn_type_with_self_type %I.F.type, %I.facet.2df [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type.1b3: type = fn_type @I.WithSelf.F, @I(%I.facet.2df) [concrete] +// CHECK:STDOUT: %.a11: type = fn_type_with_self_type %I.WithSelf.F.type.1b3, %I.facet.2df [concrete] // CHECK:STDOUT: %T.binding.as_type.as.I.impl.F.specific_fn.78c: = specific_function %T.binding.as_type.as.I.impl.F.698, @T.binding.as_type.as.I.impl.F(%J.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -142,20 +147,24 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] {} {} -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %Self.loc4_13: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type.08c) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F.705)] {} {} +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc4_13 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%I.F.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.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: interface_with_self_decl @J [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -200,7 +209,7 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc4_13: %I.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -219,9 +228,10 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc11_9.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.3af)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc11_9.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %.loc11_19.2: type = fn_type_with_self_type constants.%I.F.type, %T.loc11_9.1 [symbolic = %.loc11_19.2 (constants.%.354)] -// CHECK:STDOUT: %impl.elem0.loc11_19.2: @UseI.%.loc11_19.2 (%.354) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_19.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc11_19.2: = specific_impl_function %impl.elem0.loc11_19.2, @I.F(%T.loc11_9.1) [symbolic = %specific_impl_fn.loc11_19.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%T.loc11_9.1) [symbolic = %I.WithSelf.F.type (constants.%I.WithSelf.F.type.a1f)] +// CHECK:STDOUT: %.loc11_19.2: type = fn_type_with_self_type %I.WithSelf.F.type, %T.loc11_9.1 [symbolic = %.loc11_19.2 (constants.%.7d0)] +// CHECK:STDOUT: %impl.elem0.loc11_19.2: @UseI.%.loc11_19.2 (%.7d0) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_19.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc11_19.2: = specific_impl_function %impl.elem0.loc11_19.2, @I.WithSelf.F(%T.loc11_9.1) [symbolic = %specific_impl_fn.loc11_19.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -229,9 +239,9 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type.3af)] // CHECK:STDOUT: %.loc11_19.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type.3af)] // CHECK:STDOUT: %F.ref: %I.assoc_type = name_ref F, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc11_19.1: @UseI.%.loc11_19.2 (%.354) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_19.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc11_19.1: = specific_impl_function %impl.elem0.loc11_19.1, @I.F(constants.%T.651) [symbolic = %specific_impl_fn.loc11_19.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %I.F.call: init %empty_tuple.type = call %specific_impl_fn.loc11_19.1() +// CHECK:STDOUT: %impl.elem0.loc11_19.1: @UseI.%.loc11_19.2 (%.7d0) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_19.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc11_19.1: = specific_impl_function %impl.elem0.loc11_19.1, @I.WithSelf.F(constants.%T.651) [symbolic = %specific_impl_fn.loc11_19.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %I.WithSelf.F.call: init %empty_tuple.type = call %specific_impl_fn.loc11_19.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -270,7 +280,18 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.ab9) {} +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4_21 => 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: +// CHECK:STDOUT: specific @J(constants.%Self.8a1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @T.binding.as_type.as.I.impl(constants.%T.612) { // CHECK:STDOUT: %T.loc7_20.1 => constants.%T.612 @@ -286,13 +307,27 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet.af5) {} +// CHECK:STDOUT: specific @I(constants.%I.facet.af5) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4_21 => constants.%I.facet.af5 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.7d2 +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.bc8 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet.af5) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @UseI(constants.%T.651) { // CHECK:STDOUT: %T.loc11_9.1 => constants.%T.651 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%T.651) {} +// CHECK:STDOUT: specific @I(constants.%T.651) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc4_21 => constants.%T.651 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.a1f +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F.cc3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%T.651) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @UseJ(constants.%T.612) { // CHECK:STDOUT: %T.loc12_9.1 => constants.%T.612 @@ -304,11 +339,16 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.binding.as_type => constants.%T.binding.as_type.50b // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness.ada -// CHECK:STDOUT: %.loc11_19.2 => constants.%.e68 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.7d2 +// CHECK:STDOUT: %.loc11_19.2 => constants.%.623 // CHECK:STDOUT: %impl.elem0.loc11_19.2 => constants.%T.binding.as_type.as.I.impl.F.ded // CHECK:STDOUT: %specific_impl_fn.loc11_19.2 => constants.%T.binding.as_type.as.I.impl.F.specific_fn.95b // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @J(constants.%J.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @UseJ(constants.%J.facet) { // CHECK:STDOUT: %T.loc12_9.1 => constants.%J.facet // CHECK:STDOUT: @@ -336,12 +376,15 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.binding.as_type => constants.%C // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.impl_witness.9a0 -// CHECK:STDOUT: %.loc11_19.2 => constants.%.9fc +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type.1b3 +// CHECK:STDOUT: %.loc11_19.2 => constants.%.a11 // CHECK:STDOUT: %impl.elem0.loc11_19.2 => constants.%T.binding.as_type.as.I.impl.F.698 // CHECK:STDOUT: %specific_impl_fn.loc11_19.2 => constants.%T.binding.as_type.as.I.impl.F.specific_fn.78c // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%I.facet.2df) {} +// CHECK:STDOUT: specific @I(constants.%I.facet.2df) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%I.facet.2df) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @T.binding.as_type.as.I.impl.F(constants.%J.facet) { // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/interface/generic.carbon b/toolchain/check/testdata/interface/generic.carbon index c3c8a5699fe6..d86fc3a9fcfb 100644 --- a/toolchain/check/testdata/interface/generic.carbon +++ b/toolchain/check/testdata/interface/generic.carbon @@ -97,24 +97,27 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: %Self.629: %WithAssocFn.type.d36 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %.22a: Core.Form = init_form %X, call_param0 [concrete] // CHECK:STDOUT: %pattern_type.05f: type = pattern_type %X [concrete] -// CHECK:STDOUT: %WithAssocFn.F.type.b86: type = fn_type @WithAssocFn.F, @WithAssocFn(%T.67d) [symbolic] -// CHECK:STDOUT: %WithAssocFn.F.c8d: %WithAssocFn.F.type.b86 = struct_value () [symbolic] +// CHECK:STDOUT: %WithAssocFn.WithSelf.F.type.6c9: type = fn_type @WithAssocFn.WithSelf.F, @WithAssocFn(%T.67d, %Self.629) [symbolic] +// CHECK:STDOUT: %WithAssocFn.WithSelf.F.6d9: %WithAssocFn.WithSelf.F.type.6c9 = struct_value () [symbolic] // CHECK:STDOUT: %WithAssocFn.assoc_type.b93: type = assoc_entity_type @WithAssocFn, @WithAssocFn(%T.67d) [symbolic] -// CHECK:STDOUT: %assoc0.62d: %WithAssocFn.assoc_type.b93 = assoc_entity element0, @WithAssocFn.%WithAssocFn.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.395: %WithAssocFn.assoc_type.b93 = assoc_entity element0, @WithAssocFn.%WithAssocFn.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %Simple.type.12a: type = facet_type <@Simple, @Simple(%C)> [concrete] // CHECK:STDOUT: %Simple.impl_witness: = impl_witness @C.as.Simple.impl.%Simple.impl_witness_table [concrete] // CHECK:STDOUT: %Self.0b4: %Simple.type.12a = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %Simple.facet: %Simple.type.12a = facet_value %C, (%Simple.impl_witness) [concrete] // CHECK:STDOUT: %WithAssocFn.type.19d: type = facet_type <@WithAssocFn, @WithAssocFn(%C)> [concrete] // CHECK:STDOUT: %WithAssocFn.impl_witness: = impl_witness @C.as.WithAssocFn.impl.%WithAssocFn.impl_witness_table [concrete] // CHECK:STDOUT: %Self.63e: %WithAssocFn.type.19d = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %WithAssocFn.F.type.233: type = fn_type @WithAssocFn.F, @WithAssocFn(%C) [concrete] -// CHECK:STDOUT: %WithAssocFn.F.5a8: %WithAssocFn.F.type.233 = struct_value () [concrete] +// CHECK:STDOUT: %WithAssocFn.WithSelf.F.type.836: type = fn_type @WithAssocFn.WithSelf.F, @WithAssocFn(%C, %Self.629) [symbolic] +// CHECK:STDOUT: %WithAssocFn.WithSelf.F.a5a: %WithAssocFn.WithSelf.F.type.836 = struct_value () [symbolic] // CHECK:STDOUT: %WithAssocFn.assoc_type.cc0: type = assoc_entity_type @WithAssocFn, @WithAssocFn(%C) [concrete] -// CHECK:STDOUT: %assoc0.28f: %WithAssocFn.assoc_type.cc0 = assoc_entity element0, @WithAssocFn.%WithAssocFn.F.decl [concrete] +// CHECK:STDOUT: %assoc0.50d: %WithAssocFn.assoc_type.cc0 = assoc_entity element0, @WithAssocFn.%WithAssocFn.WithSelf.F.decl [concrete] // CHECK:STDOUT: %C.as.WithAssocFn.impl.F.type: type = fn_type @C.as.WithAssocFn.impl.F [concrete] // CHECK:STDOUT: %C.as.WithAssocFn.impl.F: %C.as.WithAssocFn.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %WithAssocFn.facet: %WithAssocFn.type.19d = facet_value %C, (%WithAssocFn.impl_witness) [concrete] +// CHECK:STDOUT: %WithAssocFn.WithSelf.F.type.a47: type = fn_type @WithAssocFn.WithSelf.F, @WithAssocFn(%C, %WithAssocFn.facet) [concrete] +// CHECK:STDOUT: %WithAssocFn.WithSelf.F.975: %WithAssocFn.WithSelf.F.type.a47 = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %X.val: %X = struct_value () [concrete] // CHECK:STDOUT: %N: %T.67d = symbolic_binding N, 1 [symbolic] @@ -199,6 +202,7 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc4_28.1: @Simple.%Simple.type (%Simple.type.e29) = symbolic_binding Self, 1 [symbolic = %Self.loc4_28.2 (constants.%Self.862)] +// CHECK:STDOUT: interface_with_self_decl @Simple [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_28.1 @@ -212,16 +216,15 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: %T.loc8_23.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_23.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %WithAssocFn.type: type = facet_type <@WithAssocFn, @WithAssocFn(%T.loc8_23.1)> [symbolic = %WithAssocFn.type (constants.%WithAssocFn.type.d36)] -// CHECK:STDOUT: %Self.loc8_33.2: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.d36) = symbolic_binding Self, 1 [symbolic = %Self.loc8_33.2 (constants.%Self.629)] -// CHECK:STDOUT: %WithAssocFn.F.type: type = fn_type @WithAssocFn.F, @WithAssocFn(%T.loc8_23.1) [symbolic = %WithAssocFn.F.type (constants.%WithAssocFn.F.type.b86)] -// CHECK:STDOUT: %WithAssocFn.F: @WithAssocFn.%WithAssocFn.F.type (%WithAssocFn.F.type.b86) = struct_value () [symbolic = %WithAssocFn.F (constants.%WithAssocFn.F.c8d)] -// CHECK:STDOUT: %WithAssocFn.assoc_type: type = assoc_entity_type @WithAssocFn, @WithAssocFn(%T.loc8_23.1) [symbolic = %WithAssocFn.assoc_type (constants.%WithAssocFn.assoc_type.b93)] -// CHECK:STDOUT: %assoc0.loc10_14.2: @WithAssocFn.%WithAssocFn.assoc_type (%WithAssocFn.assoc_type.b93) = assoc_entity element0, %WithAssocFn.F.decl [symbolic = %assoc0.loc10_14.2 (constants.%assoc0.62d)] +// CHECK:STDOUT: %WithAssocFn.type.loc8: type = facet_type <@WithAssocFn, @WithAssocFn(%T.loc8_23.1)> [symbolic = %WithAssocFn.type.loc8 (constants.%WithAssocFn.type.d36)] +// CHECK:STDOUT: %Self.loc8_33.2: @WithAssocFn.%WithAssocFn.type.loc8 (%WithAssocFn.type.d36) = symbolic_binding Self, 1 [symbolic = %Self.loc8_33.2 (constants.%Self.629)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc8_33.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.d36) = symbolic_binding Self, 1 [symbolic = %Self.loc8_33.2 (constants.%Self.629)] -// CHECK:STDOUT: %WithAssocFn.F.decl: @WithAssocFn.%WithAssocFn.F.type (%WithAssocFn.F.type.b86) = fn_decl @WithAssocFn.F [symbolic = @WithAssocFn.%WithAssocFn.F (constants.%WithAssocFn.F.c8d)] { +// CHECK:STDOUT: %Self.loc8_33.1: @WithAssocFn.%WithAssocFn.type.loc8 (%WithAssocFn.type.d36) = symbolic_binding Self, 1 [symbolic = %Self.loc8_33.2 (constants.%Self.629)] +// CHECK:STDOUT: interface_with_self_decl @WithAssocFn [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %WithAssocFn.WithSelf.F.decl: @WithAssocFn.%WithAssocFn.WithSelf.F.type (%WithAssocFn.WithSelf.F.type.6c9) = fn_decl @WithAssocFn.WithSelf.F [symbolic = @WithAssocFn.%WithAssocFn.WithSelf.F (constants.%WithAssocFn.WithSelf.F.6d9)] { // CHECK:STDOUT: %return.patt: %pattern_type.05f = return_slot_pattern [concrete] // CHECK:STDOUT: %return.param_patt: %pattern_type.05f = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { @@ -230,13 +233,14 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: %return.param: ref %X = out_param call_param0 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc10_14.1: @WithAssocFn.%WithAssocFn.assoc_type (%WithAssocFn.assoc_type.b93) = assoc_entity element0, %WithAssocFn.F.decl [symbolic = %assoc0.loc10_14.2 (constants.%assoc0.62d)] +// CHECK:STDOUT: %assoc0.loc10_14.1: @WithAssocFn.%WithAssocFn.assoc_type (%WithAssocFn.assoc_type.b93) = assoc_entity element0, %WithAssocFn.WithSelf.F.decl [symbolic = %assoc0.loc10_14.2 (constants.%assoc0.395)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc8_33.1 // CHECK:STDOUT: .X = +// CHECK:STDOUT: .X = // CHECK:STDOUT: .F = %assoc0.loc10_14.1 -// CHECK:STDOUT: witness = (%WithAssocFn.F.decl) +// CHECK:STDOUT: witness = (%WithAssocFn.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -309,7 +313,7 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: .X = // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @WithAssocFn.F(@WithAssocFn.%T.loc8_23.2: type, @WithAssocFn.%Self.loc8_33.1: @WithAssocFn.%WithAssocFn.type (%WithAssocFn.type.d36)) { +// CHECK:STDOUT: generic fn @WithAssocFn.WithSelf.F(@WithAssocFn.%T.loc8_23.2: type, @WithAssocFn.%Self.loc8_33.1: @WithAssocFn.%WithAssocFn.type.loc8 (%WithAssocFn.type.d36)) { // CHECK:STDOUT: fn() -> out %return.param: %X; // CHECK:STDOUT: } // CHECK:STDOUT: @@ -352,11 +356,15 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: %T.loc4_18.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Simple(constants.%T.67d, constants.%Self.862) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @WithAssocFn(constants.%T.67d) { // CHECK:STDOUT: %T.loc8_23.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @WithAssocFn.F(constants.%T.67d, constants.%Self.629) {} +// CHECK:STDOUT: specific @WithAssocFn(constants.%T.67d, constants.%Self.629) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @WithAssocFn.WithSelf.F(constants.%T.67d, constants.%Self.629) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @Simple(constants.%C) { // CHECK:STDOUT: %T.loc4_18.1 => constants.%C @@ -366,19 +374,45 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: %Self.loc4_28.2 => constants.%Self.0b4 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Simple(constants.%C, constants.%Self.862) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Simple(constants.%C, constants.%Simple.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @WithAssocFn(constants.%C) { // CHECK:STDOUT: %T.loc8_23.1 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %WithAssocFn.type => constants.%WithAssocFn.type.19d +// CHECK:STDOUT: %WithAssocFn.type.loc8 => constants.%WithAssocFn.type.19d // CHECK:STDOUT: %Self.loc8_33.2 => constants.%Self.63e -// CHECK:STDOUT: %WithAssocFn.F.type => constants.%WithAssocFn.F.type.233 -// CHECK:STDOUT: %WithAssocFn.F => constants.%WithAssocFn.F.5a8 -// CHECK:STDOUT: %WithAssocFn.assoc_type => constants.%WithAssocFn.assoc_type.cc0 -// CHECK:STDOUT: %assoc0.loc10_14.2 => constants.%assoc0.28f // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @WithAssocFn.F(constants.%C, constants.%WithAssocFn.facet) {} +// CHECK:STDOUT: specific @WithAssocFn(constants.%C, constants.%Self.629) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc10 => constants.%C +// CHECK:STDOUT: %WithAssocFn.type.loc10 => constants.%WithAssocFn.type.19d +// CHECK:STDOUT: %Self.loc10 => constants.%Self.629 +// CHECK:STDOUT: %WithAssocFn.WithSelf.F.type => constants.%WithAssocFn.WithSelf.F.type.836 +// CHECK:STDOUT: %WithAssocFn.WithSelf.F => constants.%WithAssocFn.WithSelf.F.a5a +// CHECK:STDOUT: %WithAssocFn.assoc_type => constants.%WithAssocFn.assoc_type.cc0 +// CHECK:STDOUT: %assoc0.loc10_14.2 => constants.%assoc0.50d +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @WithAssocFn(constants.%C, constants.%WithAssocFn.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc10 => constants.%C +// CHECK:STDOUT: %WithAssocFn.type.loc10 => constants.%WithAssocFn.type.19d +// CHECK:STDOUT: %Self.loc10 => constants.%WithAssocFn.facet +// CHECK:STDOUT: %WithAssocFn.WithSelf.F.type => constants.%WithAssocFn.WithSelf.F.type.a47 +// CHECK:STDOUT: %WithAssocFn.WithSelf.F => constants.%WithAssocFn.WithSelf.F.975 +// CHECK:STDOUT: %WithAssocFn.assoc_type => constants.%WithAssocFn.assoc_type.cc0 +// CHECK:STDOUT: %assoc0.loc10_14.2 => constants.%assoc0.50d +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @WithAssocFn.WithSelf.F(constants.%C, constants.%WithAssocFn.facet) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @WithImplicitArgs(constants.%T.67d, constants.%N) { // CHECK:STDOUT: %T.loc22_28.1 => constants.%T.67d @@ -474,6 +508,7 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc4_29.1: @Generic.%Generic.type (%Generic.type.03d) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self.15d)] +// CHECK:STDOUT: interface_with_self_decl @Generic [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_29.1 @@ -524,6 +559,8 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: %T.loc4_19.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic(constants.%T.67d, constants.%Self.15d) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @Generic(constants.%A) { // CHECK:STDOUT: %T.loc4_19.1 => constants.%A // CHECK:STDOUT: } @@ -544,6 +581,10 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: %T.loc10_6.1 => constants.%T.3ee // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic(constants.%B, constants.%Self.15d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_args_count_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -594,6 +635,7 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc3_29.1: @Generic.%Generic.type (%Generic.type.03d) = symbolic_binding Self, 1 [symbolic = %Self.loc3_29.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @Generic [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc3_29.1 @@ -616,5 +658,7 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: %T.loc3_19.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Generic(constants.%T, constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @F() {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon b/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon index c957034af818..2b76c9cc3319 100644 --- a/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon +++ b/toolchain/check/testdata/interface/generic_binding_after_assoc_const.carbon @@ -29,14 +29,14 @@ interface I { // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %T: type = symbolic_binding T, 1 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type type [concrete] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F: %I.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%U [concrete] -// CHECK:STDOUT: %I.G.type: type = fn_type @I.G [concrete] -// CHECK:STDOUT: %I.G: %I.G.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.%I.G.decl [concrete] +// CHECK:STDOUT: %I.WithSelf.G.type: type = fn_type @I.WithSelf.G, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.G: %I.WithSelf.G.type = struct_value () [symbolic] +// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.%I.WithSelf.G.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -47,58 +47,57 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { +// CHECK:STDOUT: %Self.loc15: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F)] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc16_8.2: type = symbolic_binding T, 1 [symbolic = %T.loc16_8.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] { // CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%U [concrete = constants.%assoc1] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.G.decl: %I.G.type = fn_decl @I.G [concrete = constants.%I.G] { +// CHECK:STDOUT: %I.WithSelf.G.decl: @I.%I.WithSelf.G.type (%I.WithSelf.G.type) = fn_decl @I.WithSelf.G [symbolic = @I.%I.WithSelf.G (constants.%I.WithSelf.G)] { // CHECK:STDOUT: %T.patt: %pattern_type = symbolic_binding_pattern T, 1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %T.loc20_8.2: type = symbolic_binding T, 1 [symbolic = %T.loc20_8.1 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, %I.G.decl [concrete = constants.%assoc2] +// CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, %I.WithSelf.G.decl [concrete = constants.%assoc2] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: .U = @U.%assoc1 // CHECK:STDOUT: .G = %assoc2 -// CHECK:STDOUT: witness = (%I.F.decl, %U, %I.G.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl, %U, %I.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @U(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const U:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type, %T.loc16_8.2: type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc15: %I.type, %T.loc16_8.2: type) { // CHECK:STDOUT: %T.loc16_8.1: type = symbolic_binding T, 1 [symbolic = %T.loc16_8.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.G(@I.%Self: %I.type, %T.loc20_8.2: type) { +// CHECK:STDOUT: generic fn @I.WithSelf.G(@I.%Self.loc15: %I.type, %T.loc20_8.2: type) { // CHECK:STDOUT: %T.loc20_8.1: type = symbolic_binding T, 1 [symbolic = %T.loc20_8.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self, constants.%T) { +// CHECK:STDOUT: specific @I(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self, constants.%T) { // CHECK:STDOUT: %T.loc16_8.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @U(constants.%Self) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @I.G(constants.%Self, constants.%T) { +// CHECK:STDOUT: specific @I.WithSelf.G(constants.%Self, constants.%T) { // CHECK:STDOUT: %T.loc20_8.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_import.carbon b/toolchain/check/testdata/interface/generic_import.carbon index d6af7aa265b7..2d9382534a5a 100644 --- a/toolchain/check/testdata/interface/generic_import.carbon +++ b/toolchain/check/testdata/interface/generic_import.carbon @@ -42,10 +42,10 @@ impl C as AddWith(C) { // CHECK:STDOUT: %AddWith.generic: %AddWith.type.d53 = struct_value () [concrete] // CHECK:STDOUT: %AddWith.type.265: type = facet_type <@AddWith, @AddWith(%T)> [symbolic] // CHECK:STDOUT: %Self: %AddWith.type.265 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %AddWith.F.type: type = fn_type @AddWith.F, @AddWith(%T) [symbolic] -// CHECK:STDOUT: %AddWith.F: %AddWith.F.type = struct_value () [symbolic] +// CHECK:STDOUT: %AddWith.WithSelf.F.type: type = fn_type @AddWith.WithSelf.F, @AddWith(%T, %Self) [symbolic] +// CHECK:STDOUT: %AddWith.WithSelf.F: %AddWith.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %AddWith.assoc_type: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic] -// CHECK:STDOUT: %assoc0: %AddWith.assoc_type = assoc_entity element0, @AddWith.%AddWith.F.decl [symbolic] +// CHECK:STDOUT: %assoc0: %AddWith.assoc_type = assoc_entity element0, @AddWith.%AddWith.WithSelf.F.decl [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -64,28 +64,27 @@ impl C as AddWith(C) { // CHECK:STDOUT: %T.loc4_19.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_19.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T.loc4_19.1)> [symbolic = %AddWith.type (constants.%AddWith.type.265)] -// CHECK:STDOUT: %Self.loc4_29.2: @AddWith.%AddWith.type (%AddWith.type.265) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self)] -// CHECK:STDOUT: %AddWith.F.type: type = fn_type @AddWith.F, @AddWith(%T.loc4_19.1) [symbolic = %AddWith.F.type (constants.%AddWith.F.type)] -// CHECK:STDOUT: %AddWith.F: @AddWith.%AddWith.F.type (%AddWith.F.type) = struct_value () [symbolic = %AddWith.F (constants.%AddWith.F)] -// CHECK:STDOUT: %AddWith.assoc_type: type = assoc_entity_type @AddWith, @AddWith(%T.loc4_19.1) [symbolic = %AddWith.assoc_type (constants.%AddWith.assoc_type)] -// CHECK:STDOUT: %assoc0.loc5_9.2: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type) = assoc_entity element0, %AddWith.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0)] +// CHECK:STDOUT: %AddWith.type.loc4: type = facet_type <@AddWith, @AddWith(%T.loc4_19.1)> [symbolic = %AddWith.type.loc4 (constants.%AddWith.type.265)] +// CHECK:STDOUT: %Self.loc4_29.2: @AddWith.%AddWith.type.loc4 (%AddWith.type.265) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_29.1: @AddWith.%AddWith.type (%AddWith.type.265) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self)] -// CHECK:STDOUT: %AddWith.F.decl: @AddWith.%AddWith.F.type (%AddWith.F.type) = fn_decl @AddWith.F [symbolic = @AddWith.%AddWith.F (constants.%AddWith.F)] {} {} -// CHECK:STDOUT: %assoc0.loc5_9.1: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type) = assoc_entity element0, %AddWith.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0)] +// CHECK:STDOUT: %Self.loc4_29.1: @AddWith.%AddWith.type.loc4 (%AddWith.type.265) = symbolic_binding Self, 1 [symbolic = %Self.loc4_29.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @AddWith [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %AddWith.WithSelf.F.decl: @AddWith.%AddWith.WithSelf.F.type (%AddWith.WithSelf.F.type) = fn_decl @AddWith.WithSelf.F [symbolic = @AddWith.%AddWith.WithSelf.F (constants.%AddWith.WithSelf.F)] {} {} +// CHECK:STDOUT: %assoc0.loc5_9.1: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type) = assoc_entity element0, %AddWith.WithSelf.F.decl [symbolic = %assoc0.loc5_9.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_29.1 // CHECK:STDOUT: .F = %assoc0.loc5_9.1 -// CHECK:STDOUT: witness = (%AddWith.F.decl) +// CHECK:STDOUT: witness = (%AddWith.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AddWith.F(@AddWith.%T.loc4_19.2: type, @AddWith.%Self.loc4_29.1: @AddWith.%AddWith.type (%AddWith.type.265)) { +// CHECK:STDOUT: generic fn @AddWith.WithSelf.F(@AddWith.%T.loc4_19.2: type, @AddWith.%Self.loc4_29.1: @AddWith.%AddWith.type.loc4 (%AddWith.type.265)) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: @@ -93,7 +92,9 @@ impl C as AddWith(C) { // CHECK:STDOUT: %T.loc4_19.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.F(constants.%T, constants.%Self) {} +// CHECK:STDOUT: specific @AddWith(constants.%T, constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @AddWith.WithSelf.F(constants.%T, constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: @@ -106,31 +107,31 @@ impl C as AddWith(C) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %AddWith.type.265: type = facet_type <@AddWith, @AddWith(%T)> [symbolic] // CHECK:STDOUT: %Self.db2: %AddWith.type.265 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %AddWith.assoc_type.130: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic] -// CHECK:STDOUT: %assoc0.ad5: %AddWith.assoc_type.130 = assoc_entity element0, imports.%Main.import_ref.3ef [symbolic] -// CHECK:STDOUT: %AddWith.F.type.b80: type = fn_type @AddWith.F, @AddWith(%T) [symbolic] -// CHECK:STDOUT: %AddWith.F.349: %AddWith.F.type.b80 = struct_value () [symbolic] +// CHECK:STDOUT: %AddWith.WithSelf.F.type.653: type = fn_type @AddWith.WithSelf.F, @AddWith(%T, %Self.db2) [symbolic] +// CHECK:STDOUT: %AddWith.WithSelf.F.d70: %AddWith.WithSelf.F.type.653 = struct_value () [symbolic] // CHECK:STDOUT: %AddWith.type.47a: type = facet_type <@AddWith, @AddWith(%C)> [concrete] // CHECK:STDOUT: %AddWith.impl_witness: = impl_witness @C.as.AddWith.impl.%AddWith.impl_witness_table [concrete] // CHECK:STDOUT: %Self.58e: %AddWith.type.47a = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %AddWith.F.type.b42: type = fn_type @AddWith.F, @AddWith(%C) [concrete] -// CHECK:STDOUT: %AddWith.F.3d6: %AddWith.F.type.b42 = struct_value () [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.F.type.ad2: type = fn_type @AddWith.WithSelf.F, @AddWith(%C, %Self.db2) [symbolic] +// CHECK:STDOUT: %AddWith.WithSelf.F.260: %AddWith.WithSelf.F.type.ad2 = struct_value () [symbolic] // CHECK:STDOUT: %AddWith.assoc_type.217: type = assoc_entity_type @AddWith, @AddWith(%C) [concrete] -// CHECK:STDOUT: %assoc0.c17: %AddWith.assoc_type.217 = assoc_entity element0, imports.%Main.import_ref.3ef [concrete] +// CHECK:STDOUT: %assoc0.921: %AddWith.assoc_type.217 = assoc_entity element0, imports.%Main.import_ref.663 [concrete] // CHECK:STDOUT: %C.as.AddWith.impl.F.type: type = fn_type @C.as.AddWith.impl.F [concrete] // CHECK:STDOUT: %C.as.AddWith.impl.F: %C.as.AddWith.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %AddWith.facet: %AddWith.type.47a = facet_value %C, (%AddWith.impl_witness) [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.F.type.858: type = fn_type @AddWith.WithSelf.F, @AddWith(%C, %AddWith.facet) [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.F.e0b: %AddWith.WithSelf.F.type.858 = struct_value () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.AddWith: %AddWith.type.d53 = import_ref Main//a, AddWith, loaded [concrete = constants.%AddWith.generic] +// CHECK:STDOUT: %Main.import_ref.1c3 = import_ref Main//a, loc5_9, unloaded +// CHECK:STDOUT: %Main.F: @AddWith.%AddWith.WithSelf.F.type (%AddWith.WithSelf.F.type.653) = import_ref Main//a, F, loaded [symbolic = @AddWith.%AddWith.WithSelf.F (constants.%AddWith.WithSelf.F.d70)] +// CHECK:STDOUT: %Main.import_ref.663 = import_ref Main//a, loc5_9, unloaded +// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//a, loc4_19, loaded [symbolic = @AddWith.%T.1 (constants.%T)] +// CHECK:STDOUT: %Main.import_ref.cb13aa.2: @AddWith.%AddWith.type.1 (%AddWith.type.265) = import_ref Main//a, loc4_29, loaded [symbolic = @AddWith.%Self.1 (constants.%Self.db2)] // CHECK:STDOUT: %Main.import_ref.367 = import_ref Main//a, loc4_29, unloaded -// CHECK:STDOUT: %Main.import_ref.f21 = import_ref Main//a, loc5_9, unloaded -// CHECK:STDOUT: %Main.F: @AddWith.%AddWith.F.type (%AddWith.F.type.b80) = import_ref Main//a, F, loaded [symbolic = @AddWith.%AddWith.F (constants.%AddWith.F.349)] -// CHECK:STDOUT: %Main.import_ref.b3bc94.1: type = import_ref Main//a, loc4_19, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.3ef = import_ref Main//a, loc5_9, unloaded -// CHECK:STDOUT: %Main.import_ref.b3bc94.2: type = import_ref Main//a, loc4_19, loaded [symbolic = @AddWith.%T (constants.%T)] -// CHECK:STDOUT: %Main.import_ref.cb1: @AddWith.%AddWith.type (%AddWith.type.265) = import_ref Main//a, loc4_29, loaded [symbolic = @AddWith.%Self (constants.%Self.db2)] +// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//a, loc4_19, loaded [symbolic = @AddWith.%T.1 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -148,21 +149,17 @@ impl C as AddWith(C) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @AddWith(imports.%Main.import_ref.b3bc94.1: type) [from "a.carbon"] { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] +// CHECK:STDOUT: generic interface @AddWith(imports.%Main.import_ref.b3bc94.3: type) [from "a.carbon"] { +// CHECK:STDOUT: %T.1: type = symbolic_binding T, 0 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.265)] -// CHECK:STDOUT: %Self: @AddWith.%AddWith.type (%AddWith.type.265) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.db2)] -// CHECK:STDOUT: %AddWith.F.type: type = fn_type @AddWith.F, @AddWith(%T) [symbolic = %AddWith.F.type (constants.%AddWith.F.type.b80)] -// CHECK:STDOUT: %AddWith.F: @AddWith.%AddWith.F.type (%AddWith.F.type.b80) = struct_value () [symbolic = %AddWith.F (constants.%AddWith.F.349)] -// CHECK:STDOUT: %AddWith.assoc_type: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic = %AddWith.assoc_type (constants.%AddWith.assoc_type.130)] -// CHECK:STDOUT: %assoc0: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.130) = assoc_entity element0, imports.%Main.import_ref.3ef [symbolic = %assoc0 (constants.%assoc0.ad5)] +// CHECK:STDOUT: %AddWith.type.1: type = facet_type <@AddWith, @AddWith(%T.1)> [symbolic = %AddWith.type.1 (constants.%AddWith.type.265)] +// CHECK:STDOUT: %Self.1: @AddWith.%AddWith.type.1 (%AddWith.type.265) = symbolic_binding Self, 1 [symbolic = %Self.1 (constants.%Self.db2)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.367 -// CHECK:STDOUT: .F = imports.%Main.import_ref.f21 +// CHECK:STDOUT: .F = imports.%Main.import_ref.1c3 // CHECK:STDOUT: witness = (imports.%Main.F) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -187,7 +184,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @AddWith.F(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.cb1: @AddWith.%AddWith.type (%AddWith.type.265)) [from "a.carbon"] { +// CHECK:STDOUT: generic fn @AddWith.WithSelf.F(imports.%Main.import_ref.b3bc94.2: type, imports.%Main.import_ref.cb13aa.2: @AddWith.%AddWith.type.1 (%AddWith.type.265)) [from "a.carbon"] { // CHECK:STDOUT: fn; // CHECK:STDOUT: } // CHECK:STDOUT: @@ -197,22 +194,42 @@ impl C as AddWith(C) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith(constants.%T) { -// CHECK:STDOUT: %T => constants.%T +// CHECK:STDOUT: %T.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.F(constants.%T, constants.%Self.db2) {} +// CHECK:STDOUT: specific @AddWith(constants.%T, constants.%Self.db2) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @AddWith.WithSelf.F(constants.%T, constants.%Self.db2) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @AddWith(constants.%C) { -// CHECK:STDOUT: %T => constants.%C +// CHECK:STDOUT: %T.1 => constants.%C // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.47a -// CHECK:STDOUT: %Self => constants.%Self.58e -// CHECK:STDOUT: %AddWith.F.type => constants.%AddWith.F.type.b42 -// CHECK:STDOUT: %AddWith.F => constants.%AddWith.F.3d6 -// CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.217 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.c17 +// CHECK:STDOUT: %AddWith.type.1 => constants.%AddWith.type.47a +// CHECK:STDOUT: %Self.1 => constants.%Self.58e // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @AddWith.F(constants.%C, constants.%AddWith.facet) {} +// CHECK:STDOUT: specific @AddWith(constants.%C, constants.%Self.db2) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%C +// CHECK:STDOUT: %AddWith.type.2 => constants.%AddWith.type.47a +// CHECK:STDOUT: %Self.2 => constants.%Self.db2 +// CHECK:STDOUT: %AddWith.WithSelf.F.type => constants.%AddWith.WithSelf.F.type.ad2 +// CHECK:STDOUT: %AddWith.WithSelf.F => constants.%AddWith.WithSelf.F.260 +// CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.217 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.921 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @AddWith(constants.%C, constants.%AddWith.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.2 => constants.%C +// CHECK:STDOUT: %AddWith.type.2 => constants.%AddWith.type.47a +// CHECK:STDOUT: %Self.2 => constants.%AddWith.facet +// CHECK:STDOUT: %AddWith.WithSelf.F.type => constants.%AddWith.WithSelf.F.type.858 +// CHECK:STDOUT: %AddWith.WithSelf.F => constants.%AddWith.WithSelf.F.e0b +// CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.217 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.921 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @AddWith.WithSelf.F(constants.%C, constants.%AddWith.facet) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/generic_method.carbon b/toolchain/check/testdata/interface/generic_method.carbon index 2e48f4bf6ae1..b0203b89e763 100644 --- a/toolchain/check/testdata/interface/generic_method.carbon +++ b/toolchain/check/testdata/interface/generic_method.carbon @@ -104,10 +104,10 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type.762: type = tuple_type (%T.67d, %Self.binding.as_type.7ec, %ptr.8f6) [symbolic] // CHECK:STDOUT: %.de5: Core.Form = init_form %tuple.type.762, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.f66: type = pattern_type %tuple.type.762 [symbolic] -// CHECK:STDOUT: %A.F.type.71b: type = fn_type @A.F, @A(%T.67d) [symbolic] -// CHECK:STDOUT: %A.F.155: %A.F.type.71b = struct_value () [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.type.0ed: type = fn_type @A.WithSelf.F, @A(%T.67d, %Self.362) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.33a: %A.WithSelf.F.type.0ed = struct_value () [symbolic] // CHECK:STDOUT: %A.assoc_type.9f4: type = assoc_entity_type @A, @A(%T.67d) [symbolic] -// CHECK:STDOUT: %assoc0.c2b: %A.assoc_type.9f4 = assoc_entity element0, @A.%A.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.146: %A.assoc_type.9f4 = assoc_entity element0, @A.%A.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] @@ -116,10 +116,10 @@ fn CallIndirect() { // CHECK:STDOUT: %A.type.ab6: type = facet_type <@A, @A(%X)> [concrete] // CHECK:STDOUT: %A.impl_witness: = impl_witness @Y.as.A.impl.%A.impl_witness_table [concrete] // CHECK:STDOUT: %Self.e87: %A.type.ab6 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %A.F.type.49b: type = fn_type @A.F, @A(%X) [concrete] -// CHECK:STDOUT: %A.F.768: %A.F.type.49b = struct_value () [concrete] +// CHECK:STDOUT: %A.WithSelf.F.type.ba2: type = fn_type @A.WithSelf.F, @A(%X, %Self.362) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.e5f: %A.WithSelf.F.type.ba2 = struct_value () [symbolic] // CHECK:STDOUT: %A.assoc_type.f05: type = assoc_entity_type @A, @A(%X) [concrete] -// CHECK:STDOUT: %assoc0.249: %A.assoc_type.f05 = assoc_entity element0, @A.%A.F.decl [concrete] +// CHECK:STDOUT: %assoc0.368: %A.assoc_type.f05 = assoc_entity element0, @A.%A.WithSelf.F.decl [concrete] // CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f8f9.1: type = ptr_type %U.67d [symbolic] // CHECK:STDOUT: %pattern_type.4f4b84.1: type = pattern_type %ptr.e8f8f9.1 [symbolic] @@ -131,6 +131,8 @@ fn CallIndirect() { // CHECK:STDOUT: %Y.as.A.impl.F.type: type = fn_type @Y.as.A.impl.F [concrete] // CHECK:STDOUT: %Y.as.A.impl.F: %Y.as.A.impl.F.type = struct_value () [concrete] // CHECK:STDOUT: %A.facet: %A.type.ab6 = facet_value %Y, (%A.impl_witness) [concrete] +// CHECK:STDOUT: %A.WithSelf.F.type.12f: type = fn_type @A.WithSelf.F, @A(%X, %A.facet) [concrete] +// CHECK:STDOUT: %A.WithSelf.F.48c: %A.WithSelf.F.type.12f = struct_value () [concrete] // CHECK:STDOUT: %tuple.type.f96: type = tuple_type (type, %A.type.ab6, type) [concrete] // CHECK:STDOUT: %tuple.5c5: %tuple.type.f96 = tuple_value (%X, %A.facet, %ptr.e8f8f9.1) [symbolic] // CHECK:STDOUT: %require_complete.ef162c.1: = require_complete_type %ptr.e8f8f9.1 [symbolic] @@ -140,19 +142,19 @@ fn CallIndirect() { // CHECK:STDOUT: %X.val: %X = struct_value () [concrete] // CHECK:STDOUT: %Y.val: %Y = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4455.1: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e93b.1: %ptr.as.Copy.impl.Op.type.2d4455.1 = struct_value () [symbolic] // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.67d) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: = lookup_impl_witness %ptr.e8f8f9.1, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet.c25: %Copy.type = facet_value %ptr.e8f8f9.1, (%Copy.lookup_impl_witness.2e6) [symbolic] -// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c25 [symbolic] -// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b84: = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet.c25) [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.c25) [symbolic] +// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet.c25 [symbolic] +// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.366: = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet.c25) [symbolic] // CHECK:STDOUT: %Call.type: type = fn_type @Call [concrete] // CHECK:STDOUT: %Call: %Call.type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.bdb: type = pattern_type %Z [concrete] -// CHECK:STDOUT: %.900: type = fn_type_with_self_type %A.F.type.49b, %A.facet [concrete] +// CHECK:STDOUT: %.de2: type = fn_type_with_self_type %A.WithSelf.F.type.12f, %A.facet [concrete] // CHECK:STDOUT: %ptr.2a0: type = ptr_type %Z [concrete] // CHECK:STDOUT: %pattern_type.771: type = pattern_type %ptr.2a0 [concrete] // CHECK:STDOUT: %tuple.84f: %tuple.type.ff9 = tuple_value (%X, %Y, %ptr.2a0) [concrete] @@ -161,33 +163,36 @@ fn CallIndirect() { // CHECK:STDOUT: %pattern_type.79c: type = pattern_type %tuple.type.847 [concrete] // CHECK:STDOUT: %Y.as.A.impl.F.specific_fn: = specific_function %Y.as.A.impl.F, @Y.as.A.impl.F(%Z) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc23 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.8095d9.1: = custom_witness (%DestroyOp.b0ebf8.1), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.19e: %Destroy.type = facet_value %tuple.type.847, (%custom_witness.8095d9.1) [concrete] -// CHECK:STDOUT: %.b61: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.19e [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.07c: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.19e) [concrete] +// CHECK:STDOUT: %.031: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.07c, %Destroy.facet.19e [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc22 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.2: %DestroyOp.type.3e79c2.2 = struct_value () [concrete] // CHECK:STDOUT: %T.2bc: %A.type.ab6 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.143: type = pattern_type %A.type.ab6 [concrete] // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete] // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete] +// CHECK:STDOUT: %A.WithSelf.F.type.f08: type = fn_type @A.WithSelf.F, @A(%X, %T.2bc) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.7ad: %A.WithSelf.F.type.f08 = struct_value () [symbolic] // CHECK:STDOUT: %T.binding.as_type.3d0: type = symbolic_binding_type T, 0, %T.2bc [symbolic] // CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.2bc, @A, @A(%X) [symbolic] -// CHECK:STDOUT: %.ede: type = fn_type_with_self_type %A.F.type.49b, %T.2bc [symbolic] -// CHECK:STDOUT: %impl.elem0.f12: %.ede = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %.189: type = fn_type_with_self_type %A.WithSelf.F.type.f08, %T.2bc [symbolic] +// CHECK:STDOUT: %impl.elem0.86f8: %.189 = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %tuple.d24: %tuple.type.f96 = tuple_value (%X, %T.2bc, %ptr.2a0) [symbolic] // CHECK:STDOUT: %tuple.type.a50: type = tuple_type (%X, %T.binding.as_type.3d0, %ptr.2a0) [symbolic] // CHECK:STDOUT: %.e88: Core.Form = init_form %tuple.type.a50, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.160: type = pattern_type %tuple.type.a50 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.f8c: = specific_impl_function %impl.elem0.f12, @A.F(%X, %T.2bc, %Z) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.44b: = specific_impl_function %impl.elem0.86f8, @A.WithSelf.F(%X, %T.2bc, %Z) [symbolic] // CHECK:STDOUT: %require_complete.8fa: = require_complete_type %tuple.type.a50 [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %tuple.type.a50, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.df5: %Destroy.type = facet_value %tuple.type.a50, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.e15: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.df5 [symbolic] -// CHECK:STDOUT: %impl.elem0.94c: %.e15 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.348: = specific_impl_function %impl.elem0.94c, @Destroy.Op(%Destroy.facet.df5) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.707: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.df5) [symbolic] +// CHECK:STDOUT: %.11e: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.707, %Destroy.facet.df5 [symbolic] +// CHECK:STDOUT: %impl.elem0.853: %.11e = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.8a5: = specific_impl_function %impl.elem0.853, @Destroy.WithSelf.Op(%Destroy.facet.df5) [symbolic] // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete] // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete] // CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric, @CallGeneric(%A.facet) [concrete] @@ -199,7 +204,8 @@ fn CallIndirect() { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.7d1: %ptr.as.Copy.impl.Op.type.505 = struct_value () [concrete] // CHECK:STDOUT: %.157: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%Z) [concrete] // CHECK:STDOUT: %Copy.facet.26e: %Copy.type = facet_value %ptr.2a0, (%Copy.impl_witness.425) [concrete] -// CHECK:STDOUT: %.51f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.26e [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.a8b: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.26e) [concrete] +// CHECK:STDOUT: %.2ef: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a8b, %Copy.facet.26e [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.7d1, @ptr.as.Copy.impl.Op(%Z) [concrete] // CHECK:STDOUT: %tuple.6cd: %tuple.type.f96 = tuple_value (%X, %A.facet, %ptr.2a0) [concrete] // CHECK:STDOUT: } @@ -263,50 +269,50 @@ fn CallIndirect() { // CHECK:STDOUT: %T.loc5_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc5_13.1)> [symbolic = %A.type (constants.%A.type.ade)] -// CHECK:STDOUT: %Self.loc5_23.2: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)] -// CHECK:STDOUT: %A.F.type: type = fn_type @A.F, @A(%T.loc5_13.1) [symbolic = %A.F.type (constants.%A.F.type.71b)] -// CHECK:STDOUT: %A.F: @A.%A.F.type (%A.F.type.71b) = struct_value () [symbolic = %A.F (constants.%A.F.155)] -// CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A, @A(%T.loc5_13.1) [symbolic = %A.assoc_type (constants.%A.assoc_type.9f4)] -// CHECK:STDOUT: %assoc0.loc6_41.2: @A.%A.assoc_type (%A.assoc_type.9f4) = assoc_entity element0, %A.F.decl [symbolic = %assoc0.loc6_41.2 (constants.%assoc0.c2b)] +// CHECK:STDOUT: %A.type.loc5: type = facet_type <@A, @A(%T.loc5_13.1)> [symbolic = %A.type.loc5 (constants.%A.type.ade)] +// CHECK:STDOUT: %Self.loc5_23.2: @A.%A.type.loc5 (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc5_23.1: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)] -// CHECK:STDOUT: %A.F.decl: @A.%A.F.type (%A.F.type.71b) = fn_decl @A.F [symbolic = @A.%A.F (constants.%A.F.155)] { +// CHECK:STDOUT: %Self.loc5_23.1: @A.%A.type.loc5 (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %A.WithSelf.F.decl: @A.%A.WithSelf.F.type (%A.WithSelf.F.type.0ed) = fn_decl @A.WithSelf.F [symbolic = @A.%A.WithSelf.F (constants.%A.WithSelf.F.33a)] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 2 [concrete] -// CHECK:STDOUT: %u.patt: @A.F.%pattern_type.loc6_18 (%pattern_type.986) = value_binding_pattern u [concrete] -// CHECK:STDOUT: %u.param_patt: @A.F.%pattern_type.loc6_18 (%pattern_type.986) = value_param_pattern %u.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @A.F.%pattern_type.loc6_25 (%pattern_type.f66) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @A.F.%pattern_type.loc6_25 (%pattern_type.f66) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %u.patt: @A.WithSelf.F.%pattern_type.loc6_18 (%pattern_type.986) = value_binding_pattern u [concrete] +// CHECK:STDOUT: %u.param_patt: @A.WithSelf.F.%pattern_type.loc6_18 (%pattern_type.986) = value_param_pattern %u.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @A.WithSelf.F.%pattern_type.loc6_25 (%pattern_type.f66) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @A.WithSelf.F.%pattern_type.loc6_25 (%pattern_type.f66) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_13.2 [symbolic = %T (constants.%T.67d)] -// CHECK:STDOUT: %.loc6_32: @A.F.%A.type (%A.type.ade) = specific_constant @A.%Self.loc5_23.1, @A(constants.%T.67d) [symbolic = %Self (constants.%Self.362)] -// CHECK:STDOUT: %Self.ref: @A.F.%A.type (%A.type.ade) = name_ref Self, %.loc6_32 [symbolic = %Self (constants.%Self.362)] +// CHECK:STDOUT: %.loc6_32: @A.WithSelf.F.%A.type (%A.type.ade) = specific_constant @A.%Self.loc5_23.1, @A(constants.%T.67d) [symbolic = %Self (constants.%Self.362)] +// CHECK:STDOUT: %Self.ref: @A.WithSelf.F.%A.type (%A.type.ade) = name_ref Self, %.loc6_32 [symbolic = %Self (constants.%Self.362)] // CHECK:STDOUT: %U.ref.loc6_38: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)] // CHECK:STDOUT: %ptr.loc6_39: type = ptr_type %U.ref.loc6_38 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)] -// CHECK:STDOUT: %.loc6_40.2: @A.F.%tuple.type.loc6_40.1 (%tuple.type.f2d) = tuple_literal (%T.ref, %Self.ref, %ptr.loc6_39) [symbolic = %tuple (constants.%tuple.2c7)] +// CHECK:STDOUT: %.loc6_40.2: @A.WithSelf.F.%tuple.type.loc6_40.1 (%tuple.type.f2d) = tuple_literal (%T.ref, %Self.ref, %ptr.loc6_39) [symbolic = %tuple (constants.%tuple.2c7)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type constants.%Self.362 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)] // CHECK:STDOUT: %.loc6_40.3: type = converted constants.%Self.362, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)] // CHECK:STDOUT: %.loc6_40.4: type = converted %.loc6_40.2, constants.%tuple.type.762 [symbolic = %tuple.type.loc6_40.2 (constants.%tuple.type.762)] // CHECK:STDOUT: %.loc6_40.5: Core.Form = init_form %.loc6_40.4, call_param1 [symbolic = %.loc6_40.1 (constants.%.de5)] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc6_8.2: type = symbolic_binding U, 2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)] -// CHECK:STDOUT: %u.param: @A.F.%ptr.loc6_22.1 (%ptr.8f6) = value_param call_param0 +// CHECK:STDOUT: %u.param: @A.WithSelf.F.%ptr.loc6_22.1 (%ptr.8f6) = value_param call_param0 // CHECK:STDOUT: %.loc6_22: type = splice_block %ptr.loc6_22.2 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)] { // CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)] // CHECK:STDOUT: %ptr.loc6_22.2: type = ptr_type %U.ref.loc6_21 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)] // CHECK:STDOUT: } -// CHECK:STDOUT: %u: @A.F.%ptr.loc6_22.1 (%ptr.8f6) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @A.F.%tuple.type.loc6_40.2 (%tuple.type.762) = out_param call_param1 -// CHECK:STDOUT: %return: ref @A.F.%tuple.type.loc6_40.2 (%tuple.type.762) = return_slot %return.param +// CHECK:STDOUT: %u: @A.WithSelf.F.%ptr.loc6_22.1 (%ptr.8f6) = value_binding u, %u.param +// CHECK:STDOUT: %return.param: ref @A.WithSelf.F.%tuple.type.loc6_40.2 (%tuple.type.762) = out_param call_param1 +// CHECK:STDOUT: %return: ref @A.WithSelf.F.%tuple.type.loc6_40.2 (%tuple.type.762) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc6_41.1: @A.%A.assoc_type (%A.assoc_type.9f4) = assoc_entity element0, %A.F.decl [symbolic = %assoc0.loc6_41.2 (constants.%assoc0.c2b)] +// CHECK:STDOUT: %assoc0.loc6_41.1: @A.%A.assoc_type (%A.assoc_type.9f4) = assoc_entity element0, %A.WithSelf.F.decl [symbolic = %assoc0.loc6_41.2 (constants.%assoc0.146)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc5_23.1 // CHECK:STDOUT: .T = +// CHECK:STDOUT: .T = // CHECK:STDOUT: .F = %assoc0.loc6_41.1 -// CHECK:STDOUT: witness = (%A.F.decl) +// CHECK:STDOUT: witness = (%A.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -372,21 +378,21 @@ fn CallIndirect() { // CHECK:STDOUT: .Self = constants.%Z // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @A.F(@A.%T.loc5_13.2: type, @A.%Self.loc5_23.1: @A.%A.type (%A.type.ade), %U.loc6_8.2: type) { +// CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%T.loc5_13.2: type, @A.%Self.loc5_23.1: @A.%A.type.loc5 (%A.type.ade), %U.loc6_8.2: type) { // CHECK:STDOUT: %U.loc6_8.1: type = symbolic_binding U, 2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)] // CHECK:STDOUT: %ptr.loc6_22.1: type = ptr_type %U.loc6_8.1 [symbolic = %ptr.loc6_22.1 (constants.%ptr.8f6)] // CHECK:STDOUT: %pattern_type.loc6_18: type = pattern_type %ptr.loc6_22.1 [symbolic = %pattern_type.loc6_18 (constants.%pattern_type.986)] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T)> [symbolic = %A.type (constants.%A.type.ade)] -// CHECK:STDOUT: %Self: @A.F.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.362)] +// CHECK:STDOUT: %Self: @A.WithSelf.F.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.362)] // CHECK:STDOUT: %tuple.type.loc6_40.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_40.1 (constants.%tuple.type.f2d)] -// CHECK:STDOUT: %tuple: @A.F.%tuple.type.loc6_40.1 (%tuple.type.f2d) = tuple_value (%T, %Self, %ptr.loc6_22.1) [symbolic = %tuple (constants.%tuple.2c7)] +// CHECK:STDOUT: %tuple: @A.WithSelf.F.%tuple.type.loc6_40.1 (%tuple.type.f2d) = tuple_value (%T, %Self, %ptr.loc6_22.1) [symbolic = %tuple (constants.%tuple.2c7)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)] // CHECK:STDOUT: %tuple.type.loc6_40.2: type = tuple_type (%T, %Self.binding.as_type, %ptr.loc6_22.1) [symbolic = %tuple.type.loc6_40.2 (constants.%tuple.type.762)] // CHECK:STDOUT: %.loc6_40.1: Core.Form = init_form %tuple.type.loc6_40.2, call_param1 [symbolic = %.loc6_40.1 (constants.%.de5)] // CHECK:STDOUT: %pattern_type.loc6_25: type = pattern_type %tuple.type.loc6_40.2 [symbolic = %pattern_type.loc6_25 (constants.%pattern_type.f66)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @A.F.%ptr.loc6_22.1 (%ptr.8f6)) -> out %return.param: @A.F.%tuple.type.loc6_40.2 (%tuple.type.762); +// CHECK:STDOUT: fn(%u.param: @A.WithSelf.F.%ptr.loc6_22.1 (%ptr.8f6)) -> out %return.param: @A.WithSelf.F.%tuple.type.loc6_40.2 (%tuple.type.762); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Y.as.A.impl.F(%U.loc16_8.2: type) { @@ -405,9 +411,10 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc17_21.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc16_8.1) [symbolic = %.loc17_21.1 (constants.%.2f2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_22.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc16_22.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.c25)] -// CHECK:STDOUT: %.loc17_21.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc17_21.2 (constants.%.b46)] -// CHECK:STDOUT: %impl.elem0.loc17_21.2: @Y.as.A.impl.F.%.loc17_21.2 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.201)] -// CHECK:STDOUT: %specific_impl_fn.loc17_21.2: = specific_impl_function %impl.elem0.loc17_21.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d82)] +// CHECK:STDOUT: %.loc17_21.2: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc17_21.2 (constants.%.299)] +// CHECK:STDOUT: %impl.elem0.loc17_21.2: @Y.as.A.impl.F.%.loc17_21.2 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.1c7)] +// CHECK:STDOUT: %specific_impl_fn.loc17_21.2: = specific_impl_function %impl.elem0.loc17_21.2, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%u.param: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1)) -> out %return.param: @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.244) { // CHECK:STDOUT: !entry: @@ -421,13 +428,13 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.elem1: ref %Y = tuple_access %return.param, element1 // CHECK:STDOUT: %.loc17_18.2: init %Y to %tuple.elem1 = class_init () [concrete = constants.%Y.val] // CHECK:STDOUT: %.loc17_22.3: init %Y = converted %.loc17_18.1, %.loc17_18.2 [concrete = constants.%Y.val] -// CHECK:STDOUT: %impl.elem0.loc17_21.1: @Y.as.A.impl.F.%.loc17_21.2 (%.b46) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.201)] +// CHECK:STDOUT: %impl.elem0.loc17_21.1: @Y.as.A.impl.F.%.loc17_21.2 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.1c7)] // CHECK:STDOUT: %bound_method.loc17_21.1: = bound_method %u.ref, %impl.elem0.loc17_21.1 -// CHECK:STDOUT: %specific_impl_fn.loc17_21.1: = specific_impl_function %impl.elem0.loc17_21.1, @Copy.Op(constants.%Copy.facet.c25) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.b84)] +// CHECK:STDOUT: %specific_impl_fn.loc17_21.1: = specific_impl_function %impl.elem0.loc17_21.1, @Copy.WithSelf.Op(constants.%Copy.facet.c25) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.366)] // CHECK:STDOUT: %bound_method.loc17_21.2: = bound_method %u.ref, %specific_impl_fn.loc17_21.1 -// CHECK:STDOUT: %Copy.Op.call: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = call %bound_method.loc17_21.2(%u.ref) +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = call %bound_method.loc17_21.2(%u.ref) // CHECK:STDOUT: %tuple.elem2: ref @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = tuple_access %return.param, element2 -// CHECK:STDOUT: %.loc17_22.4: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) to %tuple.elem2 = in_place_init %Copy.Op.call +// CHECK:STDOUT: %.loc17_22.4: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) to %tuple.elem2 = in_place_init %Copy.WithSelf.Op.call // CHECK:STDOUT: %.loc17_22.5: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.244) to %return.param = tuple_init (%.loc17_22.2, %.loc17_22.3, %.loc17_22.4) // CHECK:STDOUT: %.loc17_23: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.244) = converted %.loc17_22.1, %.loc17_22.5 // CHECK:STDOUT: return %.loc17_23 to %return.param @@ -451,9 +458,9 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc23_6: %A.type.ab6 = converted %Y.ref, %A.facet [concrete = constants.%A.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc23_6 [concrete = constants.%Y] // CHECK:STDOUT: %.loc23_14.1: type = converted %.loc23_6, %as_type [concrete = constants.%Y] -// CHECK:STDOUT: %.loc23_14.2: %A.assoc_type.f05 = specific_constant @A.%assoc0.loc6_41.1, @A(constants.%X) [concrete = constants.%assoc0.249] -// CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc23_14.2 [concrete = constants.%assoc0.249] -// CHECK:STDOUT: %impl.elem0: %.900 = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%Y.as.A.impl.F] +// CHECK:STDOUT: %.loc23_14.2: %A.assoc_type.f05 = specific_constant @A.%assoc0.loc6_41.1, @A(constants.%X, constants.%A.facet) [concrete = constants.%assoc0.368] +// CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc23_14.2 [concrete = constants.%assoc0.368] +// CHECK:STDOUT: %impl.elem0: %.de2 = impl_witness_access constants.%A.impl_witness, element0 [concrete = constants.%Y.as.A.impl.F] // CHECK:STDOUT: %Z.ref.loc23: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %u.ref: ref %Z = name_ref u, %u // CHECK:STDOUT: %addr: %ptr.2a0 = addr_of %u.ref @@ -478,16 +485,18 @@ fn CallIndirect() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc26_16.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type.3d0)] // CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc26_16.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] -// CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type constants.%A.F.type.49b, %T.loc26_16.1 [symbolic = %.loc28_4.3 (constants.%.ede)] -// CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.ede) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.f12)] -// CHECK:STDOUT: %specific_impl_fn.loc28_4.2: = specific_impl_function %impl.elem0.loc28_4.2, @A.F(constants.%X, %T.loc26_16.1, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.f8c)] +// CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A(constants.%X, %T.loc26_16.1) [symbolic = %A.WithSelf.F.type (constants.%A.WithSelf.F.type.f08)] +// CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type %A.WithSelf.F.type, %T.loc26_16.1 [symbolic = %.loc28_4.3 (constants.%.189)] +// CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.189) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.86f8)] +// CHECK:STDOUT: %specific_impl_fn.loc28_4.2: = specific_impl_function %impl.elem0.loc28_4.2, @A.WithSelf.F(constants.%X, %T.loc26_16.1, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.44b)] // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.binding.as_type, constants.%ptr.2a0) [symbolic = %tuple.type (constants.%tuple.type.a50)] // CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.8fa)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.df5)] -// CHECK:STDOUT: %.loc28_12.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.3 (constants.%.e15)] -// CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.3 (%.e15) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.94c)] -// CHECK:STDOUT: %specific_impl_fn.loc28_12.2: = specific_impl_function %impl.elem0.loc28_12.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.348)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.707)] +// CHECK:STDOUT: %.loc28_12.3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc28_12.3 (constants.%.11e)] +// CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.3 (%.11e) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.853)] +// CHECK:STDOUT: %specific_impl_fn.loc28_12.2: = specific_impl_function %impl.elem0.loc28_12.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.8a5)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: @@ -501,21 +510,21 @@ fn CallIndirect() { // CHECK:STDOUT: %T.ref: %A.type.ab6 = name_ref T, %T.loc26_16.2 [symbolic = %T.loc26_16.1 (constants.%T.2bc)] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type.3d0)] // CHECK:STDOUT: %.loc28_4.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type.3d0)] -// CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.f05 = specific_constant @A.%assoc0.loc6_41.1, @A(constants.%X) [concrete = constants.%assoc0.249] -// CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc28_4.2 [concrete = constants.%assoc0.249] -// CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.ede) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.f12)] +// CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.f05 = specific_constant @A.%assoc0.loc6_41.1, @A(constants.%X, constants.%T.2bc) [concrete = constants.%assoc0.368] +// CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc28_4.2 [concrete = constants.%assoc0.368] +// CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.189) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.86f8)] // CHECK:STDOUT: %Z.ref.loc28: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %u.ref: ref %Z = name_ref u, %u // CHECK:STDOUT: %addr: %ptr.2a0 = addr_of %u.ref -// CHECK:STDOUT: %specific_impl_fn.loc28_4.1: = specific_impl_function %impl.elem0.loc28_4.1, @A.F(constants.%X, constants.%T.2bc, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.f8c)] +// CHECK:STDOUT: %specific_impl_fn.loc28_4.1: = specific_impl_function %impl.elem0.loc28_4.1, @A.WithSelf.F(constants.%X, constants.%T.2bc, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.44b)] // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.a50) = temporary_storage -// CHECK:STDOUT: %A.F.call: init @CallGeneric.%tuple.type (%tuple.type.a50) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%addr) -// CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.a50) = temporary %.loc28_12.1, %A.F.call -// CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.3 (%.e15) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.94c)] +// CHECK:STDOUT: %A.WithSelf.F.call: init @CallGeneric.%tuple.type (%tuple.type.a50) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%addr) +// CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.a50) = temporary %.loc28_12.1, %A.WithSelf.F.call +// CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.3 (%.11e) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.853)] // CHECK:STDOUT: %bound_method.loc28_12.1: = bound_method %.loc28_12.2, %impl.elem0.loc28_12.1 -// CHECK:STDOUT: %specific_impl_fn.loc28_12.1: = specific_impl_function %impl.elem0.loc28_12.1, @Destroy.Op(constants.%Destroy.facet.df5) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.348)] +// CHECK:STDOUT: %specific_impl_fn.loc28_12.1: = specific_impl_function %impl.elem0.loc28_12.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.df5) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.8a5)] // CHECK:STDOUT: %bound_method.loc28_12.2: = bound_method %.loc28_12.2, %specific_impl_fn.loc28_12.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2) // CHECK:STDOUT: %DestroyOp.bound: = bound_method %u.var, constants.%DestroyOp.b0ebf8.2 // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%u.var) // CHECK:STDOUT: return @@ -537,7 +546,9 @@ fn CallIndirect() { // CHECK:STDOUT: %T.loc5_13.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.F(constants.%T.67d, constants.%Self.362, constants.%U.4e7) { +// CHECK:STDOUT: specific @A(constants.%T.67d, constants.%Self.362) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.F(constants.%T.67d, constants.%Self.362, constants.%U.4e7) { // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.4e7 // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.8f6 // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.986 @@ -556,12 +567,19 @@ fn CallIndirect() { // CHECK:STDOUT: %T.loc5_13.1 => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %A.type => constants.%A.type.ab6 +// CHECK:STDOUT: %A.type.loc5 => constants.%A.type.ab6 // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.e87 -// CHECK:STDOUT: %A.F.type => constants.%A.F.type.49b -// CHECK:STDOUT: %A.F => constants.%A.F.768 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%X, constants.%Self.362) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%X +// CHECK:STDOUT: %A.type.loc6 => constants.%A.type.ab6 +// CHECK:STDOUT: %Self.loc6 => constants.%Self.362 +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.ba2 +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.e5f // CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05 -// CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.249 +// CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.368 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Y.as.A.impl.F(constants.%U.67d) { @@ -574,7 +592,18 @@ fn CallIndirect() { // CHECK:STDOUT: %pattern_type.loc16_25 => constants.%pattern_type.06d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.F(constants.%X, constants.%A.facet, constants.%U.67d) { +// CHECK:STDOUT: specific @A(constants.%X, constants.%A.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%X +// CHECK:STDOUT: %A.type.loc6 => constants.%A.type.ab6 +// CHECK:STDOUT: %Self.loc6 => constants.%A.facet +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.12f +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.48c +// CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05 +// CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.368 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet, constants.%U.67d) { // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.67d // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.e8f8f9.1 // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.4f4b84.1 @@ -605,7 +634,8 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc17_21.1 => constants.%.157 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.425 // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.26e -// CHECK:STDOUT: %.loc17_21.2 => constants.%.51f +// CHECK:STDOUT: %Copy.WithSelf.Op.type => constants.%Copy.WithSelf.Op.type.a8b +// CHECK:STDOUT: %.loc17_21.2 => constants.%.2ef // CHECK:STDOUT: %impl.elem0.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.7d1 // CHECK:STDOUT: %specific_impl_fn.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } @@ -614,7 +644,18 @@ fn CallIndirect() { // CHECK:STDOUT: %T.loc26_16.1 => constants.%T.2bc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.F(constants.%X, constants.%T.2bc, constants.%Z) { +// CHECK:STDOUT: specific @A(constants.%X, constants.%T.2bc) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%X +// CHECK:STDOUT: %A.type.loc6 => constants.%A.type.ab6 +// CHECK:STDOUT: %Self.loc6 => constants.%T.2bc +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.f08 +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.7ad +// CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05 +// CHECK:STDOUT: %assoc0.loc6_41.2 => constants.%assoc0.368 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%T.2bc, constants.%Z) { // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.2a0 // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.771 @@ -635,19 +676,21 @@ fn CallIndirect() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.binding.as_type => constants.%Y // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness -// CHECK:STDOUT: %.loc28_4.3 => constants.%.900 +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.12f +// CHECK:STDOUT: %.loc28_4.3 => constants.%.de2 // CHECK:STDOUT: %impl.elem0.loc28_4.2 => constants.%Y.as.A.impl.F // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%Y.as.A.impl.F.specific_fn // CHECK:STDOUT: %tuple.type => constants.%tuple.type.847 // CHECK:STDOUT: %require_complete => constants.%complete_type.28e // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.8095d9.1 // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.19e -// CHECK:STDOUT: %.loc28_12.3 => constants.%.b61 +// CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.07c +// CHECK:STDOUT: %.loc28_12.3 => constants.%.031 // CHECK:STDOUT: %impl.elem0.loc28_12.2 => constants.%DestroyOp.b0ebf8.1 // CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%DestroyOp.b0ebf8.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.F(constants.%X, constants.%A.facet, constants.%Z) { +// CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet, constants.%Z) { // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z // CHECK:STDOUT: %ptr.loc6_22.1 => constants.%ptr.2a0 // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.771 @@ -682,10 +725,10 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type.7f3: type = tuple_type (%T.67d, %Self.binding.as_type.7ec, %U.4e7) [symbolic] // CHECK:STDOUT: %.a0a: Core.Form = init_form %tuple.type.7f3, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.22d: type = pattern_type %tuple.type.7f3 [symbolic] -// CHECK:STDOUT: %A.F.type.71b: type = fn_type @A.F, @A(%T.67d) [symbolic] -// CHECK:STDOUT: %A.F.155: %A.F.type.71b = struct_value () [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.type.0ed: type = fn_type @A.WithSelf.F, @A(%T.67d, %Self.362) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.33a: %A.WithSelf.F.type.0ed = struct_value () [symbolic] // CHECK:STDOUT: %A.assoc_type.9f4: type = assoc_entity_type @A, @A(%T.67d) [symbolic] -// CHECK:STDOUT: %assoc0.c2b: %A.assoc_type.9f4 = assoc_entity element0, @A.%A.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.146: %A.assoc_type.9f4 = assoc_entity element0, @A.%A.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %complete_type.357: = complete_type_witness %empty_struct_type [concrete] @@ -701,10 +744,10 @@ fn CallIndirect() { // CHECK:STDOUT: %A.type.fe7: type = facet_type <@A, @A(%W)> [symbolic] // CHECK:STDOUT: %A.impl_witness.be2: = impl_witness @tuple.type.as.A.impl.%A.impl_witness_table, @tuple.type.as.A.impl(%V1, %V2, %W) [symbolic] // CHECK:STDOUT: %Self.d33: %A.type.fe7 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %A.F.type.0cd: type = fn_type @A.F, @A(%W) [symbolic] -// CHECK:STDOUT: %A.F.cef: %A.F.type.0cd = struct_value () [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.type.986: type = fn_type @A.WithSelf.F, @A(%W, %Self.362) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.0f5: %A.WithSelf.F.type.986 = struct_value () [symbolic] // CHECK:STDOUT: %A.assoc_type.7a9: type = assoc_entity_type @A, @A(%W) [symbolic] -// CHECK:STDOUT: %assoc0.264: %A.assoc_type.7a9 = assoc_entity element0, @A.%A.F.decl [symbolic] +// CHECK:STDOUT: %assoc0.dfc: %A.assoc_type.7a9 = assoc_entity element0, @A.%A.WithSelf.F.decl [symbolic] // CHECK:STDOUT: %require_complete.9a5: = require_complete_type %A.type.fe7 [symbolic] // CHECK:STDOUT: %U.ce4: type = symbolic_binding U, 3 [symbolic] // CHECK:STDOUT: %pattern_type.e4a: type = pattern_type %U.ce4 [symbolic] @@ -716,6 +759,8 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type.as.A.impl.F.type.ce6: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%V1, %V2, %W) [symbolic] // CHECK:STDOUT: %tuple.type.as.A.impl.F.74d: %tuple.type.as.A.impl.F.type.ce6 = struct_value () [symbolic] // CHECK:STDOUT: %A.facet.56b: %A.type.fe7 = facet_value %tuple.type.a5e, (%A.impl_witness.be2) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.type.104: type = fn_type @A.WithSelf.F, @A(%W, %A.facet.56b) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.028: %A.WithSelf.F.type.104 = struct_value () [symbolic] // CHECK:STDOUT: %tuple.type.52a: type = tuple_type (type, %A.type.fe7, type) [symbolic] // CHECK:STDOUT: %tuple.ec4: %tuple.type.52a = tuple_value (%W, %A.facet.56b, %U.ce4) [symbolic] // CHECK:STDOUT: %require_complete.5a4: = require_complete_type %U.ce4 [symbolic] @@ -728,15 +773,17 @@ fn CallIndirect() { // CHECK:STDOUT: %A.type.ab6: type = facet_type <@A, @A(%X)> [concrete] // CHECK:STDOUT: %A.impl_witness.b3a: = impl_witness @tuple.type.as.A.impl.%A.impl_witness_table, @tuple.type.as.A.impl(%Y1, %Y2, %X) [concrete] // CHECK:STDOUT: %Self.e87: %A.type.ab6 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %A.F.type.49b: type = fn_type @A.F, @A(%X) [concrete] -// CHECK:STDOUT: %A.F.768: %A.F.type.49b = struct_value () [concrete] +// CHECK:STDOUT: %A.WithSelf.F.type.ba2: type = fn_type @A.WithSelf.F, @A(%X, %Self.362) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.e5f: %A.WithSelf.F.type.ba2 = struct_value () [symbolic] // CHECK:STDOUT: %A.assoc_type.f05: type = assoc_entity_type @A, @A(%X) [concrete] -// CHECK:STDOUT: %assoc0.249: %A.assoc_type.f05 = assoc_entity element0, @A.%A.F.decl [concrete] +// CHECK:STDOUT: %assoc0.368: %A.assoc_type.f05 = assoc_entity element0, @A.%A.WithSelf.F.decl [concrete] // CHECK:STDOUT: %complete_type.a36: = complete_type_witness %A.type.ab6 [concrete] // CHECK:STDOUT: %tuple.type.as.A.impl.F.type.d14: type = fn_type @tuple.type.as.A.impl.F, @tuple.type.as.A.impl(%Y1, %Y2, %X) [concrete] // CHECK:STDOUT: %tuple.type.as.A.impl.F.cc8: %tuple.type.as.A.impl.F.type.d14 = struct_value () [concrete] // CHECK:STDOUT: %A.facet.906: %A.type.ab6 = facet_value %tuple.type.ab2, (%A.impl_witness.b3a) [concrete] -// CHECK:STDOUT: %.c38: type = fn_type_with_self_type %A.F.type.49b, %A.facet.906 [concrete] +// CHECK:STDOUT: %A.WithSelf.F.type.757: type = fn_type @A.WithSelf.F, @A(%X, %A.facet.906) [concrete] +// CHECK:STDOUT: %A.WithSelf.F.8b6: %A.WithSelf.F.type.757 = struct_value () [concrete] +// CHECK:STDOUT: %.fa2: type = fn_type_with_self_type %A.WithSelf.F.type.757, %A.facet.906 [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] // CHECK:STDOUT: %pattern_type.bdb: type = pattern_type %Z [concrete] // CHECK:STDOUT: %tuple.66d: %tuple.type.11f = tuple_value (%X, %tuple.dd5, %Z) [concrete] @@ -746,34 +793,37 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.af6: = specific_function %tuple.type.as.A.impl.F.cc8, @tuple.type.as.A.impl.F(%Y1, %Y2, %X, %Z) [concrete] // CHECK:STDOUT: %Z.val: %Z = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc24_39 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.8095d9.1: = custom_witness (%DestroyOp.b0ebf8.1), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.eb3: %Destroy.type = facet_value %tuple.type.65a, (%custom_witness.8095d9.1) [concrete] -// CHECK:STDOUT: %.3f9: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.eb3 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.16c: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.eb3) [concrete] +// CHECK:STDOUT: %.644: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.16c, %Destroy.facet.eb3 [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc24_38 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.2: %DestroyOp.type.3e79c2.2 = struct_value () [concrete] // CHECK:STDOUT: %T.2bc: %A.type.ab6 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.143: type = pattern_type %A.type.ab6 [concrete] // CHECK:STDOUT: %CallGeneric.type: type = fn_type @CallGeneric [concrete] // CHECK:STDOUT: %CallGeneric: %CallGeneric.type = struct_value () [concrete] +// CHECK:STDOUT: %A.WithSelf.F.type.f08: type = fn_type @A.WithSelf.F, @A(%X, %T.2bc) [symbolic] +// CHECK:STDOUT: %A.WithSelf.F.7ad: %A.WithSelf.F.type.f08 = struct_value () [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.2bc [symbolic] // CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.2bc, @A, @A(%X) [symbolic] -// CHECK:STDOUT: %.ede: type = fn_type_with_self_type %A.F.type.49b, %T.2bc [symbolic] -// CHECK:STDOUT: %impl.elem0.f12: %.ede = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %.189: type = fn_type_with_self_type %A.WithSelf.F.type.f08, %T.2bc [symbolic] +// CHECK:STDOUT: %impl.elem0.86f: %.189 = impl_witness_access %A.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %tuple.type.f96: type = tuple_type (type, %A.type.ab6, type) [concrete] // CHECK:STDOUT: %tuple.631: %tuple.type.f96 = tuple_value (%X, %T.2bc, %Z) [symbolic] // CHECK:STDOUT: %tuple.type.856: type = tuple_type (%X, %T.binding.as_type, %Z) [symbolic] // CHECK:STDOUT: %.e4a: Core.Form = init_form %tuple.type.856, call_param1 [symbolic] // CHECK:STDOUT: %pattern_type.4b2: type = pattern_type %tuple.type.856 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.f8c: = specific_impl_function %impl.elem0.f12, @A.F(%X, %T.2bc, %Z) [symbolic] +// CHECK:STDOUT: %specific_impl_fn.44b: = specific_impl_function %impl.elem0.86f, @A.WithSelf.F(%X, %T.2bc, %Z) [symbolic] // CHECK:STDOUT: %require_complete.7d4: = require_complete_type %tuple.type.856 [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %tuple.type.856, @Destroy [symbolic] // CHECK:STDOUT: %Destroy.facet.a1c: %Destroy.type = facet_value %tuple.type.856, (%Destroy.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.fbe: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.a1c [symbolic] -// CHECK:STDOUT: %impl.elem0.5c1: %.fbe = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.145: = specific_impl_function %impl.elem0.5c1, @Destroy.Op(%Destroy.facet.a1c) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.725: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.a1c) [symbolic] +// CHECK:STDOUT: %.949: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.725, %Destroy.facet.a1c [symbolic] +// CHECK:STDOUT: %impl.elem0.487: %.949 = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.56d: = specific_impl_function %impl.elem0.487, @Destroy.WithSelf.Op(%Destroy.facet.a1c) [symbolic] // CHECK:STDOUT: %CallIndirect.type: type = fn_type @CallIndirect [concrete] // CHECK:STDOUT: %CallIndirect: %CallIndirect.type = struct_value () [concrete] // CHECK:STDOUT: %CallGeneric.specific_fn: = specific_function %CallGeneric, @CallGeneric(%A.facet.906) [concrete] @@ -851,46 +901,46 @@ fn CallIndirect() { // CHECK:STDOUT: %T.loc5_13.1: type = symbolic_binding T, 0 [symbolic = %T.loc5_13.1 (constants.%T.67d)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T.loc5_13.1)> [symbolic = %A.type (constants.%A.type.ade)] -// CHECK:STDOUT: %Self.loc5_23.2: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)] -// CHECK:STDOUT: %A.F.type: type = fn_type @A.F, @A(%T.loc5_13.1) [symbolic = %A.F.type (constants.%A.F.type.71b)] -// CHECK:STDOUT: %A.F: @A.%A.F.type (%A.F.type.71b) = struct_value () [symbolic = %A.F (constants.%A.F.155)] -// CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type @A, @A(%T.loc5_13.1) [symbolic = %A.assoc_type (constants.%A.assoc_type.9f4)] -// CHECK:STDOUT: %assoc0.loc6_39.2: @A.%A.assoc_type (%A.assoc_type.9f4) = assoc_entity element0, %A.F.decl [symbolic = %assoc0.loc6_39.2 (constants.%assoc0.c2b)] +// CHECK:STDOUT: %A.type.loc5: type = facet_type <@A, @A(%T.loc5_13.1)> [symbolic = %A.type.loc5 (constants.%A.type.ade)] +// CHECK:STDOUT: %Self.loc5_23.2: @A.%A.type.loc5 (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc5_23.1: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)] -// CHECK:STDOUT: %A.F.decl: @A.%A.F.type (%A.F.type.71b) = fn_decl @A.F [symbolic = @A.%A.F (constants.%A.F.155)] { +// CHECK:STDOUT: %Self.loc5_23.1: @A.%A.type.loc5 (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc5_23.2 (constants.%Self.362)] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %A.WithSelf.F.decl: @A.%A.WithSelf.F.type (%A.WithSelf.F.type.0ed) = fn_decl @A.WithSelf.F [symbolic = @A.%A.WithSelf.F (constants.%A.WithSelf.F.33a)] { // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 2 [concrete] -// CHECK:STDOUT: %u.patt: @A.F.%pattern_type.loc6_18 (%pattern_type.62e) = value_binding_pattern u [concrete] -// CHECK:STDOUT: %u.param_patt: @A.F.%pattern_type.loc6_18 (%pattern_type.62e) = value_param_pattern %u.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @A.F.%pattern_type.loc6_24 (%pattern_type.22d) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @A.F.%pattern_type.loc6_24 (%pattern_type.22d) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %u.patt: @A.WithSelf.F.%pattern_type.loc6_18 (%pattern_type.62e) = value_binding_pattern u [concrete] +// CHECK:STDOUT: %u.param_patt: @A.WithSelf.F.%pattern_type.loc6_18 (%pattern_type.62e) = value_param_pattern %u.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @A.WithSelf.F.%pattern_type.loc6_24 (%pattern_type.22d) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @A.WithSelf.F.%pattern_type.loc6_24 (%pattern_type.22d) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc5_13.2 [symbolic = %T (constants.%T.67d)] -// CHECK:STDOUT: %.loc6_31: @A.F.%A.type (%A.type.ade) = specific_constant @A.%Self.loc5_23.1, @A(constants.%T.67d) [symbolic = %Self (constants.%Self.362)] -// CHECK:STDOUT: %Self.ref: @A.F.%A.type (%A.type.ade) = name_ref Self, %.loc6_31 [symbolic = %Self (constants.%Self.362)] +// CHECK:STDOUT: %.loc6_31: @A.WithSelf.F.%A.type (%A.type.ade) = specific_constant @A.%Self.loc5_23.1, @A(constants.%T.67d) [symbolic = %Self (constants.%Self.362)] +// CHECK:STDOUT: %Self.ref: @A.WithSelf.F.%A.type (%A.type.ade) = name_ref Self, %.loc6_31 [symbolic = %Self (constants.%Self.362)] // CHECK:STDOUT: %U.ref.loc6_37: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)] -// CHECK:STDOUT: %.loc6_38.2: @A.F.%tuple.type.loc6_38.1 (%tuple.type.f2d) = tuple_literal (%T.ref, %Self.ref, %U.ref.loc6_37) [symbolic = %tuple (constants.%tuple.f25)] +// CHECK:STDOUT: %.loc6_38.2: @A.WithSelf.F.%tuple.type.loc6_38.1 (%tuple.type.f2d) = tuple_literal (%T.ref, %Self.ref, %U.ref.loc6_37) [symbolic = %tuple (constants.%tuple.f25)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type constants.%Self.362 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)] // CHECK:STDOUT: %.loc6_38.3: type = converted constants.%Self.362, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)] // CHECK:STDOUT: %.loc6_38.4: type = converted %.loc6_38.2, constants.%tuple.type.7f3 [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.7f3)] // CHECK:STDOUT: %.loc6_38.5: Core.Form = init_form %.loc6_38.4, call_param1 [symbolic = %.loc6_38.1 (constants.%.a0a)] // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %U.loc6_8.2: type = symbolic_binding U, 2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)] -// CHECK:STDOUT: %u.param: @A.F.%U.loc6_8.1 (%U.4e7) = value_param call_param0 +// CHECK:STDOUT: %u.param: @A.WithSelf.F.%U.loc6_8.1 (%U.4e7) = value_param call_param0 // CHECK:STDOUT: %U.ref.loc6_21: type = name_ref U, %U.loc6_8.2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)] -// CHECK:STDOUT: %u: @A.F.%U.loc6_8.1 (%U.4e7) = value_binding u, %u.param -// CHECK:STDOUT: %return.param: ref @A.F.%tuple.type.loc6_38.2 (%tuple.type.7f3) = out_param call_param1 -// CHECK:STDOUT: %return: ref @A.F.%tuple.type.loc6_38.2 (%tuple.type.7f3) = return_slot %return.param +// CHECK:STDOUT: %u: @A.WithSelf.F.%U.loc6_8.1 (%U.4e7) = value_binding u, %u.param +// CHECK:STDOUT: %return.param: ref @A.WithSelf.F.%tuple.type.loc6_38.2 (%tuple.type.7f3) = out_param call_param1 +// CHECK:STDOUT: %return: ref @A.WithSelf.F.%tuple.type.loc6_38.2 (%tuple.type.7f3) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc6_39.1: @A.%A.assoc_type (%A.assoc_type.9f4) = assoc_entity element0, %A.F.decl [symbolic = %assoc0.loc6_39.2 (constants.%assoc0.c2b)] +// CHECK:STDOUT: %assoc0.loc6_39.1: @A.%A.assoc_type (%A.assoc_type.9f4) = assoc_entity element0, %A.WithSelf.F.decl [symbolic = %assoc0.loc6_39.2 (constants.%assoc0.146)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc5_23.1 // CHECK:STDOUT: .T = +// CHECK:STDOUT: .T = // CHECK:STDOUT: .F = %assoc0.loc6_39.1 -// CHECK:STDOUT: witness = (%A.F.decl) +// CHECK:STDOUT: witness = (%A.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -979,20 +1029,20 @@ fn CallIndirect() { // CHECK:STDOUT: .Self = constants.%Z // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @A.F(@A.%T.loc5_13.2: type, @A.%Self.loc5_23.1: @A.%A.type (%A.type.ade), %U.loc6_8.2: type) { +// CHECK:STDOUT: generic fn @A.WithSelf.F(@A.%T.loc5_13.2: type, @A.%Self.loc5_23.1: @A.%A.type.loc5 (%A.type.ade), %U.loc6_8.2: type) { // CHECK:STDOUT: %U.loc6_8.1: type = symbolic_binding U, 2 [symbolic = %U.loc6_8.1 (constants.%U.4e7)] // CHECK:STDOUT: %pattern_type.loc6_18: type = pattern_type %U.loc6_8.1 [symbolic = %pattern_type.loc6_18 (constants.%pattern_type.62e)] // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] // CHECK:STDOUT: %A.type: type = facet_type <@A, @A(%T)> [symbolic = %A.type (constants.%A.type.ade)] -// CHECK:STDOUT: %Self: @A.F.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.362)] +// CHECK:STDOUT: %Self: @A.WithSelf.F.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.362)] // CHECK:STDOUT: %tuple.type.loc6_38.1: type = tuple_type (type, %A.type, type) [symbolic = %tuple.type.loc6_38.1 (constants.%tuple.type.f2d)] -// CHECK:STDOUT: %tuple: @A.F.%tuple.type.loc6_38.1 (%tuple.type.f2d) = tuple_value (%T, %Self, %U.loc6_8.1) [symbolic = %tuple (constants.%tuple.f25)] +// CHECK:STDOUT: %tuple: @A.WithSelf.F.%tuple.type.loc6_38.1 (%tuple.type.f2d) = tuple_value (%T, %Self, %U.loc6_8.1) [symbolic = %tuple (constants.%tuple.f25)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.7ec)] // CHECK:STDOUT: %tuple.type.loc6_38.2: type = tuple_type (%T, %Self.binding.as_type, %U.loc6_8.1) [symbolic = %tuple.type.loc6_38.2 (constants.%tuple.type.7f3)] // CHECK:STDOUT: %.loc6_38.1: Core.Form = init_form %tuple.type.loc6_38.2, call_param1 [symbolic = %.loc6_38.1 (constants.%.a0a)] // CHECK:STDOUT: %pattern_type.loc6_24: type = pattern_type %tuple.type.loc6_38.2 [symbolic = %pattern_type.loc6_24 (constants.%pattern_type.22d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%u.param: @A.F.%U.loc6_8.1 (%U.4e7)) -> out %return.param: @A.F.%tuple.type.loc6_38.2 (%tuple.type.7f3); +// CHECK:STDOUT: fn(%u.param: @A.WithSelf.F.%U.loc6_8.1 (%U.4e7)) -> out %return.param: @A.WithSelf.F.%tuple.type.loc6_38.2 (%tuple.type.7f3); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @tuple.type.as.A.impl.F(@tuple.type.as.A.impl.%V1.loc14_14.2: type, @tuple.type.as.A.impl.%V2.loc14_25.2: type, @tuple.type.as.A.impl.%W.loc14_36.2: type, %U.loc17_8.2: type) { @@ -1041,9 +1091,9 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc24_23: %A.type.ab6 = converted %.loc24_14, %A.facet [concrete = constants.%A.facet.906] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc24_23 [concrete = constants.%tuple.type.ab2] // CHECK:STDOUT: %.loc24_31.1: type = converted %.loc24_23, %as_type [concrete = constants.%tuple.type.ab2] -// CHECK:STDOUT: %.loc24_31.2: %A.assoc_type.f05 = specific_constant @A.%assoc0.loc6_39.1, @A(constants.%X) [concrete = constants.%assoc0.249] -// CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc24_31.2 [concrete = constants.%assoc0.249] -// CHECK:STDOUT: %impl.elem0: %.c38 = impl_witness_access constants.%A.impl_witness.b3a, element0 [concrete = constants.%tuple.type.as.A.impl.F.cc8] +// CHECK:STDOUT: %.loc24_31.2: %A.assoc_type.f05 = specific_constant @A.%assoc0.loc6_39.1, @A(constants.%X, constants.%A.facet.906) [concrete = constants.%assoc0.368] +// CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc24_31.2 [concrete = constants.%assoc0.368] +// CHECK:STDOUT: %impl.elem0: %.fa2 = impl_witness_access constants.%A.impl_witness.b3a, element0 [concrete = constants.%tuple.type.as.A.impl.F.cc8] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %.loc24_38.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @tuple.type.as.A.impl.F(constants.%Y1, constants.%Y2, constants.%X, constants.%Z) [concrete = constants.%tuple.type.as.A.impl.F.specific_fn.af6] @@ -1072,41 +1122,43 @@ fn CallIndirect() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.loc27_16.1 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc27_16.1, @A, @A(constants.%X) [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] -// CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type constants.%A.F.type.49b, %T.loc27_16.1 [symbolic = %.loc28_4.3 (constants.%.ede)] -// CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.ede) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.f12)] -// CHECK:STDOUT: %specific_impl_fn.loc28_4.2: = specific_impl_function %impl.elem0.loc28_4.2, @A.F(constants.%X, %T.loc27_16.1, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.f8c)] +// CHECK:STDOUT: %A.WithSelf.F.type: type = fn_type @A.WithSelf.F, @A(constants.%X, %T.loc27_16.1) [symbolic = %A.WithSelf.F.type (constants.%A.WithSelf.F.type.f08)] +// CHECK:STDOUT: %.loc28_4.3: type = fn_type_with_self_type %A.WithSelf.F.type, %T.loc27_16.1 [symbolic = %.loc28_4.3 (constants.%.189)] +// CHECK:STDOUT: %impl.elem0.loc28_4.2: @CallGeneric.%.loc28_4.3 (%.189) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.86f)] +// CHECK:STDOUT: %specific_impl_fn.loc28_4.2: = specific_impl_function %impl.elem0.loc28_4.2, @A.WithSelf.F(constants.%X, %T.loc27_16.1, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.44b)] // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.binding.as_type, constants.%Z) [symbolic = %tuple.type (constants.%tuple.type.856)] // CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.7d4)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.a1c)] -// CHECK:STDOUT: %.loc28_12.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.3 (constants.%.fbe)] -// CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.3 (%.fbe) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.5c1)] -// CHECK:STDOUT: %specific_impl_fn.loc28_12.2: = specific_impl_function %impl.elem0.loc28_12.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.145)] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet) [symbolic = %Destroy.WithSelf.Op.type (constants.%Destroy.WithSelf.Op.type.725)] +// CHECK:STDOUT: %.loc28_12.3: type = fn_type_with_self_type %Destroy.WithSelf.Op.type, %Destroy.facet [symbolic = %.loc28_12.3 (constants.%.949)] +// CHECK:STDOUT: %impl.elem0.loc28_12.2: @CallGeneric.%.loc28_12.3 (%.949) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.487)] +// CHECK:STDOUT: %specific_impl_fn.loc28_12.2: = specific_impl_function %impl.elem0.loc28_12.2, @Destroy.WithSelf.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.56d)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: %A.type.ab6 = name_ref T, %T.loc27_16.2 [symbolic = %T.loc27_16.1 (constants.%T.2bc)] // CHECK:STDOUT: %T.as_type: type = facet_access_type %T.ref [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc28_4.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.f05 = specific_constant @A.%assoc0.loc6_39.1, @A(constants.%X) [concrete = constants.%assoc0.249] -// CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc28_4.2 [concrete = constants.%assoc0.249] -// CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.ede) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.f12)] +// CHECK:STDOUT: %.loc28_4.2: %A.assoc_type.f05 = specific_constant @A.%assoc0.loc6_39.1, @A(constants.%X, constants.%T.2bc) [concrete = constants.%assoc0.368] +// CHECK:STDOUT: %F.ref: %A.assoc_type.f05 = name_ref F, %.loc28_4.2 [concrete = constants.%assoc0.368] +// CHECK:STDOUT: %impl.elem0.loc28_4.1: @CallGeneric.%.loc28_4.3 (%.189) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_4.2 (constants.%impl.elem0.86f)] // CHECK:STDOUT: %Z.ref: type = name_ref Z, file.%Z.decl [concrete = constants.%Z] // CHECK:STDOUT: %.loc28_11.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] -// CHECK:STDOUT: %specific_impl_fn.loc28_4.1: = specific_impl_function %impl.elem0.loc28_4.1, @A.F(constants.%X, constants.%T.2bc, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.f8c)] +// CHECK:STDOUT: %specific_impl_fn.loc28_4.1: = specific_impl_function %impl.elem0.loc28_4.1, @A.WithSelf.F(constants.%X, constants.%T.2bc, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.44b)] // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.856) = temporary_storage // CHECK:STDOUT: %.loc28_11.2: ref %Z = temporary_storage // CHECK:STDOUT: %.loc28_11.3: init %Z to %.loc28_11.2 = class_init () [concrete = constants.%Z.val] // CHECK:STDOUT: %.loc28_11.4: ref %Z = temporary %.loc28_11.2, %.loc28_11.3 // CHECK:STDOUT: %.loc28_11.5: ref %Z = converted %.loc28_11.1, %.loc28_11.4 // CHECK:STDOUT: %.loc28_11.6: %Z = acquire_value %.loc28_11.5 -// CHECK:STDOUT: %A.F.call: init @CallGeneric.%tuple.type (%tuple.type.856) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%.loc28_11.6) -// CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.856) = temporary %.loc28_12.1, %A.F.call -// CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.3 (%.fbe) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.5c1)] +// CHECK:STDOUT: %A.WithSelf.F.call: init @CallGeneric.%tuple.type (%tuple.type.856) to %.loc28_12.1 = call %specific_impl_fn.loc28_4.1(%.loc28_11.6) +// CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.856) = temporary %.loc28_12.1, %A.WithSelf.F.call +// CHECK:STDOUT: %impl.elem0.loc28_12.1: @CallGeneric.%.loc28_12.3 (%.949) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc28_12.2 (constants.%impl.elem0.487)] // CHECK:STDOUT: %bound_method.loc28_12.1: = bound_method %.loc28_12.2, %impl.elem0.loc28_12.1 -// CHECK:STDOUT: %specific_impl_fn.loc28_12.1: = specific_impl_function %impl.elem0.loc28_12.1, @Destroy.Op(constants.%Destroy.facet.a1c) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.145)] +// CHECK:STDOUT: %specific_impl_fn.loc28_12.1: = specific_impl_function %impl.elem0.loc28_12.1, @Destroy.WithSelf.Op(constants.%Destroy.facet.a1c) [symbolic = %specific_impl_fn.loc28_12.2 (constants.%specific_impl_fn.56d)] // CHECK:STDOUT: %bound_method.loc28_12.2: = bound_method %.loc28_12.2, %specific_impl_fn.loc28_12.1 -// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2) +// CHECK:STDOUT: %Destroy.WithSelf.Op.call: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2) // CHECK:STDOUT: %DestroyOp.bound: = bound_method %.loc28_11.4, constants.%DestroyOp.b0ebf8.2 // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc28_11.4) // CHECK:STDOUT: return @@ -1131,7 +1183,9 @@ fn CallIndirect() { // CHECK:STDOUT: %T.loc5_13.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.F(constants.%T.67d, constants.%Self.362, constants.%U.4e7) { +// CHECK:STDOUT: specific @A(constants.%T.67d, constants.%Self.362) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.F(constants.%T.67d, constants.%Self.362, constants.%U.4e7) { // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.4e7 // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.62e // CHECK:STDOUT: %T => constants.%T.67d @@ -1149,12 +1203,8 @@ fn CallIndirect() { // CHECK:STDOUT: %T.loc5_13.1 => constants.%W // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %A.type => constants.%A.type.fe7 +// CHECK:STDOUT: %A.type.loc5 => constants.%A.type.fe7 // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.d33 -// CHECK:STDOUT: %A.F.type => constants.%A.F.type.0cd -// CHECK:STDOUT: %A.F => constants.%A.F.cef -// CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.7a9 -// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.264 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @tuple.type.as.A.impl(constants.%V1, constants.%V2, constants.%W) { @@ -1172,6 +1222,17 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.74d // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%W, constants.%Self.362) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%W +// CHECK:STDOUT: %A.type.loc6 => constants.%A.type.fe7 +// CHECK:STDOUT: %Self.loc6 => constants.%Self.362 +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.986 +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.0f5 +// CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.7a9 +// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.dfc +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @tuple.type.as.A.impl.F(constants.%V1, constants.%V2, constants.%W, constants.%U.ce4) { // CHECK:STDOUT: %U.loc17_8.1 => constants.%U.ce4 // CHECK:STDOUT: %pattern_type.loc17_18 => constants.%pattern_type.e4a @@ -1193,7 +1254,18 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type.as.A.impl.F.specific_fn.loc18_12.2 => constants.%tuple.type.as.A.impl.F.specific_fn.009 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.F(constants.%W, constants.%A.facet.56b, constants.%U.ce4) { +// CHECK:STDOUT: specific @A(constants.%W, constants.%A.facet.56b) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%W +// CHECK:STDOUT: %A.type.loc6 => constants.%A.type.fe7 +// CHECK:STDOUT: %Self.loc6 => constants.%A.facet.56b +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.104 +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.028 +// CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.7a9 +// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.dfc +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.F(constants.%W, constants.%A.facet.56b, constants.%U.ce4) { // CHECK:STDOUT: %U.loc6_8.1 => constants.%U.ce4 // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.e4a // CHECK:STDOUT: %T => constants.%W @@ -1211,12 +1283,8 @@ fn CallIndirect() { // CHECK:STDOUT: %T.loc5_13.1 => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %A.type => constants.%A.type.ab6 +// CHECK:STDOUT: %A.type.loc5 => constants.%A.type.ab6 // CHECK:STDOUT: %Self.loc5_23.2 => constants.%Self.e87 -// CHECK:STDOUT: %A.F.type => constants.%A.F.type.49b -// CHECK:STDOUT: %A.F => constants.%A.F.768 -// CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05 -// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.249 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @tuple.type.as.A.impl(constants.%Y1, constants.%Y2, constants.%X) { @@ -1234,6 +1302,28 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type.as.A.impl.F => constants.%tuple.type.as.A.impl.F.cc8 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%X, constants.%Self.362) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%X +// CHECK:STDOUT: %A.type.loc6 => constants.%A.type.ab6 +// CHECK:STDOUT: %Self.loc6 => constants.%Self.362 +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.ba2 +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.e5f +// CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05 +// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.368 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%X, constants.%A.facet.906) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%X +// CHECK:STDOUT: %A.type.loc6 => constants.%A.type.ab6 +// CHECK:STDOUT: %Self.loc6 => constants.%A.facet.906 +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.757 +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.8b6 +// CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05 +// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.368 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @tuple.type.as.A.impl.F(constants.%Y1, constants.%Y2, constants.%X, constants.%Z) { // CHECK:STDOUT: %U.loc17_8.1 => constants.%Z // CHECK:STDOUT: %pattern_type.loc17_18 => constants.%pattern_type.bdb @@ -1259,7 +1349,18 @@ fn CallIndirect() { // CHECK:STDOUT: %T.loc27_16.1 => constants.%T.2bc // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.F(constants.%X, constants.%T.2bc, constants.%Z) { +// CHECK:STDOUT: specific @A(constants.%X, constants.%T.2bc) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc6 => constants.%X +// CHECK:STDOUT: %A.type.loc6 => constants.%A.type.ab6 +// CHECK:STDOUT: %Self.loc6 => constants.%T.2bc +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.f08 +// CHECK:STDOUT: %A.WithSelf.F => constants.%A.WithSelf.F.7ad +// CHECK:STDOUT: %A.assoc_type => constants.%A.assoc_type.f05 +// CHECK:STDOUT: %assoc0.loc6_39.2 => constants.%assoc0.368 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%T.2bc, constants.%Z) { // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.bdb // CHECK:STDOUT: %T => constants.%X @@ -1279,19 +1380,21 @@ fn CallIndirect() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T.binding.as_type => constants.%tuple.type.ab2 // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness.b3a -// CHECK:STDOUT: %.loc28_4.3 => constants.%.c38 +// CHECK:STDOUT: %A.WithSelf.F.type => constants.%A.WithSelf.F.type.757 +// CHECK:STDOUT: %.loc28_4.3 => constants.%.fa2 // CHECK:STDOUT: %impl.elem0.loc28_4.2 => constants.%tuple.type.as.A.impl.F.cc8 // CHECK:STDOUT: %specific_impl_fn.loc28_4.2 => constants.%tuple.type.as.A.impl.F.specific_fn.af6 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.65a // CHECK:STDOUT: %require_complete => constants.%complete_type.cf2 // CHECK:STDOUT: %Destroy.lookup_impl_witness => constants.%custom_witness.8095d9.1 // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.eb3 -// CHECK:STDOUT: %.loc28_12.3 => constants.%.3f9 +// CHECK:STDOUT: %Destroy.WithSelf.Op.type => constants.%Destroy.WithSelf.Op.type.16c +// CHECK:STDOUT: %.loc28_12.3 => constants.%.644 // CHECK:STDOUT: %impl.elem0.loc28_12.2 => constants.%DestroyOp.b0ebf8.1 // CHECK:STDOUT: %specific_impl_fn.loc28_12.2 => constants.%DestroyOp.b0ebf8.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.F(constants.%X, constants.%A.facet.906, constants.%Z) { +// CHECK:STDOUT: specific @A.WithSelf.F(constants.%X, constants.%A.facet.906, constants.%Z) { // CHECK:STDOUT: %U.loc6_8.1 => constants.%Z // CHECK:STDOUT: %pattern_type.loc6_18 => constants.%pattern_type.bdb // CHECK:STDOUT: %T => constants.%X diff --git a/toolchain/check/testdata/interface/generic_vs_params.carbon b/toolchain/check/testdata/interface/generic_vs_params.carbon index 80e8eab3deae..0bbe99fd6bbf 100644 --- a/toolchain/check/testdata/interface/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/generic_vs_params.carbon @@ -103,19 +103,24 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %X: type = class_type @X [concrete] // CHECK:STDOUT: %NotGenericNoParams.impl_witness: = impl_witness @X.as.NotGenericNoParams.impl.%NotGenericNoParams.impl_witness_table [concrete] +// CHECK:STDOUT: %NotGenericNoParams.facet: %NotGenericNoParams.type = facet_value %X, (%NotGenericNoParams.impl_witness) [concrete] // CHECK:STDOUT: %NotGenericButParams.impl_witness: = impl_witness @X.as.NotGenericButParams.impl.%NotGenericButParams.impl_witness_table [concrete] +// CHECK:STDOUT: %NotGenericButParams.facet: %NotGenericButParams.type.a08 = facet_value %X, (%NotGenericButParams.impl_witness) [concrete] // CHECK:STDOUT: %GenericAndParams.type.2bb: type = facet_type <@GenericAndParams.loc6, @GenericAndParams.loc6(%X)> [concrete] // CHECK:STDOUT: %GenericAndParams.impl_witness.12e: = impl_witness @X.as.GenericAndParams.impl.c55.%GenericAndParams.impl_witness_table [concrete] // CHECK:STDOUT: %Self.fec: %GenericAndParams.type.2bb = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %GenericAndParams.facet.109: %GenericAndParams.type.2bb = facet_value %X, (%GenericAndParams.impl_witness.12e) [concrete] // CHECK:STDOUT: %C.513: type = class_type @C, @C(%X) [concrete] // CHECK:STDOUT: %GenericNoParams.type.771: type = facet_type <@GenericNoParams, @GenericNoParams(%X)> [concrete] // CHECK:STDOUT: %GenericAndParams.type.8ab: type = generic_interface_type @GenericAndParams.loc10, @C(%X) [concrete] // CHECK:STDOUT: %GenericAndParams.generic.22e: %GenericAndParams.type.8ab = struct_value () [concrete] // CHECK:STDOUT: %GenericNoParams.impl_witness: = impl_witness @X.as.GenericNoParams.impl.%GenericNoParams.impl_witness_table [concrete] // CHECK:STDOUT: %Self.b86: %GenericNoParams.type.771 = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %GenericNoParams.facet: %GenericNoParams.type.771 = facet_value %X, (%GenericNoParams.impl_witness) [concrete] // CHECK:STDOUT: %GenericAndParams.type.2f8: type = facet_type <@GenericAndParams.loc10, @GenericAndParams.loc10(%X, %X)> [concrete] // CHECK:STDOUT: %GenericAndParams.impl_witness.e7f: = impl_witness @X.as.GenericAndParams.impl.c97.%GenericAndParams.impl_witness_table [concrete] // CHECK:STDOUT: %Self.292: %GenericAndParams.type.2f8 = symbolic_binding Self, 2 [symbolic] +// CHECK:STDOUT: %GenericAndParams.facet.ac4: %GenericAndParams.type.2f8 = facet_value %X, (%GenericAndParams.impl_witness.e7f) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -178,6 +183,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: interface @NotGenericNoParams { // CHECK:STDOUT: %Self: %NotGenericNoParams.type = symbolic_binding Self, 0 [symbolic = constants.%Self.9fc] +// CHECK:STDOUT: interface_with_self_decl @NotGenericNoParams [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -188,6 +194,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: interface @NotGenericButParams { // CHECK:STDOUT: %Self: %NotGenericButParams.type.a08 = symbolic_binding Self, 0 [symbolic = constants.%Self.290] +// CHECK:STDOUT: interface_with_self_decl @NotGenericButParams [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -205,6 +212,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc6_38.1: @GenericAndParams.loc6.%GenericAndParams.type (%GenericAndParams.type.a01) = symbolic_binding Self, 1 [symbolic = %Self.loc6_38.2 (constants.%Self.268)] +// CHECK:STDOUT: interface_with_self_decl @GenericAndParams.loc6 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc6_38.1 @@ -222,6 +230,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc9_29.1: @GenericNoParams.%GenericNoParams.type (%GenericNoParams.type.7cc) = symbolic_binding Self, 1 [symbolic = %Self.loc9_29.2 (constants.%Self.d3a)] +// CHECK:STDOUT: interface_with_self_decl @GenericNoParams [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc9_29.1 @@ -241,6 +250,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc10_40.1: @GenericAndParams.loc10.%GenericAndParams.type (%GenericAndParams.type.542) = symbolic_binding Self, 2 [symbolic = %Self.loc10_40.2 (constants.%Self.c75)] +// CHECK:STDOUT: interface_with_self_decl @GenericAndParams.loc10 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc10_40.1 @@ -324,20 +334,42 @@ interface Bar[T:! type] {} // CHECK:STDOUT: .Self = constants.%X // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @NotGenericNoParams(constants.%Self.9fc) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NotGenericButParams(constants.%Self.290) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.loc6(constants.%T) { // CHECK:STDOUT: %T.loc6_28.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericAndParams.loc6(constants.%T, constants.%Self.268) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%T) { // CHECK:STDOUT: %T.loc8_9.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @GenericNoParams(constants.%T) {} // CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericNoParams(constants.%T, constants.%Self.d3a) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.loc10(constants.%T, constants.%U) { // CHECK:STDOUT: %U.loc10_30.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericAndParams.loc10(constants.%T, constants.%U, constants.%Self.c75) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NotGenericNoParams(constants.%NotGenericNoParams.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @NotGenericButParams(constants.%NotGenericButParams.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.loc6(constants.%X) { // CHECK:STDOUT: %T.loc6_28.1 => constants.%X // CHECK:STDOUT: @@ -346,6 +378,14 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %Self.loc6_38.2 => constants.%Self.fec // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericAndParams.loc6(constants.%X, constants.%Self.268) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericAndParams.loc6(constants.%X, constants.%GenericAndParams.facet.109) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%X) { // CHECK:STDOUT: %T.loc8_9.1 => constants.%X // CHECK:STDOUT: @@ -362,6 +402,14 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %Self.loc9_29.2 => constants.%Self.b86 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericNoParams(constants.%X, constants.%Self.d3a) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericNoParams(constants.%X, constants.%GenericNoParams.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @GenericAndParams.loc10(constants.%X, constants.%X) { // CHECK:STDOUT: %U.loc10_30.1 => constants.%X // CHECK:STDOUT: @@ -371,6 +419,14 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %Self.loc10_40.2 => constants.%Self.292 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericAndParams.loc10(constants.%X, constants.%X, constants.%Self.c75) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericAndParams.loc10(constants.%X, constants.%X, constants.%GenericAndParams.facet.ac4) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_non_generic_implicit_params.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -389,6 +445,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: interface @A { // CHECK:STDOUT: %Self: %A.type.4c4 = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -397,6 +454,8 @@ interface Bar[T:! type] {} // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_non_generic_params.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -415,6 +474,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: interface @A { // CHECK:STDOUT: %Self: %A.type.4c4 = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @A [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -423,6 +483,8 @@ interface Bar[T:! type] {} // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_implicit_params_only_empty.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -441,6 +503,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: interface @Bar { // CHECK:STDOUT: %Self: %Bar.type.c56 = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Bar [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -449,6 +512,8 @@ interface Bar[T:! type] {} // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Bar(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_implicit_params_only.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -483,6 +548,7 @@ interface Bar[T:! type] {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc8_25.1: @Bar.%Bar.type (%Bar.type.24d) = symbolic_binding Self, 1 [symbolic = %Self.loc8_25.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @Bar [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc8_25.1 @@ -496,3 +562,5 @@ interface Bar[T:! type] {} // CHECK:STDOUT: %T.loc8_15.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Bar(constants.%T, constants.%Self) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/import.carbon b/toolchain/check/testdata/interface/import.carbon index 1dc443ee6ee5..b4c35786c438 100644 --- a/toolchain/check/testdata/interface/import.carbon +++ b/toolchain/check/testdata/interface/import.carbon @@ -60,17 +60,17 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Basic.type: type = facet_type <@Basic> [concrete] // CHECK:STDOUT: %Self.3e6: %Basic.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Basic.assoc_type: type = assoc_entity_type @Basic [concrete] -// CHECK:STDOUT: %assoc0.909: %Basic.assoc_type = assoc_entity element0, @Basic.%T [concrete] -// CHECK:STDOUT: %Basic.F.type: type = fn_type @Basic.F [concrete] -// CHECK:STDOUT: %Basic.F: %Basic.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1.a1d: %Basic.assoc_type = assoc_entity element1, @Basic.%Basic.F.decl [concrete] +// CHECK:STDOUT: %assoc0.590: %Basic.assoc_type = assoc_entity element0, @Basic.%T [concrete] +// CHECK:STDOUT: %Basic.WithSelf.F.type: type = fn_type @Basic.WithSelf.F, @Basic(%Self.3e6) [symbolic] +// CHECK:STDOUT: %Basic.WithSelf.F: %Basic.WithSelf.F.type = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1.6a5: %Basic.assoc_type = assoc_entity element1, @Basic.%Basic.WithSelf.F.decl [concrete] // CHECK:STDOUT: %ForwardDeclared.type: type = facet_type <@ForwardDeclared> [concrete] // CHECK:STDOUT: %Self.8e7: %ForwardDeclared.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %ForwardDeclared.assoc_type: type = assoc_entity_type @ForwardDeclared [concrete] -// CHECK:STDOUT: %assoc0.06c: %ForwardDeclared.assoc_type = assoc_entity element0, @ForwardDeclared.%T [concrete] -// CHECK:STDOUT: %ForwardDeclared.F.type: type = fn_type @ForwardDeclared.F [concrete] -// CHECK:STDOUT: %ForwardDeclared.F: %ForwardDeclared.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1.b1d: %ForwardDeclared.assoc_type = assoc_entity element1, @ForwardDeclared.%ForwardDeclared.F.decl [concrete] +// CHECK:STDOUT: %assoc0.e70: %ForwardDeclared.assoc_type = assoc_entity element0, @ForwardDeclared.%T [concrete] +// CHECK:STDOUT: %ForwardDeclared.WithSelf.F.type: type = fn_type @ForwardDeclared.WithSelf.F, @ForwardDeclared(%Self.8e7) [symbolic] +// CHECK:STDOUT: %ForwardDeclared.WithSelf.F: %ForwardDeclared.WithSelf.F.type = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1.91f: %ForwardDeclared.assoc_type = assoc_entity element1, @ForwardDeclared.%ForwardDeclared.WithSelf.F.decl [concrete] // CHECK:STDOUT: %struct_type.f: type = struct_type {.f: %ForwardDeclared.type} [concrete] // CHECK:STDOUT: %pattern_type: type = pattern_type %struct_type.f [concrete] // CHECK:STDOUT: } @@ -108,6 +108,7 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { // CHECK:STDOUT: %Self: %Empty.type = symbolic_binding Self, 0 [symbolic = constants.%Self.61e] +// CHECK:STDOUT: interface_with_self_decl @Empty [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -117,84 +118,96 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Basic { -// CHECK:STDOUT: %Self: %Basic.type = symbolic_binding Self, 0 [symbolic = constants.%Self.3e6] +// CHECK:STDOUT: %Self.loc7: %Basic.type = symbolic_binding Self, 0 [symbolic = constants.%Self.3e6] +// CHECK:STDOUT: interface_with_self_decl @Basic [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T.loc8 [concrete] { -// CHECK:STDOUT: %assoc0: %Basic.assoc_type = assoc_entity element0, @Basic.%T [concrete = constants.%assoc0.909] +// CHECK:STDOUT: %assoc0: %Basic.assoc_type = assoc_entity element0, @Basic.%T [concrete = constants.%assoc0.590] // CHECK:STDOUT: } -// CHECK:STDOUT: %Basic.F.decl: %Basic.F.type = fn_decl @Basic.F [concrete = constants.%Basic.F] {} {} -// CHECK:STDOUT: %assoc1: %Basic.assoc_type = assoc_entity element1, %Basic.F.decl [concrete = constants.%assoc1.a1d] +// CHECK:STDOUT: %Basic.WithSelf.F.decl: @Basic.%Basic.WithSelf.F.type (%Basic.WithSelf.F.type) = fn_decl @Basic.WithSelf.F [symbolic = @Basic.%Basic.WithSelf.F (constants.%Basic.WithSelf.F)] {} {} +// CHECK:STDOUT: %assoc1: %Basic.assoc_type = assoc_entity element1, %Basic.WithSelf.F.decl [concrete = constants.%assoc1.6a5] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc7 // CHECK:STDOUT: .T = @T.loc8.%assoc0 // CHECK:STDOUT: .F = %assoc1 -// CHECK:STDOUT: witness = (%T, %Basic.F.decl) +// CHECK:STDOUT: witness = (%T, %Basic.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @ForwardDeclared { -// CHECK:STDOUT: %Self: %ForwardDeclared.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8e7] +// CHECK:STDOUT: %Self.loc15: %ForwardDeclared.type = symbolic_binding Self, 0 [symbolic = constants.%Self.8e7] +// CHECK:STDOUT: interface_with_self_decl @ForwardDeclared [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T.loc16 [concrete] { -// CHECK:STDOUT: %assoc0: %ForwardDeclared.assoc_type = assoc_entity element0, @ForwardDeclared.%T [concrete = constants.%assoc0.06c] +// CHECK:STDOUT: %assoc0: %ForwardDeclared.assoc_type = assoc_entity element0, @ForwardDeclared.%T [concrete = constants.%assoc0.e70] // CHECK:STDOUT: } -// CHECK:STDOUT: %ForwardDeclared.F.decl: %ForwardDeclared.F.type = fn_decl @ForwardDeclared.F [concrete = constants.%ForwardDeclared.F] {} {} -// CHECK:STDOUT: %assoc1: %ForwardDeclared.assoc_type = assoc_entity element1, %ForwardDeclared.F.decl [concrete = constants.%assoc1.b1d] +// CHECK:STDOUT: %ForwardDeclared.WithSelf.F.decl: @ForwardDeclared.%ForwardDeclared.WithSelf.F.type (%ForwardDeclared.WithSelf.F.type) = fn_decl @ForwardDeclared.WithSelf.F [symbolic = @ForwardDeclared.%ForwardDeclared.WithSelf.F (constants.%ForwardDeclared.WithSelf.F)] {} {} +// CHECK:STDOUT: %assoc1: %ForwardDeclared.assoc_type = assoc_entity element1, %ForwardDeclared.WithSelf.F.decl [concrete = constants.%assoc1.91f] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .T = @T.loc16.%assoc0 // CHECK:STDOUT: .F = %assoc1 -// CHECK:STDOUT: witness = (%T, %ForwardDeclared.F.decl) +// CHECK:STDOUT: witness = (%T, %ForwardDeclared.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T.loc8(@Basic.%Self: %Basic.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T.loc16(@ForwardDeclared.%Self: %ForwardDeclared.type) { -// CHECK:STDOUT: assoc_const T:! type; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @Basic.F(@Basic.%Self: %Basic.type) { +// CHECK:STDOUT: generic fn @Basic.WithSelf.F(@Basic.%Self.loc7: %Basic.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ForwardDeclared.F(@ForwardDeclared.%Self: %ForwardDeclared.type) { +// CHECK:STDOUT: generic fn @ForwardDeclared.WithSelf.F(@ForwardDeclared.%Self.loc15: %ForwardDeclared.type) { // CHECK:STDOUT: fn(); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T.loc8(constants.%Self.3e6) {} +// CHECK:STDOUT: specific @Empty(constants.%Self.61e) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @Basic.F(constants.%Self.3e6) {} +// CHECK:STDOUT: specific @Basic(constants.%Self.3e6) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @T.loc16(constants.%Self.8e7) {} +// CHECK:STDOUT: specific @Basic.WithSelf.F(constants.%Self.3e6) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @ForwardDeclared.F(constants.%Self.8e7) {} +// CHECK:STDOUT: specific @ForwardDeclared(constants.%Self.8e7) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc17 => constants.%Self.8e7 +// CHECK:STDOUT: %ForwardDeclared.WithSelf.F.type => constants.%ForwardDeclared.WithSelf.F.type +// CHECK:STDOUT: %ForwardDeclared.WithSelf.F => constants.%ForwardDeclared.WithSelf.F +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ForwardDeclared.WithSelf.F(constants.%Self.8e7) {} // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Empty.type: type = facet_type <@Empty> [concrete] +// CHECK:STDOUT: %Self.0c3: %Empty.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %pattern_type.7d1: type = pattern_type %Empty.type [concrete] // CHECK:STDOUT: %UseEmpty.type: type = fn_type @UseEmpty [concrete] // CHECK:STDOUT: %UseEmpty: %UseEmpty.type = struct_value () [concrete] // CHECK:STDOUT: %Basic.type: type = facet_type <@Basic> [concrete] +// CHECK:STDOUT: %Self.685: %Basic.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %Basic.WithSelf.F.type: type = fn_type @Basic.WithSelf.F, @Basic(%Self.685) [symbolic] +// CHECK:STDOUT: %Basic.WithSelf.F: %Basic.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.185: type = pattern_type %Basic.type [concrete] // CHECK:STDOUT: %UseBasic.type: type = fn_type @UseBasic [concrete] // CHECK:STDOUT: %UseBasic: %UseBasic.type = struct_value () [concrete] // CHECK:STDOUT: %ForwardDeclared.type: type = facet_type <@ForwardDeclared> [concrete] +// CHECK:STDOUT: %Self.332: %ForwardDeclared.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %ForwardDeclared.WithSelf.F.type: type = fn_type @ForwardDeclared.WithSelf.F, @ForwardDeclared(%Self.332) [symbolic] +// CHECK:STDOUT: %ForwardDeclared.WithSelf.F: %ForwardDeclared.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.0a0: type = pattern_type %ForwardDeclared.type [concrete] // CHECK:STDOUT: %UseForwardDeclared.type: type = fn_type @UseForwardDeclared [concrete] // CHECK:STDOUT: %UseForwardDeclared: %UseForwardDeclared.type = struct_value () [concrete] // CHECK:STDOUT: %Basic.assoc_type: type = assoc_entity_type @Basic [concrete] -// CHECK:STDOUT: %assoc0.f14: %Basic.assoc_type = assoc_entity element0, imports.%Main.import_ref.a37 [concrete] -// CHECK:STDOUT: %assoc1.8cf: %Basic.assoc_type = assoc_entity element1, imports.%Main.import_ref.e5c [concrete] +// CHECK:STDOUT: %assoc0.a68: %Basic.assoc_type = assoc_entity element0, imports.%Main.import_ref.6c4 [concrete] +// CHECK:STDOUT: %assoc1.448: %Basic.assoc_type = assoc_entity element1, imports.%Main.import_ref.f48 [concrete] // CHECK:STDOUT: %ForwardDeclared.assoc_type: type = assoc_entity_type @ForwardDeclared [concrete] -// CHECK:STDOUT: %assoc0.d49: %ForwardDeclared.assoc_type = assoc_entity element0, imports.%Main.import_ref.e0c [concrete] -// CHECK:STDOUT: %assoc1.128: %ForwardDeclared.assoc_type = assoc_entity element1, imports.%Main.import_ref.b1c [concrete] +// CHECK:STDOUT: %assoc0.c28: %ForwardDeclared.assoc_type = assoc_entity element0, imports.%Main.import_ref.614 [concrete] +// CHECK:STDOUT: %assoc1.e73: %ForwardDeclared.assoc_type = assoc_entity element1, imports.%Main.import_ref.e6e [concrete] // CHECK:STDOUT: %ptr.c31: type = ptr_type %ForwardDeclared.type [concrete] // CHECK:STDOUT: %pattern_type.063: type = pattern_type %ptr.c31 [concrete] // CHECK:STDOUT: %struct_type.f: type = struct_type {.f: %ForwardDeclared.type} [concrete] @@ -202,7 +215,6 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %.816: ref %ForwardDeclared.type = struct_access imports.%f_ref.var, element0 [concrete] // CHECK:STDOUT: %addr: %ptr.c31 = addr_of %.816 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -210,7 +222,8 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.ba9: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%ForwardDeclared.type) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.a2e: %ptr.as.Copy.impl.Op.type.ba9 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.c31, (%Copy.impl_witness.e5d) [concrete] -// CHECK:STDOUT: %.5f3: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.5bc: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.092: type = fn_type_with_self_type %Copy.WithSelf.Op.type.5bc, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: = bound_method %addr, %ptr.as.Copy.impl.Op.a2e [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.a2e, @ptr.as.Copy.impl.Op(%ForwardDeclared.type) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %addr, %ptr.as.Copy.impl.Op.specific_fn [concrete] @@ -227,20 +240,22 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Main.import_ref.69f = import_ref Main//a, loc4_17, unloaded +// CHECK:STDOUT: %Main.import_ref.736: %Basic.assoc_type = import_ref Main//a, loc8_8, loaded [concrete = constants.%assoc0.a68] +// CHECK:STDOUT: %Main.import_ref.c83: %Basic.assoc_type = import_ref Main//a, loc9_9, loaded [concrete = constants.%assoc1.448] +// CHECK:STDOUT: %Main.T.85a = import_ref Main//a, T, unloaded +// CHECK:STDOUT: %Main.F.95b = import_ref Main//a, F, unloaded +// CHECK:STDOUT: %Main.import_ref.ba7f95.2: %Basic.type = import_ref Main//a, loc7_17, loaded [symbolic = constants.%Self.685] // CHECK:STDOUT: %Main.import_ref.1e4 = import_ref Main//a, loc7_17, unloaded -// CHECK:STDOUT: %Main.import_ref.016: %Basic.assoc_type = import_ref Main//a, loc8_8, loaded [concrete = constants.%assoc0.f14] -// CHECK:STDOUT: %Main.import_ref.f57: %Basic.assoc_type = import_ref Main//a, loc9_9, loaded [concrete = constants.%assoc1.8cf] -// CHECK:STDOUT: %Main.T.faa = import_ref Main//a, T, unloaded -// CHECK:STDOUT: %Main.F.dff = import_ref Main//a, F, unloaded +// CHECK:STDOUT: %Main.import_ref.fa6: %ForwardDeclared.assoc_type = import_ref Main//a, loc16_8, loaded [concrete = constants.%assoc0.c28] +// CHECK:STDOUT: %Main.import_ref.9f2: %ForwardDeclared.assoc_type = import_ref Main//a, loc17_9, loaded [concrete = constants.%assoc1.e73] +// CHECK:STDOUT: %Main.T.9f8 = import_ref Main//a, T, unloaded +// CHECK:STDOUT: %Main.F.204 = import_ref Main//a, F, unloaded +// CHECK:STDOUT: %Main.import_ref.319eb9.2: %ForwardDeclared.type = import_ref Main//a, loc15_27, loaded [symbolic = constants.%Self.332] // CHECK:STDOUT: %Main.import_ref.952 = import_ref Main//a, loc15_27, unloaded -// CHECK:STDOUT: %Main.import_ref.d48: %ForwardDeclared.assoc_type = import_ref Main//a, loc16_8, loaded [concrete = constants.%assoc0.d49] -// CHECK:STDOUT: %Main.import_ref.176: %ForwardDeclared.assoc_type = import_ref Main//a, loc17_9, loaded [concrete = constants.%assoc1.128] -// CHECK:STDOUT: %Main.T.324 = import_ref Main//a, T, unloaded -// CHECK:STDOUT: %Main.F.737 = import_ref Main//a, F, unloaded -// CHECK:STDOUT: %Main.import_ref.a37 = import_ref Main//a, loc8_8, unloaded -// CHECK:STDOUT: %Main.import_ref.e5c = import_ref Main//a, loc9_9, unloaded -// CHECK:STDOUT: %Main.import_ref.e0c = import_ref Main//a, loc16_8, unloaded -// CHECK:STDOUT: %Main.import_ref.b1c = import_ref Main//a, loc17_9, unloaded +// CHECK:STDOUT: %Main.import_ref.6c4 = import_ref Main//a, loc8_8, unloaded +// CHECK:STDOUT: %Main.import_ref.f48 = import_ref Main//a, loc9_9, unloaded +// CHECK:STDOUT: %Main.import_ref.614 = import_ref Main//a, loc16_8, unloaded +// CHECK:STDOUT: %Main.import_ref.e6e = import_ref Main//a, loc17_9, unloaded // CHECK:STDOUT: %f_ref.patt: %pattern_type.afe = ref_binding_pattern f_ref [concrete] // CHECK:STDOUT: %f_ref.var_patt: %pattern_type.afe = var_pattern %f_ref.patt [concrete] // CHECK:STDOUT: %f_ref.var: ref %struct_type.f = var %f_ref.var_patt [concrete] @@ -292,17 +307,17 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %f: %ForwardDeclared.type = value_binding f, %f.param // CHECK:STDOUT: } // CHECK:STDOUT: %Basic.ref.loc10: type = name_ref Basic, imports.%Main.Basic [concrete = constants.%Basic.type] -// CHECK:STDOUT: %T.ref.loc10: %Basic.assoc_type = name_ref T, imports.%Main.import_ref.016 [concrete = constants.%assoc0.f14] -// CHECK:STDOUT: %UseBasicT: %Basic.assoc_type = alias_binding UseBasicT, imports.%Main.import_ref.016 [concrete = constants.%assoc0.f14] +// CHECK:STDOUT: %T.ref.loc10: %Basic.assoc_type = name_ref T, imports.%Main.import_ref.736 [concrete = constants.%assoc0.a68] +// CHECK:STDOUT: %UseBasicT: %Basic.assoc_type = alias_binding UseBasicT, imports.%Main.import_ref.736 [concrete = constants.%assoc0.a68] // CHECK:STDOUT: %Basic.ref.loc11: type = name_ref Basic, imports.%Main.Basic [concrete = constants.%Basic.type] -// CHECK:STDOUT: %F.ref.loc11: %Basic.assoc_type = name_ref F, imports.%Main.import_ref.f57 [concrete = constants.%assoc1.8cf] -// CHECK:STDOUT: %UseBasicF: %Basic.assoc_type = alias_binding UseBasicF, imports.%Main.import_ref.f57 [concrete = constants.%assoc1.8cf] +// CHECK:STDOUT: %F.ref.loc11: %Basic.assoc_type = name_ref F, imports.%Main.import_ref.c83 [concrete = constants.%assoc1.448] +// CHECK:STDOUT: %UseBasicF: %Basic.assoc_type = alias_binding UseBasicF, imports.%Main.import_ref.c83 [concrete = constants.%assoc1.448] // CHECK:STDOUT: %ForwardDeclared.ref.loc13: type = name_ref ForwardDeclared, imports.%Main.ForwardDeclared [concrete = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %T.ref.loc13: %ForwardDeclared.assoc_type = name_ref T, imports.%Main.import_ref.d48 [concrete = constants.%assoc0.d49] -// CHECK:STDOUT: %UseForwardDeclaredT: %ForwardDeclared.assoc_type = alias_binding UseForwardDeclaredT, imports.%Main.import_ref.d48 [concrete = constants.%assoc0.d49] +// CHECK:STDOUT: %T.ref.loc13: %ForwardDeclared.assoc_type = name_ref T, imports.%Main.import_ref.fa6 [concrete = constants.%assoc0.c28] +// CHECK:STDOUT: %UseForwardDeclaredT: %ForwardDeclared.assoc_type = alias_binding UseForwardDeclaredT, imports.%Main.import_ref.fa6 [concrete = constants.%assoc0.c28] // CHECK:STDOUT: %ForwardDeclared.ref.loc14: type = name_ref ForwardDeclared, imports.%Main.ForwardDeclared [concrete = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %F.ref.loc14: %ForwardDeclared.assoc_type = name_ref F, imports.%Main.import_ref.176 [concrete = constants.%assoc1.128] -// CHECK:STDOUT: %UseForwardDeclaredF: %ForwardDeclared.assoc_type = alias_binding UseForwardDeclaredF, imports.%Main.import_ref.176 [concrete = constants.%assoc1.128] +// CHECK:STDOUT: %F.ref.loc14: %ForwardDeclared.assoc_type = name_ref F, imports.%Main.import_ref.9f2 [concrete = constants.%assoc1.e73] +// CHECK:STDOUT: %UseForwardDeclaredF: %ForwardDeclared.assoc_type = alias_binding UseForwardDeclaredF, imports.%Main.import_ref.9f2 [concrete = constants.%assoc1.e73] // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %f.patt: %pattern_type.063 = ref_binding_pattern f [concrete] // CHECK:STDOUT: %f.var_patt: %pattern_type.063 = var_pattern %f.patt [concrete] @@ -326,9 +341,9 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: interface @Basic [from "a.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.1e4 -// CHECK:STDOUT: .T = imports.%Main.import_ref.016 -// CHECK:STDOUT: .F = imports.%Main.import_ref.f57 -// CHECK:STDOUT: witness = (imports.%Main.T.faa, imports.%Main.F.dff) +// CHECK:STDOUT: .T = imports.%Main.import_ref.736 +// CHECK:STDOUT: .F = imports.%Main.import_ref.c83 +// CHECK:STDOUT: witness = (imports.%Main.T.85a, imports.%Main.F.95b) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -336,9 +351,9 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: interface @ForwardDeclared [from "a.carbon"] { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Main.import_ref.952 -// CHECK:STDOUT: .T = imports.%Main.import_ref.d48 -// CHECK:STDOUT: .F = imports.%Main.import_ref.176 -// CHECK:STDOUT: witness = (imports.%Main.T.324, imports.%Main.F.737) +// CHECK:STDOUT: .T = imports.%Main.import_ref.fa6 +// CHECK:STDOUT: .F = imports.%Main.import_ref.9f2 +// CHECK:STDOUT: witness = (imports.%Main.T.9f8, imports.%Main.F.204) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -348,11 +363,19 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: generic fn @Basic.WithSelf.F(imports.%Main.import_ref.ba7f95.2: %Basic.type) [from "a.carbon"] { +// CHECK:STDOUT: fn; +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: fn @UseBasic(%e.param: %Basic.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: generic fn @ForwardDeclared.WithSelf.F(imports.%Main.import_ref.319eb9.2: %ForwardDeclared.type) [from "a.carbon"] { +// CHECK:STDOUT: fn; +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: fn @UseForwardDeclared(%f.param: %ForwardDeclared.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return @@ -363,7 +386,7 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %f_ref.ref: ref %struct_type.f = name_ref f_ref, imports.%Main.f_ref [concrete = imports.%f_ref.var] // CHECK:STDOUT: %.loc16: ref %ForwardDeclared.type = struct_access %f_ref.ref, element0 [concrete = constants.%.816] // CHECK:STDOUT: %addr: %ptr.c31 = addr_of %.loc16 [concrete = constants.%addr] -// CHECK:STDOUT: %impl.elem0: %.5f3 = impl_witness_access constants.%Copy.impl_witness.e5d, element0 [concrete = constants.%ptr.as.Copy.impl.Op.a2e] +// CHECK:STDOUT: %impl.elem0: %.092 = impl_witness_access constants.%Copy.impl_witness.e5d, element0 [concrete = constants.%ptr.as.Copy.impl.Op.a2e] // CHECK:STDOUT: %bound_method.loc16_27.1: = bound_method %addr, %impl.elem0 [concrete = constants.%ptr.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%ForwardDeclared.type) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_27.2: = bound_method %addr, %specific_fn [concrete = constants.%bound_method] @@ -372,3 +395,25 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%Self.0c3) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Basic(constants.%Self.685) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.685 +// CHECK:STDOUT: %Basic.WithSelf.F.type => constants.%Basic.WithSelf.F.type +// CHECK:STDOUT: %Basic.WithSelf.F => constants.%Basic.WithSelf.F +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Basic.WithSelf.F(constants.%Self.685) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ForwardDeclared(constants.%Self.332) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self => constants.%Self.332 +// CHECK:STDOUT: %ForwardDeclared.WithSelf.F.type => constants.%ForwardDeclared.WithSelf.F.type +// CHECK:STDOUT: %ForwardDeclared.WithSelf.F => constants.%ForwardDeclared.WithSelf.F +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @ForwardDeclared.WithSelf.F(constants.%Self.332) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/import_access.carbon b/toolchain/check/testdata/interface/import_access.carbon index a251fc408b90..2d5d09162c06 100644 --- a/toolchain/check/testdata/interface/import_access.carbon +++ b/toolchain/check/testdata/interface/import_access.carbon @@ -168,6 +168,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: interface @Def { // CHECK:STDOUT: %Self: %Def.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Def [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -176,6 +177,8 @@ private interface Redecl {} // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Def(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- forward_with_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -193,6 +196,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: interface @ForwardWithDef { // CHECK:STDOUT: %Self: %ForwardWithDef.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @ForwardWithDef [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -201,6 +205,8 @@ private interface Redecl {} // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @ForwardWithDef(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- forward.carbon // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -211,6 +217,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Def.type: type = facet_type <@Def> [concrete] +// CHECK:STDOUT: %Self: %Def.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %Def.type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] @@ -218,7 +225,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Test.Def: type = import_ref Test//def, Def, loaded [concrete = constants.%Def.type] -// CHECK:STDOUT: %Test.import_ref = import_ref Test//def, loc4_23, unloaded +// CHECK:STDOUT: %Test.import_ref.faa = import_ref Test//def, loc4_23, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -240,7 +247,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: interface @Def [from "def.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Test.import_ref +// CHECK:STDOUT: .Self = imports.%Test.import_ref.faa // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -251,6 +258,10 @@ private interface Redecl {} // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Def(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_local_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -321,6 +332,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %ForwardWithDef.type: type = facet_type <@ForwardWithDef> [concrete] +// CHECK:STDOUT: %Self: %ForwardWithDef.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %ForwardWithDef.type [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] @@ -328,7 +340,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Test.ForwardWithDef: type = import_ref Test//forward_with_def, ForwardWithDef, loaded [concrete = constants.%ForwardWithDef.type] -// CHECK:STDOUT: %Test.import_ref = import_ref Test//forward_with_def, loc6_26, unloaded +// CHECK:STDOUT: %Test.import_ref.947 = import_ref Test//forward_with_def, loc6_26, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -350,7 +362,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: interface @ForwardWithDef [from "forward_with_def.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Test.import_ref +// CHECK:STDOUT: .Self = imports.%Test.import_ref.947 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -361,6 +373,10 @@ private interface Redecl {} // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @ForwardWithDef(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_local_forward_with_def.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -459,6 +475,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: interface @Forward { // CHECK:STDOUT: %Self: %Forward.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Forward [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -472,6 +489,8 @@ private interface Redecl {} // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Forward(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_local_forward.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -558,6 +577,7 @@ private interface Redecl {} // CHECK:STDOUT: // CHECK:STDOUT: interface @Redecl { // CHECK:STDOUT: %Self: %Redecl.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @Redecl [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -566,3 +586,5 @@ private interface Redecl {} // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Redecl(constants.%Self) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/import_interface_decl.carbon b/toolchain/check/testdata/interface/import_interface_decl.carbon index 7a588b94c233..016b0e3abeb1 100644 --- a/toolchain/check/testdata/interface/import_interface_decl.carbon +++ b/toolchain/check/testdata/interface/import_interface_decl.carbon @@ -49,6 +49,7 @@ impl library "[[@TEST_NAME]]"; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete] +// CHECK:STDOUT: %Self: %B.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -77,3 +78,5 @@ impl library "[[@TEST_NAME]]"; // CHECK:STDOUT: // CHECK:STDOUT: impl @empty_tuple.type.as.B.impl: imports.%Main.import_ref.e5c as imports.%Main.import_ref.9f2 [from "fail_b.carbon"]; // CHECK:STDOUT: +// CHECK:STDOUT: specific @B(constants.%Self) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/incomplete.carbon b/toolchain/check/testdata/interface/incomplete.carbon index 173da23492e5..f6a514c0e17f 100644 --- a/toolchain/check/testdata/interface/incomplete.carbon +++ b/toolchain/check/testdata/interface/incomplete.carbon @@ -124,6 +124,9 @@ interface A(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: %C = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -131,19 +134,16 @@ interface A(T:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .C = +// CHECK:STDOUT: .C = // CHECK:STDOUT: .T = @T.%assoc0 // CHECK:STDOUT: witness = (%T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const T:! %C; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: class @C; // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_incomplete_type_impl.carbon // CHECK:STDOUT: @@ -189,6 +189,9 @@ interface A(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: %C = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -196,16 +199,13 @@ interface A(T:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .C = +// CHECK:STDOUT: .C = // CHECK:STDOUT: .T = @T.%assoc0 // CHECK:STDOUT: witness = (%T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const T:! %C; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: impl @empty_struct_type.as..impl: %.loc16_7.2 as %.loc16_14 { // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = @@ -213,9 +213,13 @@ interface A(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class @C; // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%.Self) {} +// CHECK:STDOUT: specific @I(constants.%.Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_incomplete_type_usage.carbon // CHECK:STDOUT: @@ -268,6 +272,9 @@ interface A(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: %C = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0] // CHECK:STDOUT: } @@ -275,16 +282,13 @@ interface A(T:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .C = +// CHECK:STDOUT: .C = // CHECK:STDOUT: .T = @T.%assoc0 // CHECK:STDOUT: witness = (%T) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: assoc_const T:! %C; -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: class @C; // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(%U.loc9_6.2: %I.type) { @@ -306,7 +310,9 @@ interface A(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%U) { // CHECK:STDOUT: %U.loc9_6.1 => constants.%U @@ -314,7 +320,9 @@ interface A(T:! type) { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.422 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%U) {} +// CHECK:STDOUT: specific @I(constants.%U) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_incomplete_extend_constraint.carbon // CHECK:STDOUT: @@ -335,10 +343,12 @@ interface A(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @B { // CHECK:STDOUT: %Self: %B.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @B [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .A = +// CHECK:STDOUT: .A = // CHECK:STDOUT: has_error // CHECK:STDOUT: witness = () // CHECK:STDOUT: @@ -347,6 +357,8 @@ interface A(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constraint @A; // CHECK:STDOUT: +// CHECK:STDOUT: specific @B(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_extend_require_enclosing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -364,7 +376,10 @@ interface A(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @A { // CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %A.Self.binding.as_type.impls.A.type.require.decl = require_decl @A.Self.binding.as_type.impls.A.type.require [concrete] { +// CHECK:STDOUT: interface_with_self_decl @A [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %A.WithSelf.Self.binding.as_type.impls.A.type.require.decl = require_decl @A.WithSelf.Self.binding.as_type.impls.A.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %A.ref // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @A.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -374,17 +389,20 @@ interface A(T:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .A = +// CHECK:STDOUT: .A = // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @A.Self.binding.as_type.impls.A.type.require(@A.%Self: %A.type) { +// CHECK:STDOUT: generic require @A.WithSelf.Self.binding.as_type.impls.A.type.require(@A.%Self: %A.type) { // CHECK:STDOUT: %Self: %A.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.Self.binding.as_type.impls.A.type.require(constants.%Self) { +// CHECK:STDOUT: specific @A(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @A.WithSelf.Self.binding.as_type.impls.A.type.require(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: } @@ -427,7 +445,10 @@ interface A(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc3_23.1: @A.%A.type (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self.loc3_23.2 (constants.%Self)] -// CHECK:STDOUT: %A.Self.binding.as_type.impls.A.type.require.decl = require_decl @A.Self.binding.as_type.impls.A.type.require [concrete] { +// CHECK:STDOUT: interface_with_self_decl @A [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %A.WithSelf.Self.binding.as_type.impls.A.type.require.decl = require_decl @A.WithSelf.Self.binding.as_type.impls.A.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %A.type.loc11_28 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @A.%Self.loc3_23.1 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -440,16 +461,17 @@ interface A(T:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc3_23.1 // CHECK:STDOUT: .A = +// CHECK:STDOUT: .A = // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @A.Self.binding.as_type.impls.A.type.require(@A.%T.loc3_13.2: type, @A.%Self.loc3_23.1: @A.%A.type (%A.type.ade)) { +// CHECK:STDOUT: generic require @A.WithSelf.Self.binding.as_type.impls.A.type.require(@A.%T.loc3_13.2: type, @A.%Self.loc3_23.1: @A.%A.type (%A.type.ade)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %A.type.loc11_18: type = facet_type <@A, @A(%T)> [symbolic = %A.type.loc11_18 (constants.%A.type.ade)] -// CHECK:STDOUT: %Self: @A.Self.binding.as_type.impls.A.type.require.%A.type.loc11_18 (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self: @A.WithSelf.Self.binding.as_type.impls.A.type.require.%A.type.loc11_18 (%A.type.ade) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -457,11 +479,13 @@ interface A(T:! type) { // CHECK:STDOUT: %T.loc3_13.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @A(constants.%T, constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%empty_struct_type) { // CHECK:STDOUT: %T.loc3_13.1 => constants.%empty_struct_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.Self.binding.as_type.impls.A.type.require(constants.%T, constants.%Self) { +// CHECK:STDOUT: specific @A.WithSelf.Self.binding.as_type.impls.A.type.require(constants.%T, constants.%Self) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %A.type.loc11_18 => constants.%A.type.ade // CHECK:STDOUT: %Self => constants.%Self diff --git a/toolchain/check/testdata/interface/local.carbon b/toolchain/check/testdata/interface/local.carbon index de3b7e863b00..69560aee7c2e 100644 --- a/toolchain/check/testdata/interface/local.carbon +++ b/toolchain/check/testdata/interface/local.carbon @@ -32,17 +32,19 @@ fn F() { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type.2ec: type = pattern_type %Self.binding.as_type [symbolic] -// CHECK:STDOUT: %I.G.type: type = fn_type @I.G [concrete] -// CHECK:STDOUT: %I.G: %I.G.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.G.type.488: type = fn_type @I.WithSelf.G, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.G.6c4: %I.WithSelf.G.type.488 = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.G.decl [concrete] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.G.decl [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [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: %empty_tuple.type.as.I.impl.G.type: type = fn_type @empty_tuple.type.as.I.impl.G [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.G: %empty_tuple.type.as.I.impl.G.type = struct_value () [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %empty_tuple.type, (%I.impl_witness) [concrete] -// CHECK:STDOUT: %.929: type = fn_type_with_self_type %I.G.type, %I.facet [concrete] +// CHECK:STDOUT: %I.WithSelf.G.type.4f5: type = fn_type @I.WithSelf.G, @I(%I.facet) [concrete] +// CHECK:STDOUT: %I.WithSelf.G.5a3: %I.WithSelf.G.type.4f5 = struct_value () [concrete] +// CHECK:STDOUT: %.0ea: type = fn_type_with_self_type %I.WithSelf.G.type.4f5, %I.facet [concrete] // CHECK:STDOUT: %empty_tuple.type.as.I.impl.G.bound: = bound_method %empty_tuple, %empty_tuple.type.as.I.impl.G [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -54,25 +56,28 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %I.G.decl: %I.G.type = fn_decl @I.G [concrete = constants.%I.G] { -// CHECK:STDOUT: %self.patt: @I.G.%pattern_type (%pattern_type.2ec) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @I.G.%pattern_type (%pattern_type.2ec) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %Self.loc16: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.G.decl: @I.%I.WithSelf.G.type (%I.WithSelf.G.type.488) = fn_decl @I.WithSelf.G [symbolic = @I.%I.WithSelf.G (constants.%I.WithSelf.G.6c4)] { +// CHECK:STDOUT: %self.patt: @I.WithSelf.G.%pattern_type (%pattern_type.2ec) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @I.WithSelf.G.%pattern_type (%pattern_type.2ec) = value_param_pattern %self.patt, call_param0 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.param: @I.G.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @I.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc17_16.1: type = splice_block %.loc17_16.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self.loc16 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc17_16.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @I.G.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %self: @I.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.G.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.G.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc16 // CHECK:STDOUT: .G = %assoc0 -// CHECK:STDOUT: witness = (%I.G.decl) +// CHECK:STDOUT: witness = (%I.WithSelf.G.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -105,7 +110,7 @@ fn F() { // CHECK:STDOUT: %.loc22_4.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %G.ref: %I.assoc_type = name_ref G, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.929 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%empty_tuple.type.as.I.impl.G] +// CHECK:STDOUT: %impl.elem0: %.0ea = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%empty_tuple.type.as.I.impl.G] // CHECK:STDOUT: %bound_method: = bound_method %.loc22_4.1, %impl.elem0 [concrete = constants.%empty_tuple.type.as.I.impl.G.bound] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.loc22_4.2: %empty_tuple.type = converted %.loc22_4.1, %empty_tuple [concrete = constants.%empty_tuple] @@ -113,12 +118,12 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.G(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.G(@I.%Self.loc16: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.2ec)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @I.G.%Self.binding.as_type (%Self.binding.as_type)); +// CHECK:STDOUT: fn(%self.param: @I.WithSelf.G.%Self.binding.as_type (%Self.binding.as_type)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @empty_tuple.type.as.I.impl.G(%self.param: %empty_tuple.type) { @@ -126,13 +131,27 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.G(constants.%Self) { +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc17 => constants.%Self +// CHECK:STDOUT: %I.WithSelf.G.type => constants.%I.WithSelf.G.type.488 +// CHECK:STDOUT: %I.WithSelf.G => constants.%I.WithSelf.G.6c4 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.G(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.2ec // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.G(constants.%I.facet) { +// CHECK:STDOUT: specific @I(constants.%I.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc17 => constants.%I.facet +// CHECK:STDOUT: %I.WithSelf.G.type => constants.%I.WithSelf.G.type.4f5 +// CHECK:STDOUT: %I.WithSelf.G => constants.%I.WithSelf.G.5a3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I.WithSelf.G(constants.%I.facet) { // CHECK:STDOUT: %Self => constants.%I.facet // CHECK:STDOUT: %Self.binding.as_type => constants.%empty_tuple.type // CHECK:STDOUT: %pattern_type => constants.%pattern_type.cb1 diff --git a/toolchain/check/testdata/interface/member_lookup.carbon b/toolchain/check/testdata/interface/member_lookup.carbon index 5eaf4b73c60c..9c327cd8b788 100644 --- a/toolchain/check/testdata/interface/member_lookup.carbon +++ b/toolchain/check/testdata/interface/member_lookup.carbon @@ -65,7 +65,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %Self.ade: %Interface.type.442 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] // CHECK:STDOUT: %Interface.assoc_type.5a2: type = assoc_entity_type @Interface, @Interface(%T.67d) [symbolic] -// CHECK:STDOUT: %assoc0.624: %Interface.assoc_type.5a2 = assoc_entity element0, @Interface.%X [symbolic] +// CHECK:STDOUT: %assoc0.b59: %Interface.assoc_type.5a2 = assoc_entity element0, @Interface.%X [symbolic] // CHECK:STDOUT: %I.682: %Interface.type.442 = symbolic_binding I, 1 [symbolic] // CHECK:STDOUT: %pattern_type.cbe: type = pattern_type %Interface.type.442 [symbolic] // CHECK:STDOUT: %.8e9: Core.Form = init_form %ptr.e8f, call_param0 [symbolic] @@ -78,17 +78,17 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %Interface.lookup_impl_witness.9f1: = lookup_impl_witness %I.682, @Interface, @Interface(%T.67d) [symbolic] // CHECK:STDOUT: %impl.elem0.117: %ptr.e8f = impl_witness_access %Interface.lookup_impl_witness.9f1, element0 [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: = lookup_impl_witness %ptr.e8f, @Copy [symbolic] // CHECK:STDOUT: %Copy.facet.c25: %Copy.type = facet_value %ptr.e8f, (%Copy.lookup_impl_witness.2e6) [symbolic] -// CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c25 [symbolic] -// CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] -// CHECK:STDOUT: %bound_method.54b: = bound_method %impl.elem0.117, %impl.elem0.201 [symbolic] -// CHECK:STDOUT: %specific_impl_fn.b84: = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet.c25) [symbolic] -// CHECK:STDOUT: %bound_method.a76: = bound_method %impl.elem0.117, %specific_impl_fn.b84 [symbolic] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d82: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.c25) [symbolic] +// CHECK:STDOUT: %.299: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d82, %Copy.facet.c25 [symbolic] +// CHECK:STDOUT: %impl.elem0.1c7: %.299 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic] +// CHECK:STDOUT: %bound_method.28a: = bound_method %impl.elem0.117, %impl.elem0.1c7 [symbolic] +// CHECK:STDOUT: %specific_impl_fn.366: = specific_impl_function %impl.elem0.1c7, @Copy.WithSelf.Op(%Copy.facet.c25) [symbolic] +// CHECK:STDOUT: %bound_method.40f: = bound_method %impl.elem0.117, %specific_impl_fn.366 [symbolic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] @@ -103,7 +103,7 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %AccessConcrete: %AccessConcrete.type = struct_value () [concrete] // CHECK:STDOUT: %Self.b54: %Interface.type.389 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Interface.assoc_type.77f: type = assoc_entity_type @Interface, @Interface(%i32) [concrete] -// CHECK:STDOUT: %assoc0.2ec: %Interface.assoc_type.77f = assoc_entity element0, @Interface.%X [concrete] +// CHECK:STDOUT: %assoc0.dcc: %Interface.assoc_type.77f = assoc_entity element0, @Interface.%X [concrete] // CHECK:STDOUT: %I.binding.as_type.78a: type = symbolic_binding_type I, 0, %I.50d [symbolic] // CHECK:STDOUT: %Interface.lookup_impl_witness.4be: = lookup_impl_witness %I.50d, @Interface, @Interface(%i32) [symbolic] // CHECK:STDOUT: %impl.elem0.322: %ptr.235 = impl_witness_access %Interface.lookup_impl_witness.4be, element0 [symbolic] @@ -111,7 +111,8 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.c3c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.a7b: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.a7b [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.a7b) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet.a7b [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: = bound_method %impl.elem0.322, %ptr.as.Copy.impl.Op.011 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %bound_method.06d: = bound_method %impl.elem0.322, %ptr.as.Copy.impl.Op.specific_fn [symbolic] @@ -193,18 +194,20 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(%T.loc4_21.1)> [symbolic = %Interface.type (constants.%Interface.type.442)] // CHECK:STDOUT: %Self.loc4_31.2: @Interface.%Interface.type (%Interface.type.442) = symbolic_binding Self, 1 [symbolic = %Self.loc4_31.2 (constants.%Self.ade)] -// CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface, @Interface(%T.loc4_21.1) [symbolic = %Interface.assoc_type (constants.%Interface.assoc_type.5a2)] -// CHECK:STDOUT: %assoc0: @Interface.%Interface.assoc_type (%Interface.assoc_type.5a2) = assoc_entity element0, %X [symbolic = %assoc0 (constants.%assoc0.624)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc4_31.1: @Interface.%Interface.type (%Interface.type.442) = symbolic_binding Self, 1 [symbolic = %Self.loc4_31.2 (constants.%Self.ade)] -// CHECK:STDOUT: %X: @X.%ptr (%ptr.e8f) = assoc_const_decl @X [concrete] { -// CHECK:STDOUT: %assoc0: @Interface.%Interface.assoc_type (%Interface.assoc_type.5a2) = assoc_entity element0, @Interface.%X [symbolic = @Interface.%assoc0 (constants.%assoc0.624)] +// CHECK:STDOUT: interface_with_self_decl @Interface [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %X: @Interface.%ptr (%ptr.e8f) = assoc_const_decl @X [concrete] { +// CHECK:STDOUT: %assoc0: @Interface.%Interface.assoc_type (%Interface.assoc_type.5a2) = assoc_entity element0, @Interface.%X [symbolic = @Interface.%assoc0 (constants.%assoc0.b59)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_31.1 // CHECK:STDOUT: .T = +// CHECK:STDOUT: .T = // CHECK:STDOUT: .X = @X.%assoc0 // CHECK:STDOUT: witness = (%X) // CHECK:STDOUT: @@ -212,13 +215,6 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @X(@Interface.%T.loc4_21.2: type, @Interface.%Self.loc4_31.1: @Interface.%Interface.type (%Interface.type.442)) { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)] -// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr.e8f)] -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const X:! @X.%ptr (%ptr.e8f); -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic fn @AccessGeneric(%T.loc8_18.2: type, %I.loc8_28.2: @AccessGeneric.%Interface.type.loc8_43.1 (%Interface.type.442)) { // CHECK:STDOUT: %T.loc8_18.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_18.1 (constants.%T.67d)] // CHECK:STDOUT: %Interface.type.loc8_43.1: type = facet_type <@Interface, @Interface(%T.loc8_18.1)> [symbolic = %Interface.type.loc8_43.1 (constants.%Interface.type.442)] @@ -233,32 +229,33 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %require_complete.loc9: = require_complete_type %Interface.type.loc8_43.1 [symbolic = %require_complete.loc9 (constants.%require_complete.46e)] // CHECK:STDOUT: %I.binding.as_type: type = symbolic_binding_type I, 1, %I.loc8_28.1 [symbolic = %I.binding.as_type (constants.%I.binding.as_type.24f)] // CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface, @Interface(%T.loc8_18.1) [symbolic = %Interface.assoc_type (constants.%Interface.assoc_type.5a2)] -// CHECK:STDOUT: %assoc0: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.5a2) = assoc_entity element0, @Interface.%X [symbolic = %assoc0 (constants.%assoc0.624)] +// CHECK:STDOUT: %assoc0: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.5a2) = assoc_entity element0, @Interface.%X [symbolic = %assoc0 (constants.%assoc0.b59)] // CHECK:STDOUT: %Interface.lookup_impl_witness: = lookup_impl_witness %I.loc8_28.1, @Interface, @Interface(%T.loc8_18.1) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.9f1)] // CHECK:STDOUT: %impl.elem0.loc9_11.3: @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.3 (constants.%impl.elem0.117)] // CHECK:STDOUT: %.loc9_11.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc8_18.1) [symbolic = %.loc9_11.3 (constants.%.2f2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc8_50.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc8_50.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.c25)] -// CHECK:STDOUT: %.loc9_11.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc9_11.4 (constants.%.b46)] -// CHECK:STDOUT: %impl.elem0.loc9_11.4: @AccessGeneric.%.loc9_11.4 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.201)] -// CHECK:STDOUT: %bound_method.loc9_11.3: = bound_method %impl.elem0.loc9_11.3, %impl.elem0.loc9_11.4 [symbolic = %bound_method.loc9_11.3 (constants.%bound_method.54b)] -// CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem0.loc9_11.4, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.b84)] -// CHECK:STDOUT: %bound_method.loc9_11.4: = bound_method %impl.elem0.loc9_11.3, %specific_impl_fn.loc9_11.2 [symbolic = %bound_method.loc9_11.4 (constants.%bound_method.a76)] +// CHECK:STDOUT: %Copy.WithSelf.Op.type: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [symbolic = %Copy.WithSelf.Op.type (constants.%Copy.WithSelf.Op.type.d82)] +// CHECK:STDOUT: %.loc9_11.4: type = fn_type_with_self_type %Copy.WithSelf.Op.type, %Copy.facet [symbolic = %.loc9_11.4 (constants.%.299)] +// CHECK:STDOUT: %impl.elem0.loc9_11.4: @AccessGeneric.%.loc9_11.4 (%.299) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.1c7)] +// CHECK:STDOUT: %bound_method.loc9_11.3: = bound_method %impl.elem0.loc9_11.3, %impl.elem0.loc9_11.4 [symbolic = %bound_method.loc9_11.3 (constants.%bound_method.28a)] +// CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem0.loc9_11.4, @Copy.WithSelf.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.366)] +// CHECK:STDOUT: %bound_method.loc9_11.4: = bound_method %impl.elem0.loc9_11.3, %specific_impl_fn.loc9_11.2 [symbolic = %bound_method.loc9_11.4 (constants.%bound_method.40f)] // CHECK:STDOUT: // CHECK:STDOUT: fn() -> out %return.param: @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %I.ref: @AccessGeneric.%Interface.type.loc8_43.1 (%Interface.type.442) = name_ref I, %I.loc8_28.2 [symbolic = %I.loc8_28.1 (constants.%I.682)] // CHECK:STDOUT: %I.as_type: type = facet_access_type %I.ref [symbolic = %I.binding.as_type (constants.%I.binding.as_type.24f)] // CHECK:STDOUT: %.loc9_11.1: type = converted %I.ref, %I.as_type [symbolic = %I.binding.as_type (constants.%I.binding.as_type.24f)] -// CHECK:STDOUT: %.loc9_11.2: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.5a2) = specific_constant @X.%assoc0, @Interface(constants.%T.67d) [symbolic = %assoc0 (constants.%assoc0.624)] -// CHECK:STDOUT: %X.ref: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.5a2) = name_ref X, %.loc9_11.2 [symbolic = %assoc0 (constants.%assoc0.624)] +// CHECK:STDOUT: %.loc9_11.2: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.5a2) = specific_constant @X.%assoc0, @Interface(constants.%T.67d, constants.%I.682) [symbolic = %assoc0 (constants.%assoc0.b59)] +// CHECK:STDOUT: %X.ref: @AccessGeneric.%Interface.assoc_type (%Interface.assoc_type.5a2) = name_ref X, %.loc9_11.2 [symbolic = %assoc0 (constants.%assoc0.b59)] // CHECK:STDOUT: %impl.elem0.loc9_11.1: @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = impl_witness_access constants.%Interface.lookup_impl_witness.9f1, element0 [symbolic = %impl.elem0.loc9_11.3 (constants.%impl.elem0.117)] -// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%.loc9_11.4 (%.b46) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.201)] -// CHECK:STDOUT: %bound_method.loc9_11.1: = bound_method %impl.elem0.loc9_11.1, %impl.elem0.loc9_11.2 [symbolic = %bound_method.loc9_11.3 (constants.%bound_method.54b)] -// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem0.loc9_11.2, @Copy.Op(constants.%Copy.facet.c25) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.b84)] -// CHECK:STDOUT: %bound_method.loc9_11.2: = bound_method %impl.elem0.loc9_11.1, %specific_impl_fn.loc9_11.1 [symbolic = %bound_method.loc9_11.4 (constants.%bound_method.a76)] -// CHECK:STDOUT: %Copy.Op.call: init @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = call %bound_method.loc9_11.2(%impl.elem0.loc9_11.1) -// CHECK:STDOUT: return %Copy.Op.call +// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%.loc9_11.4 (%.299) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.1c7)] +// CHECK:STDOUT: %bound_method.loc9_11.1: = bound_method %impl.elem0.loc9_11.1, %impl.elem0.loc9_11.2 [symbolic = %bound_method.loc9_11.3 (constants.%bound_method.28a)] +// CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem0.loc9_11.2, @Copy.WithSelf.Op(constants.%Copy.facet.c25) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.366)] +// CHECK:STDOUT: %bound_method.loc9_11.2: = bound_method %impl.elem0.loc9_11.1, %specific_impl_fn.loc9_11.1 [symbolic = %bound_method.loc9_11.4 (constants.%bound_method.40f)] +// CHECK:STDOUT: %Copy.WithSelf.Op.call: init @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = call %bound_method.loc9_11.2(%impl.elem0.loc9_11.1) +// CHECK:STDOUT: return %Copy.WithSelf.Op.call // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -277,10 +274,10 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %I.ref: %Interface.type.389 = name_ref I, %I.loc12_19.2 [symbolic = %I.loc12_19.1 (constants.%I.50d)] // CHECK:STDOUT: %I.as_type: type = facet_access_type %I.ref [symbolic = %I.binding.as_type (constants.%I.binding.as_type.78a)] // CHECK:STDOUT: %.loc13_11.1: type = converted %I.ref, %I.as_type [symbolic = %I.binding.as_type (constants.%I.binding.as_type.78a)] -// CHECK:STDOUT: %.loc13_11.2: %Interface.assoc_type.77f = specific_constant @X.%assoc0, @Interface(constants.%i32) [concrete = constants.%assoc0.2ec] -// CHECK:STDOUT: %X.ref: %Interface.assoc_type.77f = name_ref X, %.loc13_11.2 [concrete = constants.%assoc0.2ec] +// CHECK:STDOUT: %.loc13_11.2: %Interface.assoc_type.77f = specific_constant @X.%assoc0, @Interface(constants.%i32, constants.%I.50d) [concrete = constants.%assoc0.dcc] +// CHECK:STDOUT: %X.ref: %Interface.assoc_type.77f = name_ref X, %.loc13_11.2 [concrete = constants.%assoc0.dcc] // CHECK:STDOUT: %impl.elem0.loc13_11.1: %ptr.235 = impl_witness_access constants.%Interface.lookup_impl_witness.4be, element0 [symbolic = %impl.elem0.loc13_11.3 (constants.%impl.elem0.322)] -// CHECK:STDOUT: %impl.elem0.loc13_11.2: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc13_11.2: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc13_11.1: = bound_method %impl.elem0.loc13_11.1, %impl.elem0.loc13_11.2 [symbolic = %ptr.as.Copy.impl.Op.bound (constants.%ptr.as.Copy.impl.Op.bound)] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc13_11.2, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc13_11.2: = bound_method %impl.elem0.loc13_11.1, %specific_fn [symbolic = %bound_method.loc13_11.3 (constants.%bound_method.06d)] @@ -295,13 +292,14 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type => constants.%Interface.type.442 // CHECK:STDOUT: %Self.loc4_31.2 => constants.%Self.ade -// CHECK:STDOUT: %Interface.assoc_type => constants.%Interface.assoc_type.5a2 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.624 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%T.67d, constants.%Self.ade) { -// CHECK:STDOUT: %T => constants.%T.67d +// CHECK:STDOUT: specific @Interface(constants.%T.67d, constants.%Self.ade) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%T.67d // CHECK:STDOUT: %ptr => constants.%ptr.e8f +// CHECK:STDOUT: %Interface.assoc_type => constants.%Interface.assoc_type.5a2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.b59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AccessGeneric(constants.%T.67d, constants.%I.682) { @@ -314,9 +312,12 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %pattern_type.loc8_46 => constants.%pattern_type.4f4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%T.67d, constants.%I.682) { -// CHECK:STDOUT: %T => constants.%T.67d +// CHECK:STDOUT: specific @Interface(constants.%T.67d, constants.%I.682) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%T.67d // CHECK:STDOUT: %ptr => constants.%ptr.e8f +// CHECK:STDOUT: %Interface.assoc_type => constants.%Interface.assoc_type.5a2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.b59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Interface(constants.%i32) { @@ -325,17 +326,26 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type => constants.%Interface.type.389 // CHECK:STDOUT: %Self.loc4_31.2 => constants.%Self.b54 -// CHECK:STDOUT: %Interface.assoc_type => constants.%Interface.assoc_type.77f -// CHECK:STDOUT: %assoc0 => constants.%assoc0.2ec // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AccessConcrete(constants.%I.50d) { // CHECK:STDOUT: %I.loc12_19.1 => constants.%I.50d // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%i32, constants.%I.50d) { -// CHECK:STDOUT: %T => constants.%i32 +// CHECK:STDOUT: specific @Interface(constants.%i32, constants.%Self.ade) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%i32 // CHECK:STDOUT: %ptr => constants.%ptr.235 +// CHECK:STDOUT: %Interface.assoc_type => constants.%Interface.assoc_type.77f +// CHECK:STDOUT: %assoc0 => constants.%assoc0.dcc +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface(constants.%i32, constants.%I.50d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%i32 +// CHECK:STDOUT: %ptr => constants.%ptr.235 +// CHECK:STDOUT: %Interface.assoc_type => constants.%Interface.assoc_type.77f +// CHECK:STDOUT: %assoc0 => constants.%assoc0.dcc // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_no_member.carbon @@ -349,9 +359,9 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %Interface.generic: %Interface.type.815 = struct_value () [concrete] // CHECK:STDOUT: %Interface.type.442: type = facet_type <@Interface, @Interface(%T)> [symbolic] // CHECK:STDOUT: %Self.ade: %Interface.type.442 = symbolic_binding Self, 1 [symbolic] -// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic] +// CHECK:STDOUT: %ptr.e8f: type = ptr_type %T [symbolic] // CHECK:STDOUT: %Interface.assoc_type.5a2: type = assoc_entity_type @Interface, @Interface(%T) [symbolic] -// CHECK:STDOUT: %assoc0.624: %Interface.assoc_type.5a2 = assoc_entity element0, @Interface.%X [symbolic] +// CHECK:STDOUT: %assoc0.b59: %Interface.assoc_type.5a2 = assoc_entity element0, @Interface.%X [symbolic] // CHECK:STDOUT: %I.682: %Interface.type.442 = symbolic_binding I, 1 [symbolic] // CHECK:STDOUT: %pattern_type.cbe: type = pattern_type %Interface.type.442 [symbolic] // CHECK:STDOUT: %.41b: Core.Form = init_form %T, call_param0 [symbolic] @@ -373,8 +383,9 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %AccessMissingConcrete.type: type = fn_type @AccessMissingConcrete [concrete] // CHECK:STDOUT: %AccessMissingConcrete: %AccessMissingConcrete.type = struct_value () [concrete] // CHECK:STDOUT: %Self.b54: %Interface.type.389 = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %Interface.assoc_type.77f: type = assoc_entity_type @Interface, @Interface(%i32) [concrete] -// CHECK:STDOUT: %assoc0.2ec: %Interface.assoc_type.77f = assoc_entity element0, @Interface.%X [concrete] +// CHECK:STDOUT: %assoc0.dcc: %Interface.assoc_type.77f = assoc_entity element0, @Interface.%X [concrete] // CHECK:STDOUT: %I.binding.as_type.78a: type = symbolic_binding_type I, 0, %I.50d [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -448,18 +459,20 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(%T.loc4_21.1)> [symbolic = %Interface.type (constants.%Interface.type.442)] // CHECK:STDOUT: %Self.loc4_31.2: @Interface.%Interface.type (%Interface.type.442) = symbolic_binding Self, 1 [symbolic = %Self.loc4_31.2 (constants.%Self.ade)] -// CHECK:STDOUT: %Interface.assoc_type: type = assoc_entity_type @Interface, @Interface(%T.loc4_21.1) [symbolic = %Interface.assoc_type (constants.%Interface.assoc_type.5a2)] -// CHECK:STDOUT: %assoc0: @Interface.%Interface.assoc_type (%Interface.assoc_type.5a2) = assoc_entity element0, %X [symbolic = %assoc0 (constants.%assoc0.624)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc4_31.1: @Interface.%Interface.type (%Interface.type.442) = symbolic_binding Self, 1 [symbolic = %Self.loc4_31.2 (constants.%Self.ade)] -// CHECK:STDOUT: %X: @X.%ptr (%ptr) = assoc_const_decl @X [concrete] { -// CHECK:STDOUT: %assoc0: @Interface.%Interface.assoc_type (%Interface.assoc_type.5a2) = assoc_entity element0, @Interface.%X [symbolic = @Interface.%assoc0 (constants.%assoc0.624)] +// CHECK:STDOUT: interface_with_self_decl @Interface [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %X: @Interface.%ptr (%ptr.e8f) = assoc_const_decl @X [concrete] { +// CHECK:STDOUT: %assoc0: @Interface.%Interface.assoc_type (%Interface.assoc_type.5a2) = assoc_entity element0, @Interface.%X [symbolic = @Interface.%assoc0 (constants.%assoc0.b59)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_31.1 // CHECK:STDOUT: .T = +// CHECK:STDOUT: .T = // CHECK:STDOUT: .X = @X.%assoc0 // CHECK:STDOUT: .nonesuch = // CHECK:STDOUT: witness = (%X) @@ -468,13 +481,6 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @X(@Interface.%T.loc4_21.2: type, @Interface.%Self.loc4_31.1: @Interface.%Interface.type (%Interface.type.442)) { -// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = %ptr (constants.%ptr)] -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const X:! @X.%ptr (%ptr); -// CHECK:STDOUT: } -// CHECK:STDOUT: // CHECK:STDOUT: generic fn @AccessMissingGeneric(%T.loc8_25.2: type, %I.loc8_35.2: @AccessMissingGeneric.%Interface.type.loc8_50.1 (%Interface.type.442)) { // CHECK:STDOUT: %T.loc8_25.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_25.1 (constants.%T)] // CHECK:STDOUT: %Interface.type.loc8_50.1: type = facet_type <@Interface, @Interface(%T.loc8_25.1)> [symbolic = %Interface.type.loc8_50.1 (constants.%Interface.type.442)] @@ -520,13 +526,14 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type => constants.%Interface.type.442 // CHECK:STDOUT: %Self.loc4_31.2 => constants.%Self.ade -// CHECK:STDOUT: %Interface.assoc_type => constants.%Interface.assoc_type.5a2 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.624 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @X(constants.%T, constants.%Self.ade) { -// CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %ptr => constants.%ptr +// CHECK:STDOUT: specific @Interface(constants.%T, constants.%Self.ade) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%T +// CHECK:STDOUT: %ptr => constants.%ptr.e8f +// CHECK:STDOUT: %Interface.assoc_type => constants.%Interface.assoc_type.5a2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.b59 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AccessMissingGeneric(constants.%T, constants.%I.682) { @@ -538,17 +545,39 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %pattern_type.loc8_53 => constants.%pattern_type.51d // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface(constants.%T, constants.%I.682) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%T +// CHECK:STDOUT: %ptr => constants.%ptr.e8f +// CHECK:STDOUT: %Interface.assoc_type => constants.%Interface.assoc_type.5a2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.b59 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @Interface(constants.%i32) { // CHECK:STDOUT: %T.loc4_21.1 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Interface.type => constants.%Interface.type.389 // CHECK:STDOUT: %Self.loc4_31.2 => constants.%Self.b54 -// CHECK:STDOUT: %Interface.assoc_type => constants.%Interface.assoc_type.77f -// CHECK:STDOUT: %assoc0 => constants.%assoc0.2ec // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @AccessMissingConcrete(constants.%I.50d) { // CHECK:STDOUT: %I.loc16_26.1 => constants.%I.50d // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface(constants.%i32, constants.%Self.ade) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%i32 +// CHECK:STDOUT: %ptr => constants.%ptr.235 +// CHECK:STDOUT: %Interface.assoc_type => constants.%Interface.assoc_type.77f +// CHECK:STDOUT: %assoc0 => constants.%assoc0.dcc +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Interface(constants.%i32, constants.%I.50d) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %T.loc5 => constants.%i32 +// CHECK:STDOUT: %ptr => constants.%ptr.235 +// CHECK:STDOUT: %Interface.assoc_type => constants.%Interface.assoc_type.77f +// CHECK:STDOUT: %assoc0 => constants.%assoc0.dcc +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/require.carbon b/toolchain/check/testdata/interface/require.carbon index 0da30abd4f66..013e1be6d022 100644 --- a/toolchain/check/testdata/interface/require.carbon +++ b/toolchain/check/testdata/interface/require.carbon @@ -132,7 +132,7 @@ interface Z { fn F(T:! Z) { // This should fail name lookup since Z does not extend Y. // - // CHECK:STDERR: fail_implicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInInstScope] + // CHECK:STDERR: fail_implicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: T.YY(); // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -153,7 +153,7 @@ interface Z { fn F(T:! Z) { // This should fail name lookup since Z does not extend Y. // - // CHECK:STDERR: fail_explicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInInstScope] + // CHECK:STDERR: fail_explicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: T.YY(); // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -379,6 +379,7 @@ interface Z(T:! type) { // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] // CHECK:STDOUT: %Self.c59: %Z.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.c59 [symbolic] +// CHECK:STDOUT: %T: %Z.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -390,37 +391,49 @@ interface Z(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Y.type.require [concrete] { +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Y.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %Y.ref // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: type = specific_constant @Z.Self.binding.as_type.impls.Y.type.require.%Y.ref, @Z.Self.binding.as_type.impls.Y.type.require(constants.%Self.c59) [concrete = constants.%Y.type] +// CHECK:STDOUT: %.loc9: type = specific_constant @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.ref, @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.c59) [concrete = constants.%Y.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: .YY = // CHECK:STDOUT: extend %.loc9 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Y.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Y.type.require.%Self.as_type impls @Z.Self.binding.as_type.impls.Y.type.require.%Y.ref +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Y.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Self.as_type impls @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.ref // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y.type.require(constants.%Self.c59) { +// CHECK:STDOUT: specific @Z(constants.%Self.c59) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.c59) { // CHECK:STDOUT: %Self => constants.%Self.c59 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_extend_with_self.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -430,6 +443,11 @@ interface Z(T:! type) { // CHECK:STDOUT: %Self.c59: %Z.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.c59 [symbolic] // CHECK:STDOUT: %Y.type.432: type = facet_type <@Y, @Y(%Self.binding.as_type)> [symbolic] +// CHECK:STDOUT: %require_complete.88f: = require_complete_type %Y.type.432 [symbolic] +// CHECK:STDOUT: %T.ea3: %Z.type = symbolic_binding T, 0 [symbolic] +// CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.ea3 [symbolic] +// CHECK:STDOUT: %Y.type.112: type = facet_type <@Y, @Y(%T.binding.as_type)> [symbolic] +// CHECK:STDOUT: %require_complete.dc8: = require_complete_type %Y.type.112 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -440,44 +458,64 @@ interface Z(T:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { -// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Y.type.require [concrete] { +// CHECK:STDOUT: %Self.loc8: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Y.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type.loc9_18 impls %Y.type.loc9_30.1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_type.loc9_18: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] +// CHECK:STDOUT: %Self.as_type.loc9_18: type = facet_access_type @Z.%Self.loc8 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Y.ref: %Y.type.82b = name_ref Y, file.%Y.decl [concrete = constants.%Y.generic] -// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.c59)] +// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self.loc8 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %Self.as_type.loc9_30: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc9: type = converted %Self.ref, %Self.as_type.loc9_30 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Y.type.loc9_30.1: type = facet_type <@Y, @Y(constants.%Self.binding.as_type)> [symbolic = %Y.type.loc9_30.2 (constants.%Y.type.432)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: type = specific_constant @Z.Self.binding.as_type.impls.Y.type.require.%Y.type.loc9_30.1, @Z.Self.binding.as_type.impls.Y.type.require(constants.%Self.c59) [symbolic = constants.%Y.type.432] +// CHECK:STDOUT: %.loc9: type = specific_constant @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.type.loc9_30.1, @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.c59) [symbolic = %Y.type (constants.%Y.type.432)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc8 +// CHECK:STDOUT: .Y = // CHECK:STDOUT: .Y = // CHECK:STDOUT: .YY = // CHECK:STDOUT: extend %.loc9 // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Y.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Y.type.require.%Self.as_type.loc9_18 impls @Z.Self.binding.as_type.impls.Y.type.require.%Y.type.loc9_30.1 +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Y.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Self.as_type.loc9_18 impls @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.type.loc9_30.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(@Z.%Self.loc8: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Y.type.loc9_30.2: type = facet_type <@Y, @Y(%Self.binding.as_type)> [symbolic = %Y.type.loc9_30.2 (constants.%Y.type.432)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y.type.require(constants.%Self.c59) { +// CHECK:STDOUT: specific @Z(constants.%Self.c59) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%Self.c59 +// CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type +// CHECK:STDOUT: %Y.type => constants.%Y.type.432 +// CHECK:STDOUT: %require_complete => constants.%require_complete.88f +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.c59) { // CHECK:STDOUT: %Self => constants.%Self.c59 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %Y.type.loc9_30.2 => constants.%Y.type.432 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%T.ea3) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%T.ea3 +// CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type +// CHECK:STDOUT: %Y.type => constants.%Y.type.112 +// CHECK:STDOUT: %require_complete => constants.%require_complete.dc8 +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_implicit_self_impls.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -496,7 +534,10 @@ interface Z(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Y.type.require [concrete] { +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Y.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %Y.ref // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -506,20 +547,25 @@ interface Z(T:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Y.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Y.type.require.%Self.as_type impls @Z.Self.binding.as_type.impls.Y.type.require.%Y.ref +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Y.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Self.as_type impls @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.ref // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y.type.require(constants.%Self.c59) { +// CHECK:STDOUT: specific @Z(constants.%Self.c59) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.c59) { // CHECK:STDOUT: %Self => constants.%Self.c59 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: } @@ -542,7 +588,10 @@ interface Z(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Y.type.require [concrete] { +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Y.type.require [concrete] { // CHECK:STDOUT: require %.loc9 impls %Y.ref // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.c59)] @@ -554,20 +603,25 @@ interface Z(T:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Y.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Y.type.require.%.loc9 impls @Z.Self.binding.as_type.impls.Y.type.require.%Y.ref +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Y.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%.loc9 impls @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.ref // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y.type.require(constants.%Self.c59) { +// CHECK:STDOUT: specific @Z(constants.%Self.c59) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.c59) { // CHECK:STDOUT: %Self => constants.%Self.c59 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: } @@ -593,7 +647,10 @@ interface Z(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] -// CHECK:STDOUT: %Z.C.impls.Y.type.require.decl = require_decl @Z.C.impls.Y.type.require [concrete] { +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.C.impls.Y.type.require.decl = require_decl @Z.WithSelf.C.impls.Y.type.require [concrete] { // CHECK:STDOUT: require %C.loc9_17.1 impls %Y.ref // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] @@ -608,21 +665,25 @@ interface Z(T:! type) { // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .C = // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .C = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.C.impls.Y.type.require { -// CHECK:STDOUT: require @Z.C.impls.Y.type.require.%C.loc9_17.1 impls @Z.C.impls.Y.type.require.%Y.ref +// CHECK:STDOUT: @Z.WithSelf.C.impls.Y.type.require { +// CHECK:STDOUT: require @Z.WithSelf.C.impls.Y.type.require.%C.loc9_17.1 impls @Z.WithSelf.C.impls.Y.type.require.%Y.ref // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.C.impls.Y.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.C.impls.Y.type.require(@Z.%Self: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %C.loc9_17.2: type = class_type @C, @C(%Self.binding.as_type) [symbolic = %C.loc9_17.2 (constants.%C.42e)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.C.impls.Y.type.require(constants.%Self.c59) { +// CHECK:STDOUT: specific @Z(constants.%Self.c59) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.C.impls.Y.type.require(constants.%Self.c59) { // CHECK:STDOUT: %Self => constants.%Self.c59 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %C.loc9_17.2 => constants.%C.42e @@ -655,7 +716,10 @@ interface Z(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Y_where.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Y_where.type.require [concrete] { +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %.loc7_19 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -677,20 +741,23 @@ interface Z(T:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Y_where.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Y_where.type.require.%Self.as_type impls @Z.Self.binding.as_type.impls.Y_where.type.require.%.loc7_19 +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require.%Self.as_type impls @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require.%.loc7_19 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Y_where.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require(@Z.%Self: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y_where.type.require(constants.%Self.c59) { +// CHECK:STDOUT: specific @Z(constants.%Self.c59) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require(constants.%Self.c59) { // CHECK:STDOUT: %Self => constants.%Self.c59 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: } @@ -729,13 +796,16 @@ interface Z(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc4_23.1: @Z.%Z.type (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self.loc4_23.2 (constants.%Self)] -// CHECK:STDOUT: %Z.T.impls.Z.type.require.decl = require_decl @Z.T.impls.Z.type.require [concrete] { +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.T.impls.Z.type.require.decl = require_decl @Z.WithSelf.T.impls.Z.type.require [concrete] { // CHECK:STDOUT: require %T.ref impls %Z.type.loc5_25.1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.ref: type = name_ref T, @Z.%T.loc4_13.2 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Z.ref: %Z.type.352 = name_ref Z, file.%Z.decl [concrete = constants.%Z.generic] -// CHECK:STDOUT: %.loc5_21: @Z.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.0ed) = specific_constant @Z.%Self.loc4_23.1, @Z(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @Z.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.0ed) = name_ref Self, %.loc5_21 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc5_21: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.0ed) = specific_constant @Z.%Self.loc4_23.1, @Z(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.0ed) = name_ref Self, %.loc5_21 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_25: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Z.type.loc5_25.1: type = facet_type <@Z, @Z(constants.%Self.binding.as_type)> [symbolic = %Z.type.loc5_25.2 (constants.%Z.type.6aa)] @@ -745,19 +815,21 @@ interface Z(T:! type) { // CHECK:STDOUT: .Self = %Self.loc4_23.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .Z = +// CHECK:STDOUT: .T = +// CHECK:STDOUT: .Z = // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.T.impls.Z.type.require { -// CHECK:STDOUT: require @Z.T.impls.Z.type.require.%T.ref impls @Z.T.impls.Z.type.require.%Z.type.loc5_25.1 +// CHECK:STDOUT: @Z.WithSelf.T.impls.Z.type.require { +// CHECK:STDOUT: require @Z.WithSelf.T.impls.Z.type.require.%T.ref impls @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_25.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.T.impls.Z.type.require(@Z.%T.loc4_13.2: type, @Z.%Self.loc4_23.1: @Z.%Z.type (%Z.type.0ed)) { +// CHECK:STDOUT: generic require @Z.WithSelf.T.impls.Z.type.require(@Z.%T.loc4_13.2: type, @Z.%Self.loc4_23.1: @Z.%Z.type (%Z.type.0ed)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Z.type.loc5_21: type = facet_type <@Z, @Z(%T)> [symbolic = %Z.type.loc5_21 (constants.%Z.type.0ed)] -// CHECK:STDOUT: %Self: @Z.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self: @Z.WithSelf.T.impls.Z.type.require.%Z.type.loc5_21 (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Z.type.loc5_25.2: type = facet_type <@Z, @Z(%Self.binding.as_type)> [symbolic = %Z.type.loc5_25.2 (constants.%Z.type.6aa)] // CHECK:STDOUT: } @@ -766,11 +838,13 @@ interface Z(T:! type) { // CHECK:STDOUT: %T.loc4_13.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%T, constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%Self.binding.as_type) { // CHECK:STDOUT: %T.loc4_13.1 => constants.%Self.binding.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.T.impls.Z.type.require(constants.%T, constants.%Self) { +// CHECK:STDOUT: specific @Z.WithSelf.T.impls.Z.type.require(constants.%T, constants.%Self) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Z.type.loc5_21 => constants.%Z.type.0ed // CHECK:STDOUT: %Self => constants.%Self @@ -803,7 +877,10 @@ interface Z(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Y_where.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Y_where.type.require [concrete] { +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type.loc10_11 impls %.loc10_19 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type.loc10_11: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -826,21 +903,24 @@ interface Z(T:! type) { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Y_where.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Y_where.type.require.%Self.as_type.loc10_11 impls @Z.Self.binding.as_type.impls.Y_where.type.require.%.loc10_19 +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require.%Self.as_type.loc10_11 impls @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require.%.loc10_19 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Y_where.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require(@Z.%Self: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.c59)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Y_where.type: type = facet_type <@Y where constants.%impl.elem0 = %Self.binding.as_type> [symbolic = %Y_where.type (constants.%Y_where.type)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y_where.type.require(constants.%Self.c59) { +// CHECK:STDOUT: specific @Z(constants.%Self.c59) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require(constants.%Self.c59) { // CHECK:STDOUT: %Self => constants.%Self.c59 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type @@ -879,7 +959,10 @@ interface Z(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc8_23.1: @Z.%Z.type (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self.loc8_23.2 (constants.%Self.822)] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Z.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Z.type.require [concrete] { +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Z.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Z.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %Z.type.loc11_20 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @Z.%Self.loc8_23.1 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.b37)] @@ -892,19 +975,21 @@ interface Z(T:! type) { // CHECK:STDOUT: .Self = %Self.loc8_23.1 // CHECK:STDOUT: .Z = // CHECK:STDOUT: .T = +// CHECK:STDOUT: .Z = +// CHECK:STDOUT: .T = // CHECK:STDOUT: witness = () // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Z.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Z.type.require.%Self.as_type impls @Z.Self.binding.as_type.impls.Z.type.require.%Z.type.loc11_20 +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Z.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Z.type.require.%Self.as_type impls @Z.WithSelf.Self.binding.as_type.impls.Z.type.require.%Z.type.loc11_20 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Z.type.require(@Z.%T.loc8_13.2: type, @Z.%Self.loc8_23.1: @Z.%Z.type (%Z.type.0ed)) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Z.type.require(@Z.%T.loc8_13.2: type, @Z.%Self.loc8_23.1: @Z.%Z.type (%Z.type.0ed)) { // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Z.type.loc11_11: type = facet_type <@Z, @Z(%T)> [symbolic = %Z.type.loc11_11 (constants.%Z.type.0ed)] -// CHECK:STDOUT: %Self: @Z.Self.binding.as_type.impls.Z.type.require.%Z.type.loc11_11 (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.822)] +// CHECK:STDOUT: %Self: @Z.WithSelf.Self.binding.as_type.impls.Z.type.require.%Z.type.loc11_11 (%Z.type.0ed) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.822)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.b37)] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -912,7 +997,9 @@ interface Z(T:! type) { // CHECK:STDOUT: %T.loc8_13.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Z.type.require(constants.%T, constants.%Self.822) { +// CHECK:STDOUT: specific @Z(constants.%T, constants.%Self.822) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Z.type.require(constants.%T, constants.%Self.822) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Z.type.loc11_11 => constants.%Z.type.0ed // CHECK:STDOUT: %Self => constants.%Self.822 diff --git a/toolchain/check/testdata/interface/self.carbon b/toolchain/check/testdata/interface/self.carbon index ee2e6135ed9d..5ded9995335f 100644 --- a/toolchain/check/testdata/interface/self.carbon +++ b/toolchain/check/testdata/interface/self.carbon @@ -24,10 +24,10 @@ interface UseSelf { // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic] // CHECK:STDOUT: %.52b: Core.Form = init_form %Self.binding.as_type, call_param1 [symbolic] -// CHECK:STDOUT: %UseSelf.F.type: type = fn_type @UseSelf.F [concrete] -// CHECK:STDOUT: %UseSelf.F: %UseSelf.F.type = struct_value () [concrete] +// CHECK:STDOUT: %UseSelf.WithSelf.F.type: type = fn_type @UseSelf.WithSelf.F, @UseSelf(%Self) [symbolic] +// CHECK:STDOUT: %UseSelf.WithSelf.F: %UseSelf.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %UseSelf.assoc_type: type = assoc_entity_type @UseSelf [concrete] -// CHECK:STDOUT: %assoc0: %UseSelf.assoc_type = assoc_entity element0, @UseSelf.%UseSelf.F.decl [concrete] +// CHECK:STDOUT: %assoc0: %UseSelf.assoc_type = assoc_entity element0, @UseSelf.%UseSelf.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -38,47 +38,52 @@ interface UseSelf { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @UseSelf { -// CHECK:STDOUT: %Self: %UseSelf.type = symbolic_binding Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %UseSelf.F.decl: %UseSelf.F.type = fn_decl @UseSelf.F [concrete = constants.%UseSelf.F] { -// CHECK:STDOUT: %self.patt: @UseSelf.F.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @UseSelf.F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %return.patt: @UseSelf.F.%pattern_type (%pattern_type) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @UseSelf.F.%pattern_type (%pattern_type) = out_param_pattern %return.patt, call_param1 [concrete] +// CHECK:STDOUT: %Self.loc15: %UseSelf.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @UseSelf [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %UseSelf.WithSelf.F.decl: @UseSelf.%UseSelf.WithSelf.F.type (%UseSelf.WithSelf.F.type) = fn_decl @UseSelf.WithSelf.F [symbolic = @UseSelf.%UseSelf.WithSelf.F (constants.%UseSelf.WithSelf.F)] { +// CHECK:STDOUT: %self.patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %return.patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @UseSelf.WithSelf.F.%pattern_type (%pattern_type) = out_param_pattern %return.patt, call_param1 [concrete] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc16_25: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc16_25: %UseSelf.type = name_ref Self, @UseSelf.%Self.loc15 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc16_25: type = facet_access_type %Self.ref.loc16_25 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc16_25.2: type = converted %Self.ref.loc16_25, %Self.as_type.loc16_25 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc16_25.3: Core.Form = init_form %.loc16_25.2, call_param1 [symbolic = %.loc16_25.1 (constants.%.52b)] -// CHECK:STDOUT: %self.param: @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc16_14.1: type = splice_block %.loc16_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %Self.ref.loc16_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc16_14: %UseSelf.type = name_ref Self, @UseSelf.%Self.loc15 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc16_14: type = facet_access_type %Self.ref.loc16_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc16_14.2: type = converted %Self.ref.loc16_14, %Self.as_type.loc16_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param -// CHECK:STDOUT: %return.param: ref @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type) = out_param call_param1 -// CHECK:STDOUT: %return: ref @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type) = return_slot %return.param +// CHECK:STDOUT: %self: @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %return.param: ref @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = out_param call_param1 +// CHECK:STDOUT: %return: ref @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0: %UseSelf.assoc_type = assoc_entity element0, %UseSelf.F.decl [concrete = constants.%assoc0] +// CHECK:STDOUT: %assoc0: %UseSelf.assoc_type = assoc_entity element0, %UseSelf.WithSelf.F.decl [concrete = constants.%assoc0] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .F = %assoc0 -// CHECK:STDOUT: witness = (%UseSelf.F.decl) +// CHECK:STDOUT: witness = (%UseSelf.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @UseSelf.F(@UseSelf.%Self: %UseSelf.type) { +// CHECK:STDOUT: generic fn @UseSelf.WithSelf.F(@UseSelf.%Self.loc15: %UseSelf.type) { // CHECK:STDOUT: %Self: %UseSelf.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type)] // CHECK:STDOUT: %.loc16_25.1: Core.Form = init_form %Self.binding.as_type, call_param1 [symbolic = %.loc16_25.1 (constants.%.52b)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @UseSelf.F.%Self.binding.as_type (%Self.binding.as_type); +// CHECK:STDOUT: fn(%self.param: @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type)) -> out %return.param: @UseSelf.WithSelf.F.%Self.binding.as_type (%Self.binding.as_type); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @UseSelf.F(constants.%Self) { +// CHECK:STDOUT: specific @UseSelf(constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @UseSelf.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %pattern_type => constants.%pattern_type diff --git a/toolchain/check/testdata/interface/syntactic_merge.carbon b/toolchain/check/testdata/interface/syntactic_merge.carbon index 574b46b509d1..2d3d3810a485 100644 --- a/toolchain/check/testdata/interface/syntactic_merge.carbon +++ b/toolchain/check/testdata/interface/syntactic_merge.carbon @@ -267,6 +267,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc8_22.1: @Foo.%Foo.type (%Foo.type.6f9) = symbolic_binding Self, 1 [symbolic = %Self.loc8_22.2 (constants.%Self.f8c)] +// CHECK:STDOUT: interface_with_self_decl @Foo [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc8_22.1 @@ -285,6 +286,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc11_22.1: @Bar.%Bar.type (%Bar.type.c4b) = symbolic_binding Self, 1 [symbolic = %Self.loc11_22.2 (constants.%Self.0fc)] +// CHECK:STDOUT: interface_with_self_decl @Bar [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc11_22.1 @@ -306,10 +308,14 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc7_15.1 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Foo(constants.%a, constants.%Self.f8c) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @Bar(constants.%a) { // CHECK:STDOUT: %a.loc10_15.1 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Bar(constants.%a, constants.%Self.0fc) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- spacing.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -361,6 +367,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc7_24.1: @Foo.%Foo.type (%Foo.type.6f9) = symbolic_binding Self, 1 [symbolic = %Self.loc7_24.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @Foo [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc7_24.1 @@ -382,6 +389,8 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc6_21.1 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Foo(constants.%a, constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_parens.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -441,6 +450,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc14_24.1: @Foo.loc14.%Foo.type (%Foo.type.6f9) = symbolic_binding Self, 1 [symbolic = %Self.loc14_24.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @Foo.loc14 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc14_24.1 @@ -466,6 +476,8 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc14_15.1 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Foo.loc14(constants.%a, constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- todo_fail_raw_identifier.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -517,6 +529,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc7_24.1: @Foo.%Foo.type (%Foo.type.6f9) = symbolic_binding Self, 1 [symbolic = %Self.loc7_24.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @Foo [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc7_24.1 @@ -538,6 +551,8 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc6_15.1 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Foo(constants.%a, constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- two_file.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -691,6 +706,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc12_22.1: @Foo.loc12.%Foo.type (%Foo.type.6f9) = symbolic_binding Self, 1 [symbolic = %Self.loc12_22.2 (constants.%Self.f8c)] +// CHECK:STDOUT: interface_with_self_decl @Foo.loc12 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc12_22.1 @@ -715,6 +731,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc21_22.1: @Bar.loc21.%Bar.type (%Bar.type.c4b) = symbolic_binding Self, 1 [symbolic = %Self.loc21_22.2 (constants.%Self.0fc)] +// CHECK:STDOUT: interface_with_self_decl @Bar.loc21 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc21_22.1 @@ -739,6 +756,8 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc12_15.1 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Foo.loc12(constants.%a, constants.%Self.f8c) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @Bar.1(constants.%a) { // CHECK:STDOUT: %a => constants.%a // CHECK:STDOUT: } @@ -747,6 +766,8 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc21_15.1 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Bar.loc21(constants.%a, constants.%Self.0fc) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_name_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -810,6 +831,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc15_22.1: @Foo.loc15.%Foo.type (%Foo.type.6f9) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @Foo.loc15 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc15_22.1 @@ -835,6 +857,8 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %b.loc15_15.1 => constants.%b // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Foo.loc15(constants.%b, constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -897,6 +921,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc15_22.1: @Foo.loc15.%Foo.type (%Foo.type.6f9) = symbolic_binding Self, 1 [symbolic = %Self.loc15_22.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @Foo.loc15 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc15_22.1 @@ -922,6 +947,8 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc15_15.1 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Foo.loc15(constants.%a, constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_deduced_alias.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -984,6 +1011,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc15_24.1: @Foo.loc15.%Foo.type (%Foo.type.6f9) = symbolic_binding Self, 1 [symbolic = %Self.loc15_24.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @Foo.loc15 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc15_24.1 @@ -1009,6 +1037,8 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc15_15.1 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Foo.loc15(constants.%a, constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- alias_two_file.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1120,6 +1150,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc17_22.1: @Foo.loc17.%Foo.type (%Foo.type.6f9) = symbolic_binding Self, 1 [symbolic = %Self.loc17_22.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @Foo.loc17 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc17_22.1 @@ -1144,6 +1175,8 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc17_15.1 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Foo.loc17(constants.%a, constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_repeat_const.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1207,6 +1240,7 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.loc18_36.1: @Foo.loc18.%Foo.type (%Foo.type.442) = symbolic_binding Self, 1 [symbolic = %Self.loc18_36.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @Foo.loc18 [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc18_36.1 @@ -1232,3 +1266,5 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.loc18_15.1 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Foo.loc18(constants.%a, constants.%Self) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index 9c06b69d7619..6df896d7b305 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -28,19 +28,19 @@ interface I { // 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: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%Self.ab9) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F: %I.WithSelf.F.type = struct_value () [symbolic] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.524: %I.assoc_type = assoc_entity element0, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %assoc0.18e: %I.assoc_type = assoc_entity element0, @I.%I.WithSelf.F.decl [concrete] // 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: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %.8ef: Core.Form = init_form %i32, call_param2 [concrete] -// CHECK:STDOUT: %I.G.type: type = fn_type @I.G [concrete] -// CHECK:STDOUT: %I.G: %I.G.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%I.G.decl [concrete] +// CHECK:STDOUT: %I.WithSelf.G.type: type = fn_type @I.WithSelf.G, @I(%Self.ab9) [symbolic] +// CHECK:STDOUT: %I.WithSelf.G: %I.WithSelf.G.type = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%I.WithSelf.G.decl [concrete] // CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.%T [concrete] // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple: %tuple.type.24b = tuple_value (%i32, %i32) [concrete] @@ -50,7 +50,6 @@ interface I { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -58,7 +57,8 @@ interface I { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -88,10 +88,13 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] {} {} -// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.F.decl [concrete = constants.%assoc0.524] -// CHECK:STDOUT: %I.G.decl: %I.G.type = fn_decl @I.G [concrete = constants.%I.G] { +// CHECK:STDOUT: %Self.loc15: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self.ab9] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F)] {} {} +// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %I.WithSelf.F.decl [concrete = constants.%assoc0.18e] +// CHECK:STDOUT: %I.WithSelf.G.decl: @I.%I.WithSelf.G.type (%I.WithSelf.G.type) = fn_decl @I.WithSelf.G [symbolic = @I.%I.WithSelf.G (constants.%I.WithSelf.G)] { // CHECK:STDOUT: %a.patt: %pattern_type.7ce = value_binding_pattern a [concrete] // CHECK:STDOUT: %a.param_patt: %pattern_type.7ce = value_param_pattern %a.patt, call_param0 [concrete] // CHECK:STDOUT: %b.patt: %pattern_type.7ce = value_binding_pattern b [concrete] @@ -117,7 +120,7 @@ interface I { // CHECK:STDOUT: %return.param: ref %i32 = out_param call_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %I.G.decl [concrete = constants.%assoc1] +// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %I.WithSelf.G.decl [concrete = constants.%assoc1] // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc2: %I.assoc_type = assoc_entity element2, @I.%T [concrete = constants.%assoc2] // CHECK:STDOUT: %int_32.loc22_19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] @@ -130,7 +133,7 @@ interface I { // CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] { // CHECK:STDOUT: %assoc3: %I.assoc_type = assoc_entity element3, @I.%N [concrete = constants.%assoc3] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc23_19.1: = bound_method %int_42, %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.loc23_19.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] @@ -140,29 +143,17 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc15 // CHECK:STDOUT: .F = %assoc0 // CHECK:STDOUT: .G = %assoc1 // CHECK:STDOUT: .T = @T.%assoc2 // CHECK:STDOUT: .N = @N.%assoc3 -// CHECK:STDOUT: witness = (%I.F.decl, %I.G.decl, %T, %N) +// CHECK:STDOUT: witness = (%I.WithSelf.F.decl, %I.WithSelf.G.decl, %T, %N) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const T:! type = %.loc22_28; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @N(@I.%Self: %I.type) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const N:! %i32 = %.loc23_19.2; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc15: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -171,17 +162,22 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.G(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.G(@I.%Self.loc15: %I.type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn(%a.param: %i32, %b.param: %i32) -> out %return.param: %i32 = "int.sadd"; // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self.ab9) {} +// CHECK:STDOUT: specific @I(constants.%Self.ab9) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc17 => constants.%Self.ab9 +// CHECK:STDOUT: %I.WithSelf.F.type => constants.%I.WithSelf.F.type +// CHECK:STDOUT: %I.WithSelf.F => constants.%I.WithSelf.F +// CHECK:STDOUT: %I.WithSelf.G.type => constants.%I.WithSelf.G.type +// CHECK:STDOUT: %I.WithSelf.G => constants.%I.WithSelf.G +// CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.G(constants.%Self.ab9) {} +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self.ab9) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self.ab9) {} -// CHECK:STDOUT: -// CHECK:STDOUT: specific @N(constants.%Self.ab9) {} +// CHECK:STDOUT: specific @I.WithSelf.G(constants.%Self.ab9) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interop/cpp/builtins.carbon b/toolchain/check/testdata/interop/cpp/builtins.carbon index 058dbe030122..3348c3142abd 100644 --- a/toolchain/check/testdata/interop/cpp/builtins.carbon +++ b/toolchain/check/testdata/interop/cpp/builtins.carbon @@ -119,7 +119,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.e3f: type = pattern_type %i8 [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %As.type.b4c: type = facet_type <@As, @As(%i8)> [concrete] -// CHECK:STDOUT: %As.Convert.type.cc1: type = fn_type @As.Convert, @As(%i8) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert.1, @Core.IntLiteral.as.As.impl.ae3(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -127,7 +126,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.483: type = fn_type @Core.IntLiteral.as.As.impl.Convert.1, @Core.IntLiteral.as.As.impl.ae3(%int_8) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bf2: %Core.IntLiteral.as.As.impl.Convert.type.483 = struct_value () [concrete] // CHECK:STDOUT: %As.facet.6fc: %As.type.b4c = facet_value Core.IntLiteral, (%As.impl_witness.0bb) [concrete] -// CHECK:STDOUT: %.cef: type = fn_type_with_self_type %As.Convert.type.cc1, %As.facet.6fc [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.a98: type = fn_type @As.WithSelf.Convert, @As(%i8, %As.facet.6fc) [concrete] +// CHECK:STDOUT: %.57e: type = fn_type_with_self_type %As.WithSelf.Convert.type.a98, %As.facet.6fc [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.c11: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.bf2 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.d98: = specific_function %Core.IntLiteral.as.As.impl.Convert.bf2, @Core.IntLiteral.as.As.impl.Convert.1(%int_8) [concrete] // CHECK:STDOUT: %bound_method.1fe: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn.d98 [concrete] @@ -136,12 +136,12 @@ fn F() { // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete] // CHECK:STDOUT: %pattern_type.2f8: type = pattern_type %i16 [concrete] // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete] // CHECK:STDOUT: %As.impl_witness.b61: = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl.ae3(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert.1, @Core.IntLiteral.as.As.impl.ae3(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete] // CHECK:STDOUT: %As.facet.071: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete] -// CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet.071 [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2c0: type = fn_type @As.WithSelf.Convert, @As(%i16, %As.facet.071) [concrete] +// CHECK:STDOUT: %.70c: type = fn_type_with_self_type %As.WithSelf.Convert.type.2c0, %As.facet.071 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.896: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.00b: = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert.1(%int_16) [concrete] // CHECK:STDOUT: %bound_method.4da: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn.00b [concrete] @@ -150,12 +150,12 @@ fn F() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %As.impl_witness.ab6: = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl.ae3(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert.1, @Core.IntLiteral.as.As.impl.ae3(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet.d6e: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet.d6e [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet.d6e) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet.d6e [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.bd3: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.fab: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert.1(%int_32) [concrete] // CHECK:STDOUT: %bound_method.290: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn.fab [concrete] @@ -163,14 +163,14 @@ fn F() { // CHECK:STDOUT: %u8: type = class_type @UInt, @UInt(%int_8) [concrete] // CHECK:STDOUT: %pattern_type.8f3: type = pattern_type %u8 [concrete] // CHECK:STDOUT: %As.type.714: type = facet_type <@As, @As(%u8)> [concrete] -// CHECK:STDOUT: %As.Convert.type.a56: type = fn_type @As.Convert, @As(%u8) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.2b1: type = fn_type @Core.IntLiteral.as.As.impl.Convert.2, @Core.IntLiteral.as.As.impl.5fe(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.979: %Core.IntLiteral.as.As.impl.Convert.type.2b1 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.ce7: = impl_witness imports.%As.impl_witness_table.7eb, @Core.IntLiteral.as.As.impl.5fe(%int_8) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.664: type = fn_type @Core.IntLiteral.as.As.impl.Convert.2, @Core.IntLiteral.as.As.impl.5fe(%int_8) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.edb: %Core.IntLiteral.as.As.impl.Convert.type.664 = struct_value () [concrete] // CHECK:STDOUT: %As.facet.5e2: %As.type.714 = facet_value Core.IntLiteral, (%As.impl_witness.ce7) [concrete] -// CHECK:STDOUT: %.5dc: type = fn_type_with_self_type %As.Convert.type.a56, %As.facet.5e2 [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2ea: type = fn_type @As.WithSelf.Convert, @As(%u8, %As.facet.5e2) [concrete] +// CHECK:STDOUT: %.3d2: type = fn_type_with_self_type %As.WithSelf.Convert.type.2ea, %As.facet.5e2 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.f5f: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.edb [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.130: = specific_function %Core.IntLiteral.as.As.impl.Convert.edb, @Core.IntLiteral.as.As.impl.Convert.2(%int_8) [concrete] // CHECK:STDOUT: %bound_method.6b2: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn.130 [concrete] @@ -178,12 +178,12 @@ fn F() { // CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(%int_16) [concrete] // CHECK:STDOUT: %pattern_type.9db: type = pattern_type %u16 [concrete] // CHECK:STDOUT: %As.type.b84: type = facet_type <@As, @As(%u16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.c7c: type = fn_type @As.Convert, @As(%u16) [concrete] // CHECK:STDOUT: %As.impl_witness.e55: = impl_witness imports.%As.impl_witness_table.7eb, @Core.IntLiteral.as.As.impl.5fe(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c43: type = fn_type @Core.IntLiteral.as.As.impl.Convert.2, @Core.IntLiteral.as.As.impl.5fe(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dab: %Core.IntLiteral.as.As.impl.Convert.type.c43 = struct_value () [concrete] // CHECK:STDOUT: %As.facet.810: %As.type.b84 = facet_value Core.IntLiteral, (%As.impl_witness.e55) [concrete] -// CHECK:STDOUT: %.1e6: type = fn_type_with_self_type %As.Convert.type.c7c, %As.facet.810 [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.301: type = fn_type @As.WithSelf.Convert, @As(%u16, %As.facet.810) [concrete] +// CHECK:STDOUT: %.f78: type = fn_type_with_self_type %As.WithSelf.Convert.type.301, %As.facet.810 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.e01: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.dab [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.b56: = specific_function %Core.IntLiteral.as.As.impl.Convert.dab, @Core.IntLiteral.as.As.impl.Convert.2(%int_16) [concrete] // CHECK:STDOUT: %bound_method.6f0: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn.b56 [concrete] @@ -191,12 +191,12 @@ fn F() { // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.4a9: type = pattern_type %u32 [concrete] // CHECK:STDOUT: %As.type.346: type = facet_type <@As, @As(%u32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.b94: type = fn_type @As.Convert, @As(%u32) [concrete] // CHECK:STDOUT: %As.impl_witness.e1d: = impl_witness imports.%As.impl_witness_table.7eb, @Core.IntLiteral.as.As.impl.5fe(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.3e7: type = fn_type @Core.IntLiteral.as.As.impl.Convert.2, @Core.IntLiteral.as.As.impl.5fe(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bbd: %Core.IntLiteral.as.As.impl.Convert.type.3e7 = struct_value () [concrete] // CHECK:STDOUT: %As.facet.560: %As.type.346 = facet_value Core.IntLiteral, (%As.impl_witness.e1d) [concrete] -// CHECK:STDOUT: %.548: type = fn_type_with_self_type %As.Convert.type.b94, %As.facet.560 [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.89a: type = fn_type @As.WithSelf.Convert, @As(%u32, %As.facet.560) [concrete] +// CHECK:STDOUT: %.1a4: type = fn_type_with_self_type %As.WithSelf.Convert.type.89a, %As.facet.560 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.a65: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.bbd [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.f97: = specific_function %Core.IntLiteral.as.As.impl.Convert.bbd, @Core.IntLiteral.as.As.impl.Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f17: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn.f97 [concrete] @@ -205,14 +205,14 @@ fn F() { // CHECK:STDOUT: %pattern_type.201: type = pattern_type %f32.97e [concrete] // CHECK:STDOUT: %float.674bbc.1: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %As.type.9fc: type = facet_type <@As, @As(%f32.97e)> [concrete] -// CHECK:STDOUT: %As.Convert.type.f5e: type = fn_type @As.Convert, @As(%f32.97e) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.882: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.27d: %Core.FloatLiteral.as.As.impl.Convert.type.882 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.748: = impl_witness imports.%As.impl_witness_table.7c1, @Core.FloatLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.847: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.683: %Core.FloatLiteral.as.As.impl.Convert.type.847 = struct_value () [concrete] // CHECK:STDOUT: %As.facet.58f: %As.type.9fc = facet_value Core.FloatLiteral, (%As.impl_witness.748) [concrete] -// CHECK:STDOUT: %.a86: type = fn_type_with_self_type %As.Convert.type.f5e, %As.facet.58f [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.85f: type = fn_type @As.WithSelf.Convert, @As(%f32.97e, %As.facet.58f) [concrete] +// CHECK:STDOUT: %.49e: type = fn_type_with_self_type %As.WithSelf.Convert.type.85f, %As.facet.58f [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.bound.ec8: = bound_method %float.674bbc.1, %Core.FloatLiteral.as.As.impl.Convert.683 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.specific_fn.10a: = specific_function %Core.FloatLiteral.as.As.impl.Convert.683, @Core.FloatLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.cae: = bound_method %float.674bbc.1, %Core.FloatLiteral.as.As.impl.Convert.specific_fn.10a [concrete] @@ -222,12 +222,12 @@ fn F() { // CHECK:STDOUT: %pattern_type.0ae: type = pattern_type %f64.d77 [concrete] // CHECK:STDOUT: %float.674bbc.2: Core.FloatLiteral = float_literal_value 10e-1 [concrete] // CHECK:STDOUT: %As.type.a57: type = facet_type <@As, @As(%f64.d77)> [concrete] -// CHECK:STDOUT: %As.Convert.type.8fc: type = fn_type @As.Convert, @As(%f64.d77) [concrete] // CHECK:STDOUT: %As.impl_witness.187: = impl_witness imports.%As.impl_witness_table.7c1, @Core.FloatLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.07c: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.4b9: %Core.FloatLiteral.as.As.impl.Convert.type.07c = struct_value () [concrete] // CHECK:STDOUT: %As.facet.750: %As.type.a57 = facet_value Core.FloatLiteral, (%As.impl_witness.187) [concrete] -// CHECK:STDOUT: %.cd4: type = fn_type_with_self_type %As.Convert.type.8fc, %As.facet.750 [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.dab: type = fn_type @As.WithSelf.Convert, @As(%f64.d77, %As.facet.750) [concrete] +// CHECK:STDOUT: %.293: type = fn_type_with_self_type %As.WithSelf.Convert.type.dab, %As.facet.750 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.bound.f54: = bound_method %float.674bbc.2, %Core.FloatLiteral.as.As.impl.Convert.4b9 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.specific_fn.b2e: = specific_function %Core.FloatLiteral.as.As.impl.Convert.4b9, @Core.FloatLiteral.as.As.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.20b: = bound_method %float.674bbc.2, %Core.FloatLiteral.as.As.impl.Convert.specific_fn.b2e [concrete] @@ -262,7 +262,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_8.loc8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8] // CHECK:STDOUT: %i8.loc8: type = class_type @Int, @Int(constants.%int_8) [concrete = constants.%i8] -// CHECK:STDOUT: %impl.elem0.loc8: %.cef = impl_witness_access constants.%As.impl_witness.0bb, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bf2] +// CHECK:STDOUT: %impl.elem0.loc8: %.57e = impl_witness_access constants.%As.impl_witness.0bb, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bf2] // CHECK:STDOUT: %bound_method.loc8_45.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.c11] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.As.impl.Convert.1(constants.%int_8) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.d98] // CHECK:STDOUT: %bound_method.loc8_45.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.1fe] @@ -290,7 +290,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_16.loc11: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %i16.loc11: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] -// CHECK:STDOUT: %impl.elem0.loc11: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] +// CHECK:STDOUT: %impl.elem0.loc11: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] // CHECK:STDOUT: %bound_method.loc11_33.1: = bound_method %int_1.loc11, %impl.elem0.loc11 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.896] // CHECK:STDOUT: %specific_fn.loc11: = specific_function %impl.elem0.loc11, @Core.IntLiteral.as.As.impl.Convert.1(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.00b] // CHECK:STDOUT: %bound_method.loc11_33.2: = bound_method %int_1.loc11, %specific_fn.loc11 [concrete = constants.%bound_method.4da] @@ -318,7 +318,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc14: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0.loc14: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc14_29.1: = bound_method %int_1.loc14, %impl.elem0.loc14 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.bd3] // CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Core.IntLiteral.as.As.impl.Convert.1(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.fab] // CHECK:STDOUT: %bound_method.loc14_29.2: = bound_method %int_1.loc14, %specific_fn.loc14 [concrete = constants.%bound_method.290] @@ -346,7 +346,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_8.loc17: Core.IntLiteral = int_value 8 [concrete = constants.%int_8] // CHECK:STDOUT: %u8.loc17: type = class_type @UInt, @UInt(constants.%int_8) [concrete = constants.%u8] -// CHECK:STDOUT: %impl.elem0.loc17: %.5dc = impl_witness_access constants.%As.impl_witness.ce7, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.edb] +// CHECK:STDOUT: %impl.elem0.loc17: %.3d2 = impl_witness_access constants.%As.impl_witness.ce7, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.edb] // CHECK:STDOUT: %bound_method.loc17_49.1: = bound_method %int_1.loc17, %impl.elem0.loc17 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.f5f] // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Core.IntLiteral.as.As.impl.Convert.2(constants.%int_8) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.130] // CHECK:STDOUT: %bound_method.loc17_49.2: = bound_method %int_1.loc17, %specific_fn.loc17 [concrete = constants.%bound_method.6b2] @@ -374,7 +374,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc20: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_16.loc20: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %u16.loc20: type = class_type @UInt, @UInt(constants.%int_16) [concrete = constants.%u16] -// CHECK:STDOUT: %impl.elem0.loc20: %.1e6 = impl_witness_access constants.%As.impl_witness.e55, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.dab] +// CHECK:STDOUT: %impl.elem0.loc20: %.f78 = impl_witness_access constants.%As.impl_witness.e55, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.dab] // CHECK:STDOUT: %bound_method.loc20_51.1: = bound_method %int_1.loc20, %impl.elem0.loc20 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.e01] // CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Core.IntLiteral.as.As.impl.Convert.2(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.b56] // CHECK:STDOUT: %bound_method.loc20_51.2: = bound_method %int_1.loc20, %specific_fn.loc20 [concrete = constants.%bound_method.6f0] @@ -402,7 +402,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc23: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %u32.loc23: type = class_type @UInt, @UInt(constants.%int_32) [concrete = constants.%u32] -// CHECK:STDOUT: %impl.elem0.loc23: %.548 = impl_witness_access constants.%As.impl_witness.e1d, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bbd] +// CHECK:STDOUT: %impl.elem0.loc23: %.1a4 = impl_witness_access constants.%As.impl_witness.e1d, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bbd] // CHECK:STDOUT: %bound_method.loc23_47.1: = bound_method %int_1.loc23, %impl.elem0.loc23 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.a65] // CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Core.IntLiteral.as.As.impl.Convert.2(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.f97] // CHECK:STDOUT: %bound_method.loc23_47.2: = bound_method %int_1.loc23, %specific_fn.loc23 [concrete = constants.%bound_method.f17] @@ -430,7 +430,7 @@ fn F() { // CHECK:STDOUT: %float.loc26: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674bbc.1] // CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %f32.loc26: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e] -// CHECK:STDOUT: %impl.elem0.loc26: %.a86 = impl_witness_access constants.%As.impl_witness.748, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.683] +// CHECK:STDOUT: %impl.elem0.loc26: %.49e = impl_witness_access constants.%As.impl_witness.748, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.683] // CHECK:STDOUT: %bound_method.loc26_35.1: = bound_method %float.loc26, %impl.elem0.loc26 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.bound.ec8] // CHECK:STDOUT: %specific_fn.loc26: = specific_function %impl.elem0.loc26, @Core.FloatLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.specific_fn.10a] // CHECK:STDOUT: %bound_method.loc26_35.2: = bound_method %float.loc26, %specific_fn.loc26 [concrete = constants.%bound_method.cae] @@ -458,7 +458,7 @@ fn F() { // CHECK:STDOUT: %float.loc29: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674bbc.2] // CHECK:STDOUT: %int_64.loc29: Core.IntLiteral = int_value 64 [concrete = constants.%int_64] // CHECK:STDOUT: %f64.loc29: type = class_type @Float, @Float(constants.%int_64) [concrete = constants.%f64.d77] -// CHECK:STDOUT: %impl.elem0.loc29: %.cd4 = impl_witness_access constants.%As.impl_witness.187, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.4b9] +// CHECK:STDOUT: %impl.elem0.loc29: %.293 = impl_witness_access constants.%As.impl_witness.187, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.4b9] // CHECK:STDOUT: %bound_method.loc29_37.1: = bound_method %float.loc29, %impl.elem0.loc29 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.bound.f54] // CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Core.FloatLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.specific_fn.b2e] // CHECK:STDOUT: %bound_method.loc29_37.2: = bound_method %float.loc29, %specific_fn.loc29 [concrete = constants.%bound_method.20b] @@ -490,7 +490,6 @@ fn F() { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %f64.d77: type = class_type @Float, @Float(%int_64) [concrete] // CHECK:STDOUT: %As.type.a57: type = facet_type <@As, @As(%f64.d77)> [concrete] -// CHECK:STDOUT: %As.Convert.type.8fc: type = fn_type @As.Convert, @As(%f64.d77) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.882: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.27d: %Core.FloatLiteral.as.As.impl.Convert.type.882 = struct_value () [symbolic] @@ -498,7 +497,8 @@ fn F() { // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.07c: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.4b9: %Core.FloatLiteral.as.As.impl.Convert.type.07c = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.a57 = facet_value Core.FloatLiteral, (%As.impl_witness.187) [concrete] -// CHECK:STDOUT: %.cd4: type = fn_type_with_self_type %As.Convert.type.8fc, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.dab: type = fn_type @As.WithSelf.Convert, @As(%f64.d77, %As.facet) [concrete] +// CHECK:STDOUT: %.293: type = fn_type_with_self_type %As.WithSelf.Convert.type.dab, %As.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.As.impl.Convert.4b9 [concrete] // CHECK:STDOUT: %pattern_type.0ae: type = pattern_type %f64.d77 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.As.impl.Convert.4b9, @Core.FloatLiteral.as.As.impl.Convert(%int_64) [concrete] @@ -519,7 +519,7 @@ fn F() { // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] // CHECK:STDOUT: %int_64.loc15: Core.IntLiteral = int_value 64 [concrete = constants.%int_64] // CHECK:STDOUT: %f64.loc15: type = class_type @Float, @Float(constants.%int_64) [concrete = constants.%f64.d77] -// CHECK:STDOUT: %impl.elem0: %.cd4 = impl_witness_access constants.%As.impl_witness.187, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.4b9] +// CHECK:STDOUT: %impl.elem0: %.293 = impl_witness_access constants.%As.impl_witness.187, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.4b9] // CHECK:STDOUT: %bound_method.loc15_47.1: = bound_method %float, %impl.elem0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.FloatLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_47.2: = bound_method %float, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interop/cpp/builtins.llp64.carbon b/toolchain/check/testdata/interop/cpp/builtins.llp64.carbon index 823f07661eb3..af2f264c9545 100644 --- a/toolchain/check/testdata/interop/cpp/builtins.llp64.carbon +++ b/toolchain/check/testdata/interop/cpp/builtins.llp64.carbon @@ -668,12 +668,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %pattern_type.95b: type = pattern_type %i64 [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.2ad: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete] // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic] @@ -681,7 +679,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.d48: %ImplicitAs.type.2ad = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.556) [concrete] -// CHECK:STDOUT: %.567: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet.d48 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.4af: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i64, %ImplicitAs.facet.d48) [concrete] +// CHECK:STDOUT: %.a64: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.4af, %ImplicitAs.facet.d48 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.288: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -689,14 +688,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete] // CHECK:STDOUT: %As.type.229: type = facet_type <@As, @As(%i64)> [concrete] -// CHECK:STDOUT: %As.Convert.type.d57: type = fn_type @As.Convert, @As(%i64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.c71: = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.cee: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a54: %Core.IntLiteral.as.As.impl.Convert.type.cee = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.229 = facet_value Core.IntLiteral, (%As.impl_witness.c71) [concrete] -// CHECK:STDOUT: %.aba: type = fn_type_with_self_type %As.Convert.type.d57, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.188: type = fn_type @As.WithSelf.Convert, @As(%i64, %As.facet) [concrete] +// CHECK:STDOUT: %.fc7: type = fn_type_with_self_type %As.WithSelf.Convert.type.188, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a54 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a54, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.41b: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -704,7 +703,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.ccf: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.535: %Int.as.ImplicitAs.impl.Convert.type.ccf = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.234: %ImplicitAs.type.139 = facet_value %i64, (%ImplicitAs.impl_witness.e86) [concrete] -// CHECK:STDOUT: %.3aa: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.234 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b50: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.234) [concrete] +// CHECK:STDOUT: %.495: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b50, %ImplicitAs.facet.234 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.41a, %Int.as.ImplicitAs.impl.Convert.535 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.535, @Int.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.d1e: = bound_method %int_1.41a, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -715,14 +715,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete] -// CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e4d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f32.97e, %ImplicitAs.facet.945) [concrete] +// CHECK:STDOUT: %.98d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e4d, %ImplicitAs.facet.945 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.1e4: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -758,7 +758,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: // CHECK:STDOUT: %long_long.ref.loc8: type = name_ref long_long, %i64.1 [concrete = constants.%i64] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc8: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] +// CHECK:STDOUT: %impl.elem0.loc8: %.a64 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] // CHECK:STDOUT: %bound_method.loc8_38.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_38.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.288] @@ -782,7 +782,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] // CHECK:STDOUT: %.loc11_48.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] -// CHECK:STDOUT: %impl.elem0.loc11_48: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc11_48: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc11_48.1: = bound_method %float, %impl.elem0.loc11_48 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_48: = specific_function %impl.elem0.loc11_48, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_48.2: = bound_method %float, %specific_fn.loc11_48 [concrete = constants.%bound_method.1e4] @@ -800,14 +800,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref.loc11: type = name_ref long_long, %i64.1 [concrete = constants.%i64] -// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.aba = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54] +// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.fc7 = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54] // CHECK:STDOUT: %bound_method.loc11_23.1: = bound_method %int_1.loc11, %impl.elem0.loc11_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_23.1: = specific_function %impl.elem0.loc11_23.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_23.2: = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.41b] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i64 = call %bound_method.loc11_23.2(%int_1.loc11) [concrete = constants.%int_1.41a] // CHECK:STDOUT: %.loc11_23.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a] // CHECK:STDOUT: %.loc11_23.2: %i64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.41a] -// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.3aa = impl_witness_access constants.%ImplicitAs.impl_witness.e86, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.535] +// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.495 = impl_witness_access constants.%ImplicitAs.impl_witness.e86, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.535] // CHECK:STDOUT: %bound_method.loc11_23.3: = bound_method %.loc11_23.2, %impl.elem0.loc11_23.2 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_23.2: = specific_function %impl.elem0.loc11_23.2, @Int.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_23.4: = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.d1e] @@ -834,12 +834,10 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %pattern_type.157: type = pattern_type %u64 [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.584: type = facet_type <@ImplicitAs, @ImplicitAs(%u64)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.c65: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u64) [concrete] // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.46e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.7f8: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.0ea: %UInt.as.ImplicitAs.impl.Convert.type.7f8 = struct_value () [symbolic] @@ -847,7 +845,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.fb8: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.042: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.fb8 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.dfe: %ImplicitAs.type.584 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.bb3) [concrete] -// CHECK:STDOUT: %.da7: type = fn_type_with_self_type %ImplicitAs.Convert.type.c65, %ImplicitAs.facet.dfe [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.408: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%u64, %ImplicitAs.facet.dfe) [concrete] +// CHECK:STDOUT: %.f17: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.408, %ImplicitAs.facet.dfe [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.042 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.042, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.fec: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -855,14 +854,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete] // CHECK:STDOUT: %As.type.f20: type = facet_type <@As, @As(%u64)> [concrete] -// CHECK:STDOUT: %As.Convert.type.7eb: type = fn_type @As.Convert, @As(%u64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.2b1: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.979: %Core.IntLiteral.as.As.impl.Convert.type.2b1 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.f54: = impl_witness imports.%As.impl_witness_table.7eb, @Core.IntLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.0f2: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.715: %Core.IntLiteral.as.As.impl.Convert.type.0f2 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.f20 = facet_value Core.IntLiteral, (%As.impl_witness.f54) [concrete] -// CHECK:STDOUT: %.11a: type = fn_type_with_self_type %As.Convert.type.7eb, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.286: type = fn_type @As.WithSelf.Convert, @As(%u64, %As.facet) [concrete] +// CHECK:STDOUT: %.904: type = fn_type_with_self_type %As.WithSelf.Convert.type.286, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.715 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.715, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.9cf: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -870,7 +869,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.812: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.309: %UInt.as.ImplicitAs.impl.Convert.type.812 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.02d: %ImplicitAs.type.139 = facet_value %u64, (%ImplicitAs.impl_witness.2cc) [concrete] -// CHECK:STDOUT: %.a1c: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.02d [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.79a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.02d) [concrete] +// CHECK:STDOUT: %.74a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.79a, %ImplicitAs.facet.02d [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.f23, %UInt.as.ImplicitAs.impl.Convert.309 [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %UInt.as.ImplicitAs.impl.Convert.309, @UInt.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.f18: = bound_method %int_1.f23, %UInt.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -881,14 +881,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete] -// CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e4d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f32.97e, %ImplicitAs.facet.945) [concrete] +// CHECK:STDOUT: %.98d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e4d, %ImplicitAs.facet.945 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.1e4: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -924,7 +924,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: // CHECK:STDOUT: %unsigned_long_long.ref.loc8: type = name_ref unsigned_long_long, %u64.1 [concrete = constants.%u64] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc8: %.da7 = impl_witness_access constants.%ImplicitAs.impl_witness.bb3, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.042] +// CHECK:STDOUT: %impl.elem0.loc8: %.f17 = impl_witness_access constants.%ImplicitAs.impl_witness.bb3, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.042] // CHECK:STDOUT: %bound_method.loc8_56.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_56.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.fec] @@ -948,7 +948,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] // CHECK:STDOUT: %.loc11_57.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] -// CHECK:STDOUT: %impl.elem0.loc11_57: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc11_57: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc11_57.1: = bound_method %float, %impl.elem0.loc11_57 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_57: = specific_function %impl.elem0.loc11_57, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_57.2: = bound_method %float, %specific_fn.loc11_57 [concrete = constants.%bound_method.1e4] @@ -966,14 +966,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %unsigned_long_long.ref.loc11: type = name_ref unsigned_long_long, %u64.1 [concrete = constants.%u64] -// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.11a = impl_witness_access constants.%As.impl_witness.f54, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.715] +// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.904 = impl_witness_access constants.%As.impl_witness.f54, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.715] // CHECK:STDOUT: %bound_method.loc11_23.1: = bound_method %int_1.loc11, %impl.elem0.loc11_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_23.1: = specific_function %impl.elem0.loc11_23.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_23.2: = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.9cf] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %u64 = call %bound_method.loc11_23.2(%int_1.loc11) [concrete = constants.%int_1.f23] // CHECK:STDOUT: %.loc11_23.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23] // CHECK:STDOUT: %.loc11_23.2: %u64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.f23] -// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.a1c = impl_witness_access constants.%ImplicitAs.impl_witness.2cc, element0 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.309] +// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.74a = impl_witness_access constants.%ImplicitAs.impl_witness.2cc, element0 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.309] // CHECK:STDOUT: %bound_method.loc11_23.3: = bound_method %.loc11_23.2, %impl.elem0.loc11_23.2 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_23.2: = specific_function %impl.elem0.loc11_23.2, @UInt.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_23.4: = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.f18] @@ -1005,16 +1005,14 @@ fn CopyUnsignedLong() { // 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.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete] // CHECK:STDOUT: %ImplicitAs.type.2ad: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.eed: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.eed [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.6e8: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet.eed) [concrete] +// CHECK:STDOUT: %.c0c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.6e8, %ImplicitAs.facet.eed [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38 = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a [concrete] @@ -1035,7 +1033,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %pattern_type.95b: type = pattern_type %i64 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.bbc: = impl_witness imports.%ImplicitAs.impl_witness_table.cb1 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.ba4: %ImplicitAs.type.2ad = facet_value %Cpp.long, (%ImplicitAs.impl_witness.bbc) [concrete] -// CHECK:STDOUT: %.8a2: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet.ba4 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.945: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i64, %ImplicitAs.facet.ba4) [concrete] +// CHECK:STDOUT: %.12d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.945, %ImplicitAs.facet.ba4 [concrete] // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type.431: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert.1 [concrete] // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.bbf: %Cpp.long.as.ImplicitAs.impl.Convert.type.431 = struct_value () [concrete] // CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete] @@ -1044,16 +1043,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.508: type = facet_type <@As, @As(%Cpp.long)> [concrete] -// CHECK:STDOUT: %As.Convert.type.229: type = fn_type @As.Convert, @As(%Cpp.long) [concrete] // CHECK:STDOUT: %As.impl_witness.60c: = impl_witness imports.%As.impl_witness_table.797 [concrete] // CHECK:STDOUT: %As.facet: %As.type.508 = facet_value Core.IntLiteral, (%As.impl_witness.60c) [concrete] -// CHECK:STDOUT: %.040: type = fn_type_with_self_type %As.Convert.type.229, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.6c4: type = fn_type @As.WithSelf.Convert, @As(%Cpp.long, %As.facet) [concrete] +// CHECK:STDOUT: %.a3d: type = fn_type_with_self_type %As.WithSelf.Convert.type.6c4, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.e4d: = impl_witness imports.%ImplicitAs.impl_witness_table.a09 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.772: %ImplicitAs.type.139 = facet_value %Cpp.long, (%ImplicitAs.impl_witness.e4d) [concrete] -// CHECK:STDOUT: %.8e3: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.772 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.1e8: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.772) [concrete] +// CHECK:STDOUT: %.7f4: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.1e8, %ImplicitAs.facet.772 [concrete] // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type.9ed: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.d49: %Cpp.long.as.ImplicitAs.impl.Convert.type.9ed = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5a4, %Cpp.long.as.ImplicitAs.impl.Convert.d49 [concrete] @@ -1064,14 +1064,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete] -// CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e4d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f32.97e, %ImplicitAs.facet.945) [concrete] +// CHECK:STDOUT: %.98d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e4d, %ImplicitAs.facet.945 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1151,7 +1151,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.ref.loc15: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc15: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc15: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc15: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc15(%int_1.loc15) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc15_28.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5a4] @@ -1239,7 +1239,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc24: %.8a2 = impl_witness_access constants.%ImplicitAs.impl_witness.bbc, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.bbf] +// CHECK:STDOUT: %impl.elem0.loc24: %.12d = impl_witness_access constants.%ImplicitAs.impl_witness.bbc, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.bbf] // CHECK:STDOUT: %bound_method.loc24: = bound_method %cpp_long.ref.loc24, %impl.elem0.loc24 // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc24: init %i64 = call %bound_method.loc24(%cpp_long.ref.loc24) // CHECK:STDOUT: %.loc24_25.1: %i64 = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc24 @@ -1252,7 +1252,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] // CHECK:STDOUT: %.loc26_43.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] -// CHECK:STDOUT: %impl.elem0.loc26_43: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc26_43: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc26_43.1: = bound_method %float, %impl.elem0.loc26_43 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc26_43, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc26_43.2: = bound_method %float, %specific_fn [concrete = constants.%bound_method] @@ -1270,12 +1270,12 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_1.loc26: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc26: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc26: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] -// CHECK:STDOUT: %impl.elem0.loc26_23.1: %.040 = impl_witness_access constants.%As.impl_witness.60c, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc26_23.1: %.a3d = impl_witness_access constants.%As.impl_witness.60c, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] // CHECK:STDOUT: %bound_method.loc26_23.1: = bound_method %int_1.loc26, %impl.elem0.loc26_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.long = call %bound_method.loc26_23.1(%int_1.loc26) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc26_23.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc26_23.2: %Cpp.long = converted %int_1.loc26, %.loc26_23.1 [concrete = constants.%int_1.5a4] -// CHECK:STDOUT: %impl.elem0.loc26_23.2: %.8e3 = impl_witness_access constants.%ImplicitAs.impl_witness.e4d, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.d49] +// CHECK:STDOUT: %impl.elem0.loc26_23.2: %.7f4 = impl_witness_access constants.%ImplicitAs.impl_witness.e4d, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.d49] // CHECK:STDOUT: %bound_method.loc26_23.2: = bound_method %.loc26_23.2, %impl.elem0.loc26_23.2 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc26: init Core.IntLiteral = call %bound_method.loc26_23.2(%.loc26_23.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc26_23.3: Core.IntLiteral = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc26 [concrete = constants.%int_1.5b8] @@ -1304,19 +1304,19 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.6e8: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.c0c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.6e8, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete] // CHECK:STDOUT: %Copy.impl_witness.e75: = impl_witness imports.%Copy.impl_witness_table.572 [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Cpp.long, (%Copy.impl_witness.e75) [concrete] -// CHECK:STDOUT: %.03e: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.11b: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.539: type = fn_type_with_self_type %Copy.WithSelf.Op.type.11b, %Copy.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op.type: type = fn_type @Cpp.long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op: %Cpp.long.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -1342,7 +1342,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.long = var %a.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5a4] @@ -1359,7 +1359,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %b.var: ref %Cpp.long = var %b.var_patt // CHECK:STDOUT: %a.ref: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %.loc9_21: %Cpp.long = acquire_value %a.ref -// CHECK:STDOUT: %impl.elem0.loc9: %.03e = impl_witness_access constants.%Copy.impl_witness.e75, element0 [concrete = constants.%Cpp.long.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc9: %.539 = impl_witness_access constants.%Copy.impl_witness.e75, element0 [concrete = constants.%Cpp.long.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_21, %impl.elem0.loc9 // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op.call: init %Cpp.long = call %bound_method.loc9(%.loc9_21) // CHECK:STDOUT: assign %b.var, %Cpp.long.as.Copy.impl.Op.call @@ -1384,42 +1384,42 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.6e8: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.c0c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.6e8, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete] // CHECK:STDOUT: %EqWith.type.494: type = facet_type <@EqWith, @EqWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %EqWith.Equal.type.eeb: type = fn_type @EqWith.Equal, @EqWith(%Cpp.long) [concrete] -// CHECK:STDOUT: %EqWith.NotEqual.type.d83: type = fn_type @EqWith.NotEqual, @EqWith(%Cpp.long) [concrete] // CHECK:STDOUT: %EqWith.impl_witness.6db: = impl_witness imports.%EqWith.impl_witness_table.322 [concrete] // CHECK:STDOUT: %EqWith.facet: %EqWith.type.494 = facet_value %Cpp.long, (%EqWith.impl_witness.6db) [concrete] -// CHECK:STDOUT: %.a8e: type = fn_type_with_self_type %EqWith.Equal.type.eeb, %EqWith.facet [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.227: type = fn_type @EqWith.WithSelf.Equal, @EqWith(%Cpp.long, %EqWith.facet) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.e56: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith(%Cpp.long, %EqWith.facet) [concrete] +// CHECK:STDOUT: %.909: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.227, %EqWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.type.cc0: type = fn_type @Cpp.long.as.EqWith.impl.Equal.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.1b7: %Cpp.long.as.EqWith.impl.Equal.type.cc0 = struct_value () [concrete] -// CHECK:STDOUT: %.fbc: type = fn_type_with_self_type %EqWith.NotEqual.type.d83, %EqWith.facet [concrete] +// CHECK:STDOUT: %.163: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.e56, %EqWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.type.75f: type = fn_type @Cpp.long.as.EqWith.impl.NotEqual.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.5de: %Cpp.long.as.EqWith.impl.NotEqual.type.75f = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.type.a39: type = facet_type <@OrderedWith, @OrderedWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %OrderedWith.Less.type.3c2: type = fn_type @OrderedWith.Less, @OrderedWith(%Cpp.long) [concrete] -// CHECK:STDOUT: %OrderedWith.LessOrEquivalent.type.d58: type = fn_type @OrderedWith.LessOrEquivalent, @OrderedWith(%Cpp.long) [concrete] -// CHECK:STDOUT: %OrderedWith.Greater.type.a51: type = fn_type @OrderedWith.Greater, @OrderedWith(%Cpp.long) [concrete] -// CHECK:STDOUT: %OrderedWith.GreaterOrEquivalent.type.3df: type = fn_type @OrderedWith.GreaterOrEquivalent, @OrderedWith(%Cpp.long) [concrete] // CHECK:STDOUT: %OrderedWith.impl_witness.2b3: = impl_witness imports.%OrderedWith.impl_witness_table.e82 [concrete] // CHECK:STDOUT: %OrderedWith.facet: %OrderedWith.type.a39 = facet_value %Cpp.long, (%OrderedWith.impl_witness.2b3) [concrete] -// CHECK:STDOUT: %.3ad: type = fn_type_with_self_type %OrderedWith.Greater.type.a51, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.294: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(%Cpp.long, %OrderedWith.facet) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.cf1: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith(%Cpp.long, %OrderedWith.facet) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.2d5: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith(%Cpp.long, %OrderedWith.facet) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.8eb: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith(%Cpp.long, %OrderedWith.facet) [concrete] +// CHECK:STDOUT: %.fdc: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.2d5, %OrderedWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.type.da5: type = fn_type @Cpp.long.as.OrderedWith.impl.Greater.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.cc7: %Cpp.long.as.OrderedWith.impl.Greater.type.da5 = struct_value () [concrete] -// CHECK:STDOUT: %.b8a: type = fn_type_with_self_type %OrderedWith.Less.type.3c2, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.c90: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.294, %OrderedWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.type.d1e: type = fn_type @Cpp.long.as.OrderedWith.impl.Less.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.911: %Cpp.long.as.OrderedWith.impl.Less.type.d1e = struct_value () [concrete] -// CHECK:STDOUT: %.805: type = fn_type_with_self_type %OrderedWith.GreaterOrEquivalent.type.3df, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.a9b: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.8eb, %OrderedWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.9c8: type = fn_type @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.337: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.9c8 = struct_value () [concrete] -// CHECK:STDOUT: %.6d7: type = fn_type_with_self_type %OrderedWith.LessOrEquivalent.type.d58, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.fad: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.cf1, %OrderedWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.cd7: type = fn_type @Cpp.long.as.OrderedWith.impl.LessOrEquivalent.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.187: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.cd7 = struct_value () [concrete] // CHECK:STDOUT: } @@ -1451,7 +1451,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc8: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc8_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.5a4] @@ -1465,7 +1465,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc9: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc9: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc9: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc9_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.5a4] @@ -1473,32 +1473,32 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %b: %Cpp.long = value_binding b, %.loc9_21.2 // CHECK:STDOUT: %a.ref.loc10: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc10: %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc10: %.a8e = impl_witness_access constants.%EqWith.impl_witness.6db, element0 [concrete = constants.%Cpp.long.as.EqWith.impl.Equal.1b7] +// CHECK:STDOUT: %impl.elem0.loc10: %.909 = impl_witness_access constants.%EqWith.impl_witness.6db, element0 [concrete = constants.%Cpp.long.as.EqWith.impl.Equal.1b7] // CHECK:STDOUT: %bound_method.loc10: = bound_method %a.ref.loc10, %impl.elem0.loc10 // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.call: init bool = call %bound_method.loc10(%a.ref.loc10, %b.ref.loc10) // CHECK:STDOUT: %a.ref.loc11: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc11: %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem1.loc11: %.fbc = impl_witness_access constants.%EqWith.impl_witness.6db, element1 [concrete = constants.%Cpp.long.as.EqWith.impl.NotEqual.5de] +// CHECK:STDOUT: %impl.elem1.loc11: %.163 = impl_witness_access constants.%EqWith.impl_witness.6db, element1 [concrete = constants.%Cpp.long.as.EqWith.impl.NotEqual.5de] // CHECK:STDOUT: %bound_method.loc11: = bound_method %a.ref.loc11, %impl.elem1.loc11 // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.call: init bool = call %bound_method.loc11(%a.ref.loc11, %b.ref.loc11) // CHECK:STDOUT: %a.ref.loc12: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc12: %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem2: %.3ad = impl_witness_access constants.%OrderedWith.impl_witness.2b3, element2 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Greater.cc7] +// CHECK:STDOUT: %impl.elem2: %.fdc = impl_witness_access constants.%OrderedWith.impl_witness.2b3, element2 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Greater.cc7] // CHECK:STDOUT: %bound_method.loc12: = bound_method %a.ref.loc12, %impl.elem2 // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.call: init bool = call %bound_method.loc12(%a.ref.loc12, %b.ref.loc12) // CHECK:STDOUT: %a.ref.loc13: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc13: %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc13: %.b8a = impl_witness_access constants.%OrderedWith.impl_witness.2b3, element0 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Less.911] +// CHECK:STDOUT: %impl.elem0.loc13: %.c90 = impl_witness_access constants.%OrderedWith.impl_witness.2b3, element0 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Less.911] // CHECK:STDOUT: %bound_method.loc13: = bound_method %a.ref.loc13, %impl.elem0.loc13 // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.call: init bool = call %bound_method.loc13(%a.ref.loc13, %b.ref.loc13) // CHECK:STDOUT: %a.ref.loc14: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc14: %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem3: %.805 = impl_witness_access constants.%OrderedWith.impl_witness.2b3, element3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.337] +// CHECK:STDOUT: %impl.elem3: %.a9b = impl_witness_access constants.%OrderedWith.impl_witness.2b3, element3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.337] // CHECK:STDOUT: %bound_method.loc14: = bound_method %a.ref.loc14, %impl.elem3 // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.call: init bool = call %bound_method.loc14(%a.ref.loc14, %b.ref.loc14) // CHECK:STDOUT: %a.ref.loc15: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc15: %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem1.loc15: %.6d7 = impl_witness_access constants.%OrderedWith.impl_witness.2b3, element1 [concrete = constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.187] +// CHECK:STDOUT: %impl.elem1.loc15: %.fad = impl_witness_access constants.%OrderedWith.impl_witness.2b3, element1 [concrete = constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.187] // CHECK:STDOUT: %bound_method.loc15: = bound_method %a.ref.loc15, %impl.elem1.loc15 // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.call: init bool = call %bound_method.loc15(%a.ref.loc15, %b.ref.loc15) // CHECK:STDOUT: @@ -1513,17 +1513,15 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete] // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete] // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.eed: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.eed [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.6e8: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet.eed) [concrete] +// CHECK:STDOUT: %.c0c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.6e8, %ImplicitAs.facet.eed [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38 = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a [concrete] // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete] // CHECK:STDOUT: %EqWith.type.d8f: type = facet_type <@EqWith, @EqWith(%i32)> [concrete] -// CHECK:STDOUT: %EqWith.Equal.type.874: type = fn_type @EqWith.Equal, @EqWith(%i32) [concrete] -// CHECK:STDOUT: %EqWith.NotEqual.type.a9a: type = fn_type @EqWith.NotEqual, @EqWith(%i32) [concrete] // CHECK:STDOUT: %T.57d: %ImplicitAs.type.819 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.type.b3148d.1: type = fn_type @Cpp.long.as.EqWith.impl.NotEqual.1, @Cpp.long.as.EqWith.impl.f13(%T.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.c90ef2.1: %Cpp.long.as.EqWith.impl.NotEqual.type.b3148d.1 = struct_value () [symbolic] @@ -1534,8 +1532,6 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.type.7da93b.2: type = fn_type @Cpp.long.as.EqWith.impl.Equal.2, @Cpp.long.as.EqWith.impl.f13(%T.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.c91b06.2: %Cpp.long.as.EqWith.impl.Equal.type.7da93b.2 = struct_value () [symbolic] // CHECK:STDOUT: %EqWith.type.ded: type = facet_type <@EqWith, @EqWith(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %EqWith.NotEqual.type.b22: type = fn_type @EqWith.NotEqual, @EqWith(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %EqWith.Equal.type.f75: type = fn_type @EqWith.Equal, @EqWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.0fc: = impl_witness imports.%ImplicitAs.impl_witness_table.5ad [concrete] // CHECK:STDOUT: %ImplicitAs.facet.174: %ImplicitAs.type.819 = facet_value %i32, (%ImplicitAs.impl_witness.0fc) [concrete] // CHECK:STDOUT: %EqWith.impl_witness.15a: = impl_witness imports.%EqWith.impl_witness_table.44b, @Cpp.long.as.EqWith.impl.f13(%ImplicitAs.facet.174) [concrete] @@ -1548,20 +1544,19 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.type.b6d1d8.2: type = fn_type @Cpp.long.as.EqWith.impl.NotEqual.1, @Cpp.long.as.EqWith.impl.f13(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.6a28a6.2: %Cpp.long.as.EqWith.impl.NotEqual.type.b6d1d8.2 = struct_value () [concrete] // CHECK:STDOUT: %EqWith.facet.fd1: %EqWith.type.d8f = facet_value %Cpp.long, (%EqWith.impl_witness.15a) [concrete] -// CHECK:STDOUT: %.d7e: type = fn_type_with_self_type %EqWith.Equal.type.874, %EqWith.facet.fd1 [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.366: type = fn_type @EqWith.WithSelf.Equal, @EqWith(%i32, %EqWith.facet.fd1) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.32d: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith(%i32, %EqWith.facet.fd1) [concrete] +// CHECK:STDOUT: %.09a: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.366, %EqWith.facet.fd1 [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.specific_fn.b56f6d.1: = specific_function %Cpp.long.as.EqWith.impl.Equal.0f3e3b.2, @Cpp.long.as.EqWith.impl.Equal.1(%ImplicitAs.facet.174) [concrete] -// CHECK:STDOUT: %.c45: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.174 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.9f0: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet.174) [concrete] +// CHECK:STDOUT: %.bb8: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.9f0, %ImplicitAs.facet.174 [concrete] // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.type: type = fn_type @i32.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert: %i32.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.specific_fn.b56f6d.2: = specific_function %Cpp.long.as.EqWith.impl.Equal.0f3e3b.1, @Cpp.long.as.EqWith.impl.Equal.2(%ImplicitAs.facet.174) [concrete] -// CHECK:STDOUT: %.397: type = fn_type_with_self_type %EqWith.NotEqual.type.a9a, %EqWith.facet.fd1 [concrete] +// CHECK:STDOUT: %.1c7: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.32d, %EqWith.facet.fd1 [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.specific_fn.25d32e.1: = specific_function %Cpp.long.as.EqWith.impl.NotEqual.6a28a6.2, @Cpp.long.as.EqWith.impl.NotEqual.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.specific_fn.25d32e.2: = specific_function %Cpp.long.as.EqWith.impl.NotEqual.6a28a6.1, @Cpp.long.as.EqWith.impl.NotEqual.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %OrderedWith.type.243: type = facet_type <@OrderedWith, @OrderedWith(%i32)> [concrete] -// CHECK:STDOUT: %OrderedWith.Less.type.815: type = fn_type @OrderedWith.Less, @OrderedWith(%i32) [concrete] -// CHECK:STDOUT: %OrderedWith.LessOrEquivalent.type.257: type = fn_type @OrderedWith.LessOrEquivalent, @OrderedWith(%i32) [concrete] -// CHECK:STDOUT: %OrderedWith.Greater.type.402: type = fn_type @OrderedWith.Greater, @OrderedWith(%i32) [concrete] -// CHECK:STDOUT: %OrderedWith.GreaterOrEquivalent.type.6fe: type = fn_type @OrderedWith.GreaterOrEquivalent, @OrderedWith(%i32) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.74811b.1: type = fn_type @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.1, @Cpp.long.as.OrderedWith.impl.15a(%T.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.dd28ba.1: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.74811b.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.74811b.2: type = fn_type @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.2, @Cpp.long.as.OrderedWith.impl.15a(%T.57d) [symbolic] @@ -1579,10 +1574,6 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.type.a59daa.2: type = fn_type @Cpp.long.as.OrderedWith.impl.Less.2, @Cpp.long.as.OrderedWith.impl.15a(%T.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.954f71.2: %Cpp.long.as.OrderedWith.impl.Less.type.a59daa.2 = struct_value () [symbolic] // CHECK:STDOUT: %OrderedWith.type.358: type = facet_type <@OrderedWith, @OrderedWith(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %OrderedWith.GreaterOrEquivalent.type.e24: type = fn_type @OrderedWith.GreaterOrEquivalent, @OrderedWith(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %OrderedWith.Greater.type.30c: type = fn_type @OrderedWith.Greater, @OrderedWith(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %OrderedWith.LessOrEquivalent.type.776: type = fn_type @OrderedWith.LessOrEquivalent, @OrderedWith(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %OrderedWith.Less.type.20d: type = fn_type @OrderedWith.Less, @OrderedWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %OrderedWith.impl_witness.576: = impl_witness imports.%OrderedWith.impl_witness_table.9c6, @Cpp.long.as.OrderedWith.impl.15a(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.type.8fda0e.1: type = fn_type @Cpp.long.as.OrderedWith.impl.Less.2, @Cpp.long.as.OrderedWith.impl.15a(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.5299ce.1: %Cpp.long.as.OrderedWith.impl.Less.type.8fda0e.1 = struct_value () [concrete] @@ -1601,16 +1592,20 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.062a19.2: type = fn_type @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.1, @Cpp.long.as.OrderedWith.impl.15a(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.c90ad0.2: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.062a19.2 = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.facet.19d: %OrderedWith.type.243 = facet_value %Cpp.long, (%OrderedWith.impl_witness.576) [concrete] -// CHECK:STDOUT: %.528: type = fn_type_with_self_type %OrderedWith.Greater.type.402, %OrderedWith.facet.19d [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.280: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(%i32, %OrderedWith.facet.19d) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.c5d: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith(%i32, %OrderedWith.facet.19d) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.2e4: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith(%i32, %OrderedWith.facet.19d) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.353: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith(%i32, %OrderedWith.facet.19d) [concrete] +// CHECK:STDOUT: %.883: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.2e4, %OrderedWith.facet.19d [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.specific_fn.760220.1: = specific_function %Cpp.long.as.OrderedWith.impl.Greater.9898ff.2, @Cpp.long.as.OrderedWith.impl.Greater.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.specific_fn.760220.2: = specific_function %Cpp.long.as.OrderedWith.impl.Greater.9898ff.1, @Cpp.long.as.OrderedWith.impl.Greater.2(%ImplicitAs.facet.174) [concrete] -// CHECK:STDOUT: %.3e2: type = fn_type_with_self_type %OrderedWith.Less.type.815, %OrderedWith.facet.19d [concrete] +// CHECK:STDOUT: %.481: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.280, %OrderedWith.facet.19d [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.specific_fn.89e78a.1: = specific_function %Cpp.long.as.OrderedWith.impl.Less.5299ce.2, @Cpp.long.as.OrderedWith.impl.Less.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.specific_fn.89e78a.2: = specific_function %Cpp.long.as.OrderedWith.impl.Less.5299ce.1, @Cpp.long.as.OrderedWith.impl.Less.2(%ImplicitAs.facet.174) [concrete] -// CHECK:STDOUT: %.723: type = fn_type_with_self_type %OrderedWith.GreaterOrEquivalent.type.6fe, %OrderedWith.facet.19d [concrete] +// CHECK:STDOUT: %.753: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.353, %OrderedWith.facet.19d [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.e67d4e.1: = specific_function %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.c90ad0.2, @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.e67d4e.2: = specific_function %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.c90ad0.1, @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.2(%ImplicitAs.facet.174) [concrete] -// CHECK:STDOUT: %.d50: type = fn_type_with_self_type %OrderedWith.LessOrEquivalent.type.257, %OrderedWith.facet.19d [concrete] +// CHECK:STDOUT: %.14a: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.c5d, %OrderedWith.facet.19d [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.9548d5.1: = specific_function %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.1eddf1.2, @Cpp.long.as.OrderedWith.impl.LessOrEquivalent.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.9548d5.2: = specific_function %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.1eddf1.1, @Cpp.long.as.OrderedWith.impl.LessOrEquivalent.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %EqWith.impl_witness.8e5: = impl_witness imports.%EqWith.impl_witness_table.44b, @Cpp.long.as.EqWith.impl.f13(%ImplicitAs.facet.eed) [concrete] @@ -1623,10 +1618,12 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.type.de968c.2: type = fn_type @Cpp.long.as.EqWith.impl.NotEqual.1, @Cpp.long.as.EqWith.impl.f13(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.f686b3.2: %Cpp.long.as.EqWith.impl.NotEqual.type.de968c.2 = struct_value () [concrete] // CHECK:STDOUT: %EqWith.facet.3d4: %EqWith.type.ded = facet_value %Cpp.long, (%EqWith.impl_witness.8e5) [concrete] -// CHECK:STDOUT: %.64d: type = fn_type_with_self_type %EqWith.Equal.type.f75, %EqWith.facet.3d4 [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.d3d: type = fn_type @EqWith.WithSelf.Equal, @EqWith(Core.IntLiteral, %EqWith.facet.3d4) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.510: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith(Core.IntLiteral, %EqWith.facet.3d4) [concrete] +// CHECK:STDOUT: %.a03: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.d3d, %EqWith.facet.3d4 [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.specific_fn.334ae9.1: = specific_function %Cpp.long.as.EqWith.impl.Equal.6ed862.2, @Cpp.long.as.EqWith.impl.Equal.1(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.specific_fn.334ae9.2: = specific_function %Cpp.long.as.EqWith.impl.Equal.6ed862.1, @Cpp.long.as.EqWith.impl.Equal.2(%ImplicitAs.facet.eed) [concrete] -// CHECK:STDOUT: %.2f9: type = fn_type_with_self_type %EqWith.NotEqual.type.b22, %EqWith.facet.3d4 [concrete] +// CHECK:STDOUT: %.9a1: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.510, %EqWith.facet.3d4 [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.specific_fn.5aa006.1: = specific_function %Cpp.long.as.EqWith.impl.NotEqual.f686b3.2, @Cpp.long.as.EqWith.impl.NotEqual.1(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.specific_fn.5aa006.2: = specific_function %Cpp.long.as.EqWith.impl.NotEqual.f686b3.1, @Cpp.long.as.EqWith.impl.NotEqual.2(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %OrderedWith.impl_witness.52f: = impl_witness imports.%OrderedWith.impl_witness_table.9c6, @Cpp.long.as.OrderedWith.impl.15a(%ImplicitAs.facet.eed) [concrete] @@ -1647,16 +1644,20 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.2273d7.2: type = fn_type @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.1, @Cpp.long.as.OrderedWith.impl.15a(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.abd013.2: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.2273d7.2 = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.facet.eef: %OrderedWith.type.358 = facet_value %Cpp.long, (%OrderedWith.impl_witness.52f) [concrete] -// CHECK:STDOUT: %.07e: type = fn_type_with_self_type %OrderedWith.Greater.type.30c, %OrderedWith.facet.eef [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.af4: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(Core.IntLiteral, %OrderedWith.facet.eef) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.9ec: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith(Core.IntLiteral, %OrderedWith.facet.eef) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.327: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith(Core.IntLiteral, %OrderedWith.facet.eef) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.d4c: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith(Core.IntLiteral, %OrderedWith.facet.eef) [concrete] +// CHECK:STDOUT: %.5af: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.327, %OrderedWith.facet.eef [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.specific_fn.b2149b.1: = specific_function %Cpp.long.as.OrderedWith.impl.Greater.74a807.2, @Cpp.long.as.OrderedWith.impl.Greater.1(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.specific_fn.b2149b.2: = specific_function %Cpp.long.as.OrderedWith.impl.Greater.74a807.1, @Cpp.long.as.OrderedWith.impl.Greater.2(%ImplicitAs.facet.eed) [concrete] -// CHECK:STDOUT: %.66b: type = fn_type_with_self_type %OrderedWith.Less.type.20d, %OrderedWith.facet.eef [concrete] +// CHECK:STDOUT: %.6b7: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.af4, %OrderedWith.facet.eef [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.specific_fn.b6fc5e.1: = specific_function %Cpp.long.as.OrderedWith.impl.Less.0de767.2, @Cpp.long.as.OrderedWith.impl.Less.1(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.specific_fn.b6fc5e.2: = specific_function %Cpp.long.as.OrderedWith.impl.Less.0de767.1, @Cpp.long.as.OrderedWith.impl.Less.2(%ImplicitAs.facet.eed) [concrete] -// CHECK:STDOUT: %.d0e: type = fn_type_with_self_type %OrderedWith.GreaterOrEquivalent.type.e24, %OrderedWith.facet.eef [concrete] +// CHECK:STDOUT: %.1f9: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.d4c, %OrderedWith.facet.eef [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.f90679.1: = specific_function %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.abd013.2, @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.1(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.f90679.2: = specific_function %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.abd013.1, @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.2(%ImplicitAs.facet.eed) [concrete] -// CHECK:STDOUT: %.4d6: type = fn_type_with_self_type %OrderedWith.LessOrEquivalent.type.776, %OrderedWith.facet.eef [concrete] +// CHECK:STDOUT: %.76b: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.9ec, %OrderedWith.facet.eef [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.c5c24a.1: = specific_function %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.9833d9.2, @Cpp.long.as.OrderedWith.impl.LessOrEquivalent.1(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.c5c24a.2: = specific_function %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.9833d9.1, @Cpp.long.as.OrderedWith.impl.LessOrEquivalent.2(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: } @@ -1697,7 +1698,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc9: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc9: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc9_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.5a4] @@ -1705,7 +1706,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a: %Cpp.long = value_binding a, %.loc9_21.2 // CHECK:STDOUT: %a.ref.loc10: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc10: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc10_5.1: %.d7e = impl_witness_access constants.%EqWith.impl_witness.15a, element0 [concrete = constants.%Cpp.long.as.EqWith.impl.Equal.0f3e3b.2] +// CHECK:STDOUT: %impl.elem0.loc10_5.1: %.09a = impl_witness_access constants.%EqWith.impl_witness.15a, element0 [concrete = constants.%Cpp.long.as.EqWith.impl.Equal.0f3e3b.2] // CHECK:STDOUT: %bound_method.loc10_5.1: = bound_method %a.ref.loc10, %impl.elem0.loc10_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc10_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc10_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc10_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -1716,14 +1717,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc10_5.3: %Cpp.long.as.EqWith.impl.Equal.type.c1ed1a.1 = specific_constant imports.%Core.Equal.0ad, @Cpp.long.as.EqWith.impl.f13(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.EqWith.impl.Equal.0f3e3b.1] // CHECK:STDOUT: %Equal.ref.loc10: %Cpp.long.as.EqWith.impl.Equal.type.c1ed1a.1 = name_ref Equal, %.loc10_5.3 [concrete = constants.%Cpp.long.as.EqWith.impl.Equal.0f3e3b.1] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.bound.loc10: = bound_method %a.ref.loc10, %Equal.ref.loc10 -// CHECK:STDOUT: %impl.elem0.loc10_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_5.3: = bound_method %b.ref.loc10, %impl.elem0.loc10_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc10_5: init %Cpp.long = call %bound_method.loc10_5.3(%b.ref.loc10) // CHECK:STDOUT: %.loc10_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc10_5 // CHECK:STDOUT: %.loc10_5.5: %Cpp.long = converted %b.ref.loc10, %.loc10_5.4 // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.specific_fn.loc10: = specific_function %Equal.ref.loc10, @Cpp.long.as.EqWith.impl.Equal.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.EqWith.impl.Equal.specific_fn.b56f6d.2] // CHECK:STDOUT: %bound_method.loc10_5.4: = bound_method %a.ref.loc10, %Cpp.long.as.EqWith.impl.Equal.specific_fn.loc10 -// CHECK:STDOUT: %impl.elem0.loc10_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_8: = bound_method %b.ref.loc10, %impl.elem0.loc10_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc10_8: init %Cpp.long = call %bound_method.loc10_8(%b.ref.loc10) // CHECK:STDOUT: %.loc10_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc10_8 @@ -1731,7 +1732,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.call.loc10: init bool = call %bound_method.loc10_5.4(%a.ref.loc10, %.loc10_8.2) // CHECK:STDOUT: %a.ref.loc11: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc11: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem1.loc11: %.397 = impl_witness_access constants.%EqWith.impl_witness.15a, element1 [concrete = constants.%Cpp.long.as.EqWith.impl.NotEqual.6a28a6.2] +// CHECK:STDOUT: %impl.elem1.loc11: %.1c7 = impl_witness_access constants.%EqWith.impl_witness.15a, element1 [concrete = constants.%Cpp.long.as.EqWith.impl.NotEqual.6a28a6.2] // CHECK:STDOUT: %bound_method.loc11_5.1: = bound_method %a.ref.loc11, %impl.elem1.loc11 // CHECK:STDOUT: %ImplicitAs.facet.loc11_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc11_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc11_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -1742,14 +1743,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc11_5.3: %Cpp.long.as.EqWith.impl.NotEqual.type.b6d1d8.1 = specific_constant imports.%Core.NotEqual.b1f, @Cpp.long.as.EqWith.impl.f13(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.EqWith.impl.NotEqual.6a28a6.1] // CHECK:STDOUT: %NotEqual.ref.loc11: %Cpp.long.as.EqWith.impl.NotEqual.type.b6d1d8.1 = name_ref NotEqual, %.loc11_5.3 [concrete = constants.%Cpp.long.as.EqWith.impl.NotEqual.6a28a6.1] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.bound.loc11: = bound_method %a.ref.loc11, %NotEqual.ref.loc11 -// CHECK:STDOUT: %impl.elem0.loc11_5: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc11_5: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc11_5.3: = bound_method %b.ref.loc11, %impl.elem0.loc11_5 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc11_5: init %Cpp.long = call %bound_method.loc11_5.3(%b.ref.loc11) // CHECK:STDOUT: %.loc11_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc11_5 // CHECK:STDOUT: %.loc11_5.5: %Cpp.long = converted %b.ref.loc11, %.loc11_5.4 // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.specific_fn.loc11: = specific_function %NotEqual.ref.loc11, @Cpp.long.as.EqWith.impl.NotEqual.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.EqWith.impl.NotEqual.specific_fn.25d32e.2] // CHECK:STDOUT: %bound_method.loc11_5.4: = bound_method %a.ref.loc11, %Cpp.long.as.EqWith.impl.NotEqual.specific_fn.loc11 -// CHECK:STDOUT: %impl.elem0.loc11_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc11_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc11_8: = bound_method %b.ref.loc11, %impl.elem0.loc11_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc11_8: init %Cpp.long = call %bound_method.loc11_8(%b.ref.loc11) // CHECK:STDOUT: %.loc11_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc11_8 @@ -1757,7 +1758,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.call.loc11: init bool = call %bound_method.loc11_5.4(%a.ref.loc11, %.loc11_8.2) // CHECK:STDOUT: %a.ref.loc12: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc12: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem2.loc12: %.528 = impl_witness_access constants.%OrderedWith.impl_witness.576, element2 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Greater.9898ff.2] +// CHECK:STDOUT: %impl.elem2.loc12: %.883 = impl_witness_access constants.%OrderedWith.impl_witness.576, element2 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Greater.9898ff.2] // CHECK:STDOUT: %bound_method.loc12_5.1: = bound_method %a.ref.loc12, %impl.elem2.loc12 // CHECK:STDOUT: %ImplicitAs.facet.loc12_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc12_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc12_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -1768,14 +1769,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc12_5.3: %Cpp.long.as.OrderedWith.impl.Greater.type.a1c5d5.1 = specific_constant imports.%Core.Greater.9da, @Cpp.long.as.OrderedWith.impl.15a(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.OrderedWith.impl.Greater.9898ff.1] // CHECK:STDOUT: %Greater.ref.loc12: %Cpp.long.as.OrderedWith.impl.Greater.type.a1c5d5.1 = name_ref Greater, %.loc12_5.3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Greater.9898ff.1] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.bound.loc12: = bound_method %a.ref.loc12, %Greater.ref.loc12 -// CHECK:STDOUT: %impl.elem0.loc12_5: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc12_5: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc12_5.3: = bound_method %b.ref.loc12, %impl.elem0.loc12_5 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc12_5: init %Cpp.long = call %bound_method.loc12_5.3(%b.ref.loc12) // CHECK:STDOUT: %.loc12_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc12_5 // CHECK:STDOUT: %.loc12_5.5: %Cpp.long = converted %b.ref.loc12, %.loc12_5.4 // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.specific_fn.loc12: = specific_function %Greater.ref.loc12, @Cpp.long.as.OrderedWith.impl.Greater.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.OrderedWith.impl.Greater.specific_fn.760220.2] // CHECK:STDOUT: %bound_method.loc12_5.4: = bound_method %a.ref.loc12, %Cpp.long.as.OrderedWith.impl.Greater.specific_fn.loc12 -// CHECK:STDOUT: %impl.elem0.loc12_7: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc12_7: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc12_7: = bound_method %b.ref.loc12, %impl.elem0.loc12_7 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc12_7: init %Cpp.long = call %bound_method.loc12_7(%b.ref.loc12) // CHECK:STDOUT: %.loc12_7.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc12_7 @@ -1783,7 +1784,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.call.loc12: init bool = call %bound_method.loc12_5.4(%a.ref.loc12, %.loc12_7.2) // CHECK:STDOUT: %a.ref.loc13: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc13: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc13_5.1: %.3e2 = impl_witness_access constants.%OrderedWith.impl_witness.576, element0 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Less.5299ce.2] +// CHECK:STDOUT: %impl.elem0.loc13_5.1: %.481 = impl_witness_access constants.%OrderedWith.impl_witness.576, element0 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Less.5299ce.2] // CHECK:STDOUT: %bound_method.loc13_5.1: = bound_method %a.ref.loc13, %impl.elem0.loc13_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc13_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc13_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc13_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -1794,14 +1795,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc13_5.3: %Cpp.long.as.OrderedWith.impl.Less.type.8fda0e.1 = specific_constant imports.%Core.Less.c86, @Cpp.long.as.OrderedWith.impl.15a(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.OrderedWith.impl.Less.5299ce.1] // CHECK:STDOUT: %Less.ref.loc13: %Cpp.long.as.OrderedWith.impl.Less.type.8fda0e.1 = name_ref Less, %.loc13_5.3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Less.5299ce.1] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.bound.loc13: = bound_method %a.ref.loc13, %Less.ref.loc13 -// CHECK:STDOUT: %impl.elem0.loc13_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc13_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc13_5.3: = bound_method %b.ref.loc13, %impl.elem0.loc13_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc13_5: init %Cpp.long = call %bound_method.loc13_5.3(%b.ref.loc13) // CHECK:STDOUT: %.loc13_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc13_5 // CHECK:STDOUT: %.loc13_5.5: %Cpp.long = converted %b.ref.loc13, %.loc13_5.4 // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.specific_fn.loc13: = specific_function %Less.ref.loc13, @Cpp.long.as.OrderedWith.impl.Less.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.OrderedWith.impl.Less.specific_fn.89e78a.2] // CHECK:STDOUT: %bound_method.loc13_5.4: = bound_method %a.ref.loc13, %Cpp.long.as.OrderedWith.impl.Less.specific_fn.loc13 -// CHECK:STDOUT: %impl.elem0.loc13_7: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc13_7: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc13_7: = bound_method %b.ref.loc13, %impl.elem0.loc13_7 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc13_7: init %Cpp.long = call %bound_method.loc13_7(%b.ref.loc13) // CHECK:STDOUT: %.loc13_7.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc13_7 @@ -1809,7 +1810,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.call.loc13: init bool = call %bound_method.loc13_5.4(%a.ref.loc13, %.loc13_7.2) // CHECK:STDOUT: %a.ref.loc14: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc14: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem3.loc14: %.723 = impl_witness_access constants.%OrderedWith.impl_witness.576, element3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.c90ad0.2] +// CHECK:STDOUT: %impl.elem3.loc14: %.753 = impl_witness_access constants.%OrderedWith.impl_witness.576, element3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.c90ad0.2] // CHECK:STDOUT: %bound_method.loc14_5.1: = bound_method %a.ref.loc14, %impl.elem3.loc14 // CHECK:STDOUT: %ImplicitAs.facet.loc14_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc14_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc14_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -1820,14 +1821,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc14_5.3: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.062a19.1 = specific_constant imports.%Core.GreaterOrEquivalent.76e, @Cpp.long.as.OrderedWith.impl.15a(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.c90ad0.1] // CHECK:STDOUT: %GreaterOrEquivalent.ref.loc14: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.062a19.1 = name_ref GreaterOrEquivalent, %.loc14_5.3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.c90ad0.1] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.bound.loc14: = bound_method %a.ref.loc14, %GreaterOrEquivalent.ref.loc14 -// CHECK:STDOUT: %impl.elem0.loc14_5: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc14_5: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc14_5.3: = bound_method %b.ref.loc14, %impl.elem0.loc14_5 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc14_5: init %Cpp.long = call %bound_method.loc14_5.3(%b.ref.loc14) // CHECK:STDOUT: %.loc14_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc14_5 // CHECK:STDOUT: %.loc14_5.5: %Cpp.long = converted %b.ref.loc14, %.loc14_5.4 // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc14: = specific_function %GreaterOrEquivalent.ref.loc14, @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.e67d4e.2] // CHECK:STDOUT: %bound_method.loc14_5.4: = bound_method %a.ref.loc14, %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc14 -// CHECK:STDOUT: %impl.elem0.loc14_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc14_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc14_8: = bound_method %b.ref.loc14, %impl.elem0.loc14_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc14_8: init %Cpp.long = call %bound_method.loc14_8(%b.ref.loc14) // CHECK:STDOUT: %.loc14_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc14_8 @@ -1835,7 +1836,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.call.loc14: init bool = call %bound_method.loc14_5.4(%a.ref.loc14, %.loc14_8.2) // CHECK:STDOUT: %a.ref.loc15: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc15: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem1.loc15: %.d50 = impl_witness_access constants.%OrderedWith.impl_witness.576, element1 [concrete = constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.1eddf1.2] +// CHECK:STDOUT: %impl.elem1.loc15: %.14a = impl_witness_access constants.%OrderedWith.impl_witness.576, element1 [concrete = constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.1eddf1.2] // CHECK:STDOUT: %bound_method.loc15_5.1: = bound_method %a.ref.loc15, %impl.elem1.loc15 // CHECK:STDOUT: %ImplicitAs.facet.loc15_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc15_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc15_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -1846,14 +1847,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc15_5.3: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.11ca57.1 = specific_constant imports.%Core.LessOrEquivalent.4a6, @Cpp.long.as.OrderedWith.impl.15a(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.1eddf1.1] // CHECK:STDOUT: %LessOrEquivalent.ref.loc15: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.11ca57.1 = name_ref LessOrEquivalent, %.loc15_5.3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.1eddf1.1] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.bound.loc15: = bound_method %a.ref.loc15, %LessOrEquivalent.ref.loc15 -// CHECK:STDOUT: %impl.elem0.loc15_5: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc15_5: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc15_5.3: = bound_method %b.ref.loc15, %impl.elem0.loc15_5 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc15_5: init %Cpp.long = call %bound_method.loc15_5.3(%b.ref.loc15) // CHECK:STDOUT: %.loc15_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc15_5 // CHECK:STDOUT: %.loc15_5.5: %Cpp.long = converted %b.ref.loc15, %.loc15_5.4 // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc15: = specific_function %LessOrEquivalent.ref.loc15, @Cpp.long.as.OrderedWith.impl.LessOrEquivalent.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.9548d5.2] // CHECK:STDOUT: %bound_method.loc15_5.4: = bound_method %a.ref.loc15, %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc15 -// CHECK:STDOUT: %impl.elem0.loc15_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc15_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc15_8: = bound_method %b.ref.loc15, %impl.elem0.loc15_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc15_8: init %Cpp.long = call %bound_method.loc15_8(%b.ref.loc15) // CHECK:STDOUT: %.loc15_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc15_8 @@ -1861,7 +1862,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.call.loc15: init bool = call %bound_method.loc15_5.4(%a.ref.loc15, %.loc15_8.2) // CHECK:STDOUT: %a.ref.loc17: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc17_5.1: %.64d = impl_witness_access constants.%EqWith.impl_witness.8e5, element0 [concrete = constants.%Cpp.long.as.EqWith.impl.Equal.6ed862.2] +// CHECK:STDOUT: %impl.elem0.loc17_5.1: %.a03 = impl_witness_access constants.%EqWith.impl_witness.8e5, element0 [concrete = constants.%Cpp.long.as.EqWith.impl.Equal.6ed862.2] // CHECK:STDOUT: %bound_method.loc17_5.1: = bound_method %a.ref.loc17, %impl.elem0.loc17_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc17_5.1: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.2ce) [concrete = constants.%ImplicitAs.facet.eed] // CHECK:STDOUT: %.loc17_5.1: %ImplicitAs.type.819 = converted Core.IntLiteral, %ImplicitAs.facet.loc17_5.1 [concrete = constants.%ImplicitAs.facet.eed] @@ -1872,14 +1873,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc17_5.3: %Cpp.long.as.EqWith.impl.Equal.type.416d09.1 = specific_constant imports.%Core.Equal.0ad, @Cpp.long.as.EqWith.impl.f13(constants.%ImplicitAs.facet.eed) [concrete = constants.%Cpp.long.as.EqWith.impl.Equal.6ed862.1] // CHECK:STDOUT: %Equal.ref.loc17: %Cpp.long.as.EqWith.impl.Equal.type.416d09.1 = name_ref Equal, %.loc17_5.3 [concrete = constants.%Cpp.long.as.EqWith.impl.Equal.6ed862.1] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.bound.loc17: = bound_method %a.ref.loc17, %Equal.ref.loc17 -// CHECK:STDOUT: %impl.elem0.loc17_5.2: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc17_5.2: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc17_5.3: = bound_method %int_1.loc17, %impl.elem0.loc17_5.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17_5: init %Cpp.long = call %bound_method.loc17_5.3(%int_1.loc17) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc17_5.4: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17_5 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc17_5.5: %Cpp.long = converted %int_1.loc17, %.loc17_5.4 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.specific_fn.loc17: = specific_function %Equal.ref.loc17, @Cpp.long.as.EqWith.impl.Equal.2(constants.%ImplicitAs.facet.eed) [concrete = constants.%Cpp.long.as.EqWith.impl.Equal.specific_fn.334ae9.2] // CHECK:STDOUT: %bound_method.loc17_5.4: = bound_method %a.ref.loc17, %Cpp.long.as.EqWith.impl.Equal.specific_fn.loc17 -// CHECK:STDOUT: %impl.elem0.loc17_8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc17_8: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc17_8: = bound_method %int_1.loc17, %impl.elem0.loc17_8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17_8: init %Cpp.long = call %bound_method.loc17_8(%int_1.loc17) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc17_8.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17_8 [concrete = constants.%int_1.5a4] @@ -1887,7 +1888,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.Equal.call.loc17: init bool = call %bound_method.loc17_5.4(%a.ref.loc17, %.loc17_8.2) // CHECK:STDOUT: %a.ref.loc18: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem1.loc18: %.2f9 = impl_witness_access constants.%EqWith.impl_witness.8e5, element1 [concrete = constants.%Cpp.long.as.EqWith.impl.NotEqual.f686b3.2] +// CHECK:STDOUT: %impl.elem1.loc18: %.9a1 = impl_witness_access constants.%EqWith.impl_witness.8e5, element1 [concrete = constants.%Cpp.long.as.EqWith.impl.NotEqual.f686b3.2] // CHECK:STDOUT: %bound_method.loc18_5.1: = bound_method %a.ref.loc18, %impl.elem1.loc18 // CHECK:STDOUT: %ImplicitAs.facet.loc18_5.1: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.2ce) [concrete = constants.%ImplicitAs.facet.eed] // CHECK:STDOUT: %.loc18_5.1: %ImplicitAs.type.819 = converted Core.IntLiteral, %ImplicitAs.facet.loc18_5.1 [concrete = constants.%ImplicitAs.facet.eed] @@ -1898,14 +1899,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc18_5.3: %Cpp.long.as.EqWith.impl.NotEqual.type.de968c.1 = specific_constant imports.%Core.NotEqual.b1f, @Cpp.long.as.EqWith.impl.f13(constants.%ImplicitAs.facet.eed) [concrete = constants.%Cpp.long.as.EqWith.impl.NotEqual.f686b3.1] // CHECK:STDOUT: %NotEqual.ref.loc18: %Cpp.long.as.EqWith.impl.NotEqual.type.de968c.1 = name_ref NotEqual, %.loc18_5.3 [concrete = constants.%Cpp.long.as.EqWith.impl.NotEqual.f686b3.1] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.bound.loc18: = bound_method %a.ref.loc18, %NotEqual.ref.loc18 -// CHECK:STDOUT: %impl.elem0.loc18_5: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc18_5: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc18_5.3: = bound_method %int_1.loc18, %impl.elem0.loc18_5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_5: init %Cpp.long = call %bound_method.loc18_5.3(%int_1.loc18) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc18_5.4: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_5 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc18_5.5: %Cpp.long = converted %int_1.loc18, %.loc18_5.4 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.specific_fn.loc18: = specific_function %NotEqual.ref.loc18, @Cpp.long.as.EqWith.impl.NotEqual.2(constants.%ImplicitAs.facet.eed) [concrete = constants.%Cpp.long.as.EqWith.impl.NotEqual.specific_fn.5aa006.2] // CHECK:STDOUT: %bound_method.loc18_5.4: = bound_method %a.ref.loc18, %Cpp.long.as.EqWith.impl.NotEqual.specific_fn.loc18 -// CHECK:STDOUT: %impl.elem0.loc18_8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc18_8: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc18_8: = bound_method %int_1.loc18, %impl.elem0.loc18_8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_8: init %Cpp.long = call %bound_method.loc18_8(%int_1.loc18) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc18_8.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_8 [concrete = constants.%int_1.5a4] @@ -1913,7 +1914,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.EqWith.impl.NotEqual.call.loc18: init bool = call %bound_method.loc18_5.4(%a.ref.loc18, %.loc18_8.2) // CHECK:STDOUT: %a.ref.loc19: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem2.loc19: %.07e = impl_witness_access constants.%OrderedWith.impl_witness.52f, element2 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Greater.74a807.2] +// CHECK:STDOUT: %impl.elem2.loc19: %.5af = impl_witness_access constants.%OrderedWith.impl_witness.52f, element2 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Greater.74a807.2] // CHECK:STDOUT: %bound_method.loc19_5.1: = bound_method %a.ref.loc19, %impl.elem2.loc19 // CHECK:STDOUT: %ImplicitAs.facet.loc19_5.1: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.2ce) [concrete = constants.%ImplicitAs.facet.eed] // CHECK:STDOUT: %.loc19_5.1: %ImplicitAs.type.819 = converted Core.IntLiteral, %ImplicitAs.facet.loc19_5.1 [concrete = constants.%ImplicitAs.facet.eed] @@ -1924,14 +1925,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc19_5.3: %Cpp.long.as.OrderedWith.impl.Greater.type.3fd1ac.1 = specific_constant imports.%Core.Greater.9da, @Cpp.long.as.OrderedWith.impl.15a(constants.%ImplicitAs.facet.eed) [concrete = constants.%Cpp.long.as.OrderedWith.impl.Greater.74a807.1] // CHECK:STDOUT: %Greater.ref.loc19: %Cpp.long.as.OrderedWith.impl.Greater.type.3fd1ac.1 = name_ref Greater, %.loc19_5.3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Greater.74a807.1] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.bound.loc19: = bound_method %a.ref.loc19, %Greater.ref.loc19 -// CHECK:STDOUT: %impl.elem0.loc19_5: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc19_5: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc19_5.3: = bound_method %int_1.loc19, %impl.elem0.loc19_5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19_5: init %Cpp.long = call %bound_method.loc19_5.3(%int_1.loc19) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc19_5.4: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19_5 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc19_5.5: %Cpp.long = converted %int_1.loc19, %.loc19_5.4 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.specific_fn.loc19: = specific_function %Greater.ref.loc19, @Cpp.long.as.OrderedWith.impl.Greater.2(constants.%ImplicitAs.facet.eed) [concrete = constants.%Cpp.long.as.OrderedWith.impl.Greater.specific_fn.b2149b.2] // CHECK:STDOUT: %bound_method.loc19_5.4: = bound_method %a.ref.loc19, %Cpp.long.as.OrderedWith.impl.Greater.specific_fn.loc19 -// CHECK:STDOUT: %impl.elem0.loc19_7: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc19_7: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc19_7: = bound_method %int_1.loc19, %impl.elem0.loc19_7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19_7: init %Cpp.long = call %bound_method.loc19_7(%int_1.loc19) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc19_7.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19_7 [concrete = constants.%int_1.5a4] @@ -1939,7 +1940,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Greater.call.loc19: init bool = call %bound_method.loc19_5.4(%a.ref.loc19, %.loc19_7.2) // CHECK:STDOUT: %a.ref.loc20: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %int_1.loc20: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc20_5.1: %.66b = impl_witness_access constants.%OrderedWith.impl_witness.52f, element0 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Less.0de767.2] +// CHECK:STDOUT: %impl.elem0.loc20_5.1: %.6b7 = impl_witness_access constants.%OrderedWith.impl_witness.52f, element0 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Less.0de767.2] // CHECK:STDOUT: %bound_method.loc20_5.1: = bound_method %a.ref.loc20, %impl.elem0.loc20_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc20_5.1: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.2ce) [concrete = constants.%ImplicitAs.facet.eed] // CHECK:STDOUT: %.loc20_5.1: %ImplicitAs.type.819 = converted Core.IntLiteral, %ImplicitAs.facet.loc20_5.1 [concrete = constants.%ImplicitAs.facet.eed] @@ -1950,14 +1951,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc20_5.3: %Cpp.long.as.OrderedWith.impl.Less.type.8ced31.1 = specific_constant imports.%Core.Less.c86, @Cpp.long.as.OrderedWith.impl.15a(constants.%ImplicitAs.facet.eed) [concrete = constants.%Cpp.long.as.OrderedWith.impl.Less.0de767.1] // CHECK:STDOUT: %Less.ref.loc20: %Cpp.long.as.OrderedWith.impl.Less.type.8ced31.1 = name_ref Less, %.loc20_5.3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.Less.0de767.1] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.bound.loc20: = bound_method %a.ref.loc20, %Less.ref.loc20 -// CHECK:STDOUT: %impl.elem0.loc20_5.2: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc20_5.2: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc20_5.3: = bound_method %int_1.loc20, %impl.elem0.loc20_5.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20_5: init %Cpp.long = call %bound_method.loc20_5.3(%int_1.loc20) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc20_5.4: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20_5 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc20_5.5: %Cpp.long = converted %int_1.loc20, %.loc20_5.4 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.specific_fn.loc20: = specific_function %Less.ref.loc20, @Cpp.long.as.OrderedWith.impl.Less.2(constants.%ImplicitAs.facet.eed) [concrete = constants.%Cpp.long.as.OrderedWith.impl.Less.specific_fn.b6fc5e.2] // CHECK:STDOUT: %bound_method.loc20_5.4: = bound_method %a.ref.loc20, %Cpp.long.as.OrderedWith.impl.Less.specific_fn.loc20 -// CHECK:STDOUT: %impl.elem0.loc20_7: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc20_7: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc20_7: = bound_method %int_1.loc20, %impl.elem0.loc20_7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20_7: init %Cpp.long = call %bound_method.loc20_7(%int_1.loc20) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc20_7.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20_7 [concrete = constants.%int_1.5a4] @@ -1965,7 +1966,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.Less.call.loc20: init bool = call %bound_method.loc20_5.4(%a.ref.loc20, %.loc20_7.2) // CHECK:STDOUT: %a.ref.loc21: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem3.loc21: %.d0e = impl_witness_access constants.%OrderedWith.impl_witness.52f, element3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.abd013.2] +// CHECK:STDOUT: %impl.elem3.loc21: %.1f9 = impl_witness_access constants.%OrderedWith.impl_witness.52f, element3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.abd013.2] // CHECK:STDOUT: %bound_method.loc21_5.1: = bound_method %a.ref.loc21, %impl.elem3.loc21 // CHECK:STDOUT: %ImplicitAs.facet.loc21_5.1: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.2ce) [concrete = constants.%ImplicitAs.facet.eed] // CHECK:STDOUT: %.loc21_5.1: %ImplicitAs.type.819 = converted Core.IntLiteral, %ImplicitAs.facet.loc21_5.1 [concrete = constants.%ImplicitAs.facet.eed] @@ -1976,14 +1977,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc21_5.3: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.2273d7.1 = specific_constant imports.%Core.GreaterOrEquivalent.76e, @Cpp.long.as.OrderedWith.impl.15a(constants.%ImplicitAs.facet.eed) [concrete = constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.abd013.1] // CHECK:STDOUT: %GreaterOrEquivalent.ref.loc21: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.type.2273d7.1 = name_ref GreaterOrEquivalent, %.loc21_5.3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.abd013.1] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.bound.loc21: = bound_method %a.ref.loc21, %GreaterOrEquivalent.ref.loc21 -// CHECK:STDOUT: %impl.elem0.loc21_5: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc21_5: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc21_5.3: = bound_method %int_1.loc21, %impl.elem0.loc21_5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21_5: init %Cpp.long = call %bound_method.loc21_5.3(%int_1.loc21) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc21_5.4: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21_5 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc21_5.5: %Cpp.long = converted %int_1.loc21, %.loc21_5.4 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc21: = specific_function %GreaterOrEquivalent.ref.loc21, @Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.2(constants.%ImplicitAs.facet.eed) [concrete = constants.%Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.f90679.2] // CHECK:STDOUT: %bound_method.loc21_5.4: = bound_method %a.ref.loc21, %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc21 -// CHECK:STDOUT: %impl.elem0.loc21_8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc21_8: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc21_8: = bound_method %int_1.loc21, %impl.elem0.loc21_8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21_8: init %Cpp.long = call %bound_method.loc21_8(%int_1.loc21) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc21_8.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21_8 [concrete = constants.%int_1.5a4] @@ -1991,7 +1992,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.GreaterOrEquivalent.call.loc21: init bool = call %bound_method.loc21_5.4(%a.ref.loc21, %.loc21_8.2) // CHECK:STDOUT: %a.ref.loc22: %Cpp.long = name_ref a, %a // CHECK:STDOUT: %int_1.loc22: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem1.loc22: %.4d6 = impl_witness_access constants.%OrderedWith.impl_witness.52f, element1 [concrete = constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.9833d9.2] +// CHECK:STDOUT: %impl.elem1.loc22: %.76b = impl_witness_access constants.%OrderedWith.impl_witness.52f, element1 [concrete = constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.9833d9.2] // CHECK:STDOUT: %bound_method.loc22_5.1: = bound_method %a.ref.loc22, %impl.elem1.loc22 // CHECK:STDOUT: %ImplicitAs.facet.loc22_5.1: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.2ce) [concrete = constants.%ImplicitAs.facet.eed] // CHECK:STDOUT: %.loc22_5.1: %ImplicitAs.type.819 = converted Core.IntLiteral, %ImplicitAs.facet.loc22_5.1 [concrete = constants.%ImplicitAs.facet.eed] @@ -2002,14 +2003,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc22_5.3: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.28524d.1 = specific_constant imports.%Core.LessOrEquivalent.4a6, @Cpp.long.as.OrderedWith.impl.15a(constants.%ImplicitAs.facet.eed) [concrete = constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.9833d9.1] // CHECK:STDOUT: %LessOrEquivalent.ref.loc22: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.type.28524d.1 = name_ref LessOrEquivalent, %.loc22_5.3 [concrete = constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.9833d9.1] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.bound.loc22: = bound_method %a.ref.loc22, %LessOrEquivalent.ref.loc22 -// CHECK:STDOUT: %impl.elem0.loc22_5: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc22_5: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc22_5.3: = bound_method %int_1.loc22, %impl.elem0.loc22_5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_5: init %Cpp.long = call %bound_method.loc22_5.3(%int_1.loc22) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc22_5.4: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_5 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc22_5.5: %Cpp.long = converted %int_1.loc22, %.loc22_5.4 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc22: = specific_function %LessOrEquivalent.ref.loc22, @Cpp.long.as.OrderedWith.impl.LessOrEquivalent.2(constants.%ImplicitAs.facet.eed) [concrete = constants.%Cpp.long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.c5c24a.2] // CHECK:STDOUT: %bound_method.loc22_5.4: = bound_method %a.ref.loc22, %Cpp.long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc22 -// CHECK:STDOUT: %impl.elem0.loc22_8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc22_8: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc22_8: = bound_method %int_1.loc22, %impl.elem0.loc22_8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_8: init %Cpp.long = call %bound_method.loc22_8(%int_1.loc22) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc22_8.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_8 [concrete = constants.%int_1.5a4] @@ -2027,17 +2028,15 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete] // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete] // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.eed: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.eed [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.6e8: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet.eed) [concrete] +// CHECK:STDOUT: %.c0c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.6e8, %ImplicitAs.facet.eed [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38 = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a [concrete] // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete] // CHECK:STDOUT: %EqWith.type.494: type = facet_type <@EqWith, @EqWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %EqWith.Equal.type.eeb: type = fn_type @EqWith.Equal, @EqWith(%Cpp.long) [concrete] -// CHECK:STDOUT: %EqWith.NotEqual.type.d83: type = fn_type @EqWith.NotEqual, @EqWith(%Cpp.long) [concrete] // CHECK:STDOUT: %T.57d: %ImplicitAs.type.819 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.type.71d714.1: type = fn_type @T.binding.as_type.as.EqWith.impl.NotEqual.1, @T.binding.as_type.as.EqWith.impl.8ff(%T.57d) [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.2eedb3.1: %T.binding.as_type.as.EqWith.impl.NotEqual.type.71d714.1 = struct_value () [symbolic] @@ -2059,20 +2058,19 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.type.0a8f8f.2: type = fn_type @T.binding.as_type.as.EqWith.impl.NotEqual.1, @T.binding.as_type.as.EqWith.impl.8ff(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.37228f.2: %T.binding.as_type.as.EqWith.impl.NotEqual.type.0a8f8f.2 = struct_value () [concrete] // CHECK:STDOUT: %EqWith.facet.57a: %EqWith.type.494 = facet_value %i32, (%EqWith.impl_witness.949) [concrete] -// CHECK:STDOUT: %.c41: type = fn_type_with_self_type %EqWith.Equal.type.eeb, %EqWith.facet.57a [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.593: type = fn_type @EqWith.WithSelf.Equal, @EqWith(%Cpp.long, %EqWith.facet.57a) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.048: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith(%Cpp.long, %EqWith.facet.57a) [concrete] +// CHECK:STDOUT: %.566: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.593, %EqWith.facet.57a [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.73f7cb.1: = specific_function %T.binding.as_type.as.EqWith.impl.Equal.b65948.2, @T.binding.as_type.as.EqWith.impl.Equal.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.73f7cb.2: = specific_function %T.binding.as_type.as.EqWith.impl.Equal.b65948.1, @T.binding.as_type.as.EqWith.impl.Equal.2(%ImplicitAs.facet.174) [concrete] -// CHECK:STDOUT: %.c45: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.174 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.9f0: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet.174) [concrete] +// CHECK:STDOUT: %.bb8: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.9f0, %ImplicitAs.facet.174 [concrete] // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.type: type = fn_type @i32.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert: %i32.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] -// CHECK:STDOUT: %.4a6: type = fn_type_with_self_type %EqWith.NotEqual.type.d83, %EqWith.facet.57a [concrete] +// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.048, %EqWith.facet.57a [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.91cc57.1: = specific_function %T.binding.as_type.as.EqWith.impl.NotEqual.37228f.2, @T.binding.as_type.as.EqWith.impl.NotEqual.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.91cc57.2: = specific_function %T.binding.as_type.as.EqWith.impl.NotEqual.37228f.1, @T.binding.as_type.as.EqWith.impl.NotEqual.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %OrderedWith.type.a39: type = facet_type <@OrderedWith, @OrderedWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %OrderedWith.Less.type.3c2: type = fn_type @OrderedWith.Less, @OrderedWith(%Cpp.long) [concrete] -// CHECK:STDOUT: %OrderedWith.LessOrEquivalent.type.d58: type = fn_type @OrderedWith.LessOrEquivalent, @OrderedWith(%Cpp.long) [concrete] -// CHECK:STDOUT: %OrderedWith.Greater.type.a51: type = fn_type @OrderedWith.Greater, @OrderedWith(%Cpp.long) [concrete] -// CHECK:STDOUT: %OrderedWith.GreaterOrEquivalent.type.3df: type = fn_type @OrderedWith.GreaterOrEquivalent, @OrderedWith(%Cpp.long) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.058043.1: type = fn_type @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.1, @T.binding.as_type.as.OrderedWith.impl.891(%T.57d) [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.9f68cd.1: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.058043.1 = struct_value () [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.058043.2: type = fn_type @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.2, @T.binding.as_type.as.OrderedWith.impl.891(%T.57d) [symbolic] @@ -2107,16 +2105,20 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.9e0984.2: type = fn_type @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.1, @T.binding.as_type.as.OrderedWith.impl.891(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.6ad500.2: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.9e0984.2 = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.facet.fa3: %OrderedWith.type.a39 = facet_value %i32, (%OrderedWith.impl_witness.f9b) [concrete] -// CHECK:STDOUT: %.2cb: type = fn_type_with_self_type %OrderedWith.Greater.type.a51, %OrderedWith.facet.fa3 [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.373: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(%Cpp.long, %OrderedWith.facet.fa3) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.43c: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith(%Cpp.long, %OrderedWith.facet.fa3) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.021: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith(%Cpp.long, %OrderedWith.facet.fa3) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.a29: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith(%Cpp.long, %OrderedWith.facet.fa3) [concrete] +// CHECK:STDOUT: %.d93: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.021, %OrderedWith.facet.fa3 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.6e99ac.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.Greater.5cc4da.2, @T.binding.as_type.as.OrderedWith.impl.Greater.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.6e99ac.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.Greater.5cc4da.1, @T.binding.as_type.as.OrderedWith.impl.Greater.2(%ImplicitAs.facet.174) [concrete] -// CHECK:STDOUT: %.199: type = fn_type_with_self_type %OrderedWith.Less.type.3c2, %OrderedWith.facet.fa3 [concrete] +// CHECK:STDOUT: %.4a1: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.373, %OrderedWith.facet.fa3 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.548b71.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.Less.f24104.2, @T.binding.as_type.as.OrderedWith.impl.Less.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.548b71.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.Less.f24104.1, @T.binding.as_type.as.OrderedWith.impl.Less.2(%ImplicitAs.facet.174) [concrete] -// CHECK:STDOUT: %.fd0: type = fn_type_with_self_type %OrderedWith.GreaterOrEquivalent.type.3df, %OrderedWith.facet.fa3 [concrete] +// CHECK:STDOUT: %.7fd: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.a29, %OrderedWith.facet.fa3 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.445813.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.6ad500.2, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.445813.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.6ad500.1, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.2(%ImplicitAs.facet.174) [concrete] -// CHECK:STDOUT: %.184: type = fn_type_with_self_type %OrderedWith.LessOrEquivalent.type.d58, %OrderedWith.facet.fa3 [concrete] +// CHECK:STDOUT: %.8f3: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.43c, %OrderedWith.facet.fa3 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.a789d4.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.48db04.2, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.a789d4.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.48db04.1, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %EqWith.impl_witness.801: = impl_witness imports.%EqWith.impl_witness_table.c6d, @T.binding.as_type.as.EqWith.impl.8ff(%ImplicitAs.facet.eed) [concrete] @@ -2129,14 +2131,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.type.bb8d74.2: type = fn_type @T.binding.as_type.as.EqWith.impl.NotEqual.1, @T.binding.as_type.as.EqWith.impl.8ff(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.ffd0ee.2: %T.binding.as_type.as.EqWith.impl.NotEqual.type.bb8d74.2 = struct_value () [concrete] // CHECK:STDOUT: %EqWith.facet.fa2: %EqWith.type.494 = facet_value Core.IntLiteral, (%EqWith.impl_witness.801) [concrete] -// CHECK:STDOUT: %.a9d: type = fn_type_with_self_type %EqWith.Equal.type.eeb, %EqWith.facet.fa2 [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.9e3: type = fn_type @EqWith.WithSelf.Equal, @EqWith(%Cpp.long, %EqWith.facet.fa2) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.ede: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith(%Cpp.long, %EqWith.facet.fa2) [concrete] +// CHECK:STDOUT: %.389: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.9e3, %EqWith.facet.fa2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.bound.62ea05.1: = bound_method %int_1.5b8, %T.binding.as_type.as.EqWith.impl.Equal.326379.2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.ad9d43.1: = specific_function %T.binding.as_type.as.EqWith.impl.Equal.326379.2, @T.binding.as_type.as.EqWith.impl.Equal.1(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %bound_method.8a46b0.1: = bound_method %int_1.5b8, %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.ad9d43.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.bound.62ea05.2: = bound_method %int_1.5b8, %T.binding.as_type.as.EqWith.impl.Equal.326379.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.ad9d43.2: = specific_function %T.binding.as_type.as.EqWith.impl.Equal.326379.1, @T.binding.as_type.as.EqWith.impl.Equal.2(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %bound_method.8a46b0.2: = bound_method %int_1.5b8, %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.ad9d43.2 [concrete] -// CHECK:STDOUT: %.a87: type = fn_type_with_self_type %EqWith.NotEqual.type.d83, %EqWith.facet.fa2 [concrete] +// CHECK:STDOUT: %.ec0: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.ede, %EqWith.facet.fa2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.bound.29032e.1: = bound_method %int_1.5b8, %T.binding.as_type.as.EqWith.impl.NotEqual.ffd0ee.2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.ceecb6.1: = specific_function %T.binding.as_type.as.EqWith.impl.NotEqual.ffd0ee.2, @T.binding.as_type.as.EqWith.impl.NotEqual.1(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %bound_method.082399.1: = bound_method %int_1.5b8, %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.ceecb6.1 [concrete] @@ -2161,28 +2165,32 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.9cc1f0.2: type = fn_type @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.1, @T.binding.as_type.as.OrderedWith.impl.891(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.8659c0.2: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.9cc1f0.2 = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.facet.2bc: %OrderedWith.type.a39 = facet_value Core.IntLiteral, (%OrderedWith.impl_witness.252) [concrete] -// CHECK:STDOUT: %.5df: type = fn_type_with_self_type %OrderedWith.Greater.type.a51, %OrderedWith.facet.2bc [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.2af: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(%Cpp.long, %OrderedWith.facet.2bc) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.916: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith(%Cpp.long, %OrderedWith.facet.2bc) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.796: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith(%Cpp.long, %OrderedWith.facet.2bc) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.e13: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith(%Cpp.long, %OrderedWith.facet.2bc) [concrete] +// CHECK:STDOUT: %.cfa: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.796, %OrderedWith.facet.2bc [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.bound.8ab0dc.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Greater.4a0e77.2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.87e25a.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.Greater.4a0e77.2, @T.binding.as_type.as.OrderedWith.impl.Greater.1(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %bound_method.ea09f6.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.87e25a.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.bound.8ab0dc.2: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Greater.4a0e77.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.87e25a.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.Greater.4a0e77.1, @T.binding.as_type.as.OrderedWith.impl.Greater.2(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %bound_method.ea09f6.2: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.87e25a.2 [concrete] -// CHECK:STDOUT: %.0c4: type = fn_type_with_self_type %OrderedWith.Less.type.3c2, %OrderedWith.facet.2bc [concrete] +// CHECK:STDOUT: %.ea7: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.2af, %OrderedWith.facet.2bc [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.bound.a0ee36.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Less.11dfa8.2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.47804e.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.Less.11dfa8.2, @T.binding.as_type.as.OrderedWith.impl.Less.1(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %bound_method.d20c63.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.47804e.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.bound.a0ee36.2: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Less.11dfa8.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.47804e.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.Less.11dfa8.1, @T.binding.as_type.as.OrderedWith.impl.Less.2(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %bound_method.d20c63.2: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.47804e.2 [concrete] -// CHECK:STDOUT: %.9ee: type = fn_type_with_self_type %OrderedWith.GreaterOrEquivalent.type.3df, %OrderedWith.facet.2bc [concrete] +// CHECK:STDOUT: %.8f6: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.e13, %OrderedWith.facet.2bc [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.bound.378e29.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.8659c0.2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.3899ef.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.8659c0.2, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.1(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %bound_method.212360.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.3899ef.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.bound.378e29.2: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.8659c0.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.3899ef.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.8659c0.1, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.2(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %bound_method.212360.2: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.3899ef.2 [concrete] -// CHECK:STDOUT: %.36d: type = fn_type_with_self_type %OrderedWith.LessOrEquivalent.type.d58, %OrderedWith.facet.2bc [concrete] +// CHECK:STDOUT: %.2ed: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.916, %OrderedWith.facet.2bc [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.bound.5ef5e5.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.70a674.2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.925a78.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.70a674.2, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.1(%ImplicitAs.facet.eed) [concrete] // CHECK:STDOUT: %bound_method.e9dda0.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.925a78.1 [concrete] @@ -2227,7 +2235,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc9: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc9: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc9_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.5a4] @@ -2235,7 +2243,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a: %Cpp.long = value_binding a, %.loc9_21.2 // CHECK:STDOUT: %b.ref.loc10: %i32 = name_ref b, %b // CHECK:STDOUT: %a.ref.loc10: %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc10_5: %.c41 = impl_witness_access constants.%EqWith.impl_witness.949, element0 [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.b65948.2] +// CHECK:STDOUT: %impl.elem0.loc10_5: %.566 = impl_witness_access constants.%EqWith.impl_witness.949, element0 [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.b65948.2] // CHECK:STDOUT: %bound_method.loc10_5.1: = bound_method %b.ref.loc10, %impl.elem0.loc10_5 // CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10_5, @T.binding.as_type.as.EqWith.impl.Equal.1(constants.%ImplicitAs.facet.174) [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.specific_fn.73f7cb.1] // CHECK:STDOUT: %bound_method.loc10_5.2: = bound_method %b.ref.loc10, %specific_fn.loc10 @@ -2244,7 +2252,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.bound.loc10: = bound_method %b.ref.loc10, %Equal.ref.loc10 // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.loc10: = specific_function %Equal.ref.loc10, @T.binding.as_type.as.EqWith.impl.Equal.2(constants.%ImplicitAs.facet.174) [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.specific_fn.73f7cb.2] // CHECK:STDOUT: %bound_method.loc10_5.3: = bound_method %b.ref.loc10, %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.loc10 -// CHECK:STDOUT: %impl.elem0.loc10_3: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_3: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_3: = bound_method %b.ref.loc10, %impl.elem0.loc10_3 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc10: init %Cpp.long = call %bound_method.loc10_3(%b.ref.loc10) // CHECK:STDOUT: %.loc10_3.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc10 @@ -2252,7 +2260,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.call.loc10: init bool = call %bound_method.loc10_5.3(%.loc10_3.2, %a.ref.loc10) // CHECK:STDOUT: %b.ref.loc11: %i32 = name_ref b, %b // CHECK:STDOUT: %a.ref.loc11: %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem1.loc11: %.4a6 = impl_witness_access constants.%EqWith.impl_witness.949, element1 [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.37228f.2] +// CHECK:STDOUT: %impl.elem1.loc11: %.4d8 = impl_witness_access constants.%EqWith.impl_witness.949, element1 [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.37228f.2] // CHECK:STDOUT: %bound_method.loc11_5.1: = bound_method %b.ref.loc11, %impl.elem1.loc11 // CHECK:STDOUT: %specific_fn.loc11: = specific_function %impl.elem1.loc11, @T.binding.as_type.as.EqWith.impl.NotEqual.1(constants.%ImplicitAs.facet.174) [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.91cc57.1] // CHECK:STDOUT: %bound_method.loc11_5.2: = bound_method %b.ref.loc11, %specific_fn.loc11 @@ -2261,7 +2269,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.bound.loc11: = bound_method %b.ref.loc11, %NotEqual.ref.loc11 // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.loc11: = specific_function %NotEqual.ref.loc11, @T.binding.as_type.as.EqWith.impl.NotEqual.2(constants.%ImplicitAs.facet.174) [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.91cc57.2] // CHECK:STDOUT: %bound_method.loc11_5.3: = bound_method %b.ref.loc11, %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.loc11 -// CHECK:STDOUT: %impl.elem0.loc11: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc11: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc11_3: = bound_method %b.ref.loc11, %impl.elem0.loc11 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc11: init %Cpp.long = call %bound_method.loc11_3(%b.ref.loc11) // CHECK:STDOUT: %.loc11_3.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc11 @@ -2269,7 +2277,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.call.loc11: init bool = call %bound_method.loc11_5.3(%.loc11_3.2, %a.ref.loc11) // CHECK:STDOUT: %b.ref.loc12: %i32 = name_ref b, %b // CHECK:STDOUT: %a.ref.loc12: %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem2.loc12: %.2cb = impl_witness_access constants.%OrderedWith.impl_witness.f9b, element2 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.5cc4da.2] +// CHECK:STDOUT: %impl.elem2.loc12: %.d93 = impl_witness_access constants.%OrderedWith.impl_witness.f9b, element2 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.5cc4da.2] // CHECK:STDOUT: %bound_method.loc12_5.1: = bound_method %b.ref.loc12, %impl.elem2.loc12 // CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem2.loc12, @T.binding.as_type.as.OrderedWith.impl.Greater.1(constants.%ImplicitAs.facet.174) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.6e99ac.1] // CHECK:STDOUT: %bound_method.loc12_5.2: = bound_method %b.ref.loc12, %specific_fn.loc12 @@ -2278,7 +2286,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.bound.loc12: = bound_method %b.ref.loc12, %Greater.ref.loc12 // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.loc12: = specific_function %Greater.ref.loc12, @T.binding.as_type.as.OrderedWith.impl.Greater.2(constants.%ImplicitAs.facet.174) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.6e99ac.2] // CHECK:STDOUT: %bound_method.loc12_5.3: = bound_method %b.ref.loc12, %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.loc12 -// CHECK:STDOUT: %impl.elem0.loc12: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc12: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc12_3: = bound_method %b.ref.loc12, %impl.elem0.loc12 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc12: init %Cpp.long = call %bound_method.loc12_3(%b.ref.loc12) // CHECK:STDOUT: %.loc12_3.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc12 @@ -2286,7 +2294,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.call.loc12: init bool = call %bound_method.loc12_5.3(%.loc12_3.2, %a.ref.loc12) // CHECK:STDOUT: %b.ref.loc13: %i32 = name_ref b, %b // CHECK:STDOUT: %a.ref.loc13: %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc13_5: %.199 = impl_witness_access constants.%OrderedWith.impl_witness.f9b, element0 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.f24104.2] +// CHECK:STDOUT: %impl.elem0.loc13_5: %.4a1 = impl_witness_access constants.%OrderedWith.impl_witness.f9b, element0 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.f24104.2] // CHECK:STDOUT: %bound_method.loc13_5.1: = bound_method %b.ref.loc13, %impl.elem0.loc13_5 // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13_5, @T.binding.as_type.as.OrderedWith.impl.Less.1(constants.%ImplicitAs.facet.174) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.548b71.1] // CHECK:STDOUT: %bound_method.loc13_5.2: = bound_method %b.ref.loc13, %specific_fn.loc13 @@ -2295,7 +2303,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.bound.loc13: = bound_method %b.ref.loc13, %Less.ref.loc13 // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.loc13: = specific_function %Less.ref.loc13, @T.binding.as_type.as.OrderedWith.impl.Less.2(constants.%ImplicitAs.facet.174) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.548b71.2] // CHECK:STDOUT: %bound_method.loc13_5.3: = bound_method %b.ref.loc13, %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.loc13 -// CHECK:STDOUT: %impl.elem0.loc13_3: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc13_3: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc13_3: = bound_method %b.ref.loc13, %impl.elem0.loc13_3 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc13: init %Cpp.long = call %bound_method.loc13_3(%b.ref.loc13) // CHECK:STDOUT: %.loc13_3.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc13 @@ -2303,7 +2311,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.call.loc13: init bool = call %bound_method.loc13_5.3(%.loc13_3.2, %a.ref.loc13) // CHECK:STDOUT: %b.ref.loc14: %i32 = name_ref b, %b // CHECK:STDOUT: %a.ref.loc14: %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem3.loc14: %.fd0 = impl_witness_access constants.%OrderedWith.impl_witness.f9b, element3 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.6ad500.2] +// CHECK:STDOUT: %impl.elem3.loc14: %.7fd = impl_witness_access constants.%OrderedWith.impl_witness.f9b, element3 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.6ad500.2] // CHECK:STDOUT: %bound_method.loc14_5.1: = bound_method %b.ref.loc14, %impl.elem3.loc14 // CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem3.loc14, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.1(constants.%ImplicitAs.facet.174) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.445813.1] // CHECK:STDOUT: %bound_method.loc14_5.2: = bound_method %b.ref.loc14, %specific_fn.loc14 @@ -2312,7 +2320,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.bound.loc14: = bound_method %b.ref.loc14, %GreaterOrEquivalent.ref.loc14 // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc14: = specific_function %GreaterOrEquivalent.ref.loc14, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.2(constants.%ImplicitAs.facet.174) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.445813.2] // CHECK:STDOUT: %bound_method.loc14_5.3: = bound_method %b.ref.loc14, %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc14 -// CHECK:STDOUT: %impl.elem0.loc14: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc14: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc14_3: = bound_method %b.ref.loc14, %impl.elem0.loc14 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc14: init %Cpp.long = call %bound_method.loc14_3(%b.ref.loc14) // CHECK:STDOUT: %.loc14_3.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc14 @@ -2320,7 +2328,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.call.loc14: init bool = call %bound_method.loc14_5.3(%.loc14_3.2, %a.ref.loc14) // CHECK:STDOUT: %b.ref.loc15: %i32 = name_ref b, %b // CHECK:STDOUT: %a.ref.loc15: %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem1.loc15: %.184 = impl_witness_access constants.%OrderedWith.impl_witness.f9b, element1 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.48db04.2] +// CHECK:STDOUT: %impl.elem1.loc15: %.8f3 = impl_witness_access constants.%OrderedWith.impl_witness.f9b, element1 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.48db04.2] // CHECK:STDOUT: %bound_method.loc15_5.1: = bound_method %b.ref.loc15, %impl.elem1.loc15 // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem1.loc15, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.1(constants.%ImplicitAs.facet.174) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.a789d4.1] // CHECK:STDOUT: %bound_method.loc15_5.2: = bound_method %b.ref.loc15, %specific_fn.loc15 @@ -2329,7 +2337,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.bound.loc15: = bound_method %b.ref.loc15, %LessOrEquivalent.ref.loc15 // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc15: = specific_function %LessOrEquivalent.ref.loc15, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.2(constants.%ImplicitAs.facet.174) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.a789d4.2] // CHECK:STDOUT: %bound_method.loc15_5.3: = bound_method %b.ref.loc15, %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc15 -// CHECK:STDOUT: %impl.elem0.loc15: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc15: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc15_3: = bound_method %b.ref.loc15, %impl.elem0.loc15 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc15: init %Cpp.long = call %bound_method.loc15_3(%b.ref.loc15) // CHECK:STDOUT: %.loc15_3.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc15 @@ -2337,7 +2345,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.call.loc15: init bool = call %bound_method.loc15_5.3(%.loc15_3.2, %a.ref.loc15) // CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %a.ref.loc17: %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc17_5: %.a9d = impl_witness_access constants.%EqWith.impl_witness.801, element0 [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.326379.2] +// CHECK:STDOUT: %impl.elem0.loc17_5: %.389 = impl_witness_access constants.%EqWith.impl_witness.801, element0 [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.326379.2] // CHECK:STDOUT: %bound_method.loc17_5.1: = bound_method %int_1.loc17, %impl.elem0.loc17_5 [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.bound.62ea05.1] // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17_5, @T.binding.as_type.as.EqWith.impl.Equal.1(constants.%ImplicitAs.facet.eed) [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.specific_fn.ad9d43.1] // CHECK:STDOUT: %bound_method.loc17_5.2: = bound_method %int_1.loc17, %specific_fn.loc17 [concrete = constants.%bound_method.8a46b0.1] @@ -2346,7 +2354,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.bound.loc17: = bound_method %int_1.loc17, %Equal.ref.loc17 [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.bound.62ea05.2] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.loc17: = specific_function %Equal.ref.loc17, @T.binding.as_type.as.EqWith.impl.Equal.2(constants.%ImplicitAs.facet.eed) [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.specific_fn.ad9d43.2] // CHECK:STDOUT: %bound_method.loc17_5.3: = bound_method %int_1.loc17, %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.loc17 [concrete = constants.%bound_method.8a46b0.2] -// CHECK:STDOUT: %impl.elem0.loc17_3: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc17_3: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc17_3: = bound_method %int_1.loc17, %impl.elem0.loc17_3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17: init %Cpp.long = call %bound_method.loc17_3(%int_1.loc17) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc17_3.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17 [concrete = constants.%int_1.5a4] @@ -2354,7 +2362,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.call.loc17: init bool = call %bound_method.loc17_5.3(%.loc17_3.2, %a.ref.loc17) // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %a.ref.loc18: %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem1.loc18: %.a87 = impl_witness_access constants.%EqWith.impl_witness.801, element1 [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.ffd0ee.2] +// CHECK:STDOUT: %impl.elem1.loc18: %.ec0 = impl_witness_access constants.%EqWith.impl_witness.801, element1 [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.ffd0ee.2] // CHECK:STDOUT: %bound_method.loc18_5.1: = bound_method %int_1.loc18, %impl.elem1.loc18 [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.bound.29032e.1] // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem1.loc18, @T.binding.as_type.as.EqWith.impl.NotEqual.1(constants.%ImplicitAs.facet.eed) [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.ceecb6.1] // CHECK:STDOUT: %bound_method.loc18_5.2: = bound_method %int_1.loc18, %specific_fn.loc18 [concrete = constants.%bound_method.082399.1] @@ -2363,7 +2371,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.bound.loc18: = bound_method %int_1.loc18, %NotEqual.ref.loc18 [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.bound.29032e.2] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.loc18: = specific_function %NotEqual.ref.loc18, @T.binding.as_type.as.EqWith.impl.NotEqual.2(constants.%ImplicitAs.facet.eed) [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.ceecb6.2] // CHECK:STDOUT: %bound_method.loc18_5.3: = bound_method %int_1.loc18, %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.loc18 [concrete = constants.%bound_method.082399.2] -// CHECK:STDOUT: %impl.elem0.loc18: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc18: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc18_3: = bound_method %int_1.loc18, %impl.elem0.loc18 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18: init %Cpp.long = call %bound_method.loc18_3(%int_1.loc18) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc18_3.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18 [concrete = constants.%int_1.5a4] @@ -2371,7 +2379,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.call.loc18: init bool = call %bound_method.loc18_5.3(%.loc18_3.2, %a.ref.loc18) // CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %a.ref.loc19: %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem2.loc19: %.5df = impl_witness_access constants.%OrderedWith.impl_witness.252, element2 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.4a0e77.2] +// CHECK:STDOUT: %impl.elem2.loc19: %.cfa = impl_witness_access constants.%OrderedWith.impl_witness.252, element2 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.4a0e77.2] // CHECK:STDOUT: %bound_method.loc19_5.1: = bound_method %int_1.loc19, %impl.elem2.loc19 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.bound.8ab0dc.1] // CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem2.loc19, @T.binding.as_type.as.OrderedWith.impl.Greater.1(constants.%ImplicitAs.facet.eed) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.87e25a.1] // CHECK:STDOUT: %bound_method.loc19_5.2: = bound_method %int_1.loc19, %specific_fn.loc19 [concrete = constants.%bound_method.ea09f6.1] @@ -2380,7 +2388,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.bound.loc19: = bound_method %int_1.loc19, %Greater.ref.loc19 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.bound.8ab0dc.2] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.loc19: = specific_function %Greater.ref.loc19, @T.binding.as_type.as.OrderedWith.impl.Greater.2(constants.%ImplicitAs.facet.eed) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.87e25a.2] // CHECK:STDOUT: %bound_method.loc19_5.3: = bound_method %int_1.loc19, %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.loc19 [concrete = constants.%bound_method.ea09f6.2] -// CHECK:STDOUT: %impl.elem0.loc19: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc19: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc19_3: = bound_method %int_1.loc19, %impl.elem0.loc19 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19: init %Cpp.long = call %bound_method.loc19_3(%int_1.loc19) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc19_3.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19 [concrete = constants.%int_1.5a4] @@ -2388,7 +2396,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.call.loc19: init bool = call %bound_method.loc19_5.3(%.loc19_3.2, %a.ref.loc19) // CHECK:STDOUT: %int_1.loc20: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %a.ref.loc20: %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc20_5: %.0c4 = impl_witness_access constants.%OrderedWith.impl_witness.252, element0 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.11dfa8.2] +// CHECK:STDOUT: %impl.elem0.loc20_5: %.ea7 = impl_witness_access constants.%OrderedWith.impl_witness.252, element0 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.11dfa8.2] // CHECK:STDOUT: %bound_method.loc20_5.1: = bound_method %int_1.loc20, %impl.elem0.loc20_5 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.bound.a0ee36.1] // CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20_5, @T.binding.as_type.as.OrderedWith.impl.Less.1(constants.%ImplicitAs.facet.eed) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.47804e.1] // CHECK:STDOUT: %bound_method.loc20_5.2: = bound_method %int_1.loc20, %specific_fn.loc20 [concrete = constants.%bound_method.d20c63.1] @@ -2397,7 +2405,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.bound.loc20: = bound_method %int_1.loc20, %Less.ref.loc20 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.bound.a0ee36.2] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.loc20: = specific_function %Less.ref.loc20, @T.binding.as_type.as.OrderedWith.impl.Less.2(constants.%ImplicitAs.facet.eed) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.47804e.2] // CHECK:STDOUT: %bound_method.loc20_5.3: = bound_method %int_1.loc20, %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.loc20 [concrete = constants.%bound_method.d20c63.2] -// CHECK:STDOUT: %impl.elem0.loc20_3: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc20_3: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc20_3: = bound_method %int_1.loc20, %impl.elem0.loc20_3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20: init %Cpp.long = call %bound_method.loc20_3(%int_1.loc20) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc20_3.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20 [concrete = constants.%int_1.5a4] @@ -2405,7 +2413,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.call.loc20: init bool = call %bound_method.loc20_5.3(%.loc20_3.2, %a.ref.loc20) // CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %a.ref.loc21: %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem3.loc21: %.9ee = impl_witness_access constants.%OrderedWith.impl_witness.252, element3 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.8659c0.2] +// CHECK:STDOUT: %impl.elem3.loc21: %.8f6 = impl_witness_access constants.%OrderedWith.impl_witness.252, element3 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.8659c0.2] // CHECK:STDOUT: %bound_method.loc21_5.1: = bound_method %int_1.loc21, %impl.elem3.loc21 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.bound.378e29.1] // CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem3.loc21, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.1(constants.%ImplicitAs.facet.eed) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.3899ef.1] // CHECK:STDOUT: %bound_method.loc21_5.2: = bound_method %int_1.loc21, %specific_fn.loc21 [concrete = constants.%bound_method.212360.1] @@ -2414,7 +2422,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.bound.loc21: = bound_method %int_1.loc21, %GreaterOrEquivalent.ref.loc21 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.bound.378e29.2] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc21: = specific_function %GreaterOrEquivalent.ref.loc21, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.2(constants.%ImplicitAs.facet.eed) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.3899ef.2] // CHECK:STDOUT: %bound_method.loc21_5.3: = bound_method %int_1.loc21, %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc21 [concrete = constants.%bound_method.212360.2] -// CHECK:STDOUT: %impl.elem0.loc21: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc21: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc21_3: = bound_method %int_1.loc21, %impl.elem0.loc21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21: init %Cpp.long = call %bound_method.loc21_3(%int_1.loc21) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc21_3.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21 [concrete = constants.%int_1.5a4] @@ -2422,7 +2430,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.call.loc21: init bool = call %bound_method.loc21_5.3(%.loc21_3.2, %a.ref.loc21) // CHECK:STDOUT: %int_1.loc22: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %a.ref.loc22: %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem1.loc22: %.36d = impl_witness_access constants.%OrderedWith.impl_witness.252, element1 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.70a674.2] +// CHECK:STDOUT: %impl.elem1.loc22: %.2ed = impl_witness_access constants.%OrderedWith.impl_witness.252, element1 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.70a674.2] // CHECK:STDOUT: %bound_method.loc22_5.1: = bound_method %int_1.loc22, %impl.elem1.loc22 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.bound.5ef5e5.1] // CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem1.loc22, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.1(constants.%ImplicitAs.facet.eed) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.925a78.1] // CHECK:STDOUT: %bound_method.loc22_5.2: = bound_method %int_1.loc22, %specific_fn.loc22 [concrete = constants.%bound_method.e9dda0.1] @@ -2431,7 +2439,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.bound.loc22: = bound_method %int_1.loc22, %LessOrEquivalent.ref.loc22 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.bound.5ef5e5.2] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc22: = specific_function %LessOrEquivalent.ref.loc22, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.2(constants.%ImplicitAs.facet.eed) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.925a78.2] // CHECK:STDOUT: %bound_method.loc22_5.3: = bound_method %int_1.loc22, %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc22 [concrete = constants.%bound_method.e9dda0.2] -// CHECK:STDOUT: %impl.elem0.loc22: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc22: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc22_3: = bound_method %int_1.loc22, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22: init %Cpp.long = call %bound_method.loc22_3(%int_1.loc22) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc22_3.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22 [concrete = constants.%int_1.5a4] @@ -2447,54 +2455,54 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.6e8: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.c0c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.6e8, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete] // CHECK:STDOUT: %Negate.impl_witness: = impl_witness imports.%Negate.impl_witness_table [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %Cpp.long, (%Negate.impl_witness) [concrete] -// CHECK:STDOUT: %.494: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.b80: type = fn_type @Negate.WithSelf.Op, @Negate(%Negate.facet) [concrete] +// CHECK:STDOUT: %.22b: type = fn_type_with_self_type %Negate.WithSelf.Op.type.b80, %Negate.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.Negate.impl.Op.type: type = fn_type @Cpp.long.as.Negate.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long.as.Negate.impl.Op: %Cpp.long.as.Negate.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %AddWith.type.9c2: type = facet_type <@AddWith, @AddWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %AddWith.Op.type.9a6: type = fn_type @AddWith.Op, @AddWith(%Cpp.long) [concrete] // CHECK:STDOUT: %AddWith.impl_witness.e9f: = impl_witness imports.%AddWith.impl_witness_table.2f5 [concrete] // CHECK:STDOUT: %AddWith.facet: %AddWith.type.9c2 = facet_value %Cpp.long, (%AddWith.impl_witness.e9f) [concrete] -// CHECK:STDOUT: %.a81: type = fn_type_with_self_type %AddWith.Op.type.9a6, %AddWith.facet [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type.914: type = fn_type @AddWith.WithSelf.Op, @AddWith(%Cpp.long, %AddWith.facet) [concrete] +// CHECK:STDOUT: %.165: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.914, %AddWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.AddWith.impl.Op.type.094: type = fn_type @Cpp.long.as.AddWith.impl.Op.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.AddWith.impl.Op.be0: %Cpp.long.as.AddWith.impl.Op.type.094 = struct_value () [concrete] // CHECK:STDOUT: %SubWith.type.e8e: type = facet_type <@SubWith, @SubWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %SubWith.Op.type.533: type = fn_type @SubWith.Op, @SubWith(%Cpp.long) [concrete] // CHECK:STDOUT: %SubWith.impl_witness.8a6: = impl_witness imports.%SubWith.impl_witness_table.e2e [concrete] // CHECK:STDOUT: %SubWith.facet: %SubWith.type.e8e = facet_value %Cpp.long, (%SubWith.impl_witness.8a6) [concrete] -// CHECK:STDOUT: %.70d: type = fn_type_with_self_type %SubWith.Op.type.533, %SubWith.facet [concrete] +// CHECK:STDOUT: %SubWith.WithSelf.Op.type.a4a: type = fn_type @SubWith.WithSelf.Op, @SubWith(%Cpp.long, %SubWith.facet) [concrete] +// CHECK:STDOUT: %.571: type = fn_type_with_self_type %SubWith.WithSelf.Op.type.a4a, %SubWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.SubWith.impl.Op.type.882: type = fn_type @Cpp.long.as.SubWith.impl.Op.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.SubWith.impl.Op.37d: %Cpp.long.as.SubWith.impl.Op.type.882 = struct_value () [concrete] // CHECK:STDOUT: %MulWith.type.a32: type = facet_type <@MulWith, @MulWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %MulWith.Op.type.44b: type = fn_type @MulWith.Op, @MulWith(%Cpp.long) [concrete] // CHECK:STDOUT: %MulWith.impl_witness.87c: = impl_witness imports.%MulWith.impl_witness_table.20e [concrete] // CHECK:STDOUT: %MulWith.facet: %MulWith.type.a32 = facet_value %Cpp.long, (%MulWith.impl_witness.87c) [concrete] -// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %MulWith.Op.type.44b, %MulWith.facet [concrete] +// CHECK:STDOUT: %MulWith.WithSelf.Op.type.038: type = fn_type @MulWith.WithSelf.Op, @MulWith(%Cpp.long, %MulWith.facet) [concrete] +// CHECK:STDOUT: %.7d0: type = fn_type_with_self_type %MulWith.WithSelf.Op.type.038, %MulWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.MulWith.impl.Op.type.31a: type = fn_type @Cpp.long.as.MulWith.impl.Op.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.MulWith.impl.Op.4e5: %Cpp.long.as.MulWith.impl.Op.type.31a = struct_value () [concrete] // CHECK:STDOUT: %DivWith.type.0c0: type = facet_type <@DivWith, @DivWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %DivWith.Op.type.494: type = fn_type @DivWith.Op, @DivWith(%Cpp.long) [concrete] // CHECK:STDOUT: %DivWith.impl_witness.4ab: = impl_witness imports.%DivWith.impl_witness_table.1ae [concrete] // CHECK:STDOUT: %DivWith.facet: %DivWith.type.0c0 = facet_value %Cpp.long, (%DivWith.impl_witness.4ab) [concrete] -// CHECK:STDOUT: %.22b: type = fn_type_with_self_type %DivWith.Op.type.494, %DivWith.facet [concrete] +// CHECK:STDOUT: %DivWith.WithSelf.Op.type.d57: type = fn_type @DivWith.WithSelf.Op, @DivWith(%Cpp.long, %DivWith.facet) [concrete] +// CHECK:STDOUT: %.aa3: type = fn_type_with_self_type %DivWith.WithSelf.Op.type.d57, %DivWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.DivWith.impl.Op.type.5e7: type = fn_type @Cpp.long.as.DivWith.impl.Op.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.DivWith.impl.Op.33f: %Cpp.long.as.DivWith.impl.Op.type.5e7 = struct_value () [concrete] // CHECK:STDOUT: %ModWith.type.2fc: type = facet_type <@ModWith, @ModWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ModWith.Op.type.c13: type = fn_type @ModWith.Op, @ModWith(%Cpp.long) [concrete] // CHECK:STDOUT: %ModWith.impl_witness.c73: = impl_witness imports.%ModWith.impl_witness_table.ed4 [concrete] // CHECK:STDOUT: %ModWith.facet: %ModWith.type.2fc = facet_value %Cpp.long, (%ModWith.impl_witness.c73) [concrete] -// CHECK:STDOUT: %.300: type = fn_type_with_self_type %ModWith.Op.type.c13, %ModWith.facet [concrete] +// CHECK:STDOUT: %ModWith.WithSelf.Op.type.b7d: type = fn_type @ModWith.WithSelf.Op, @ModWith(%Cpp.long, %ModWith.facet) [concrete] +// CHECK:STDOUT: %.c19: type = fn_type_with_self_type %ModWith.WithSelf.Op.type.b7d, %ModWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.ModWith.impl.Op.type.aa5: type = fn_type @Cpp.long.as.ModWith.impl.Op.3 [concrete] // CHECK:STDOUT: %Cpp.long.as.ModWith.impl.Op.06e: %Cpp.long.as.ModWith.impl.Op.type.aa5 = struct_value () [concrete] // CHECK:STDOUT: } @@ -2536,7 +2544,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc8: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc8_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.5a4] @@ -2550,7 +2558,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc9: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc9: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc9: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc9_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.5a4] @@ -2560,7 +2568,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.patt: %pattern_type.68c = value_binding_pattern a [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: %x.ref.loc11: %Cpp.long = name_ref x, %x -// CHECK:STDOUT: %impl.elem1.loc11: %.494 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Cpp.long.as.Negate.impl.Op] +// CHECK:STDOUT: %impl.elem1.loc11: %.22b = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Cpp.long.as.Negate.impl.Op] // CHECK:STDOUT: %bound_method.loc11: = bound_method %x.ref.loc11, %impl.elem1.loc11 // CHECK:STDOUT: %Cpp.long.as.Negate.impl.Op.call: init %Cpp.long = call %bound_method.loc11(%x.ref.loc11) // CHECK:STDOUT: %.loc11_13: type = splice_block %long.ref.loc11 [concrete = constants.%Cpp.long] { @@ -2575,7 +2583,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %x.ref.loc12: %Cpp.long = name_ref x, %x // CHECK:STDOUT: %y.ref.loc12: %Cpp.long = name_ref y, %y -// CHECK:STDOUT: %impl.elem1.loc12: %.a81 = impl_witness_access constants.%AddWith.impl_witness.e9f, element1 [concrete = constants.%Cpp.long.as.AddWith.impl.Op.be0] +// CHECK:STDOUT: %impl.elem1.loc12: %.165 = impl_witness_access constants.%AddWith.impl_witness.e9f, element1 [concrete = constants.%Cpp.long.as.AddWith.impl.Op.be0] // CHECK:STDOUT: %bound_method.loc12: = bound_method %x.ref.loc12, %impl.elem1.loc12 // CHECK:STDOUT: %Cpp.long.as.AddWith.impl.Op.call: init %Cpp.long = call %bound_method.loc12(%x.ref.loc12, %y.ref.loc12) // CHECK:STDOUT: %.loc12_13: type = splice_block %long.ref.loc12 [concrete = constants.%Cpp.long] { @@ -2590,7 +2598,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %x.ref.loc13: %Cpp.long = name_ref x, %x // CHECK:STDOUT: %y.ref.loc13: %Cpp.long = name_ref y, %y -// CHECK:STDOUT: %impl.elem1.loc13: %.70d = impl_witness_access constants.%SubWith.impl_witness.8a6, element1 [concrete = constants.%Cpp.long.as.SubWith.impl.Op.37d] +// CHECK:STDOUT: %impl.elem1.loc13: %.571 = impl_witness_access constants.%SubWith.impl_witness.8a6, element1 [concrete = constants.%Cpp.long.as.SubWith.impl.Op.37d] // CHECK:STDOUT: %bound_method.loc13: = bound_method %x.ref.loc13, %impl.elem1.loc13 // CHECK:STDOUT: %Cpp.long.as.SubWith.impl.Op.call: init %Cpp.long = call %bound_method.loc13(%x.ref.loc13, %y.ref.loc13) // CHECK:STDOUT: %.loc13_13: type = splice_block %long.ref.loc13 [concrete = constants.%Cpp.long] { @@ -2605,7 +2613,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %x.ref.loc14: %Cpp.long = name_ref x, %x // CHECK:STDOUT: %y.ref.loc14: %Cpp.long = name_ref y, %y -// CHECK:STDOUT: %impl.elem1.loc14: %.0a7 = impl_witness_access constants.%MulWith.impl_witness.87c, element1 [concrete = constants.%Cpp.long.as.MulWith.impl.Op.4e5] +// CHECK:STDOUT: %impl.elem1.loc14: %.7d0 = impl_witness_access constants.%MulWith.impl_witness.87c, element1 [concrete = constants.%Cpp.long.as.MulWith.impl.Op.4e5] // CHECK:STDOUT: %bound_method.loc14: = bound_method %x.ref.loc14, %impl.elem1.loc14 // CHECK:STDOUT: %Cpp.long.as.MulWith.impl.Op.call: init %Cpp.long = call %bound_method.loc14(%x.ref.loc14, %y.ref.loc14) // CHECK:STDOUT: %.loc14_13: type = splice_block %long.ref.loc14 [concrete = constants.%Cpp.long] { @@ -2620,7 +2628,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %x.ref.loc15: %Cpp.long = name_ref x, %x // CHECK:STDOUT: %y.ref.loc15: %Cpp.long = name_ref y, %y -// CHECK:STDOUT: %impl.elem1.loc15: %.22b = impl_witness_access constants.%DivWith.impl_witness.4ab, element1 [concrete = constants.%Cpp.long.as.DivWith.impl.Op.33f] +// CHECK:STDOUT: %impl.elem1.loc15: %.aa3 = impl_witness_access constants.%DivWith.impl_witness.4ab, element1 [concrete = constants.%Cpp.long.as.DivWith.impl.Op.33f] // CHECK:STDOUT: %bound_method.loc15: = bound_method %x.ref.loc15, %impl.elem1.loc15 // CHECK:STDOUT: %Cpp.long.as.DivWith.impl.Op.call: init %Cpp.long = call %bound_method.loc15(%x.ref.loc15, %y.ref.loc15) // CHECK:STDOUT: %.loc15_13: type = splice_block %long.ref.loc15 [concrete = constants.%Cpp.long] { @@ -2635,7 +2643,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %x.ref.loc16: %Cpp.long = name_ref x, %x // CHECK:STDOUT: %y.ref.loc16: %Cpp.long = name_ref y, %y -// CHECK:STDOUT: %impl.elem1.loc16: %.300 = impl_witness_access constants.%ModWith.impl_witness.c73, element1 [concrete = constants.%Cpp.long.as.ModWith.impl.Op.06e] +// CHECK:STDOUT: %impl.elem1.loc16: %.c19 = impl_witness_access constants.%ModWith.impl_witness.c73, element1 [concrete = constants.%Cpp.long.as.ModWith.impl.Op.06e] // CHECK:STDOUT: %bound_method.loc16: = bound_method %x.ref.loc16, %impl.elem1.loc16 // CHECK:STDOUT: %Cpp.long.as.ModWith.impl.Op.call: init %Cpp.long = call %bound_method.loc16(%x.ref.loc16, %y.ref.loc16) // CHECK:STDOUT: %.loc16_13: type = splice_block %long.ref.loc16 [concrete = constants.%Cpp.long] { @@ -2656,20 +2664,19 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %T.035: %Copy.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.ImplicitAs.impl.Convert.type.55d: type = fn_type @T.binding.as_type.as.ImplicitAs.impl.Convert, @T.binding.as_type.as.ImplicitAs.impl(%T.035) [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.ImplicitAs.impl.Convert.19b: %T.binding.as_type.as.ImplicitAs.impl.Convert.type.55d = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.eed: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.eed [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.6e8: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet.eed) [concrete] +// CHECK:STDOUT: %.c0c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.6e8, %ImplicitAs.facet.eed [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete] // CHECK:STDOUT: %AddAssignWith.type.bef: type = facet_type <@AddAssignWith, @AddAssignWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %AddAssignWith.Op.type.6a2: type = fn_type @AddAssignWith.Op, @AddAssignWith(%Cpp.long) [concrete] // CHECK:STDOUT: %U.57d: %ImplicitAs.type.819 = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.9f3dfb.1: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.78f138.1: %Cpp.long.as.AddAssignWith.impl.Op.type.9f3dfb.1 = struct_value () [symbolic] @@ -2685,11 +2692,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.defb93.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.8b7759.2: %Cpp.long.as.AddAssignWith.impl.Op.type.defb93.2 = struct_value () [concrete] // CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.bef = facet_value %Cpp.long, (%AddAssignWith.impl_witness.fb1) [concrete] -// CHECK:STDOUT: %.dff: type = fn_type_with_self_type %AddAssignWith.Op.type.6a2, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.045: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith(%Cpp.long, %AddAssignWith.facet) [concrete] +// CHECK:STDOUT: %.045: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.045, %AddAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.df00b6.1: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.8b7759.2, @Cpp.long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.df00b6.2: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.8b7759.1, @Cpp.long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %SubAssignWith.type.b12: type = facet_type <@SubAssignWith, @SubAssignWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %SubAssignWith.Op.type.628: type = fn_type @SubAssignWith.Op, @SubAssignWith(%Cpp.long) [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.type.1f2d1c.1: type = fn_type @Cpp.long.as.SubAssignWith.impl.Op.1, @Cpp.long.as.SubAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.c39240.1: %Cpp.long.as.SubAssignWith.impl.Op.type.1f2d1c.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.type.1f2d1c.2: type = fn_type @Cpp.long.as.SubAssignWith.impl.Op.2, @Cpp.long.as.SubAssignWith.impl(%U.57d) [symbolic] @@ -2700,11 +2707,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.type.7e399e.2: type = fn_type @Cpp.long.as.SubAssignWith.impl.Op.1, @Cpp.long.as.SubAssignWith.impl(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.31eaa0.2: %Cpp.long.as.SubAssignWith.impl.Op.type.7e399e.2 = struct_value () [concrete] // CHECK:STDOUT: %SubAssignWith.facet: %SubAssignWith.type.b12 = facet_value %Cpp.long, (%SubAssignWith.impl_witness.631) [concrete] -// CHECK:STDOUT: %.327: type = fn_type_with_self_type %SubAssignWith.Op.type.628, %SubAssignWith.facet [concrete] +// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.887: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith(%Cpp.long, %SubAssignWith.facet) [concrete] +// CHECK:STDOUT: %.052: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.887, %SubAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.specific_fn.864a67.1: = specific_function %Cpp.long.as.SubAssignWith.impl.Op.31eaa0.2, @Cpp.long.as.SubAssignWith.impl.Op.1(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.specific_fn.864a67.2: = specific_function %Cpp.long.as.SubAssignWith.impl.Op.31eaa0.1, @Cpp.long.as.SubAssignWith.impl.Op.2(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %MulAssignWith.type.59a: type = facet_type <@MulAssignWith, @MulAssignWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %MulAssignWith.Op.type.2a9: type = fn_type @MulAssignWith.Op, @MulAssignWith(%Cpp.long) [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.type.afa7f7.1: type = fn_type @Cpp.long.as.MulAssignWith.impl.Op.1, @Cpp.long.as.MulAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.421374.1: %Cpp.long.as.MulAssignWith.impl.Op.type.afa7f7.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.type.afa7f7.2: type = fn_type @Cpp.long.as.MulAssignWith.impl.Op.2, @Cpp.long.as.MulAssignWith.impl(%U.57d) [symbolic] @@ -2715,11 +2722,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.type.c3673e.2: type = fn_type @Cpp.long.as.MulAssignWith.impl.Op.1, @Cpp.long.as.MulAssignWith.impl(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.b067dc.2: %Cpp.long.as.MulAssignWith.impl.Op.type.c3673e.2 = struct_value () [concrete] // CHECK:STDOUT: %MulAssignWith.facet: %MulAssignWith.type.59a = facet_value %Cpp.long, (%MulAssignWith.impl_witness.0b4) [concrete] -// CHECK:STDOUT: %.4ea: type = fn_type_with_self_type %MulAssignWith.Op.type.2a9, %MulAssignWith.facet [concrete] +// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.ddd: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith(%Cpp.long, %MulAssignWith.facet) [concrete] +// CHECK:STDOUT: %.8d7: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.ddd, %MulAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.specific_fn.a37438.1: = specific_function %Cpp.long.as.MulAssignWith.impl.Op.b067dc.2, @Cpp.long.as.MulAssignWith.impl.Op.1(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.specific_fn.a37438.2: = specific_function %Cpp.long.as.MulAssignWith.impl.Op.b067dc.1, @Cpp.long.as.MulAssignWith.impl.Op.2(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %DivAssignWith.type.e6d: type = facet_type <@DivAssignWith, @DivAssignWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %DivAssignWith.Op.type.883: type = fn_type @DivAssignWith.Op, @DivAssignWith(%Cpp.long) [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.type.f3536d.1: type = fn_type @Cpp.long.as.DivAssignWith.impl.Op.1, @Cpp.long.as.DivAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.6227df.1: %Cpp.long.as.DivAssignWith.impl.Op.type.f3536d.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.type.f3536d.2: type = fn_type @Cpp.long.as.DivAssignWith.impl.Op.2, @Cpp.long.as.DivAssignWith.impl(%U.57d) [symbolic] @@ -2730,11 +2737,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.type.97cfb4.2: type = fn_type @Cpp.long.as.DivAssignWith.impl.Op.1, @Cpp.long.as.DivAssignWith.impl(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.b85335.2: %Cpp.long.as.DivAssignWith.impl.Op.type.97cfb4.2 = struct_value () [concrete] // CHECK:STDOUT: %DivAssignWith.facet: %DivAssignWith.type.e6d = facet_value %Cpp.long, (%DivAssignWith.impl_witness.b4e) [concrete] -// CHECK:STDOUT: %.a57: type = fn_type_with_self_type %DivAssignWith.Op.type.883, %DivAssignWith.facet [concrete] +// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.829: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith(%Cpp.long, %DivAssignWith.facet) [concrete] +// CHECK:STDOUT: %.1d5: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.829, %DivAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.specific_fn.19b8da.1: = specific_function %Cpp.long.as.DivAssignWith.impl.Op.b85335.2, @Cpp.long.as.DivAssignWith.impl.Op.1(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.specific_fn.19b8da.2: = specific_function %Cpp.long.as.DivAssignWith.impl.Op.b85335.1, @Cpp.long.as.DivAssignWith.impl.Op.2(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %ModAssignWith.type.2a3: type = facet_type <@ModAssignWith, @ModAssignWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ModAssignWith.Op.type.a01: type = fn_type @ModAssignWith.Op, @ModAssignWith(%Cpp.long) [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.type.2d6972.1: type = fn_type @Cpp.long.as.ModAssignWith.impl.Op.1, @Cpp.long.as.ModAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.666e79.1: %Cpp.long.as.ModAssignWith.impl.Op.type.2d6972.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.type.2d6972.2: type = fn_type @Cpp.long.as.ModAssignWith.impl.Op.2, @Cpp.long.as.ModAssignWith.impl(%U.57d) [symbolic] @@ -2745,11 +2752,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.type.24a130.2: type = fn_type @Cpp.long.as.ModAssignWith.impl.Op.1, @Cpp.long.as.ModAssignWith.impl(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.da4005.2: %Cpp.long.as.ModAssignWith.impl.Op.type.24a130.2 = struct_value () [concrete] // CHECK:STDOUT: %ModAssignWith.facet: %ModAssignWith.type.2a3 = facet_value %Cpp.long, (%ModAssignWith.impl_witness.faa) [concrete] -// CHECK:STDOUT: %.db4: type = fn_type_with_self_type %ModAssignWith.Op.type.a01, %ModAssignWith.facet [concrete] +// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.c4a: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith(%Cpp.long, %ModAssignWith.facet) [concrete] +// CHECK:STDOUT: %.474: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.c4a, %ModAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.specific_fn.51594a.1: = specific_function %Cpp.long.as.ModAssignWith.impl.Op.da4005.2, @Cpp.long.as.ModAssignWith.impl.Op.1(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.specific_fn.51594a.2: = specific_function %Cpp.long.as.ModAssignWith.impl.Op.da4005.1, @Cpp.long.as.ModAssignWith.impl.Op.2(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %BitAndAssignWith.type.efd: type = facet_type <@BitAndAssignWith, @BitAndAssignWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %BitAndAssignWith.Op.type.3d8: type = fn_type @BitAndAssignWith.Op, @BitAndAssignWith(%Cpp.long) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.type.442dcf.1: type = fn_type @Cpp.long.as.BitAndAssignWith.impl.Op.1, @Cpp.long.as.BitAndAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.d99897.1: %Cpp.long.as.BitAndAssignWith.impl.Op.type.442dcf.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.type.442dcf.2: type = fn_type @Cpp.long.as.BitAndAssignWith.impl.Op.2, @Cpp.long.as.BitAndAssignWith.impl(%U.57d) [symbolic] @@ -2760,11 +2767,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.type.bdaab3.2: type = fn_type @Cpp.long.as.BitAndAssignWith.impl.Op.1, @Cpp.long.as.BitAndAssignWith.impl(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.500716.2: %Cpp.long.as.BitAndAssignWith.impl.Op.type.bdaab3.2 = struct_value () [concrete] // CHECK:STDOUT: %BitAndAssignWith.facet: %BitAndAssignWith.type.efd = facet_value %Cpp.long, (%BitAndAssignWith.impl_witness.a49) [concrete] -// CHECK:STDOUT: %.1cc: type = fn_type_with_self_type %BitAndAssignWith.Op.type.3d8, %BitAndAssignWith.facet [concrete] +// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.e39: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith(%Cpp.long, %BitAndAssignWith.facet) [concrete] +// CHECK:STDOUT: %.f3c: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.e39, %BitAndAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.specific_fn.1245aa.1: = specific_function %Cpp.long.as.BitAndAssignWith.impl.Op.500716.2, @Cpp.long.as.BitAndAssignWith.impl.Op.1(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.specific_fn.1245aa.2: = specific_function %Cpp.long.as.BitAndAssignWith.impl.Op.500716.1, @Cpp.long.as.BitAndAssignWith.impl.Op.2(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %BitOrAssignWith.type.b27: type = facet_type <@BitOrAssignWith, @BitOrAssignWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %BitOrAssignWith.Op.type.99d: type = fn_type @BitOrAssignWith.Op, @BitOrAssignWith(%Cpp.long) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.type.219f14.1: type = fn_type @Cpp.long.as.BitOrAssignWith.impl.Op.1, @Cpp.long.as.BitOrAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.e5afa1.1: %Cpp.long.as.BitOrAssignWith.impl.Op.type.219f14.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.type.219f14.2: type = fn_type @Cpp.long.as.BitOrAssignWith.impl.Op.2, @Cpp.long.as.BitOrAssignWith.impl(%U.57d) [symbolic] @@ -2775,11 +2782,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.type.a2b279.2: type = fn_type @Cpp.long.as.BitOrAssignWith.impl.Op.1, @Cpp.long.as.BitOrAssignWith.impl(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.9b8237.2: %Cpp.long.as.BitOrAssignWith.impl.Op.type.a2b279.2 = struct_value () [concrete] // CHECK:STDOUT: %BitOrAssignWith.facet: %BitOrAssignWith.type.b27 = facet_value %Cpp.long, (%BitOrAssignWith.impl_witness.ab4) [concrete] -// CHECK:STDOUT: %.d95: type = fn_type_with_self_type %BitOrAssignWith.Op.type.99d, %BitOrAssignWith.facet [concrete] +// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.823: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith(%Cpp.long, %BitOrAssignWith.facet) [concrete] +// CHECK:STDOUT: %.2c9: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.823, %BitOrAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.specific_fn.b7967f.1: = specific_function %Cpp.long.as.BitOrAssignWith.impl.Op.9b8237.2, @Cpp.long.as.BitOrAssignWith.impl.Op.1(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.specific_fn.b7967f.2: = specific_function %Cpp.long.as.BitOrAssignWith.impl.Op.9b8237.1, @Cpp.long.as.BitOrAssignWith.impl.Op.2(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %BitXorAssignWith.type.431: type = facet_type <@BitXorAssignWith, @BitXorAssignWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %BitXorAssignWith.Op.type.d3b: type = fn_type @BitXorAssignWith.Op, @BitXorAssignWith(%Cpp.long) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.type.8b07a5.1: type = fn_type @Cpp.long.as.BitXorAssignWith.impl.Op.1, @Cpp.long.as.BitXorAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.3c4d0d.1: %Cpp.long.as.BitXorAssignWith.impl.Op.type.8b07a5.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.type.8b07a5.2: type = fn_type @Cpp.long.as.BitXorAssignWith.impl.Op.2, @Cpp.long.as.BitXorAssignWith.impl(%U.57d) [symbolic] @@ -2790,11 +2797,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.type.6f67bc.2: type = fn_type @Cpp.long.as.BitXorAssignWith.impl.Op.1, @Cpp.long.as.BitXorAssignWith.impl(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.d7e378.2: %Cpp.long.as.BitXorAssignWith.impl.Op.type.6f67bc.2 = struct_value () [concrete] // CHECK:STDOUT: %BitXorAssignWith.facet: %BitXorAssignWith.type.431 = facet_value %Cpp.long, (%BitXorAssignWith.impl_witness.4d7) [concrete] -// CHECK:STDOUT: %.797: type = fn_type_with_self_type %BitXorAssignWith.Op.type.d3b, %BitXorAssignWith.facet [concrete] +// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.820: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith(%Cpp.long, %BitXorAssignWith.facet) [concrete] +// CHECK:STDOUT: %.504: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.820, %BitXorAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.specific_fn.04506a.1: = specific_function %Cpp.long.as.BitXorAssignWith.impl.Op.d7e378.2, @Cpp.long.as.BitXorAssignWith.impl.Op.1(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.specific_fn.04506a.2: = specific_function %Cpp.long.as.BitXorAssignWith.impl.Op.d7e378.1, @Cpp.long.as.BitXorAssignWith.impl.Op.2(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.type.bed: type = facet_type <@LeftShiftAssignWith, @LeftShiftAssignWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.Op.type.1b3: type = fn_type @LeftShiftAssignWith.Op, @LeftShiftAssignWith(%Cpp.long) [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.21420b.1: type = fn_type @Cpp.long.as.LeftShiftAssignWith.impl.Op.1, @Cpp.long.as.LeftShiftAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.e204a3.1: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.21420b.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.21420b.2: type = fn_type @Cpp.long.as.LeftShiftAssignWith.impl.Op.2, @Cpp.long.as.LeftShiftAssignWith.impl(%U.57d) [symbolic] @@ -2805,11 +2812,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.e1513f.2: type = fn_type @Cpp.long.as.LeftShiftAssignWith.impl.Op.1, @Cpp.long.as.LeftShiftAssignWith.impl(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.216e26.2: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.e1513f.2 = struct_value () [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.facet: %LeftShiftAssignWith.type.bed = facet_value %Cpp.long, (%LeftShiftAssignWith.impl_witness.550) [concrete] -// CHECK:STDOUT: %.98f: type = fn_type_with_self_type %LeftShiftAssignWith.Op.type.1b3, %LeftShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.d0a: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith(%Cpp.long, %LeftShiftAssignWith.facet) [concrete] +// CHECK:STDOUT: %.20f: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.d0a, %LeftShiftAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.specific_fn.0946f9.1: = specific_function %Cpp.long.as.LeftShiftAssignWith.impl.Op.216e26.2, @Cpp.long.as.LeftShiftAssignWith.impl.Op.1(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.specific_fn.0946f9.2: = specific_function %Cpp.long.as.LeftShiftAssignWith.impl.Op.216e26.1, @Cpp.long.as.LeftShiftAssignWith.impl.Op.2(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %RightShiftAssignWith.type.222: type = facet_type <@RightShiftAssignWith, @RightShiftAssignWith(%Cpp.long)> [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.Op.type.400: type = fn_type @RightShiftAssignWith.Op, @RightShiftAssignWith(%Cpp.long) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.f850d3.1: type = fn_type @Cpp.long.as.RightShiftAssignWith.impl.Op.1, @Cpp.long.as.RightShiftAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.328772.1: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.f850d3.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.f850d3.2: type = fn_type @Cpp.long.as.RightShiftAssignWith.impl.Op.2, @Cpp.long.as.RightShiftAssignWith.impl(%U.57d) [symbolic] @@ -2820,7 +2827,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.095737.2: type = fn_type @Cpp.long.as.RightShiftAssignWith.impl.Op.1, @Cpp.long.as.RightShiftAssignWith.impl(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.860e6c.2: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.095737.2 = struct_value () [concrete] // CHECK:STDOUT: %RightShiftAssignWith.facet: %RightShiftAssignWith.type.222 = facet_value %Cpp.long, (%RightShiftAssignWith.impl_witness.df5) [concrete] -// CHECK:STDOUT: %.918: type = fn_type_with_self_type %RightShiftAssignWith.Op.type.400, %RightShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.6ca: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith(%Cpp.long, %RightShiftAssignWith.facet) [concrete] +// CHECK:STDOUT: %.19a: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.6ca, %RightShiftAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.1ec453.1: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.860e6c.2, @Cpp.long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.1ec453.2: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.860e6c.1, @Cpp.long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.3fe) [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -2880,7 +2888,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.long = var %a.var_patt // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.5a4] @@ -2896,7 +2904,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %Cpp.long = var %b.var_patt // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc9: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc9: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc9_3: init %Cpp.long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.5a4] @@ -2908,7 +2916,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %b: ref %Cpp.long = ref_binding b, %b.var // CHECK:STDOUT: %a.ref.loc11: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc11: ref %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc11: %.dff = impl_witness_access constants.%AddAssignWith.impl_witness.fb1, element0 [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.8b7759.2] +// CHECK:STDOUT: %impl.elem0.loc11: %.045 = impl_witness_access constants.%AddAssignWith.impl_witness.fb1, element0 [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.8b7759.2] // CHECK:STDOUT: %bound_method.loc11_5.1: = bound_method %a.ref.loc11, %impl.elem0.loc11 // CHECK:STDOUT: %ImplicitAs.facet.loc11_5.1: %ImplicitAs.type.819 = facet_value constants.%Cpp.long, (constants.%ImplicitAs.impl_witness.bd4) [concrete = constants.%ImplicitAs.facet.3fe] // CHECK:STDOUT: %.loc11_5.1: %ImplicitAs.type.819 = converted constants.%Cpp.long, %ImplicitAs.facet.loc11_5.1 [concrete = constants.%ImplicitAs.facet.3fe] @@ -2925,7 +2933,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc11_5.3(%a.ref.loc11, %.loc11_8) // CHECK:STDOUT: %a.ref.loc12: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc12: ref %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc12: %.327 = impl_witness_access constants.%SubAssignWith.impl_witness.631, element0 [concrete = constants.%Cpp.long.as.SubAssignWith.impl.Op.31eaa0.2] +// CHECK:STDOUT: %impl.elem0.loc12: %.052 = impl_witness_access constants.%SubAssignWith.impl_witness.631, element0 [concrete = constants.%Cpp.long.as.SubAssignWith.impl.Op.31eaa0.2] // CHECK:STDOUT: %bound_method.loc12_5.1: = bound_method %a.ref.loc12, %impl.elem0.loc12 // CHECK:STDOUT: %ImplicitAs.facet.loc12_5.1: %ImplicitAs.type.819 = facet_value constants.%Cpp.long, (constants.%ImplicitAs.impl_witness.bd4) [concrete = constants.%ImplicitAs.facet.3fe] // CHECK:STDOUT: %.loc12_5.1: %ImplicitAs.type.819 = converted constants.%Cpp.long, %ImplicitAs.facet.loc12_5.1 [concrete = constants.%ImplicitAs.facet.3fe] @@ -2942,7 +2950,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc12_5.3(%a.ref.loc12, %.loc12_8) // CHECK:STDOUT: %a.ref.loc13: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc13: ref %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc13: %.4ea = impl_witness_access constants.%MulAssignWith.impl_witness.0b4, element0 [concrete = constants.%Cpp.long.as.MulAssignWith.impl.Op.b067dc.2] +// CHECK:STDOUT: %impl.elem0.loc13: %.8d7 = impl_witness_access constants.%MulAssignWith.impl_witness.0b4, element0 [concrete = constants.%Cpp.long.as.MulAssignWith.impl.Op.b067dc.2] // CHECK:STDOUT: %bound_method.loc13_5.1: = bound_method %a.ref.loc13, %impl.elem0.loc13 // CHECK:STDOUT: %ImplicitAs.facet.loc13_5.1: %ImplicitAs.type.819 = facet_value constants.%Cpp.long, (constants.%ImplicitAs.impl_witness.bd4) [concrete = constants.%ImplicitAs.facet.3fe] // CHECK:STDOUT: %.loc13_5.1: %ImplicitAs.type.819 = converted constants.%Cpp.long, %ImplicitAs.facet.loc13_5.1 [concrete = constants.%ImplicitAs.facet.3fe] @@ -2959,7 +2967,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc13_5.3(%a.ref.loc13, %.loc13_8) // CHECK:STDOUT: %a.ref.loc14: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc14: ref %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc14: %.a57 = impl_witness_access constants.%DivAssignWith.impl_witness.b4e, element0 [concrete = constants.%Cpp.long.as.DivAssignWith.impl.Op.b85335.2] +// CHECK:STDOUT: %impl.elem0.loc14: %.1d5 = impl_witness_access constants.%DivAssignWith.impl_witness.b4e, element0 [concrete = constants.%Cpp.long.as.DivAssignWith.impl.Op.b85335.2] // CHECK:STDOUT: %bound_method.loc14_5.1: = bound_method %a.ref.loc14, %impl.elem0.loc14 // CHECK:STDOUT: %ImplicitAs.facet.loc14_5.1: %ImplicitAs.type.819 = facet_value constants.%Cpp.long, (constants.%ImplicitAs.impl_witness.bd4) [concrete = constants.%ImplicitAs.facet.3fe] // CHECK:STDOUT: %.loc14_5.1: %ImplicitAs.type.819 = converted constants.%Cpp.long, %ImplicitAs.facet.loc14_5.1 [concrete = constants.%ImplicitAs.facet.3fe] @@ -2976,7 +2984,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc14_5.3(%a.ref.loc14, %.loc14_8) // CHECK:STDOUT: %a.ref.loc15: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc15: ref %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc15: %.db4 = impl_witness_access constants.%ModAssignWith.impl_witness.faa, element0 [concrete = constants.%Cpp.long.as.ModAssignWith.impl.Op.da4005.2] +// CHECK:STDOUT: %impl.elem0.loc15: %.474 = impl_witness_access constants.%ModAssignWith.impl_witness.faa, element0 [concrete = constants.%Cpp.long.as.ModAssignWith.impl.Op.da4005.2] // CHECK:STDOUT: %bound_method.loc15_5.1: = bound_method %a.ref.loc15, %impl.elem0.loc15 // CHECK:STDOUT: %ImplicitAs.facet.loc15_5.1: %ImplicitAs.type.819 = facet_value constants.%Cpp.long, (constants.%ImplicitAs.impl_witness.bd4) [concrete = constants.%ImplicitAs.facet.3fe] // CHECK:STDOUT: %.loc15_5.1: %ImplicitAs.type.819 = converted constants.%Cpp.long, %ImplicitAs.facet.loc15_5.1 [concrete = constants.%ImplicitAs.facet.3fe] @@ -2993,7 +3001,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc15_5.3(%a.ref.loc15, %.loc15_8) // CHECK:STDOUT: %a.ref.loc17: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc17: ref %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc17: %.1cc = impl_witness_access constants.%BitAndAssignWith.impl_witness.a49, element0 [concrete = constants.%Cpp.long.as.BitAndAssignWith.impl.Op.500716.2] +// CHECK:STDOUT: %impl.elem0.loc17: %.f3c = impl_witness_access constants.%BitAndAssignWith.impl_witness.a49, element0 [concrete = constants.%Cpp.long.as.BitAndAssignWith.impl.Op.500716.2] // CHECK:STDOUT: %bound_method.loc17_5.1: = bound_method %a.ref.loc17, %impl.elem0.loc17 // CHECK:STDOUT: %ImplicitAs.facet.loc17_5.1: %ImplicitAs.type.819 = facet_value constants.%Cpp.long, (constants.%ImplicitAs.impl_witness.bd4) [concrete = constants.%ImplicitAs.facet.3fe] // CHECK:STDOUT: %.loc17_5.1: %ImplicitAs.type.819 = converted constants.%Cpp.long, %ImplicitAs.facet.loc17_5.1 [concrete = constants.%ImplicitAs.facet.3fe] @@ -3010,7 +3018,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc17_5.3(%a.ref.loc17, %.loc17_8) // CHECK:STDOUT: %a.ref.loc18: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc18: ref %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc18: %.d95 = impl_witness_access constants.%BitOrAssignWith.impl_witness.ab4, element0 [concrete = constants.%Cpp.long.as.BitOrAssignWith.impl.Op.9b8237.2] +// CHECK:STDOUT: %impl.elem0.loc18: %.2c9 = impl_witness_access constants.%BitOrAssignWith.impl_witness.ab4, element0 [concrete = constants.%Cpp.long.as.BitOrAssignWith.impl.Op.9b8237.2] // CHECK:STDOUT: %bound_method.loc18_5.1: = bound_method %a.ref.loc18, %impl.elem0.loc18 // CHECK:STDOUT: %ImplicitAs.facet.loc18_5.1: %ImplicitAs.type.819 = facet_value constants.%Cpp.long, (constants.%ImplicitAs.impl_witness.bd4) [concrete = constants.%ImplicitAs.facet.3fe] // CHECK:STDOUT: %.loc18_5.1: %ImplicitAs.type.819 = converted constants.%Cpp.long, %ImplicitAs.facet.loc18_5.1 [concrete = constants.%ImplicitAs.facet.3fe] @@ -3027,7 +3035,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18_5.3(%a.ref.loc18, %.loc18_8) // CHECK:STDOUT: %a.ref.loc19: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc19: ref %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc19: %.797 = impl_witness_access constants.%BitXorAssignWith.impl_witness.4d7, element0 [concrete = constants.%Cpp.long.as.BitXorAssignWith.impl.Op.d7e378.2] +// CHECK:STDOUT: %impl.elem0.loc19: %.504 = impl_witness_access constants.%BitXorAssignWith.impl_witness.4d7, element0 [concrete = constants.%Cpp.long.as.BitXorAssignWith.impl.Op.d7e378.2] // CHECK:STDOUT: %bound_method.loc19_5.1: = bound_method %a.ref.loc19, %impl.elem0.loc19 // CHECK:STDOUT: %ImplicitAs.facet.loc19_5.1: %ImplicitAs.type.819 = facet_value constants.%Cpp.long, (constants.%ImplicitAs.impl_witness.bd4) [concrete = constants.%ImplicitAs.facet.3fe] // CHECK:STDOUT: %.loc19_5.1: %ImplicitAs.type.819 = converted constants.%Cpp.long, %ImplicitAs.facet.loc19_5.1 [concrete = constants.%ImplicitAs.facet.3fe] @@ -3044,7 +3052,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc19_5.3(%a.ref.loc19, %.loc19_8) // CHECK:STDOUT: %a.ref.loc20: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc20: ref %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc20: %.98f = impl_witness_access constants.%LeftShiftAssignWith.impl_witness.550, element0 [concrete = constants.%Cpp.long.as.LeftShiftAssignWith.impl.Op.216e26.2] +// CHECK:STDOUT: %impl.elem0.loc20: %.20f = impl_witness_access constants.%LeftShiftAssignWith.impl_witness.550, element0 [concrete = constants.%Cpp.long.as.LeftShiftAssignWith.impl.Op.216e26.2] // CHECK:STDOUT: %bound_method.loc20_5.1: = bound_method %a.ref.loc20, %impl.elem0.loc20 // CHECK:STDOUT: %ImplicitAs.facet.loc20_5.1: %ImplicitAs.type.819 = facet_value constants.%Cpp.long, (constants.%ImplicitAs.impl_witness.bd4) [concrete = constants.%ImplicitAs.facet.3fe] // CHECK:STDOUT: %.loc20_5.1: %ImplicitAs.type.819 = converted constants.%Cpp.long, %ImplicitAs.facet.loc20_5.1 [concrete = constants.%ImplicitAs.facet.3fe] @@ -3061,7 +3069,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc20_5.3(%a.ref.loc20, %.loc20_9) // CHECK:STDOUT: %a.ref.loc21: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc21: ref %Cpp.long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc21: %.918 = impl_witness_access constants.%RightShiftAssignWith.impl_witness.df5, element0 [concrete = constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.860e6c.2] +// CHECK:STDOUT: %impl.elem0.loc21: %.19a = impl_witness_access constants.%RightShiftAssignWith.impl_witness.df5, element0 [concrete = constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.860e6c.2] // CHECK:STDOUT: %bound_method.loc21_5.1: = bound_method %a.ref.loc21, %impl.elem0.loc21 // CHECK:STDOUT: %ImplicitAs.facet.loc21_5.1: %ImplicitAs.type.819 = facet_value constants.%Cpp.long, (constants.%ImplicitAs.impl_witness.bd4) [concrete = constants.%ImplicitAs.facet.3fe] // CHECK:STDOUT: %.loc21_5.1: %ImplicitAs.type.819 = converted constants.%Cpp.long, %ImplicitAs.facet.loc21_5.1 [concrete = constants.%ImplicitAs.facet.3fe] @@ -3095,16 +3103,15 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete] // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete] // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.eed: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.eed [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.6e8: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet.eed) [concrete] +// CHECK:STDOUT: %.c0c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.6e8, %ImplicitAs.facet.eed [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38 = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a [concrete] // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete] // CHECK:STDOUT: %AddAssignWith.type.794: type = facet_type <@AddAssignWith, @AddAssignWith(%i32)> [concrete] -// CHECK:STDOUT: %AddAssignWith.Op.type.6cd: type = fn_type @AddAssignWith.Op, @AddAssignWith(%i32) [concrete] // CHECK:STDOUT: %U.57d: %ImplicitAs.type.819 = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.9f3dfb.1: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.78f138.1: %Cpp.long.as.AddAssignWith.impl.Op.type.9f3dfb.1 = struct_value () [symbolic] @@ -3118,14 +3125,15 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.8bd196.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.d19046.2: %Cpp.long.as.AddAssignWith.impl.Op.type.8bd196.2 = struct_value () [concrete] // CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.794 = facet_value %Cpp.long, (%AddAssignWith.impl_witness.ca1) [concrete] -// CHECK:STDOUT: %.5e7: type = fn_type_with_self_type %AddAssignWith.Op.type.6cd, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.6a4: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith(%i32, %AddAssignWith.facet) [concrete] +// CHECK:STDOUT: %.3d2: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.6a4, %AddAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.2a1dd4.1: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.d19046.2, @Cpp.long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet.174) [concrete] -// CHECK:STDOUT: %.c45: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.174 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.9f0: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet.174) [concrete] +// CHECK:STDOUT: %.bb8: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.9f0, %ImplicitAs.facet.174 [concrete] // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.type: type = fn_type @i32.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert: %i32.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.2a1dd4.2: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.d19046.1, @Cpp.long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %SubAssignWith.type.ab0: type = facet_type <@SubAssignWith, @SubAssignWith(%i32)> [concrete] -// CHECK:STDOUT: %SubAssignWith.Op.type.c0c: type = fn_type @SubAssignWith.Op, @SubAssignWith(%i32) [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.type.1f2d1c.1: type = fn_type @Cpp.long.as.SubAssignWith.impl.Op.1, @Cpp.long.as.SubAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.c39240.1: %Cpp.long.as.SubAssignWith.impl.Op.type.1f2d1c.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.type.1f2d1c.2: type = fn_type @Cpp.long.as.SubAssignWith.impl.Op.2, @Cpp.long.as.SubAssignWith.impl(%U.57d) [symbolic] @@ -3136,11 +3144,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.type.f5cce2.2: type = fn_type @Cpp.long.as.SubAssignWith.impl.Op.1, @Cpp.long.as.SubAssignWith.impl(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.22e054.2: %Cpp.long.as.SubAssignWith.impl.Op.type.f5cce2.2 = struct_value () [concrete] // CHECK:STDOUT: %SubAssignWith.facet: %SubAssignWith.type.ab0 = facet_value %Cpp.long, (%SubAssignWith.impl_witness.200) [concrete] -// CHECK:STDOUT: %.f56: type = fn_type_with_self_type %SubAssignWith.Op.type.c0c, %SubAssignWith.facet [concrete] +// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.463: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith(%i32, %SubAssignWith.facet) [concrete] +// CHECK:STDOUT: %.432: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.463, %SubAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.specific_fn.dd31df.1: = specific_function %Cpp.long.as.SubAssignWith.impl.Op.22e054.2, @Cpp.long.as.SubAssignWith.impl.Op.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.specific_fn.dd31df.2: = specific_function %Cpp.long.as.SubAssignWith.impl.Op.22e054.1, @Cpp.long.as.SubAssignWith.impl.Op.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %MulAssignWith.type.743: type = facet_type <@MulAssignWith, @MulAssignWith(%i32)> [concrete] -// CHECK:STDOUT: %MulAssignWith.Op.type.7f1: type = fn_type @MulAssignWith.Op, @MulAssignWith(%i32) [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.type.afa7f7.1: type = fn_type @Cpp.long.as.MulAssignWith.impl.Op.1, @Cpp.long.as.MulAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.421374.1: %Cpp.long.as.MulAssignWith.impl.Op.type.afa7f7.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.type.afa7f7.2: type = fn_type @Cpp.long.as.MulAssignWith.impl.Op.2, @Cpp.long.as.MulAssignWith.impl(%U.57d) [symbolic] @@ -3151,11 +3159,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.type.d2f0ca.2: type = fn_type @Cpp.long.as.MulAssignWith.impl.Op.1, @Cpp.long.as.MulAssignWith.impl(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.8b6fd2.2: %Cpp.long.as.MulAssignWith.impl.Op.type.d2f0ca.2 = struct_value () [concrete] // CHECK:STDOUT: %MulAssignWith.facet: %MulAssignWith.type.743 = facet_value %Cpp.long, (%MulAssignWith.impl_witness.c16) [concrete] -// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %MulAssignWith.Op.type.7f1, %MulAssignWith.facet [concrete] +// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.7fa: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith(%i32, %MulAssignWith.facet) [concrete] +// CHECK:STDOUT: %.fbe: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.7fa, %MulAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.specific_fn.c127b2.1: = specific_function %Cpp.long.as.MulAssignWith.impl.Op.8b6fd2.2, @Cpp.long.as.MulAssignWith.impl.Op.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.specific_fn.c127b2.2: = specific_function %Cpp.long.as.MulAssignWith.impl.Op.8b6fd2.1, @Cpp.long.as.MulAssignWith.impl.Op.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %DivAssignWith.type.786: type = facet_type <@DivAssignWith, @DivAssignWith(%i32)> [concrete] -// CHECK:STDOUT: %DivAssignWith.Op.type.1bd: type = fn_type @DivAssignWith.Op, @DivAssignWith(%i32) [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.type.f3536d.1: type = fn_type @Cpp.long.as.DivAssignWith.impl.Op.1, @Cpp.long.as.DivAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.6227df.1: %Cpp.long.as.DivAssignWith.impl.Op.type.f3536d.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.type.f3536d.2: type = fn_type @Cpp.long.as.DivAssignWith.impl.Op.2, @Cpp.long.as.DivAssignWith.impl(%U.57d) [symbolic] @@ -3166,11 +3174,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.type.16271d.2: type = fn_type @Cpp.long.as.DivAssignWith.impl.Op.1, @Cpp.long.as.DivAssignWith.impl(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.2f8f46.2: %Cpp.long.as.DivAssignWith.impl.Op.type.16271d.2 = struct_value () [concrete] // CHECK:STDOUT: %DivAssignWith.facet: %DivAssignWith.type.786 = facet_value %Cpp.long, (%DivAssignWith.impl_witness.b4b) [concrete] -// CHECK:STDOUT: %.9a9: type = fn_type_with_self_type %DivAssignWith.Op.type.1bd, %DivAssignWith.facet [concrete] +// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.578: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith(%i32, %DivAssignWith.facet) [concrete] +// CHECK:STDOUT: %.2e1: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.578, %DivAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.specific_fn.ee65e7.1: = specific_function %Cpp.long.as.DivAssignWith.impl.Op.2f8f46.2, @Cpp.long.as.DivAssignWith.impl.Op.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.specific_fn.ee65e7.2: = specific_function %Cpp.long.as.DivAssignWith.impl.Op.2f8f46.1, @Cpp.long.as.DivAssignWith.impl.Op.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %ModAssignWith.type.e49: type = facet_type <@ModAssignWith, @ModAssignWith(%i32)> [concrete] -// CHECK:STDOUT: %ModAssignWith.Op.type.0ee: type = fn_type @ModAssignWith.Op, @ModAssignWith(%i32) [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.type.2d6972.1: type = fn_type @Cpp.long.as.ModAssignWith.impl.Op.1, @Cpp.long.as.ModAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.666e79.1: %Cpp.long.as.ModAssignWith.impl.Op.type.2d6972.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.type.2d6972.2: type = fn_type @Cpp.long.as.ModAssignWith.impl.Op.2, @Cpp.long.as.ModAssignWith.impl(%U.57d) [symbolic] @@ -3181,11 +3189,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.type.e2a2e6.2: type = fn_type @Cpp.long.as.ModAssignWith.impl.Op.1, @Cpp.long.as.ModAssignWith.impl(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.f69ad5.2: %Cpp.long.as.ModAssignWith.impl.Op.type.e2a2e6.2 = struct_value () [concrete] // CHECK:STDOUT: %ModAssignWith.facet: %ModAssignWith.type.e49 = facet_value %Cpp.long, (%ModAssignWith.impl_witness.a13) [concrete] -// CHECK:STDOUT: %.804: type = fn_type_with_self_type %ModAssignWith.Op.type.0ee, %ModAssignWith.facet [concrete] +// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.de5: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith(%i32, %ModAssignWith.facet) [concrete] +// CHECK:STDOUT: %.c03: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.de5, %ModAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.specific_fn.73e9bb.1: = specific_function %Cpp.long.as.ModAssignWith.impl.Op.f69ad5.2, @Cpp.long.as.ModAssignWith.impl.Op.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.specific_fn.73e9bb.2: = specific_function %Cpp.long.as.ModAssignWith.impl.Op.f69ad5.1, @Cpp.long.as.ModAssignWith.impl.Op.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %BitAndAssignWith.type.d65: type = facet_type <@BitAndAssignWith, @BitAndAssignWith(%i32)> [concrete] -// CHECK:STDOUT: %BitAndAssignWith.Op.type.e4f: type = fn_type @BitAndAssignWith.Op, @BitAndAssignWith(%i32) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.type.442dcf.1: type = fn_type @Cpp.long.as.BitAndAssignWith.impl.Op.1, @Cpp.long.as.BitAndAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.d99897.1: %Cpp.long.as.BitAndAssignWith.impl.Op.type.442dcf.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.type.442dcf.2: type = fn_type @Cpp.long.as.BitAndAssignWith.impl.Op.2, @Cpp.long.as.BitAndAssignWith.impl(%U.57d) [symbolic] @@ -3196,11 +3204,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.type.aa6f07.2: type = fn_type @Cpp.long.as.BitAndAssignWith.impl.Op.1, @Cpp.long.as.BitAndAssignWith.impl(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.5f705c.2: %Cpp.long.as.BitAndAssignWith.impl.Op.type.aa6f07.2 = struct_value () [concrete] // CHECK:STDOUT: %BitAndAssignWith.facet: %BitAndAssignWith.type.d65 = facet_value %Cpp.long, (%BitAndAssignWith.impl_witness.349) [concrete] -// CHECK:STDOUT: %.24e: type = fn_type_with_self_type %BitAndAssignWith.Op.type.e4f, %BitAndAssignWith.facet [concrete] +// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.f71: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith(%i32, %BitAndAssignWith.facet) [concrete] +// CHECK:STDOUT: %.a81: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.f71, %BitAndAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.specific_fn.560221.1: = specific_function %Cpp.long.as.BitAndAssignWith.impl.Op.5f705c.2, @Cpp.long.as.BitAndAssignWith.impl.Op.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.specific_fn.560221.2: = specific_function %Cpp.long.as.BitAndAssignWith.impl.Op.5f705c.1, @Cpp.long.as.BitAndAssignWith.impl.Op.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %BitOrAssignWith.type.6e9: type = facet_type <@BitOrAssignWith, @BitOrAssignWith(%i32)> [concrete] -// CHECK:STDOUT: %BitOrAssignWith.Op.type.9af: type = fn_type @BitOrAssignWith.Op, @BitOrAssignWith(%i32) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.type.219f14.1: type = fn_type @Cpp.long.as.BitOrAssignWith.impl.Op.1, @Cpp.long.as.BitOrAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.e5afa1.1: %Cpp.long.as.BitOrAssignWith.impl.Op.type.219f14.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.type.219f14.2: type = fn_type @Cpp.long.as.BitOrAssignWith.impl.Op.2, @Cpp.long.as.BitOrAssignWith.impl(%U.57d) [symbolic] @@ -3211,11 +3219,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.type.fac636.2: type = fn_type @Cpp.long.as.BitOrAssignWith.impl.Op.1, @Cpp.long.as.BitOrAssignWith.impl(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.73e223.2: %Cpp.long.as.BitOrAssignWith.impl.Op.type.fac636.2 = struct_value () [concrete] // CHECK:STDOUT: %BitOrAssignWith.facet: %BitOrAssignWith.type.6e9 = facet_value %Cpp.long, (%BitOrAssignWith.impl_witness.119) [concrete] -// CHECK:STDOUT: %.b0b: type = fn_type_with_self_type %BitOrAssignWith.Op.type.9af, %BitOrAssignWith.facet [concrete] +// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.b79: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith(%i32, %BitOrAssignWith.facet) [concrete] +// CHECK:STDOUT: %.1f8: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.b79, %BitOrAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.specific_fn.665975.1: = specific_function %Cpp.long.as.BitOrAssignWith.impl.Op.73e223.2, @Cpp.long.as.BitOrAssignWith.impl.Op.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.specific_fn.665975.2: = specific_function %Cpp.long.as.BitOrAssignWith.impl.Op.73e223.1, @Cpp.long.as.BitOrAssignWith.impl.Op.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %BitXorAssignWith.type.ea8: type = facet_type <@BitXorAssignWith, @BitXorAssignWith(%i32)> [concrete] -// CHECK:STDOUT: %BitXorAssignWith.Op.type.a60: type = fn_type @BitXorAssignWith.Op, @BitXorAssignWith(%i32) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.type.8b07a5.1: type = fn_type @Cpp.long.as.BitXorAssignWith.impl.Op.1, @Cpp.long.as.BitXorAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.3c4d0d.1: %Cpp.long.as.BitXorAssignWith.impl.Op.type.8b07a5.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.type.8b07a5.2: type = fn_type @Cpp.long.as.BitXorAssignWith.impl.Op.2, @Cpp.long.as.BitXorAssignWith.impl(%U.57d) [symbolic] @@ -3226,11 +3234,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.type.53faad.2: type = fn_type @Cpp.long.as.BitXorAssignWith.impl.Op.1, @Cpp.long.as.BitXorAssignWith.impl(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.616e38.2: %Cpp.long.as.BitXorAssignWith.impl.Op.type.53faad.2 = struct_value () [concrete] // CHECK:STDOUT: %BitXorAssignWith.facet: %BitXorAssignWith.type.ea8 = facet_value %Cpp.long, (%BitXorAssignWith.impl_witness.5aa) [concrete] -// CHECK:STDOUT: %.528: type = fn_type_with_self_type %BitXorAssignWith.Op.type.a60, %BitXorAssignWith.facet [concrete] +// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.291: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith(%i32, %BitXorAssignWith.facet) [concrete] +// CHECK:STDOUT: %.9ab: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.291, %BitXorAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.specific_fn.4cd193.1: = specific_function %Cpp.long.as.BitXorAssignWith.impl.Op.616e38.2, @Cpp.long.as.BitXorAssignWith.impl.Op.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.specific_fn.4cd193.2: = specific_function %Cpp.long.as.BitXorAssignWith.impl.Op.616e38.1, @Cpp.long.as.BitXorAssignWith.impl.Op.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.type.92b: type = facet_type <@LeftShiftAssignWith, @LeftShiftAssignWith(%i32)> [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.Op.type.ba8: type = fn_type @LeftShiftAssignWith.Op, @LeftShiftAssignWith(%i32) [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.21420b.1: type = fn_type @Cpp.long.as.LeftShiftAssignWith.impl.Op.1, @Cpp.long.as.LeftShiftAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.e204a3.1: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.21420b.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.21420b.2: type = fn_type @Cpp.long.as.LeftShiftAssignWith.impl.Op.2, @Cpp.long.as.LeftShiftAssignWith.impl(%U.57d) [symbolic] @@ -3241,11 +3249,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.426a0e.2: type = fn_type @Cpp.long.as.LeftShiftAssignWith.impl.Op.1, @Cpp.long.as.LeftShiftAssignWith.impl(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.e25b25.2: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.426a0e.2 = struct_value () [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.facet: %LeftShiftAssignWith.type.92b = facet_value %Cpp.long, (%LeftShiftAssignWith.impl_witness.199) [concrete] -// CHECK:STDOUT: %.0a6: type = fn_type_with_self_type %LeftShiftAssignWith.Op.type.ba8, %LeftShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.706: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith(%i32, %LeftShiftAssignWith.facet) [concrete] +// CHECK:STDOUT: %.424: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.706, %LeftShiftAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.specific_fn.3bd66d.1: = specific_function %Cpp.long.as.LeftShiftAssignWith.impl.Op.e25b25.2, @Cpp.long.as.LeftShiftAssignWith.impl.Op.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.specific_fn.3bd66d.2: = specific_function %Cpp.long.as.LeftShiftAssignWith.impl.Op.e25b25.1, @Cpp.long.as.LeftShiftAssignWith.impl.Op.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %RightShiftAssignWith.type.8ae: type = facet_type <@RightShiftAssignWith, @RightShiftAssignWith(%i32)> [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.Op.type.011: type = fn_type @RightShiftAssignWith.Op, @RightShiftAssignWith(%i32) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.f850d3.1: type = fn_type @Cpp.long.as.RightShiftAssignWith.impl.Op.1, @Cpp.long.as.RightShiftAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.328772.1: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.f850d3.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.f850d3.2: type = fn_type @Cpp.long.as.RightShiftAssignWith.impl.Op.2, @Cpp.long.as.RightShiftAssignWith.impl(%U.57d) [symbolic] @@ -3256,7 +3264,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.f2dfa9.2: type = fn_type @Cpp.long.as.RightShiftAssignWith.impl.Op.1, @Cpp.long.as.RightShiftAssignWith.impl(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.56db42.2: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.f2dfa9.2 = struct_value () [concrete] // CHECK:STDOUT: %RightShiftAssignWith.facet: %RightShiftAssignWith.type.8ae = facet_value %Cpp.long, (%RightShiftAssignWith.impl_witness.e4e) [concrete] -// CHECK:STDOUT: %.6ef: type = fn_type_with_self_type %RightShiftAssignWith.Op.type.011, %RightShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.e38: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith(%i32, %RightShiftAssignWith.facet) [concrete] +// CHECK:STDOUT: %.eaa: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.e38, %RightShiftAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.11c3db.1: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.56db42.2, @Cpp.long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.11c3db.2: = specific_function %Cpp.long.as.RightShiftAssignWith.impl.Op.56db42.1, @Cpp.long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -3313,7 +3322,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.long = var %a.var_patt // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc9: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc9: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc9_3: init %Cpp.long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.5a4] @@ -3325,7 +3334,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a: ref %Cpp.long = ref_binding a, %a.var // CHECK:STDOUT: %a.ref.loc10: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc10: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc10_5.1: %.5e7 = impl_witness_access constants.%AddAssignWith.impl_witness.ca1, element0 [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.d19046.2] +// CHECK:STDOUT: %impl.elem0.loc10_5.1: %.3d2 = impl_witness_access constants.%AddAssignWith.impl_witness.ca1, element0 [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.d19046.2] // CHECK:STDOUT: %bound_method.loc10_5.1: = bound_method %a.ref.loc10, %impl.elem0.loc10_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc10_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc10_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc10_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -3336,14 +3345,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc10_5.3: %Cpp.long.as.AddAssignWith.impl.Op.type.8bd196.1 = specific_constant imports.%Core.Op.f81, @Cpp.long.as.AddAssignWith.impl(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.d19046.1] // CHECK:STDOUT: %Op.ref.loc10: %Cpp.long.as.AddAssignWith.impl.Op.type.8bd196.1 = name_ref Op, %.loc10_5.3 [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.d19046.1] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.bound: = bound_method %a.ref.loc10, %Op.ref.loc10 -// CHECK:STDOUT: %impl.elem0.loc10_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_5.3: = bound_method %b.ref.loc10, %impl.elem0.loc10_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc10_5: init %Cpp.long = call %bound_method.loc10_5.3(%b.ref.loc10) // CHECK:STDOUT: %.loc10_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc10_5 // CHECK:STDOUT: %.loc10_5.5: %Cpp.long = converted %b.ref.loc10, %.loc10_5.4 // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc10, @Cpp.long.as.AddAssignWith.impl.Op.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.specific_fn.2a1dd4.2] // CHECK:STDOUT: %bound_method.loc10_5.4: = bound_method %a.ref.loc10, %Cpp.long.as.AddAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc10_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_8: = bound_method %b.ref.loc10, %impl.elem0.loc10_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc10_8: init %Cpp.long = call %bound_method.loc10_8(%b.ref.loc10) // CHECK:STDOUT: %.loc10_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc10_8 @@ -3351,7 +3360,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_5.4(%a.ref.loc10, %.loc10_8.2) // CHECK:STDOUT: %a.ref.loc11: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc11: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc11_5.1: %.f56 = impl_witness_access constants.%SubAssignWith.impl_witness.200, element0 [concrete = constants.%Cpp.long.as.SubAssignWith.impl.Op.22e054.2] +// CHECK:STDOUT: %impl.elem0.loc11_5.1: %.432 = impl_witness_access constants.%SubAssignWith.impl_witness.200, element0 [concrete = constants.%Cpp.long.as.SubAssignWith.impl.Op.22e054.2] // CHECK:STDOUT: %bound_method.loc11_5.1: = bound_method %a.ref.loc11, %impl.elem0.loc11_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc11_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc11_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc11_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -3362,14 +3371,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc11_5.3: %Cpp.long.as.SubAssignWith.impl.Op.type.f5cce2.1 = specific_constant imports.%Core.Op.739, @Cpp.long.as.SubAssignWith.impl(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.SubAssignWith.impl.Op.22e054.1] // CHECK:STDOUT: %Op.ref.loc11: %Cpp.long.as.SubAssignWith.impl.Op.type.f5cce2.1 = name_ref Op, %.loc11_5.3 [concrete = constants.%Cpp.long.as.SubAssignWith.impl.Op.22e054.1] // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.bound: = bound_method %a.ref.loc11, %Op.ref.loc11 -// CHECK:STDOUT: %impl.elem0.loc11_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc11_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc11_5.3: = bound_method %b.ref.loc11, %impl.elem0.loc11_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc11_5: init %Cpp.long = call %bound_method.loc11_5.3(%b.ref.loc11) // CHECK:STDOUT: %.loc11_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc11_5 // CHECK:STDOUT: %.loc11_5.5: %Cpp.long = converted %b.ref.loc11, %.loc11_5.4 // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc11, @Cpp.long.as.SubAssignWith.impl.Op.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.SubAssignWith.impl.Op.specific_fn.dd31df.2] // CHECK:STDOUT: %bound_method.loc11_5.4: = bound_method %a.ref.loc11, %Cpp.long.as.SubAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc11_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc11_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc11_8: = bound_method %b.ref.loc11, %impl.elem0.loc11_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc11_8: init %Cpp.long = call %bound_method.loc11_8(%b.ref.loc11) // CHECK:STDOUT: %.loc11_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc11_8 @@ -3377,7 +3386,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc11_5.4(%a.ref.loc11, %.loc11_8.2) // CHECK:STDOUT: %a.ref.loc12: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc12: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc12_5.1: %.d15 = impl_witness_access constants.%MulAssignWith.impl_witness.c16, element0 [concrete = constants.%Cpp.long.as.MulAssignWith.impl.Op.8b6fd2.2] +// CHECK:STDOUT: %impl.elem0.loc12_5.1: %.fbe = impl_witness_access constants.%MulAssignWith.impl_witness.c16, element0 [concrete = constants.%Cpp.long.as.MulAssignWith.impl.Op.8b6fd2.2] // CHECK:STDOUT: %bound_method.loc12_5.1: = bound_method %a.ref.loc12, %impl.elem0.loc12_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc12_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc12_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc12_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -3388,14 +3397,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc12_5.3: %Cpp.long.as.MulAssignWith.impl.Op.type.d2f0ca.1 = specific_constant imports.%Core.Op.3b8, @Cpp.long.as.MulAssignWith.impl(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.MulAssignWith.impl.Op.8b6fd2.1] // CHECK:STDOUT: %Op.ref.loc12: %Cpp.long.as.MulAssignWith.impl.Op.type.d2f0ca.1 = name_ref Op, %.loc12_5.3 [concrete = constants.%Cpp.long.as.MulAssignWith.impl.Op.8b6fd2.1] // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.bound: = bound_method %a.ref.loc12, %Op.ref.loc12 -// CHECK:STDOUT: %impl.elem0.loc12_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc12_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc12_5.3: = bound_method %b.ref.loc12, %impl.elem0.loc12_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc12_5: init %Cpp.long = call %bound_method.loc12_5.3(%b.ref.loc12) // CHECK:STDOUT: %.loc12_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc12_5 // CHECK:STDOUT: %.loc12_5.5: %Cpp.long = converted %b.ref.loc12, %.loc12_5.4 // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc12, @Cpp.long.as.MulAssignWith.impl.Op.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.MulAssignWith.impl.Op.specific_fn.c127b2.2] // CHECK:STDOUT: %bound_method.loc12_5.4: = bound_method %a.ref.loc12, %Cpp.long.as.MulAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc12_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc12_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc12_8: = bound_method %b.ref.loc12, %impl.elem0.loc12_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc12_8: init %Cpp.long = call %bound_method.loc12_8(%b.ref.loc12) // CHECK:STDOUT: %.loc12_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc12_8 @@ -3403,7 +3412,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc12_5.4(%a.ref.loc12, %.loc12_8.2) // CHECK:STDOUT: %a.ref.loc13: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc13: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc13_5.1: %.9a9 = impl_witness_access constants.%DivAssignWith.impl_witness.b4b, element0 [concrete = constants.%Cpp.long.as.DivAssignWith.impl.Op.2f8f46.2] +// CHECK:STDOUT: %impl.elem0.loc13_5.1: %.2e1 = impl_witness_access constants.%DivAssignWith.impl_witness.b4b, element0 [concrete = constants.%Cpp.long.as.DivAssignWith.impl.Op.2f8f46.2] // CHECK:STDOUT: %bound_method.loc13_5.1: = bound_method %a.ref.loc13, %impl.elem0.loc13_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc13_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc13_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc13_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -3414,14 +3423,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc13_5.3: %Cpp.long.as.DivAssignWith.impl.Op.type.16271d.1 = specific_constant imports.%Core.Op.f47, @Cpp.long.as.DivAssignWith.impl(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.DivAssignWith.impl.Op.2f8f46.1] // CHECK:STDOUT: %Op.ref.loc13: %Cpp.long.as.DivAssignWith.impl.Op.type.16271d.1 = name_ref Op, %.loc13_5.3 [concrete = constants.%Cpp.long.as.DivAssignWith.impl.Op.2f8f46.1] // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.bound: = bound_method %a.ref.loc13, %Op.ref.loc13 -// CHECK:STDOUT: %impl.elem0.loc13_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc13_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc13_5.3: = bound_method %b.ref.loc13, %impl.elem0.loc13_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc13_5: init %Cpp.long = call %bound_method.loc13_5.3(%b.ref.loc13) // CHECK:STDOUT: %.loc13_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc13_5 // CHECK:STDOUT: %.loc13_5.5: %Cpp.long = converted %b.ref.loc13, %.loc13_5.4 // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc13, @Cpp.long.as.DivAssignWith.impl.Op.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.DivAssignWith.impl.Op.specific_fn.ee65e7.2] // CHECK:STDOUT: %bound_method.loc13_5.4: = bound_method %a.ref.loc13, %Cpp.long.as.DivAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc13_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc13_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc13_8: = bound_method %b.ref.loc13, %impl.elem0.loc13_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc13_8: init %Cpp.long = call %bound_method.loc13_8(%b.ref.loc13) // CHECK:STDOUT: %.loc13_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc13_8 @@ -3429,7 +3438,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc13_5.4(%a.ref.loc13, %.loc13_8.2) // CHECK:STDOUT: %a.ref.loc14: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc14: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc14_5.1: %.804 = impl_witness_access constants.%ModAssignWith.impl_witness.a13, element0 [concrete = constants.%Cpp.long.as.ModAssignWith.impl.Op.f69ad5.2] +// CHECK:STDOUT: %impl.elem0.loc14_5.1: %.c03 = impl_witness_access constants.%ModAssignWith.impl_witness.a13, element0 [concrete = constants.%Cpp.long.as.ModAssignWith.impl.Op.f69ad5.2] // CHECK:STDOUT: %bound_method.loc14_5.1: = bound_method %a.ref.loc14, %impl.elem0.loc14_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc14_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc14_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc14_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -3440,14 +3449,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc14_5.3: %Cpp.long.as.ModAssignWith.impl.Op.type.e2a2e6.1 = specific_constant imports.%Core.Op.b37, @Cpp.long.as.ModAssignWith.impl(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.ModAssignWith.impl.Op.f69ad5.1] // CHECK:STDOUT: %Op.ref.loc14: %Cpp.long.as.ModAssignWith.impl.Op.type.e2a2e6.1 = name_ref Op, %.loc14_5.3 [concrete = constants.%Cpp.long.as.ModAssignWith.impl.Op.f69ad5.1] // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.bound: = bound_method %a.ref.loc14, %Op.ref.loc14 -// CHECK:STDOUT: %impl.elem0.loc14_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc14_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc14_5.3: = bound_method %b.ref.loc14, %impl.elem0.loc14_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc14_5: init %Cpp.long = call %bound_method.loc14_5.3(%b.ref.loc14) // CHECK:STDOUT: %.loc14_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc14_5 // CHECK:STDOUT: %.loc14_5.5: %Cpp.long = converted %b.ref.loc14, %.loc14_5.4 // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc14, @Cpp.long.as.ModAssignWith.impl.Op.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.ModAssignWith.impl.Op.specific_fn.73e9bb.2] // CHECK:STDOUT: %bound_method.loc14_5.4: = bound_method %a.ref.loc14, %Cpp.long.as.ModAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc14_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc14_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc14_8: = bound_method %b.ref.loc14, %impl.elem0.loc14_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc14_8: init %Cpp.long = call %bound_method.loc14_8(%b.ref.loc14) // CHECK:STDOUT: %.loc14_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc14_8 @@ -3455,7 +3464,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc14_5.4(%a.ref.loc14, %.loc14_8.2) // CHECK:STDOUT: %a.ref.loc16: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc16: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc16_5.1: %.24e = impl_witness_access constants.%BitAndAssignWith.impl_witness.349, element0 [concrete = constants.%Cpp.long.as.BitAndAssignWith.impl.Op.5f705c.2] +// CHECK:STDOUT: %impl.elem0.loc16_5.1: %.a81 = impl_witness_access constants.%BitAndAssignWith.impl_witness.349, element0 [concrete = constants.%Cpp.long.as.BitAndAssignWith.impl.Op.5f705c.2] // CHECK:STDOUT: %bound_method.loc16_5.1: = bound_method %a.ref.loc16, %impl.elem0.loc16_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc16_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc16_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc16_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -3466,14 +3475,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc16_5.3: %Cpp.long.as.BitAndAssignWith.impl.Op.type.aa6f07.1 = specific_constant imports.%Core.Op.fe8, @Cpp.long.as.BitAndAssignWith.impl(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.BitAndAssignWith.impl.Op.5f705c.1] // CHECK:STDOUT: %Op.ref.loc16: %Cpp.long.as.BitAndAssignWith.impl.Op.type.aa6f07.1 = name_ref Op, %.loc16_5.3 [concrete = constants.%Cpp.long.as.BitAndAssignWith.impl.Op.5f705c.1] // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.bound: = bound_method %a.ref.loc16, %Op.ref.loc16 -// CHECK:STDOUT: %impl.elem0.loc16_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc16_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc16_5.3: = bound_method %b.ref.loc16, %impl.elem0.loc16_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc16_5: init %Cpp.long = call %bound_method.loc16_5.3(%b.ref.loc16) // CHECK:STDOUT: %.loc16_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc16_5 // CHECK:STDOUT: %.loc16_5.5: %Cpp.long = converted %b.ref.loc16, %.loc16_5.4 // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc16, @Cpp.long.as.BitAndAssignWith.impl.Op.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.BitAndAssignWith.impl.Op.specific_fn.560221.2] // CHECK:STDOUT: %bound_method.loc16_5.4: = bound_method %a.ref.loc16, %Cpp.long.as.BitAndAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc16_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc16_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc16_8: = bound_method %b.ref.loc16, %impl.elem0.loc16_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc16_8: init %Cpp.long = call %bound_method.loc16_8(%b.ref.loc16) // CHECK:STDOUT: %.loc16_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc16_8 @@ -3481,7 +3490,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc16_5.4(%a.ref.loc16, %.loc16_8.2) // CHECK:STDOUT: %a.ref.loc17: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc17: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc17_5.1: %.b0b = impl_witness_access constants.%BitOrAssignWith.impl_witness.119, element0 [concrete = constants.%Cpp.long.as.BitOrAssignWith.impl.Op.73e223.2] +// CHECK:STDOUT: %impl.elem0.loc17_5.1: %.1f8 = impl_witness_access constants.%BitOrAssignWith.impl_witness.119, element0 [concrete = constants.%Cpp.long.as.BitOrAssignWith.impl.Op.73e223.2] // CHECK:STDOUT: %bound_method.loc17_5.1: = bound_method %a.ref.loc17, %impl.elem0.loc17_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc17_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc17_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc17_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -3492,14 +3501,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc17_5.3: %Cpp.long.as.BitOrAssignWith.impl.Op.type.fac636.1 = specific_constant imports.%Core.Op.5c2, @Cpp.long.as.BitOrAssignWith.impl(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.BitOrAssignWith.impl.Op.73e223.1] // CHECK:STDOUT: %Op.ref.loc17: %Cpp.long.as.BitOrAssignWith.impl.Op.type.fac636.1 = name_ref Op, %.loc17_5.3 [concrete = constants.%Cpp.long.as.BitOrAssignWith.impl.Op.73e223.1] // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.bound: = bound_method %a.ref.loc17, %Op.ref.loc17 -// CHECK:STDOUT: %impl.elem0.loc17_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc17_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc17_5.3: = bound_method %b.ref.loc17, %impl.elem0.loc17_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc17_5: init %Cpp.long = call %bound_method.loc17_5.3(%b.ref.loc17) // CHECK:STDOUT: %.loc17_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc17_5 // CHECK:STDOUT: %.loc17_5.5: %Cpp.long = converted %b.ref.loc17, %.loc17_5.4 // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc17, @Cpp.long.as.BitOrAssignWith.impl.Op.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.BitOrAssignWith.impl.Op.specific_fn.665975.2] // CHECK:STDOUT: %bound_method.loc17_5.4: = bound_method %a.ref.loc17, %Cpp.long.as.BitOrAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc17_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc17_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc17_8: = bound_method %b.ref.loc17, %impl.elem0.loc17_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc17_8: init %Cpp.long = call %bound_method.loc17_8(%b.ref.loc17) // CHECK:STDOUT: %.loc17_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc17_8 @@ -3507,7 +3516,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc17_5.4(%a.ref.loc17, %.loc17_8.2) // CHECK:STDOUT: %a.ref.loc18: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc18: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc18_5.1: %.528 = impl_witness_access constants.%BitXorAssignWith.impl_witness.5aa, element0 [concrete = constants.%Cpp.long.as.BitXorAssignWith.impl.Op.616e38.2] +// CHECK:STDOUT: %impl.elem0.loc18_5.1: %.9ab = impl_witness_access constants.%BitXorAssignWith.impl_witness.5aa, element0 [concrete = constants.%Cpp.long.as.BitXorAssignWith.impl.Op.616e38.2] // CHECK:STDOUT: %bound_method.loc18_5.1: = bound_method %a.ref.loc18, %impl.elem0.loc18_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc18_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc18_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc18_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -3518,14 +3527,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc18_5.3: %Cpp.long.as.BitXorAssignWith.impl.Op.type.53faad.1 = specific_constant imports.%Core.Op.caf, @Cpp.long.as.BitXorAssignWith.impl(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.BitXorAssignWith.impl.Op.616e38.1] // CHECK:STDOUT: %Op.ref.loc18: %Cpp.long.as.BitXorAssignWith.impl.Op.type.53faad.1 = name_ref Op, %.loc18_5.3 [concrete = constants.%Cpp.long.as.BitXorAssignWith.impl.Op.616e38.1] // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.bound: = bound_method %a.ref.loc18, %Op.ref.loc18 -// CHECK:STDOUT: %impl.elem0.loc18_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc18_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc18_5.3: = bound_method %b.ref.loc18, %impl.elem0.loc18_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc18_5: init %Cpp.long = call %bound_method.loc18_5.3(%b.ref.loc18) // CHECK:STDOUT: %.loc18_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc18_5 // CHECK:STDOUT: %.loc18_5.5: %Cpp.long = converted %b.ref.loc18, %.loc18_5.4 // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc18, @Cpp.long.as.BitXorAssignWith.impl.Op.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.BitXorAssignWith.impl.Op.specific_fn.4cd193.2] // CHECK:STDOUT: %bound_method.loc18_5.4: = bound_method %a.ref.loc18, %Cpp.long.as.BitXorAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc18_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc18_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc18_8: = bound_method %b.ref.loc18, %impl.elem0.loc18_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc18_8: init %Cpp.long = call %bound_method.loc18_8(%b.ref.loc18) // CHECK:STDOUT: %.loc18_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc18_8 @@ -3533,7 +3542,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18_5.4(%a.ref.loc18, %.loc18_8.2) // CHECK:STDOUT: %a.ref.loc19: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc19: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc19_5.1: %.0a6 = impl_witness_access constants.%LeftShiftAssignWith.impl_witness.199, element0 [concrete = constants.%Cpp.long.as.LeftShiftAssignWith.impl.Op.e25b25.2] +// CHECK:STDOUT: %impl.elem0.loc19_5.1: %.424 = impl_witness_access constants.%LeftShiftAssignWith.impl_witness.199, element0 [concrete = constants.%Cpp.long.as.LeftShiftAssignWith.impl.Op.e25b25.2] // CHECK:STDOUT: %bound_method.loc19_5.1: = bound_method %a.ref.loc19, %impl.elem0.loc19_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc19_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc19_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc19_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -3544,14 +3553,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc19_5.3: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.426a0e.1 = specific_constant imports.%Core.Op.030, @Cpp.long.as.LeftShiftAssignWith.impl(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.LeftShiftAssignWith.impl.Op.e25b25.1] // CHECK:STDOUT: %Op.ref.loc19: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type.426a0e.1 = name_ref Op, %.loc19_5.3 [concrete = constants.%Cpp.long.as.LeftShiftAssignWith.impl.Op.e25b25.1] // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.bound: = bound_method %a.ref.loc19, %Op.ref.loc19 -// CHECK:STDOUT: %impl.elem0.loc19_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc19_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc19_5.3: = bound_method %b.ref.loc19, %impl.elem0.loc19_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc19_5: init %Cpp.long = call %bound_method.loc19_5.3(%b.ref.loc19) // CHECK:STDOUT: %.loc19_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc19_5 // CHECK:STDOUT: %.loc19_5.5: %Cpp.long = converted %b.ref.loc19, %.loc19_5.4 // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc19, @Cpp.long.as.LeftShiftAssignWith.impl.Op.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.LeftShiftAssignWith.impl.Op.specific_fn.3bd66d.2] // CHECK:STDOUT: %bound_method.loc19_5.4: = bound_method %a.ref.loc19, %Cpp.long.as.LeftShiftAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc19_9: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc19_9: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc19_9: = bound_method %b.ref.loc19, %impl.elem0.loc19_9 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc19_9: init %Cpp.long = call %bound_method.loc19_9(%b.ref.loc19) // CHECK:STDOUT: %.loc19_9.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc19_9 @@ -3559,7 +3568,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc19_5.4(%a.ref.loc19, %.loc19_9.2) // CHECK:STDOUT: %a.ref.loc20: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc20: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc20_5.1: %.6ef = impl_witness_access constants.%RightShiftAssignWith.impl_witness.e4e, element0 [concrete = constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.56db42.2] +// CHECK:STDOUT: %impl.elem0.loc20_5.1: %.eaa = impl_witness_access constants.%RightShiftAssignWith.impl_witness.e4e, element0 [concrete = constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.56db42.2] // CHECK:STDOUT: %bound_method.loc20_5.1: = bound_method %a.ref.loc20, %impl.elem0.loc20_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc20_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc20_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc20_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -3570,14 +3579,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc20_5.3: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.f2dfa9.1 = specific_constant imports.%Core.Op.3b5, @Cpp.long.as.RightShiftAssignWith.impl(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.56db42.1] // CHECK:STDOUT: %Op.ref.loc20: %Cpp.long.as.RightShiftAssignWith.impl.Op.type.f2dfa9.1 = name_ref Op, %.loc20_5.3 [concrete = constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.56db42.1] // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.bound: = bound_method %a.ref.loc20, %Op.ref.loc20 -// CHECK:STDOUT: %impl.elem0.loc20_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc20_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc20_5.3: = bound_method %b.ref.loc20, %impl.elem0.loc20_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc20_5: init %Cpp.long = call %bound_method.loc20_5.3(%b.ref.loc20) // CHECK:STDOUT: %.loc20_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc20_5 // CHECK:STDOUT: %.loc20_5.5: %Cpp.long = converted %b.ref.loc20, %.loc20_5.4 // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc20, @Cpp.long.as.RightShiftAssignWith.impl.Op.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn.11c3db.2] // CHECK:STDOUT: %bound_method.loc20_5.4: = bound_method %a.ref.loc20, %Cpp.long.as.RightShiftAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc20_9: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc20_9: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc20_9: = bound_method %b.ref.loc20, %impl.elem0.loc20_9 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc20_9: init %Cpp.long = call %bound_method.loc20_9(%b.ref.loc20) // CHECK:STDOUT: %.loc20_9.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc20_9 @@ -3598,16 +3607,15 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.6e8: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.c0c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.6e8, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete] // CHECK:STDOUT: %AddAssignWith.type.761: type = facet_type <@AddAssignWith, @AddAssignWith(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %AddAssignWith.Op.type.4fd: type = fn_type @AddAssignWith.Op, @AddAssignWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %U.57d: %ImplicitAs.type.819 = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.9f3dfb.1: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.78f138.1: %Cpp.long.as.AddAssignWith.impl.Op.type.9f3dfb.1 = struct_value () [symbolic] @@ -3619,7 +3627,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.a474b7.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.5fb128.2: %Cpp.long.as.AddAssignWith.impl.Op.type.a474b7.2 = struct_value () [concrete] // CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.761 = facet_value %Cpp.long, (%AddAssignWith.impl_witness.623) [concrete] -// CHECK:STDOUT: %.4b1: type = fn_type_with_self_type %AddAssignWith.Op.type.4fd, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.e1c: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith(Core.IntLiteral, %AddAssignWith.facet) [concrete] +// CHECK:STDOUT: %.2e2: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.e1c, %AddAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.3a3075.1: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.5fb128.2, @Cpp.long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.3a3075.2: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.5fb128.1, @Cpp.long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -3646,7 +3655,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.long = var %a.var_patt // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.5a4] @@ -3658,7 +3667,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a: ref %Cpp.long = ref_binding a, %a.var // CHECK:STDOUT: %a.ref: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc9_5.1: %.4b1 = impl_witness_access constants.%AddAssignWith.impl_witness.623, element0 [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.5fb128.2] +// CHECK:STDOUT: %impl.elem0.loc9_5.1: %.2e2 = impl_witness_access constants.%AddAssignWith.impl_witness.623, element0 [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.5fb128.2] // CHECK:STDOUT: %bound_method.loc9_5.1: = bound_method %a.ref, %impl.elem0.loc9_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc9_5.1: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.2ce) [concrete = constants.%ImplicitAs.facet] // CHECK:STDOUT: %.loc9_5.1: %ImplicitAs.type.819 = converted Core.IntLiteral, %ImplicitAs.facet.loc9_5.1 [concrete = constants.%ImplicitAs.facet] @@ -3669,14 +3678,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc9_5.3: %Cpp.long.as.AddAssignWith.impl.Op.type.a474b7.1 = specific_constant imports.%Core.Op.f81, @Cpp.long.as.AddAssignWith.impl(constants.%ImplicitAs.facet) [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.5fb128.1] // CHECK:STDOUT: %Op.ref: %Cpp.long.as.AddAssignWith.impl.Op.type.a474b7.1 = name_ref Op, %.loc9_5.3 [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.5fb128.1] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.bound: = bound_method %a.ref, %Op.ref -// CHECK:STDOUT: %impl.elem0.loc9_5.2: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc9_5.2: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc9_5.3: = bound_method %int_1.loc9, %impl.elem0.loc9_5.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_5: init %Cpp.long = call %bound_method.loc9_5.3(%int_1.loc9) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc9_5.4: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_5 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc9_5.5: %Cpp.long = converted %int_1.loc9, %.loc9_5.4 [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn: = specific_function %Op.ref, @Cpp.long.as.AddAssignWith.impl.Op.2(constants.%ImplicitAs.facet) [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.specific_fn.3a3075.2] // CHECK:STDOUT: %bound_method.loc9_5.4: = bound_method %a.ref, %Cpp.long.as.AddAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc9_8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc9_8: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc9_8: = bound_method %int_1.loc9, %impl.elem0.loc9_8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_8: init %Cpp.long = call %bound_method.loc9_8(%int_1.loc9) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc9_8.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_8 [concrete = constants.%int_1.5a4] @@ -3699,17 +3708,16 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.eed: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.eed [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.6e8: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet.eed) [concrete] +// CHECK:STDOUT: %.c0c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.6e8, %ImplicitAs.facet.eed [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38 = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a [concrete] // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.2, @Core.IntLiteral.as.ImplicitAs.impl.b2d(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -3717,13 +3725,13 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.2, @Core.IntLiteral.as.ImplicitAs.impl.b2d(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert.2(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %AddAssignWith.type.794: type = facet_type <@AddAssignWith, @AddAssignWith(%i32)> [concrete] -// CHECK:STDOUT: %AddAssignWith.Op.type.6cd: type = fn_type @AddAssignWith.Op, @AddAssignWith(%i32) [concrete] // CHECK:STDOUT: %U.57d: %ImplicitAs.type.819 = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.9f3dfb.1: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%U.57d) [symbolic] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.78f138.1: %Cpp.long.as.AddAssignWith.impl.Op.type.9f3dfb.1 = struct_value () [symbolic] @@ -3737,9 +3745,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type.8bd196.2: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op.1, @Cpp.long.as.AddAssignWith.impl(%ImplicitAs.facet.174) [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.d19046.2: %Cpp.long.as.AddAssignWith.impl.Op.type.8bd196.2 = struct_value () [concrete] // CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.794 = facet_value %Cpp.long, (%AddAssignWith.impl_witness.ca1) [concrete] -// CHECK:STDOUT: %.5e7: type = fn_type_with_self_type %AddAssignWith.Op.type.6cd, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.6a4: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith(%i32, %AddAssignWith.facet) [concrete] +// CHECK:STDOUT: %.3d2: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.6a4, %AddAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.2a1dd4.1: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.d19046.2, @Cpp.long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet.174) [concrete] -// CHECK:STDOUT: %.c45: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.174 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.9f0: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet.174) [concrete] +// CHECK:STDOUT: %.bb8: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.9f0, %ImplicitAs.facet.174 [concrete] // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.type: type = fn_type @i32.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert: %i32.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn.2a1dd4.2: = specific_function %Cpp.long.as.AddAssignWith.impl.Op.d19046.1, @Cpp.long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet.174) [concrete] @@ -3771,7 +3781,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.long = var %a.var_patt // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] +// CHECK:STDOUT: %impl.elem0.loc8: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.5a4] @@ -3789,7 +3799,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc9: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_16.1: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Core.IntLiteral.as.ImplicitAs.impl.Convert.2(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_16.2: = bound_method %int_1.loc9, %specific_fn.loc9 [concrete = constants.%bound_method] @@ -3799,7 +3809,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %b: %i32 = value_binding b, %.loc9_16.2 // CHECK:STDOUT: %a.ref: ref %Cpp.long = name_ref a, %a // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc10_5.1: %.5e7 = impl_witness_access constants.%AddAssignWith.impl_witness.ca1, element0 [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.d19046.2] +// CHECK:STDOUT: %impl.elem0.loc10_5.1: %.3d2 = impl_witness_access constants.%AddAssignWith.impl_witness.ca1, element0 [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.d19046.2] // CHECK:STDOUT: %bound_method.loc10_5.1: = bound_method %a.ref, %impl.elem0.loc10_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc10_5.1: %ImplicitAs.type.819 = facet_value constants.%i32, (constants.%ImplicitAs.impl_witness.0fc) [concrete = constants.%ImplicitAs.facet.174] // CHECK:STDOUT: %.loc10_5.1: %ImplicitAs.type.819 = converted constants.%i32, %ImplicitAs.facet.loc10_5.1 [concrete = constants.%ImplicitAs.facet.174] @@ -3810,14 +3820,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %.loc10_5.3: %Cpp.long.as.AddAssignWith.impl.Op.type.8bd196.1 = specific_constant imports.%Core.Op.f81, @Cpp.long.as.AddAssignWith.impl(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.d19046.1] // CHECK:STDOUT: %Op.ref: %Cpp.long.as.AddAssignWith.impl.Op.type.8bd196.1 = name_ref Op, %.loc10_5.3 [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.d19046.1] // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.bound: = bound_method %a.ref, %Op.ref -// CHECK:STDOUT: %impl.elem0.loc10_5.2: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_5.2: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_5.3: = bound_method %b.ref, %impl.elem0.loc10_5.2 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc10_5: init %Cpp.long = call %bound_method.loc10_5.3(%b.ref) // CHECK:STDOUT: %.loc10_5.4: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc10_5 // CHECK:STDOUT: %.loc10_5.5: %Cpp.long = converted %b.ref, %.loc10_5.4 // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.specific_fn: = specific_function %Op.ref, @Cpp.long.as.AddAssignWith.impl.Op.2(constants.%ImplicitAs.facet.174) [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op.specific_fn.2a1dd4.2] // CHECK:STDOUT: %bound_method.loc10_5.4: = bound_method %a.ref, %Cpp.long.as.AddAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc10_8: %.c45 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_8: %.bb8 = impl_witness_access constants.%ImplicitAs.impl_witness.0fc, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_8: = bound_method %b.ref, %impl.elem0.loc10_8 // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.call.loc10_8: init %Cpp.long = call %bound_method.loc10_8(%b.ref) // CHECK:STDOUT: %.loc10_8.1: %Cpp.long = value_of_initializer %i32.as.ImplicitAs.impl.Convert.call.loc10_8 @@ -3838,26 +3848,26 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete] -// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.6e8: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.c0c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.6e8, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] -// CHECK:STDOUT: %Inc.Op.type: type = fn_type @Inc.Op [concrete] // CHECK:STDOUT: %Inc.impl_witness: = impl_witness imports.%Inc.impl_witness_table [concrete] // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Cpp.long, (%Inc.impl_witness) [concrete] -// CHECK:STDOUT: %.153: type = fn_type_with_self_type %Inc.Op.type, %Inc.facet [concrete] +// CHECK:STDOUT: %Inc.WithSelf.Op.type.633: type = fn_type @Inc.WithSelf.Op, @Inc(%Inc.facet) [concrete] +// CHECK:STDOUT: %.314: type = fn_type_with_self_type %Inc.WithSelf.Op.type.633, %Inc.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.Inc.impl.Op.type: type = fn_type @Cpp.long.as.Inc.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long.as.Inc.impl.Op: %Cpp.long.as.Inc.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Dec.type: type = facet_type <@Dec> [concrete] -// CHECK:STDOUT: %Dec.Op.type: type = fn_type @Dec.Op [concrete] // CHECK:STDOUT: %Dec.impl_witness: = impl_witness imports.%Dec.impl_witness_table [concrete] // CHECK:STDOUT: %Dec.facet: %Dec.type = facet_value %Cpp.long, (%Dec.impl_witness) [concrete] -// CHECK:STDOUT: %.fff: type = fn_type_with_self_type %Dec.Op.type, %Dec.facet [concrete] +// CHECK:STDOUT: %Dec.WithSelf.Op.type.b87: type = fn_type @Dec.WithSelf.Op, @Dec(%Dec.facet) [concrete] +// CHECK:STDOUT: %.253: type = fn_type_with_self_type %Dec.WithSelf.Op.type.b87, %Dec.facet [concrete] // CHECK:STDOUT: %Cpp.long.as.Dec.impl.Op.type: type = fn_type @Cpp.long.as.Dec.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long.as.Dec.impl.Op: %Cpp.long.as.Dec.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -3885,7 +3895,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.long = var %a.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.c0c = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.5a4] // CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5a4] @@ -3896,11 +3906,11 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %Cpp.long = ref_binding a, %a.var // CHECK:STDOUT: %a.ref.loc9: ref %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc9: %.153 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Cpp.long.as.Inc.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc9: %.314 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Cpp.long.as.Inc.impl.Op] // CHECK:STDOUT: %bound_method.loc9: = bound_method %a.ref.loc9, %impl.elem0.loc9 // CHECK:STDOUT: %Cpp.long.as.Inc.impl.Op.call: init %empty_tuple.type = call %bound_method.loc9(%a.ref.loc9) // CHECK:STDOUT: %a.ref.loc10: ref %Cpp.long = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc10: %.fff = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%Cpp.long.as.Dec.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc10: %.253 = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%Cpp.long.as.Dec.impl.Op] // CHECK:STDOUT: %bound_method.loc10: = bound_method %a.ref.loc10, %impl.elem0.loc10 // CHECK:STDOUT: %Cpp.long.as.Dec.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10(%a.ref.loc10) // CHECK:STDOUT: %DestroyOp.bound: = bound_method %a.var, constants.%DestroyOp @@ -3925,14 +3935,12 @@ fn CopyUnsignedLong() { // 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.3c3: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.unsigned_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.691: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.unsigned_long) [concrete] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.146: type = facet_type <@ImplicitAs, @ImplicitAs(%u32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.92a: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.a19: = impl_witness imports.%ImplicitAs.impl_witness_table.5b5 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.66c: %ImplicitAs.type.3c3 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.a19) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %ImplicitAs.Convert.type.691, %ImplicitAs.facet.66c [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b7d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.unsigned_long, %ImplicitAs.facet.66c) [concrete] +// CHECK:STDOUT: %.541: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b7d, %ImplicitAs.facet.66c [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.71f: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.14b: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.71f = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.14b [concrete] @@ -3947,7 +3955,8 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %pattern_type.4a9: type = pattern_type %u32 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.e61: = impl_witness imports.%ImplicitAs.impl_witness_table.af7 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.3c4: %ImplicitAs.type.146 = facet_value %Cpp.unsigned_long, (%ImplicitAs.impl_witness.e61) [concrete] -// CHECK:STDOUT: %.da1: type = fn_type_with_self_type %ImplicitAs.Convert.type.92a, %ImplicitAs.facet.3c4 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.4ad: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%u32, %ImplicitAs.facet.3c4) [concrete] +// CHECK:STDOUT: %.5ab: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.4ad, %ImplicitAs.facet.3c4 [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.bef: type = fn_type @Cpp.unsigned_long.as.ImplicitAs.impl.Convert.1 [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.19d: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.bef = struct_value () [concrete] // CHECK:STDOUT: %UIntResult: type = class_type @UIntResult [concrete] @@ -3961,16 +3970,17 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.950: type = facet_type <@As, @As(%Cpp.unsigned_long)> [concrete] -// CHECK:STDOUT: %As.Convert.type.3ff: type = fn_type @As.Convert, @As(%Cpp.unsigned_long) [concrete] // CHECK:STDOUT: %As.impl_witness.d5f: = impl_witness imports.%As.impl_witness_table.f58 [concrete] // CHECK:STDOUT: %As.facet: %As.type.950 = facet_value Core.IntLiteral, (%As.impl_witness.d5f) [concrete] -// CHECK:STDOUT: %.80d: type = fn_type_with_self_type %As.Convert.type.3ff, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.cab: type = fn_type @As.WithSelf.Convert, @As(%Cpp.unsigned_long, %As.facet) [concrete] +// CHECK:STDOUT: %.59b: type = fn_type_with_self_type %As.WithSelf.Convert.type.cab, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.a13: = impl_witness imports.%ImplicitAs.impl_witness_table.50d [concrete] // CHECK:STDOUT: %ImplicitAs.facet.2f7: %ImplicitAs.type.139 = facet_value %Cpp.unsigned_long, (%ImplicitAs.impl_witness.a13) [concrete] -// CHECK:STDOUT: %.4f2: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.2f7 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.328: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.2f7) [concrete] +// CHECK:STDOUT: %.0db: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.328, %ImplicitAs.facet.2f7 [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.a9d: type = fn_type @Cpp.unsigned_long.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.e53: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.a9d = struct_value () [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.0ab, %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.e53 [concrete] @@ -3981,14 +3991,14 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete] -// CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e4d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f32.97e, %ImplicitAs.facet.945) [concrete] +// CHECK:STDOUT: %.98d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e4d, %ImplicitAs.facet.945 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -4068,7 +4078,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %Cpp.ref.loc15: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %unsigned_long.ref.loc15: type = name_ref unsigned_long, constants.%Cpp.unsigned_long [concrete = constants.%Cpp.unsigned_long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc15: %.6bf = impl_witness_access constants.%ImplicitAs.impl_witness.a19, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.14b] +// CHECK:STDOUT: %impl.elem0.loc15: %.541 = impl_witness_access constants.%ImplicitAs.impl_witness.a19, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.14b] // CHECK:STDOUT: %bound_method.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.unsigned_long = call %bound_method.loc15(%int_1.loc15) [concrete = constants.%int_1.0ab] // CHECK:STDOUT: %.loc15_46.1: %Cpp.unsigned_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.0ab] @@ -4126,7 +4136,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [concrete = constants.%u32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc21: %.da1 = impl_witness_access constants.%ImplicitAs.impl_witness.e61, element0 [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.19d] +// CHECK:STDOUT: %impl.elem0.loc21: %.5ab = impl_witness_access constants.%ImplicitAs.impl_witness.e61, element0 [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.19d] // CHECK:STDOUT: %bound_method.loc21: = bound_method %cpp_unsigned_long.ref.loc21, %impl.elem0.loc21 // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc21: init %u32 = call %bound_method.loc21(%cpp_unsigned_long.ref.loc21) // CHECK:STDOUT: %.loc21_25.1: %u32 = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc21 @@ -4156,7 +4166,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] // CHECK:STDOUT: %.loc24_52.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] -// CHECK:STDOUT: %impl.elem0.loc24_52: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc24_52: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc24_52.1: = bound_method %float, %impl.elem0.loc24_52 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc24_52, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc24_52.2: = bound_method %float, %specific_fn [concrete = constants.%bound_method] @@ -4174,12 +4184,12 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc24: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %unsigned_long.ref.loc24: type = name_ref unsigned_long, constants.%Cpp.unsigned_long [concrete = constants.%Cpp.unsigned_long] -// CHECK:STDOUT: %impl.elem0.loc24_23.1: %.80d = impl_witness_access constants.%As.impl_witness.d5f, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc24_23.1: %.59b = impl_witness_access constants.%As.impl_witness.d5f, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] // CHECK:STDOUT: %bound_method.loc24_23.1: = bound_method %int_1.loc24, %impl.elem0.loc24_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.unsigned_long = call %bound_method.loc24_23.1(%int_1.loc24) [concrete = constants.%int_1.0ab] // CHECK:STDOUT: %.loc24_23.1: %Cpp.unsigned_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.0ab] // CHECK:STDOUT: %.loc24_23.2: %Cpp.unsigned_long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.0ab] -// CHECK:STDOUT: %impl.elem0.loc24_23.2: %.4f2 = impl_witness_access constants.%ImplicitAs.impl_witness.a13, element0 [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.e53] +// CHECK:STDOUT: %impl.elem0.loc24_23.2: %.0db = impl_witness_access constants.%ImplicitAs.impl_witness.a13, element0 [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.e53] // CHECK:STDOUT: %bound_method.loc24_23.2: = bound_method %.loc24_23.2, %impl.elem0.loc24_23.2 [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc24: init Core.IntLiteral = call %bound_method.loc24_23.2(%.loc24_23.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8] @@ -4208,19 +4218,19 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %pattern_type.5b7: type = pattern_type %Cpp.unsigned_long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.3c3: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.unsigned_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.691: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.unsigned_long) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.a19: = impl_witness imports.%ImplicitAs.impl_witness_table.5b5 [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.3c3 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.a19) [concrete] -// CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %ImplicitAs.Convert.type.691, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b7d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.unsigned_long, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.541: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b7d, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.0ab: %Cpp.unsigned_long = int_value 1 [concrete] // CHECK:STDOUT: %Copy.impl_witness.ae3: = impl_witness imports.%Copy.impl_witness_table.36c [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Cpp.unsigned_long, (%Copy.impl_witness.ae3) [concrete] -// CHECK:STDOUT: %.5a2: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.973: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.f45: type = fn_type_with_self_type %Copy.WithSelf.Op.type.973, %Copy.facet [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.Copy.impl.Op.type: type = fn_type @Cpp.unsigned_long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.unsigned_long.as.Copy.impl.Op: %Cpp.unsigned_long.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -4246,7 +4256,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.unsigned_long = var %a.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.6bf = impl_witness_access constants.%ImplicitAs.impl_witness.a19, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.541 = impl_witness_access constants.%ImplicitAs.impl_witness.a19, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.unsigned_long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.0ab] // CHECK:STDOUT: %.loc8_3: init %Cpp.unsigned_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.0ab] @@ -4263,7 +4273,7 @@ fn CopyUnsignedLong() { // CHECK:STDOUT: %b.var: ref %Cpp.unsigned_long = var %b.var_patt // CHECK:STDOUT: %a.ref: ref %Cpp.unsigned_long = name_ref a, %a // CHECK:STDOUT: %.loc9_30: %Cpp.unsigned_long = acquire_value %a.ref -// CHECK:STDOUT: %impl.elem0.loc9: %.5a2 = impl_witness_access constants.%Copy.impl_witness.ae3, element0 [concrete = constants.%Cpp.unsigned_long.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc9: %.f45 = impl_witness_access constants.%Copy.impl_witness.ae3, element0 [concrete = constants.%Cpp.unsigned_long.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_30, %impl.elem0.loc9 // CHECK:STDOUT: %Cpp.unsigned_long.as.Copy.impl.Op.call: init %Cpp.unsigned_long = call %bound_method.loc9(%.loc9_30) // CHECK:STDOUT: assign %b.var, %Cpp.unsigned_long.as.Copy.impl.Op.call diff --git a/toolchain/check/testdata/interop/cpp/builtins.lp64.carbon b/toolchain/check/testdata/interop/cpp/builtins.lp64.carbon index 62fa43404b56..de040e6cbc13 100644 --- a/toolchain/check/testdata/interop/cpp/builtins.lp64.carbon +++ b/toolchain/check/testdata/interop/cpp/builtins.lp64.carbon @@ -616,12 +616,10 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %pattern_type.95b: type = pattern_type %i64 [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.2ad: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete] // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic] @@ -629,7 +627,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.d48: %ImplicitAs.type.2ad = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.556) [concrete] -// CHECK:STDOUT: %.567: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet.d48 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.4af: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i64, %ImplicitAs.facet.d48) [concrete] +// CHECK:STDOUT: %.a64: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.4af, %ImplicitAs.facet.d48 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.288: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -637,14 +636,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete] // CHECK:STDOUT: %As.type.229: type = facet_type <@As, @As(%i64)> [concrete] -// CHECK:STDOUT: %As.Convert.type.d57: type = fn_type @As.Convert, @As(%i64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.c71: = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.cee: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a54: %Core.IntLiteral.as.As.impl.Convert.type.cee = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.229 = facet_value Core.IntLiteral, (%As.impl_witness.c71) [concrete] -// CHECK:STDOUT: %.aba: type = fn_type_with_self_type %As.Convert.type.d57, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.188: type = fn_type @As.WithSelf.Convert, @As(%i64, %As.facet) [concrete] +// CHECK:STDOUT: %.fc7: type = fn_type_with_self_type %As.WithSelf.Convert.type.188, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a54 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a54, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.41b: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -652,7 +651,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.ccf: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.535: %Int.as.ImplicitAs.impl.Convert.type.ccf = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.234: %ImplicitAs.type.139 = facet_value %i64, (%ImplicitAs.impl_witness.e86) [concrete] -// CHECK:STDOUT: %.3aa: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.234 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b50: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.234) [concrete] +// CHECK:STDOUT: %.495: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b50, %ImplicitAs.facet.234 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.41a, %Int.as.ImplicitAs.impl.Convert.535 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.535, @Int.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.d1e: = bound_method %int_1.41a, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -663,14 +663,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete] -// CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e4d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f32.97e, %ImplicitAs.facet.945) [concrete] +// CHECK:STDOUT: %.98d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e4d, %ImplicitAs.facet.945 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.1e4: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -706,7 +706,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: // CHECK:STDOUT: %long.ref.loc8: type = name_ref long, %i64.1 [concrete = constants.%i64] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc8: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] +// CHECK:STDOUT: %impl.elem0.loc8: %.a64 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] // CHECK:STDOUT: %bound_method.loc8_28.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_28.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.288] @@ -730,7 +730,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] // CHECK:STDOUT: %.loc11_43.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] -// CHECK:STDOUT: %impl.elem0.loc11_43: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc11_43: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc11_43.1: = bound_method %float, %impl.elem0.loc11_43 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_43: = specific_function %impl.elem0.loc11_43, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_43.2: = bound_method %float, %specific_fn.loc11_43 [concrete = constants.%bound_method.1e4] @@ -748,14 +748,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long.ref.loc11: type = name_ref long, %i64.1 [concrete = constants.%i64] -// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.aba = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54] +// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.fc7 = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54] // CHECK:STDOUT: %bound_method.loc11_23.1: = bound_method %int_1.loc11, %impl.elem0.loc11_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_23.1: = specific_function %impl.elem0.loc11_23.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_23.2: = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.41b] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i64 = call %bound_method.loc11_23.2(%int_1.loc11) [concrete = constants.%int_1.41a] // CHECK:STDOUT: %.loc11_23.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a] // CHECK:STDOUT: %.loc11_23.2: %i64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.41a] -// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.3aa = impl_witness_access constants.%ImplicitAs.impl_witness.e86, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.535] +// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.495 = impl_witness_access constants.%ImplicitAs.impl_witness.e86, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.535] // CHECK:STDOUT: %bound_method.loc11_23.3: = bound_method %.loc11_23.2, %impl.elem0.loc11_23.2 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_23.2: = specific_function %impl.elem0.loc11_23.2, @Int.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_23.4: = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.d1e] @@ -782,12 +782,10 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %pattern_type.157: type = pattern_type %u64 [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.584: type = facet_type <@ImplicitAs, @ImplicitAs(%u64)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.c65: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u64) [concrete] // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.46e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.7f8: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.0ea: %UInt.as.ImplicitAs.impl.Convert.type.7f8 = struct_value () [symbolic] @@ -795,7 +793,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.fb8: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.042: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.fb8 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.dfe: %ImplicitAs.type.584 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.bb3) [concrete] -// CHECK:STDOUT: %.da7: type = fn_type_with_self_type %ImplicitAs.Convert.type.c65, %ImplicitAs.facet.dfe [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.408: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%u64, %ImplicitAs.facet.dfe) [concrete] +// CHECK:STDOUT: %.f17: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.408, %ImplicitAs.facet.dfe [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.042 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.042, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.fec: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -803,14 +802,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete] // CHECK:STDOUT: %As.type.f20: type = facet_type <@As, @As(%u64)> [concrete] -// CHECK:STDOUT: %As.Convert.type.7eb: type = fn_type @As.Convert, @As(%u64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.2b1: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.979: %Core.IntLiteral.as.As.impl.Convert.type.2b1 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.f54: = impl_witness imports.%As.impl_witness_table.7eb, @Core.IntLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.0f2: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.715: %Core.IntLiteral.as.As.impl.Convert.type.0f2 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.f20 = facet_value Core.IntLiteral, (%As.impl_witness.f54) [concrete] -// CHECK:STDOUT: %.11a: type = fn_type_with_self_type %As.Convert.type.7eb, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.286: type = fn_type @As.WithSelf.Convert, @As(%u64, %As.facet) [concrete] +// CHECK:STDOUT: %.904: type = fn_type_with_self_type %As.WithSelf.Convert.type.286, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.715 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.715, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.9cf: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -818,7 +817,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.812: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.309: %UInt.as.ImplicitAs.impl.Convert.type.812 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.02d: %ImplicitAs.type.139 = facet_value %u64, (%ImplicitAs.impl_witness.2cc) [concrete] -// CHECK:STDOUT: %.a1c: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.02d [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.79a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.02d) [concrete] +// CHECK:STDOUT: %.74a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.79a, %ImplicitAs.facet.02d [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.f23, %UInt.as.ImplicitAs.impl.Convert.309 [concrete] // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %UInt.as.ImplicitAs.impl.Convert.309, @UInt.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.f18: = bound_method %int_1.f23, %UInt.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -829,14 +829,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete] -// CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e4d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f32.97e, %ImplicitAs.facet.945) [concrete] +// CHECK:STDOUT: %.98d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e4d, %ImplicitAs.facet.945 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.1e4: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -872,7 +872,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: // CHECK:STDOUT: %unsigned_long.ref.loc8: type = name_ref unsigned_long, %u64.1 [concrete = constants.%u64] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc8: %.da7 = impl_witness_access constants.%ImplicitAs.impl_witness.bb3, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.042] +// CHECK:STDOUT: %impl.elem0.loc8: %.f17 = impl_witness_access constants.%ImplicitAs.impl_witness.bb3, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.042] // CHECK:STDOUT: %bound_method.loc8_46.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_46.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.fec] @@ -896,7 +896,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] // CHECK:STDOUT: %.loc11_52.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] -// CHECK:STDOUT: %impl.elem0.loc11_52: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc11_52: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc11_52.1: = bound_method %float, %impl.elem0.loc11_52 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_52: = specific_function %impl.elem0.loc11_52, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_52.2: = bound_method %float, %specific_fn.loc11_52 [concrete = constants.%bound_method.1e4] @@ -914,14 +914,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %unsigned_long.ref.loc11: type = name_ref unsigned_long, %u64.1 [concrete = constants.%u64] -// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.11a = impl_witness_access constants.%As.impl_witness.f54, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.715] +// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.904 = impl_witness_access constants.%As.impl_witness.f54, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.715] // CHECK:STDOUT: %bound_method.loc11_23.1: = bound_method %int_1.loc11, %impl.elem0.loc11_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_23.1: = specific_function %impl.elem0.loc11_23.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_23.2: = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.9cf] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %u64 = call %bound_method.loc11_23.2(%int_1.loc11) [concrete = constants.%int_1.f23] // CHECK:STDOUT: %.loc11_23.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23] // CHECK:STDOUT: %.loc11_23.2: %u64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.f23] -// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.a1c = impl_witness_access constants.%ImplicitAs.impl_witness.2cc, element0 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.309] +// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.74a = impl_witness_access constants.%ImplicitAs.impl_witness.2cc, element0 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.309] // CHECK:STDOUT: %bound_method.loc11_23.3: = bound_method %.loc11_23.2, %impl.elem0.loc11_23.2 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_23.2: = specific_function %impl.elem0.loc11_23.2, @UInt.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_23.4: = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.f18] @@ -953,13 +953,12 @@ fn CopyUnsignedLongLong() { // 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.a03: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6e4: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long_long) [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.82e: = impl_witness imports.%ImplicitAs.impl_witness_table.896 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.d52: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.82e) [concrete] -// CHECK:STDOUT: %.a93: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet.d52 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.dcd: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet.d52) [concrete] +// CHECK:STDOUT: %.a11: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.dcd, %ImplicitAs.facet.d52 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] @@ -983,16 +982,17 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.b3e: type = facet_type <@As, @As(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %As.Convert.type.92c: type = fn_type @As.Convert, @As(%Cpp.long_long) [concrete] // CHECK:STDOUT: %As.impl_witness.158: = impl_witness imports.%As.impl_witness_table.eb3 [concrete] // CHECK:STDOUT: %As.facet: %As.type.b3e = facet_value Core.IntLiteral, (%As.impl_witness.158) [concrete] -// CHECK:STDOUT: %.ae2: type = fn_type_with_self_type %As.Convert.type.92c, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.1b8: type = fn_type @As.WithSelf.Convert, @As(%Cpp.long_long, %As.facet) [concrete] +// CHECK:STDOUT: %.c9c: type = fn_type_with_self_type %As.WithSelf.Convert.type.1b8, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.737: = impl_witness imports.%ImplicitAs.impl_witness_table.64f [concrete] // CHECK:STDOUT: %ImplicitAs.facet.084: %ImplicitAs.type.139 = facet_value %Cpp.long_long, (%ImplicitAs.impl_witness.737) [concrete] -// CHECK:STDOUT: %.7c8: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.084 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.566: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.084) [concrete] +// CHECK:STDOUT: %.0a4: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.566, %ImplicitAs.facet.084 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.type: type = fn_type @Cpp.long_long.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert: %Cpp.long_long.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.092, %Cpp.long_long.as.ImplicitAs.impl.Convert [concrete] @@ -1003,14 +1003,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete] -// CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e4d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f32.97e, %ImplicitAs.facet.945) [concrete] +// CHECK:STDOUT: %.98d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e4d, %ImplicitAs.facet.945 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1088,7 +1088,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.ref.loc15: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref.loc15: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc15: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc15: %.a11 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long_long = call %bound_method.loc15(%int_1.loc15) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc15_38.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.092] @@ -1175,7 +1175,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] // CHECK:STDOUT: %.loc24_48.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] -// CHECK:STDOUT: %impl.elem0.loc24_48: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc24_48: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc24_48.1: = bound_method %float, %impl.elem0.loc24_48 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc24_48, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc24_48.2: = bound_method %float, %specific_fn [concrete = constants.%bound_method] @@ -1193,12 +1193,12 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc24: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref.loc24: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] -// CHECK:STDOUT: %impl.elem0.loc24_23.1: %.ae2 = impl_witness_access constants.%As.impl_witness.158, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc24_23.1: %.c9c = impl_witness_access constants.%As.impl_witness.158, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] // CHECK:STDOUT: %bound_method.loc24_23.1: = bound_method %int_1.loc24, %impl.elem0.loc24_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.long_long = call %bound_method.loc24_23.1(%int_1.loc24) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc24_23.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc24_23.2: %Cpp.long_long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.092] -// CHECK:STDOUT: %impl.elem0.loc24_23.2: %.7c8 = impl_witness_access constants.%ImplicitAs.impl_witness.737, element0 [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc24_23.2: %.0a4 = impl_witness_access constants.%ImplicitAs.impl_witness.737, element0 [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc24_23.2: = bound_method %.loc24_23.2, %impl.elem0.loc24_23.2 [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc24_23.2(%.loc24_23.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.long_long.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8] @@ -1227,19 +1227,19 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %pattern_type.76e: type = pattern_type %Cpp.long_long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.a03: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6e4: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long_long) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.82e: = impl_witness imports.%ImplicitAs.impl_witness_table.896 [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.82e) [concrete] -// CHECK:STDOUT: %.a93: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.dcd: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.a11: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.dcd, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.092: %Cpp.long_long = int_value 1 [concrete] // CHECK:STDOUT: %Copy.impl_witness.6d4: = impl_witness imports.%Copy.impl_witness_table.804 [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Cpp.long_long, (%Copy.impl_witness.6d4) [concrete] -// CHECK:STDOUT: %.26f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.fdc: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.3c6: type = fn_type_with_self_type %Copy.WithSelf.Op.type.fdc, %Copy.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Copy.impl.Op.type: type = fn_type @Cpp.long_long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Copy.impl.Op: %Cpp.long_long.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -1265,7 +1265,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.long_long = var %a.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.a11 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long_long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc8_3: init %Cpp.long_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.092] @@ -1282,7 +1282,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %b.var: ref %Cpp.long_long = var %b.var_patt // CHECK:STDOUT: %a.ref: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %.loc9_26: %Cpp.long_long = acquire_value %a.ref -// CHECK:STDOUT: %impl.elem0.loc9: %.26f = impl_witness_access constants.%Copy.impl_witness.6d4, element0 [concrete = constants.%Cpp.long_long.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc9: %.3c6 = impl_witness_access constants.%Copy.impl_witness.6d4, element0 [concrete = constants.%Cpp.long_long.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_26, %impl.elem0.loc9 // CHECK:STDOUT: %Cpp.long_long.as.Copy.impl.Op.call: init %Cpp.long_long = call %bound_method.loc9(%.loc9_26) // CHECK:STDOUT: assign %b.var, %Cpp.long_long.as.Copy.impl.Op.call @@ -1307,42 +1307,42 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %pattern_type.76e: type = pattern_type %Cpp.long_long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.a03: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6e4: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long_long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.82e: = impl_witness imports.%ImplicitAs.impl_witness_table.896 [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.82e) [concrete] -// CHECK:STDOUT: %.a93: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.dcd: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.a119: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.dcd, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.092: %Cpp.long_long = int_value 1 [concrete] // CHECK:STDOUT: %EqWith.type.4be: type = facet_type <@EqWith, @EqWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %EqWith.Equal.type.6d5: type = fn_type @EqWith.Equal, @EqWith(%Cpp.long_long) [concrete] -// CHECK:STDOUT: %EqWith.NotEqual.type.c18: type = fn_type @EqWith.NotEqual, @EqWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %EqWith.impl_witness.625: = impl_witness imports.%EqWith.impl_witness_table.636 [concrete] // CHECK:STDOUT: %EqWith.facet: %EqWith.type.4be = facet_value %Cpp.long_long, (%EqWith.impl_witness.625) [concrete] -// CHECK:STDOUT: %.a50: type = fn_type_with_self_type %EqWith.Equal.type.6d5, %EqWith.facet [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.36e: type = fn_type @EqWith.WithSelf.Equal, @EqWith(%Cpp.long_long, %EqWith.facet) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.dac: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith(%Cpp.long_long, %EqWith.facet) [concrete] +// CHECK:STDOUT: %.604: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.36e, %EqWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.type.7de: type = fn_type @Cpp.long_long.as.EqWith.impl.Equal.3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.49b: %Cpp.long_long.as.EqWith.impl.Equal.type.7de = struct_value () [concrete] -// CHECK:STDOUT: %.c9a: type = fn_type_with_self_type %EqWith.NotEqual.type.c18, %EqWith.facet [concrete] +// CHECK:STDOUT: %.df4: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.dac, %EqWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.type.4e3: type = fn_type @Cpp.long_long.as.EqWith.impl.NotEqual.3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.608: %Cpp.long_long.as.EqWith.impl.NotEqual.type.4e3 = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.type.65e: type = facet_type <@OrderedWith, @OrderedWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %OrderedWith.Less.type.bc1: type = fn_type @OrderedWith.Less, @OrderedWith(%Cpp.long_long) [concrete] -// CHECK:STDOUT: %OrderedWith.LessOrEquivalent.type.1cc: type = fn_type @OrderedWith.LessOrEquivalent, @OrderedWith(%Cpp.long_long) [concrete] -// CHECK:STDOUT: %OrderedWith.Greater.type.921: type = fn_type @OrderedWith.Greater, @OrderedWith(%Cpp.long_long) [concrete] -// CHECK:STDOUT: %OrderedWith.GreaterOrEquivalent.type.fcf: type = fn_type @OrderedWith.GreaterOrEquivalent, @OrderedWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %OrderedWith.impl_witness.dab: = impl_witness imports.%OrderedWith.impl_witness_table.366 [concrete] // CHECK:STDOUT: %OrderedWith.facet: %OrderedWith.type.65e = facet_value %Cpp.long_long, (%OrderedWith.impl_witness.dab) [concrete] -// CHECK:STDOUT: %.dbc: type = fn_type_with_self_type %OrderedWith.Greater.type.921, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.e0c: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(%Cpp.long_long, %OrderedWith.facet) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.053: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith(%Cpp.long_long, %OrderedWith.facet) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.628: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith(%Cpp.long_long, %OrderedWith.facet) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.b0a: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith(%Cpp.long_long, %OrderedWith.facet) [concrete] +// CHECK:STDOUT: %.7d6: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.628, %OrderedWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.type.445: type = fn_type @Cpp.long_long.as.OrderedWith.impl.Greater.3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.d29: %Cpp.long_long.as.OrderedWith.impl.Greater.type.445 = struct_value () [concrete] -// CHECK:STDOUT: %.be1: type = fn_type_with_self_type %OrderedWith.Less.type.bc1, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.5c4: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.e0c, %OrderedWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.type.a02: type = fn_type @Cpp.long_long.as.OrderedWith.impl.Less.3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.304: %Cpp.long_long.as.OrderedWith.impl.Less.type.a02 = struct_value () [concrete] -// CHECK:STDOUT: %.03c: type = fn_type_with_self_type %OrderedWith.GreaterOrEquivalent.type.fcf, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.7cc: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.b0a, %OrderedWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.cd4: type = fn_type @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.bcc: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.cd4 = struct_value () [concrete] -// CHECK:STDOUT: %.c0e: type = fn_type_with_self_type %OrderedWith.LessOrEquivalent.type.1cc, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.3fa: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.053, %OrderedWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.e6d: type = fn_type @Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.3 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.de3: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.e6d = struct_value () [concrete] // CHECK:STDOUT: } @@ -1374,7 +1374,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref.loc8: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc8: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long_long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc8_26.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.092] @@ -1388,7 +1388,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.ref.loc9: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref.loc9: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc9: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc9: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long_long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc9_26.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.092] @@ -1396,32 +1396,32 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %b: %Cpp.long_long = value_binding b, %.loc9_26.2 // CHECK:STDOUT: %a.ref.loc10: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc10: %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc10: %.a50 = impl_witness_access constants.%EqWith.impl_witness.625, element0 [concrete = constants.%Cpp.long_long.as.EqWith.impl.Equal.49b] +// CHECK:STDOUT: %impl.elem0.loc10: %.604 = impl_witness_access constants.%EqWith.impl_witness.625, element0 [concrete = constants.%Cpp.long_long.as.EqWith.impl.Equal.49b] // CHECK:STDOUT: %bound_method.loc10: = bound_method %a.ref.loc10, %impl.elem0.loc10 // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.call: init bool = call %bound_method.loc10(%a.ref.loc10, %b.ref.loc10) // CHECK:STDOUT: %a.ref.loc11: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc11: %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem1.loc11: %.c9a = impl_witness_access constants.%EqWith.impl_witness.625, element1 [concrete = constants.%Cpp.long_long.as.EqWith.impl.NotEqual.608] +// CHECK:STDOUT: %impl.elem1.loc11: %.df4 = impl_witness_access constants.%EqWith.impl_witness.625, element1 [concrete = constants.%Cpp.long_long.as.EqWith.impl.NotEqual.608] // CHECK:STDOUT: %bound_method.loc11: = bound_method %a.ref.loc11, %impl.elem1.loc11 // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.call: init bool = call %bound_method.loc11(%a.ref.loc11, %b.ref.loc11) // CHECK:STDOUT: %a.ref.loc12: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc12: %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem2: %.dbc = impl_witness_access constants.%OrderedWith.impl_witness.dab, element2 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Greater.d29] +// CHECK:STDOUT: %impl.elem2: %.7d6 = impl_witness_access constants.%OrderedWith.impl_witness.dab, element2 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Greater.d29] // CHECK:STDOUT: %bound_method.loc12: = bound_method %a.ref.loc12, %impl.elem2 // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.call: init bool = call %bound_method.loc12(%a.ref.loc12, %b.ref.loc12) // CHECK:STDOUT: %a.ref.loc13: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc13: %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc13: %.be1 = impl_witness_access constants.%OrderedWith.impl_witness.dab, element0 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Less.304] +// CHECK:STDOUT: %impl.elem0.loc13: %.5c4 = impl_witness_access constants.%OrderedWith.impl_witness.dab, element0 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Less.304] // CHECK:STDOUT: %bound_method.loc13: = bound_method %a.ref.loc13, %impl.elem0.loc13 // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.call: init bool = call %bound_method.loc13(%a.ref.loc13, %b.ref.loc13) // CHECK:STDOUT: %a.ref.loc14: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc14: %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem3: %.03c = impl_witness_access constants.%OrderedWith.impl_witness.dab, element3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.bcc] +// CHECK:STDOUT: %impl.elem3: %.7cc = impl_witness_access constants.%OrderedWith.impl_witness.dab, element3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.bcc] // CHECK:STDOUT: %bound_method.loc14: = bound_method %a.ref.loc14, %impl.elem3 // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.call: init bool = call %bound_method.loc14(%a.ref.loc14, %b.ref.loc14) // CHECK:STDOUT: %a.ref.loc15: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc15: %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem1.loc15: %.c0e = impl_witness_access constants.%OrderedWith.impl_witness.dab, element1 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.de3] +// CHECK:STDOUT: %impl.elem1.loc15: %.3fa = impl_witness_access constants.%OrderedWith.impl_witness.dab, element1 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.de3] // CHECK:STDOUT: %bound_method.loc15: = bound_method %a.ref.loc15, %impl.elem1.loc15 // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.call: init bool = call %bound_method.loc15(%a.ref.loc15, %b.ref.loc15) // CHECK:STDOUT: @@ -1436,17 +1436,15 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long: type = class_type @LongLong64 [concrete] // CHECK:STDOUT: %pattern_type.76e: type = pattern_type %Cpp.long_long [concrete] // CHECK:STDOUT: %ImplicitAs.type.a03: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6e4: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long_long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.82e: = impl_witness imports.%ImplicitAs.impl_witness_table.896 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.d52: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.82e) [concrete] -// CHECK:STDOUT: %.a93: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet.d52 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.dcd: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet.d52) [concrete] +// CHECK:STDOUT: %.a119: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.dcd, %ImplicitAs.facet.d52 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.aba: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.a20: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.aba = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.a20 [concrete] // CHECK:STDOUT: %int_1.092: %Cpp.long_long = int_value 1 [concrete] // CHECK:STDOUT: %EqWith.type.d68: type = facet_type <@EqWith, @EqWith(%i64)> [concrete] -// CHECK:STDOUT: %EqWith.Equal.type.59b: type = fn_type @EqWith.Equal, @EqWith(%i64) [concrete] -// CHECK:STDOUT: %EqWith.NotEqual.type.69a: type = fn_type @EqWith.NotEqual, @EqWith(%i64) [concrete] // CHECK:STDOUT: %T.ea5: %ImplicitAs.type.a03 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.type.a5582c.1: type = fn_type @Cpp.long_long.as.EqWith.impl.NotEqual.1, @Cpp.long_long.as.EqWith.impl.1bc(%T.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.e250a6.1: %Cpp.long_long.as.EqWith.impl.NotEqual.type.a5582c.1 = struct_value () [symbolic] @@ -1457,8 +1455,6 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.type.ec19bf.2: type = fn_type @Cpp.long_long.as.EqWith.impl.Equal.2, @Cpp.long_long.as.EqWith.impl.1bc(%T.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.7b9c94.2: %Cpp.long_long.as.EqWith.impl.Equal.type.ec19bf.2 = struct_value () [symbolic] // CHECK:STDOUT: %EqWith.type.ded: type = facet_type <@EqWith, @EqWith(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %EqWith.NotEqual.type.b22: type = fn_type @EqWith.NotEqual, @EqWith(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %EqWith.Equal.type.f75: type = fn_type @EqWith.Equal, @EqWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.1b3: = impl_witness imports.%ImplicitAs.impl_witness_table.b19 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.c59: %ImplicitAs.type.a03 = facet_value %i64, (%ImplicitAs.impl_witness.1b3) [concrete] // CHECK:STDOUT: %EqWith.impl_witness.756: = impl_witness imports.%EqWith.impl_witness_table.902, @Cpp.long_long.as.EqWith.impl.1bc(%ImplicitAs.facet.c59) [concrete] @@ -1471,20 +1467,19 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.type.8239fe.2: type = fn_type @Cpp.long_long.as.EqWith.impl.NotEqual.1, @Cpp.long_long.as.EqWith.impl.1bc(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.81fbd8.2: %Cpp.long_long.as.EqWith.impl.NotEqual.type.8239fe.2 = struct_value () [concrete] // CHECK:STDOUT: %EqWith.facet.d0f: %EqWith.type.d68 = facet_value %Cpp.long_long, (%EqWith.impl_witness.756) [concrete] -// CHECK:STDOUT: %.6ba: type = fn_type_with_self_type %EqWith.Equal.type.59b, %EqWith.facet.d0f [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.0d2: type = fn_type @EqWith.WithSelf.Equal, @EqWith(%i64, %EqWith.facet.d0f) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.0eb: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith(%i64, %EqWith.facet.d0f) [concrete] +// CHECK:STDOUT: %.357: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.0d2, %EqWith.facet.d0f [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.specific_fn.29a235.1: = specific_function %Cpp.long_long.as.EqWith.impl.Equal.610927.2, @Cpp.long_long.as.EqWith.impl.Equal.1(%ImplicitAs.facet.c59) [concrete] -// CHECK:STDOUT: %.b29: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet.c59 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.653: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet.c59) [concrete] +// CHECK:STDOUT: %.cb1: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.653, %ImplicitAs.facet.c59 [concrete] // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.type: type = fn_type @i64.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert: %i64.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.specific_fn.29a235.2: = specific_function %Cpp.long_long.as.EqWith.impl.Equal.610927.1, @Cpp.long_long.as.EqWith.impl.Equal.2(%ImplicitAs.facet.c59) [concrete] -// CHECK:STDOUT: %.838: type = fn_type_with_self_type %EqWith.NotEqual.type.69a, %EqWith.facet.d0f [concrete] +// CHECK:STDOUT: %.d50: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.0eb, %EqWith.facet.d0f [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.specific_fn.b9c577.1: = specific_function %Cpp.long_long.as.EqWith.impl.NotEqual.81fbd8.2, @Cpp.long_long.as.EqWith.impl.NotEqual.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.specific_fn.b9c577.2: = specific_function %Cpp.long_long.as.EqWith.impl.NotEqual.81fbd8.1, @Cpp.long_long.as.EqWith.impl.NotEqual.2(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %OrderedWith.type.e34: type = facet_type <@OrderedWith, @OrderedWith(%i64)> [concrete] -// CHECK:STDOUT: %OrderedWith.Less.type.f12: type = fn_type @OrderedWith.Less, @OrderedWith(%i64) [concrete] -// CHECK:STDOUT: %OrderedWith.LessOrEquivalent.type.c09: type = fn_type @OrderedWith.LessOrEquivalent, @OrderedWith(%i64) [concrete] -// CHECK:STDOUT: %OrderedWith.Greater.type.3c7: type = fn_type @OrderedWith.Greater, @OrderedWith(%i64) [concrete] -// CHECK:STDOUT: %OrderedWith.GreaterOrEquivalent.type.d03: type = fn_type @OrderedWith.GreaterOrEquivalent, @OrderedWith(%i64) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.89fdb1.1: type = fn_type @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1, @Cpp.long_long.as.OrderedWith.impl.ef6(%T.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.300fb6.1: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.89fdb1.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.89fdb1.2: type = fn_type @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.2, @Cpp.long_long.as.OrderedWith.impl.ef6(%T.ea5) [symbolic] @@ -1502,10 +1497,6 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.type.d531c6.2: type = fn_type @Cpp.long_long.as.OrderedWith.impl.Less.2, @Cpp.long_long.as.OrderedWith.impl.ef6(%T.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.c164d2.2: %Cpp.long_long.as.OrderedWith.impl.Less.type.d531c6.2 = struct_value () [symbolic] // CHECK:STDOUT: %OrderedWith.type.358: type = facet_type <@OrderedWith, @OrderedWith(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %OrderedWith.GreaterOrEquivalent.type.e24: type = fn_type @OrderedWith.GreaterOrEquivalent, @OrderedWith(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %OrderedWith.Greater.type.30c: type = fn_type @OrderedWith.Greater, @OrderedWith(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %OrderedWith.LessOrEquivalent.type.776: type = fn_type @OrderedWith.LessOrEquivalent, @OrderedWith(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %OrderedWith.Less.type.20d: type = fn_type @OrderedWith.Less, @OrderedWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %OrderedWith.impl_witness.940: = impl_witness imports.%OrderedWith.impl_witness_table.a1b, @Cpp.long_long.as.OrderedWith.impl.ef6(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.type.c81272.1: type = fn_type @Cpp.long_long.as.OrderedWith.impl.Less.2, @Cpp.long_long.as.OrderedWith.impl.ef6(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.39610d.1: %Cpp.long_long.as.OrderedWith.impl.Less.type.c81272.1 = struct_value () [concrete] @@ -1524,16 +1515,20 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.097dad.2: type = fn_type @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1, @Cpp.long_long.as.OrderedWith.impl.ef6(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.777234.2: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.097dad.2 = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.facet.149: %OrderedWith.type.e34 = facet_value %Cpp.long_long, (%OrderedWith.impl_witness.940) [concrete] -// CHECK:STDOUT: %.1fe: type = fn_type_with_self_type %OrderedWith.Greater.type.3c7, %OrderedWith.facet.149 [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.d11: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(%i64, %OrderedWith.facet.149) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.3e3: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith(%i64, %OrderedWith.facet.149) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.4a1: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith(%i64, %OrderedWith.facet.149) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.065: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith(%i64, %OrderedWith.facet.149) [concrete] +// CHECK:STDOUT: %.e0d: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.4a1, %OrderedWith.facet.149 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.specific_fn.9b8255.1: = specific_function %Cpp.long_long.as.OrderedWith.impl.Greater.136328.2, @Cpp.long_long.as.OrderedWith.impl.Greater.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.specific_fn.9b8255.2: = specific_function %Cpp.long_long.as.OrderedWith.impl.Greater.136328.1, @Cpp.long_long.as.OrderedWith.impl.Greater.2(%ImplicitAs.facet.c59) [concrete] -// CHECK:STDOUT: %.0e7: type = fn_type_with_self_type %OrderedWith.Less.type.f12, %OrderedWith.facet.149 [concrete] +// CHECK:STDOUT: %.c1d: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.d11, %OrderedWith.facet.149 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.specific_fn.294c7c.1: = specific_function %Cpp.long_long.as.OrderedWith.impl.Less.39610d.2, @Cpp.long_long.as.OrderedWith.impl.Less.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.specific_fn.294c7c.2: = specific_function %Cpp.long_long.as.OrderedWith.impl.Less.39610d.1, @Cpp.long_long.as.OrderedWith.impl.Less.2(%ImplicitAs.facet.c59) [concrete] -// CHECK:STDOUT: %.30d: type = fn_type_with_self_type %OrderedWith.GreaterOrEquivalent.type.d03, %OrderedWith.facet.149 [concrete] +// CHECK:STDOUT: %.f24: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.065, %OrderedWith.facet.149 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.ffe884.1: = specific_function %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.777234.2, @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.ffe884.2: = specific_function %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.777234.1, @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.2(%ImplicitAs.facet.c59) [concrete] -// CHECK:STDOUT: %.90d: type = fn_type_with_self_type %OrderedWith.LessOrEquivalent.type.c09, %OrderedWith.facet.149 [concrete] +// CHECK:STDOUT: %.6b0: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.3e3, %OrderedWith.facet.149 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.5291ea.1: = specific_function %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.29b20a.2, @Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.5291ea.2: = specific_function %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.29b20a.1, @Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.2(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %EqWith.impl_witness.5f3: = impl_witness imports.%EqWith.impl_witness_table.902, @Cpp.long_long.as.EqWith.impl.1bc(%ImplicitAs.facet.d52) [concrete] @@ -1546,10 +1541,12 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.type.84cb6f.2: type = fn_type @Cpp.long_long.as.EqWith.impl.NotEqual.1, @Cpp.long_long.as.EqWith.impl.1bc(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.7e6eb6.2: %Cpp.long_long.as.EqWith.impl.NotEqual.type.84cb6f.2 = struct_value () [concrete] // CHECK:STDOUT: %EqWith.facet.8cf: %EqWith.type.ded = facet_value %Cpp.long_long, (%EqWith.impl_witness.5f3) [concrete] -// CHECK:STDOUT: %.5a8: type = fn_type_with_self_type %EqWith.Equal.type.f75, %EqWith.facet.8cf [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.fe8: type = fn_type @EqWith.WithSelf.Equal, @EqWith(Core.IntLiteral, %EqWith.facet.8cf) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.8c1: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith(Core.IntLiteral, %EqWith.facet.8cf) [concrete] +// CHECK:STDOUT: %.b86: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.fe8, %EqWith.facet.8cf [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.specific_fn.72c761.1: = specific_function %Cpp.long_long.as.EqWith.impl.Equal.3190b1.2, @Cpp.long_long.as.EqWith.impl.Equal.1(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.specific_fn.72c761.2: = specific_function %Cpp.long_long.as.EqWith.impl.Equal.3190b1.1, @Cpp.long_long.as.EqWith.impl.Equal.2(%ImplicitAs.facet.d52) [concrete] -// CHECK:STDOUT: %.f04: type = fn_type_with_self_type %EqWith.NotEqual.type.b22, %EqWith.facet.8cf [concrete] +// CHECK:STDOUT: %.251: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.8c1, %EqWith.facet.8cf [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.specific_fn.ace954.1: = specific_function %Cpp.long_long.as.EqWith.impl.NotEqual.7e6eb6.2, @Cpp.long_long.as.EqWith.impl.NotEqual.1(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.specific_fn.ace954.2: = specific_function %Cpp.long_long.as.EqWith.impl.NotEqual.7e6eb6.1, @Cpp.long_long.as.EqWith.impl.NotEqual.2(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %OrderedWith.impl_witness.31a: = impl_witness imports.%OrderedWith.impl_witness_table.a1b, @Cpp.long_long.as.OrderedWith.impl.ef6(%ImplicitAs.facet.d52) [concrete] @@ -1570,16 +1567,20 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.23f245.2: type = fn_type @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1, @Cpp.long_long.as.OrderedWith.impl.ef6(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1b92ea.2: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.23f245.2 = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.facet.8a0: %OrderedWith.type.358 = facet_value %Cpp.long_long, (%OrderedWith.impl_witness.31a) [concrete] -// CHECK:STDOUT: %.490: type = fn_type_with_self_type %OrderedWith.Greater.type.30c, %OrderedWith.facet.8a0 [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.a91: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(Core.IntLiteral, %OrderedWith.facet.8a0) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.6cb: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith(Core.IntLiteral, %OrderedWith.facet.8a0) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.a55: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith(Core.IntLiteral, %OrderedWith.facet.8a0) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.2c3: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith(Core.IntLiteral, %OrderedWith.facet.8a0) [concrete] +// CHECK:STDOUT: %.5d9: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.a55, %OrderedWith.facet.8a0 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.specific_fn.b9662b.1: = specific_function %Cpp.long_long.as.OrderedWith.impl.Greater.b790ce.2, @Cpp.long_long.as.OrderedWith.impl.Greater.1(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.specific_fn.b9662b.2: = specific_function %Cpp.long_long.as.OrderedWith.impl.Greater.b790ce.1, @Cpp.long_long.as.OrderedWith.impl.Greater.2(%ImplicitAs.facet.d52) [concrete] -// CHECK:STDOUT: %.47c: type = fn_type_with_self_type %OrderedWith.Less.type.20d, %OrderedWith.facet.8a0 [concrete] +// CHECK:STDOUT: %.885: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.a91, %OrderedWith.facet.8a0 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.specific_fn.50db42.1: = specific_function %Cpp.long_long.as.OrderedWith.impl.Less.26cbb1.2, @Cpp.long_long.as.OrderedWith.impl.Less.1(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.specific_fn.50db42.2: = specific_function %Cpp.long_long.as.OrderedWith.impl.Less.26cbb1.1, @Cpp.long_long.as.OrderedWith.impl.Less.2(%ImplicitAs.facet.d52) [concrete] -// CHECK:STDOUT: %.f68: type = fn_type_with_self_type %OrderedWith.GreaterOrEquivalent.type.e24, %OrderedWith.facet.8a0 [concrete] +// CHECK:STDOUT: %.ea1: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.2c3, %OrderedWith.facet.8a0 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.662ddf.1: = specific_function %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1b92ea.2, @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.662ddf.2: = specific_function %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1b92ea.1, @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.2(%ImplicitAs.facet.d52) [concrete] -// CHECK:STDOUT: %.c1a: type = fn_type_with_self_type %OrderedWith.LessOrEquivalent.type.776, %OrderedWith.facet.8a0 [concrete] +// CHECK:STDOUT: %.da4: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.6cb, %OrderedWith.facet.8a0 [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.b1c4c5.1: = specific_function %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.50ecf5.2, @Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.1(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.b1c4c5.2: = specific_function %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.50ecf5.1, @Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.2(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: } @@ -1596,8 +1597,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %EqWith.impl_witness_table.902 = impl_witness_table (%Core.import_ref.142, %Core.import_ref.71f), @Cpp.long_long.as.EqWith.impl.1bc [concrete] // CHECK:STDOUT: %Core.NotEqual.dea: @Cpp.long_long.as.EqWith.impl.1bc.%Cpp.long_long.as.EqWith.impl.NotEqual.type.1 (%Cpp.long_long.as.EqWith.impl.NotEqual.type.a5582c.2) = import_ref Core//prelude/types/cpp/int, NotEqual, loaded [symbolic = @Cpp.long_long.as.EqWith.impl.1bc.%Cpp.long_long.as.EqWith.impl.NotEqual.1 (constants.%Cpp.long_long.as.EqWith.impl.NotEqual.e250a6.2)] // CHECK:STDOUT: %Core.Equal.357: @Cpp.long_long.as.EqWith.impl.1bc.%Cpp.long_long.as.EqWith.impl.Equal.type.1 (%Cpp.long_long.as.EqWith.impl.Equal.type.ec19bf.2) = import_ref Core//prelude/types/cpp/int, Equal, loaded [symbolic = @Cpp.long_long.as.EqWith.impl.1bc.%Cpp.long_long.as.EqWith.impl.Equal.1 (constants.%Cpp.long_long.as.EqWith.impl.Equal.7b9c94.2)] -// CHECK:STDOUT: %Core.import_ref.4f4b: %i64.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%i64.as.ImplicitAs.impl.Convert] -// CHECK:STDOUT: %ImplicitAs.impl_witness_table.b19 = impl_witness_table (%Core.import_ref.4f4b), @i64.as.ImplicitAs.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.4f4: %i64.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.b19 = impl_witness_table (%Core.import_ref.4f4), @i64.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.81d: @Cpp.long_long.as.OrderedWith.impl.ef6.%Cpp.long_long.as.OrderedWith.impl.Less.type.2 (%Cpp.long_long.as.OrderedWith.impl.Less.type.d531c6.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.ef6.%Cpp.long_long.as.OrderedWith.impl.Less.2 (constants.%Cpp.long_long.as.OrderedWith.impl.Less.c164d2.1)] // CHECK:STDOUT: %Core.import_ref.21c: @Cpp.long_long.as.OrderedWith.impl.ef6.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.2 (%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.3ce459.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.ef6.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.2 (constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.8dc0bf.1)] // CHECK:STDOUT: %Core.import_ref.298: @Cpp.long_long.as.OrderedWith.impl.ef6.%Cpp.long_long.as.OrderedWith.impl.Greater.type.2 (%Cpp.long_long.as.OrderedWith.impl.Greater.type.9fb493.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @Cpp.long_long.as.OrderedWith.impl.ef6.%Cpp.long_long.as.OrderedWith.impl.Greater.2 (constants.%Cpp.long_long.as.OrderedWith.impl.Greater.a3ca0e.1)] @@ -1620,7 +1621,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc9: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc9: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long_long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc9_26.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.092] @@ -1628,7 +1629,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %a: %Cpp.long_long = value_binding a, %.loc9_26.2 // CHECK:STDOUT: %a.ref.loc10: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc10: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc10_5.1: %.6ba = impl_witness_access constants.%EqWith.impl_witness.756, element0 [concrete = constants.%Cpp.long_long.as.EqWith.impl.Equal.610927.2] +// CHECK:STDOUT: %impl.elem0.loc10_5.1: %.357 = impl_witness_access constants.%EqWith.impl_witness.756, element0 [concrete = constants.%Cpp.long_long.as.EqWith.impl.Equal.610927.2] // CHECK:STDOUT: %bound_method.loc10_5.1: = bound_method %a.ref.loc10, %impl.elem0.loc10_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc10_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc10_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc10_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -1639,14 +1640,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc10_5.3: %Cpp.long_long.as.EqWith.impl.Equal.type.2f62f8.1 = specific_constant imports.%Core.Equal.357, @Cpp.long_long.as.EqWith.impl.1bc(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.EqWith.impl.Equal.610927.1] // CHECK:STDOUT: %Equal.ref.loc10: %Cpp.long_long.as.EqWith.impl.Equal.type.2f62f8.1 = name_ref Equal, %.loc10_5.3 [concrete = constants.%Cpp.long_long.as.EqWith.impl.Equal.610927.1] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.bound.loc10: = bound_method %a.ref.loc10, %Equal.ref.loc10 -// CHECK:STDOUT: %impl.elem0.loc10_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_5.3: = bound_method %b.ref.loc10, %impl.elem0.loc10_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc10_5: init %Cpp.long_long = call %bound_method.loc10_5.3(%b.ref.loc10) // CHECK:STDOUT: %.loc10_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc10_5 // CHECK:STDOUT: %.loc10_5.5: %Cpp.long_long = converted %b.ref.loc10, %.loc10_5.4 // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.specific_fn.loc10: = specific_function %Equal.ref.loc10, @Cpp.long_long.as.EqWith.impl.Equal.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.EqWith.impl.Equal.specific_fn.29a235.2] // CHECK:STDOUT: %bound_method.loc10_5.4: = bound_method %a.ref.loc10, %Cpp.long_long.as.EqWith.impl.Equal.specific_fn.loc10 -// CHECK:STDOUT: %impl.elem0.loc10_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_8: = bound_method %b.ref.loc10, %impl.elem0.loc10_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc10_8: init %Cpp.long_long = call %bound_method.loc10_8(%b.ref.loc10) // CHECK:STDOUT: %.loc10_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc10_8 @@ -1654,7 +1655,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.call.loc10: init bool = call %bound_method.loc10_5.4(%a.ref.loc10, %.loc10_8.2) // CHECK:STDOUT: %a.ref.loc11: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc11: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem1.loc11: %.838 = impl_witness_access constants.%EqWith.impl_witness.756, element1 [concrete = constants.%Cpp.long_long.as.EqWith.impl.NotEqual.81fbd8.2] +// CHECK:STDOUT: %impl.elem1.loc11: %.d50 = impl_witness_access constants.%EqWith.impl_witness.756, element1 [concrete = constants.%Cpp.long_long.as.EqWith.impl.NotEqual.81fbd8.2] // CHECK:STDOUT: %bound_method.loc11_5.1: = bound_method %a.ref.loc11, %impl.elem1.loc11 // CHECK:STDOUT: %ImplicitAs.facet.loc11_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc11_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc11_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -1665,14 +1666,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc11_5.3: %Cpp.long_long.as.EqWith.impl.NotEqual.type.8239fe.1 = specific_constant imports.%Core.NotEqual.dea, @Cpp.long_long.as.EqWith.impl.1bc(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.EqWith.impl.NotEqual.81fbd8.1] // CHECK:STDOUT: %NotEqual.ref.loc11: %Cpp.long_long.as.EqWith.impl.NotEqual.type.8239fe.1 = name_ref NotEqual, %.loc11_5.3 [concrete = constants.%Cpp.long_long.as.EqWith.impl.NotEqual.81fbd8.1] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.bound.loc11: = bound_method %a.ref.loc11, %NotEqual.ref.loc11 -// CHECK:STDOUT: %impl.elem0.loc11_5: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc11_5: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc11_5.3: = bound_method %b.ref.loc11, %impl.elem0.loc11_5 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc11_5: init %Cpp.long_long = call %bound_method.loc11_5.3(%b.ref.loc11) // CHECK:STDOUT: %.loc11_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc11_5 // CHECK:STDOUT: %.loc11_5.5: %Cpp.long_long = converted %b.ref.loc11, %.loc11_5.4 // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.specific_fn.loc11: = specific_function %NotEqual.ref.loc11, @Cpp.long_long.as.EqWith.impl.NotEqual.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.EqWith.impl.NotEqual.specific_fn.b9c577.2] // CHECK:STDOUT: %bound_method.loc11_5.4: = bound_method %a.ref.loc11, %Cpp.long_long.as.EqWith.impl.NotEqual.specific_fn.loc11 -// CHECK:STDOUT: %impl.elem0.loc11_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc11_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc11_8: = bound_method %b.ref.loc11, %impl.elem0.loc11_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc11_8: init %Cpp.long_long = call %bound_method.loc11_8(%b.ref.loc11) // CHECK:STDOUT: %.loc11_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc11_8 @@ -1680,7 +1681,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.call.loc11: init bool = call %bound_method.loc11_5.4(%a.ref.loc11, %.loc11_8.2) // CHECK:STDOUT: %a.ref.loc12: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc12: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem2.loc12: %.1fe = impl_witness_access constants.%OrderedWith.impl_witness.940, element2 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Greater.136328.2] +// CHECK:STDOUT: %impl.elem2.loc12: %.e0d = impl_witness_access constants.%OrderedWith.impl_witness.940, element2 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Greater.136328.2] // CHECK:STDOUT: %bound_method.loc12_5.1: = bound_method %a.ref.loc12, %impl.elem2.loc12 // CHECK:STDOUT: %ImplicitAs.facet.loc12_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc12_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc12_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -1691,14 +1692,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc12_5.3: %Cpp.long_long.as.OrderedWith.impl.Greater.type.1d3e50.1 = specific_constant imports.%Core.Greater.a10, @Cpp.long_long.as.OrderedWith.impl.ef6(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Greater.136328.1] // CHECK:STDOUT: %Greater.ref.loc12: %Cpp.long_long.as.OrderedWith.impl.Greater.type.1d3e50.1 = name_ref Greater, %.loc12_5.3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Greater.136328.1] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.bound.loc12: = bound_method %a.ref.loc12, %Greater.ref.loc12 -// CHECK:STDOUT: %impl.elem0.loc12_5: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc12_5: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc12_5.3: = bound_method %b.ref.loc12, %impl.elem0.loc12_5 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc12_5: init %Cpp.long_long = call %bound_method.loc12_5.3(%b.ref.loc12) // CHECK:STDOUT: %.loc12_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc12_5 // CHECK:STDOUT: %.loc12_5.5: %Cpp.long_long = converted %b.ref.loc12, %.loc12_5.4 // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.specific_fn.loc12: = specific_function %Greater.ref.loc12, @Cpp.long_long.as.OrderedWith.impl.Greater.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Greater.specific_fn.9b8255.2] // CHECK:STDOUT: %bound_method.loc12_5.4: = bound_method %a.ref.loc12, %Cpp.long_long.as.OrderedWith.impl.Greater.specific_fn.loc12 -// CHECK:STDOUT: %impl.elem0.loc12_7: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc12_7: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc12_7: = bound_method %b.ref.loc12, %impl.elem0.loc12_7 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc12_7: init %Cpp.long_long = call %bound_method.loc12_7(%b.ref.loc12) // CHECK:STDOUT: %.loc12_7.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc12_7 @@ -1706,7 +1707,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.call.loc12: init bool = call %bound_method.loc12_5.4(%a.ref.loc12, %.loc12_7.2) // CHECK:STDOUT: %a.ref.loc13: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc13: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc13_5.1: %.0e7 = impl_witness_access constants.%OrderedWith.impl_witness.940, element0 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Less.39610d.2] +// CHECK:STDOUT: %impl.elem0.loc13_5.1: %.c1d = impl_witness_access constants.%OrderedWith.impl_witness.940, element0 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Less.39610d.2] // CHECK:STDOUT: %bound_method.loc13_5.1: = bound_method %a.ref.loc13, %impl.elem0.loc13_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc13_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc13_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc13_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -1717,14 +1718,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc13_5.3: %Cpp.long_long.as.OrderedWith.impl.Less.type.c81272.1 = specific_constant imports.%Core.Less.511, @Cpp.long_long.as.OrderedWith.impl.ef6(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Less.39610d.1] // CHECK:STDOUT: %Less.ref.loc13: %Cpp.long_long.as.OrderedWith.impl.Less.type.c81272.1 = name_ref Less, %.loc13_5.3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Less.39610d.1] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.bound.loc13: = bound_method %a.ref.loc13, %Less.ref.loc13 -// CHECK:STDOUT: %impl.elem0.loc13_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc13_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc13_5.3: = bound_method %b.ref.loc13, %impl.elem0.loc13_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc13_5: init %Cpp.long_long = call %bound_method.loc13_5.3(%b.ref.loc13) // CHECK:STDOUT: %.loc13_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc13_5 // CHECK:STDOUT: %.loc13_5.5: %Cpp.long_long = converted %b.ref.loc13, %.loc13_5.4 // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.specific_fn.loc13: = specific_function %Less.ref.loc13, @Cpp.long_long.as.OrderedWith.impl.Less.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Less.specific_fn.294c7c.2] // CHECK:STDOUT: %bound_method.loc13_5.4: = bound_method %a.ref.loc13, %Cpp.long_long.as.OrderedWith.impl.Less.specific_fn.loc13 -// CHECK:STDOUT: %impl.elem0.loc13_7: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc13_7: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc13_7: = bound_method %b.ref.loc13, %impl.elem0.loc13_7 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc13_7: init %Cpp.long_long = call %bound_method.loc13_7(%b.ref.loc13) // CHECK:STDOUT: %.loc13_7.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc13_7 @@ -1732,7 +1733,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.call.loc13: init bool = call %bound_method.loc13_5.4(%a.ref.loc13, %.loc13_7.2) // CHECK:STDOUT: %a.ref.loc14: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc14: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem3.loc14: %.30d = impl_witness_access constants.%OrderedWith.impl_witness.940, element3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.777234.2] +// CHECK:STDOUT: %impl.elem3.loc14: %.f24 = impl_witness_access constants.%OrderedWith.impl_witness.940, element3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.777234.2] // CHECK:STDOUT: %bound_method.loc14_5.1: = bound_method %a.ref.loc14, %impl.elem3.loc14 // CHECK:STDOUT: %ImplicitAs.facet.loc14_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc14_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc14_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -1743,14 +1744,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc14_5.3: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.097dad.1 = specific_constant imports.%Core.GreaterOrEquivalent.489, @Cpp.long_long.as.OrderedWith.impl.ef6(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.777234.1] // CHECK:STDOUT: %GreaterOrEquivalent.ref.loc14: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.097dad.1 = name_ref GreaterOrEquivalent, %.loc14_5.3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.777234.1] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.bound.loc14: = bound_method %a.ref.loc14, %GreaterOrEquivalent.ref.loc14 -// CHECK:STDOUT: %impl.elem0.loc14_5: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc14_5: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc14_5.3: = bound_method %b.ref.loc14, %impl.elem0.loc14_5 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc14_5: init %Cpp.long_long = call %bound_method.loc14_5.3(%b.ref.loc14) // CHECK:STDOUT: %.loc14_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc14_5 // CHECK:STDOUT: %.loc14_5.5: %Cpp.long_long = converted %b.ref.loc14, %.loc14_5.4 // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc14: = specific_function %GreaterOrEquivalent.ref.loc14, @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.ffe884.2] // CHECK:STDOUT: %bound_method.loc14_5.4: = bound_method %a.ref.loc14, %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc14 -// CHECK:STDOUT: %impl.elem0.loc14_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc14_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc14_8: = bound_method %b.ref.loc14, %impl.elem0.loc14_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc14_8: init %Cpp.long_long = call %bound_method.loc14_8(%b.ref.loc14) // CHECK:STDOUT: %.loc14_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc14_8 @@ -1758,7 +1759,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.call.loc14: init bool = call %bound_method.loc14_5.4(%a.ref.loc14, %.loc14_8.2) // CHECK:STDOUT: %a.ref.loc15: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc15: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem1.loc15: %.90d = impl_witness_access constants.%OrderedWith.impl_witness.940, element1 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.29b20a.2] +// CHECK:STDOUT: %impl.elem1.loc15: %.6b0 = impl_witness_access constants.%OrderedWith.impl_witness.940, element1 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.29b20a.2] // CHECK:STDOUT: %bound_method.loc15_5.1: = bound_method %a.ref.loc15, %impl.elem1.loc15 // CHECK:STDOUT: %ImplicitAs.facet.loc15_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc15_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc15_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -1769,14 +1770,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc15_5.3: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.82788f.1 = specific_constant imports.%Core.LessOrEquivalent.aaf, @Cpp.long_long.as.OrderedWith.impl.ef6(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.29b20a.1] // CHECK:STDOUT: %LessOrEquivalent.ref.loc15: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.82788f.1 = name_ref LessOrEquivalent, %.loc15_5.3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.29b20a.1] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.bound.loc15: = bound_method %a.ref.loc15, %LessOrEquivalent.ref.loc15 -// CHECK:STDOUT: %impl.elem0.loc15_5: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc15_5: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc15_5.3: = bound_method %b.ref.loc15, %impl.elem0.loc15_5 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc15_5: init %Cpp.long_long = call %bound_method.loc15_5.3(%b.ref.loc15) // CHECK:STDOUT: %.loc15_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc15_5 // CHECK:STDOUT: %.loc15_5.5: %Cpp.long_long = converted %b.ref.loc15, %.loc15_5.4 // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc15: = specific_function %LessOrEquivalent.ref.loc15, @Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.5291ea.2] // CHECK:STDOUT: %bound_method.loc15_5.4: = bound_method %a.ref.loc15, %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc15 -// CHECK:STDOUT: %impl.elem0.loc15_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc15_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc15_8: = bound_method %b.ref.loc15, %impl.elem0.loc15_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc15_8: init %Cpp.long_long = call %bound_method.loc15_8(%b.ref.loc15) // CHECK:STDOUT: %.loc15_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc15_8 @@ -1784,7 +1785,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.call.loc15: init bool = call %bound_method.loc15_5.4(%a.ref.loc15, %.loc15_8.2) // CHECK:STDOUT: %a.ref.loc17: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc17_5.1: %.5a8 = impl_witness_access constants.%EqWith.impl_witness.5f3, element0 [concrete = constants.%Cpp.long_long.as.EqWith.impl.Equal.3190b1.2] +// CHECK:STDOUT: %impl.elem0.loc17_5.1: %.b86 = impl_witness_access constants.%EqWith.impl_witness.5f3, element0 [concrete = constants.%Cpp.long_long.as.EqWith.impl.Equal.3190b1.2] // CHECK:STDOUT: %bound_method.loc17_5.1: = bound_method %a.ref.loc17, %impl.elem0.loc17_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc17_5.1: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.82e) [concrete = constants.%ImplicitAs.facet.d52] // CHECK:STDOUT: %.loc17_5.1: %ImplicitAs.type.a03 = converted Core.IntLiteral, %ImplicitAs.facet.loc17_5.1 [concrete = constants.%ImplicitAs.facet.d52] @@ -1795,14 +1796,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc17_5.3: %Cpp.long_long.as.EqWith.impl.Equal.type.65adc5.1 = specific_constant imports.%Core.Equal.357, @Cpp.long_long.as.EqWith.impl.1bc(constants.%ImplicitAs.facet.d52) [concrete = constants.%Cpp.long_long.as.EqWith.impl.Equal.3190b1.1] // CHECK:STDOUT: %Equal.ref.loc17: %Cpp.long_long.as.EqWith.impl.Equal.type.65adc5.1 = name_ref Equal, %.loc17_5.3 [concrete = constants.%Cpp.long_long.as.EqWith.impl.Equal.3190b1.1] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.bound.loc17: = bound_method %a.ref.loc17, %Equal.ref.loc17 -// CHECK:STDOUT: %impl.elem0.loc17_5.2: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc17_5.2: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc17_5.3: = bound_method %int_1.loc17, %impl.elem0.loc17_5.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17_5: init %Cpp.long_long = call %bound_method.loc17_5.3(%int_1.loc17) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc17_5.4: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17_5 [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc17_5.5: %Cpp.long_long = converted %int_1.loc17, %.loc17_5.4 [concrete = constants.%int_1.092] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.specific_fn.loc17: = specific_function %Equal.ref.loc17, @Cpp.long_long.as.EqWith.impl.Equal.2(constants.%ImplicitAs.facet.d52) [concrete = constants.%Cpp.long_long.as.EqWith.impl.Equal.specific_fn.72c761.2] // CHECK:STDOUT: %bound_method.loc17_5.4: = bound_method %a.ref.loc17, %Cpp.long_long.as.EqWith.impl.Equal.specific_fn.loc17 -// CHECK:STDOUT: %impl.elem0.loc17_8: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc17_8: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc17_8: = bound_method %int_1.loc17, %impl.elem0.loc17_8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17_8: init %Cpp.long_long = call %bound_method.loc17_8(%int_1.loc17) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc17_8.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17_8 [concrete = constants.%int_1.092] @@ -1810,7 +1811,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.Equal.call.loc17: init bool = call %bound_method.loc17_5.4(%a.ref.loc17, %.loc17_8.2) // CHECK:STDOUT: %a.ref.loc18: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem1.loc18: %.f04 = impl_witness_access constants.%EqWith.impl_witness.5f3, element1 [concrete = constants.%Cpp.long_long.as.EqWith.impl.NotEqual.7e6eb6.2] +// CHECK:STDOUT: %impl.elem1.loc18: %.251 = impl_witness_access constants.%EqWith.impl_witness.5f3, element1 [concrete = constants.%Cpp.long_long.as.EqWith.impl.NotEqual.7e6eb6.2] // CHECK:STDOUT: %bound_method.loc18_5.1: = bound_method %a.ref.loc18, %impl.elem1.loc18 // CHECK:STDOUT: %ImplicitAs.facet.loc18_5.1: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.82e) [concrete = constants.%ImplicitAs.facet.d52] // CHECK:STDOUT: %.loc18_5.1: %ImplicitAs.type.a03 = converted Core.IntLiteral, %ImplicitAs.facet.loc18_5.1 [concrete = constants.%ImplicitAs.facet.d52] @@ -1821,14 +1822,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc18_5.3: %Cpp.long_long.as.EqWith.impl.NotEqual.type.84cb6f.1 = specific_constant imports.%Core.NotEqual.dea, @Cpp.long_long.as.EqWith.impl.1bc(constants.%ImplicitAs.facet.d52) [concrete = constants.%Cpp.long_long.as.EqWith.impl.NotEqual.7e6eb6.1] // CHECK:STDOUT: %NotEqual.ref.loc18: %Cpp.long_long.as.EqWith.impl.NotEqual.type.84cb6f.1 = name_ref NotEqual, %.loc18_5.3 [concrete = constants.%Cpp.long_long.as.EqWith.impl.NotEqual.7e6eb6.1] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.bound.loc18: = bound_method %a.ref.loc18, %NotEqual.ref.loc18 -// CHECK:STDOUT: %impl.elem0.loc18_5: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc18_5: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc18_5.3: = bound_method %int_1.loc18, %impl.elem0.loc18_5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_5: init %Cpp.long_long = call %bound_method.loc18_5.3(%int_1.loc18) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc18_5.4: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_5 [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc18_5.5: %Cpp.long_long = converted %int_1.loc18, %.loc18_5.4 [concrete = constants.%int_1.092] // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.specific_fn.loc18: = specific_function %NotEqual.ref.loc18, @Cpp.long_long.as.EqWith.impl.NotEqual.2(constants.%ImplicitAs.facet.d52) [concrete = constants.%Cpp.long_long.as.EqWith.impl.NotEqual.specific_fn.ace954.2] // CHECK:STDOUT: %bound_method.loc18_5.4: = bound_method %a.ref.loc18, %Cpp.long_long.as.EqWith.impl.NotEqual.specific_fn.loc18 -// CHECK:STDOUT: %impl.elem0.loc18_8: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc18_8: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc18_8: = bound_method %int_1.loc18, %impl.elem0.loc18_8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_8: init %Cpp.long_long = call %bound_method.loc18_8(%int_1.loc18) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc18_8.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_8 [concrete = constants.%int_1.092] @@ -1836,7 +1837,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.EqWith.impl.NotEqual.call.loc18: init bool = call %bound_method.loc18_5.4(%a.ref.loc18, %.loc18_8.2) // CHECK:STDOUT: %a.ref.loc19: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem2.loc19: %.490 = impl_witness_access constants.%OrderedWith.impl_witness.31a, element2 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Greater.b790ce.2] +// CHECK:STDOUT: %impl.elem2.loc19: %.5d9 = impl_witness_access constants.%OrderedWith.impl_witness.31a, element2 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Greater.b790ce.2] // CHECK:STDOUT: %bound_method.loc19_5.1: = bound_method %a.ref.loc19, %impl.elem2.loc19 // CHECK:STDOUT: %ImplicitAs.facet.loc19_5.1: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.82e) [concrete = constants.%ImplicitAs.facet.d52] // CHECK:STDOUT: %.loc19_5.1: %ImplicitAs.type.a03 = converted Core.IntLiteral, %ImplicitAs.facet.loc19_5.1 [concrete = constants.%ImplicitAs.facet.d52] @@ -1847,14 +1848,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc19_5.3: %Cpp.long_long.as.OrderedWith.impl.Greater.type.2f531e.1 = specific_constant imports.%Core.Greater.a10, @Cpp.long_long.as.OrderedWith.impl.ef6(constants.%ImplicitAs.facet.d52) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Greater.b790ce.1] // CHECK:STDOUT: %Greater.ref.loc19: %Cpp.long_long.as.OrderedWith.impl.Greater.type.2f531e.1 = name_ref Greater, %.loc19_5.3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Greater.b790ce.1] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.bound.loc19: = bound_method %a.ref.loc19, %Greater.ref.loc19 -// CHECK:STDOUT: %impl.elem0.loc19_5: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc19_5: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc19_5.3: = bound_method %int_1.loc19, %impl.elem0.loc19_5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19_5: init %Cpp.long_long = call %bound_method.loc19_5.3(%int_1.loc19) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc19_5.4: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19_5 [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc19_5.5: %Cpp.long_long = converted %int_1.loc19, %.loc19_5.4 [concrete = constants.%int_1.092] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.specific_fn.loc19: = specific_function %Greater.ref.loc19, @Cpp.long_long.as.OrderedWith.impl.Greater.2(constants.%ImplicitAs.facet.d52) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Greater.specific_fn.b9662b.2] // CHECK:STDOUT: %bound_method.loc19_5.4: = bound_method %a.ref.loc19, %Cpp.long_long.as.OrderedWith.impl.Greater.specific_fn.loc19 -// CHECK:STDOUT: %impl.elem0.loc19_7: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc19_7: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc19_7: = bound_method %int_1.loc19, %impl.elem0.loc19_7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19_7: init %Cpp.long_long = call %bound_method.loc19_7(%int_1.loc19) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc19_7.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19_7 [concrete = constants.%int_1.092] @@ -1862,7 +1863,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Greater.call.loc19: init bool = call %bound_method.loc19_5.4(%a.ref.loc19, %.loc19_7.2) // CHECK:STDOUT: %a.ref.loc20: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %int_1.loc20: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc20_5.1: %.47c = impl_witness_access constants.%OrderedWith.impl_witness.31a, element0 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Less.26cbb1.2] +// CHECK:STDOUT: %impl.elem0.loc20_5.1: %.885 = impl_witness_access constants.%OrderedWith.impl_witness.31a, element0 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Less.26cbb1.2] // CHECK:STDOUT: %bound_method.loc20_5.1: = bound_method %a.ref.loc20, %impl.elem0.loc20_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc20_5.1: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.82e) [concrete = constants.%ImplicitAs.facet.d52] // CHECK:STDOUT: %.loc20_5.1: %ImplicitAs.type.a03 = converted Core.IntLiteral, %ImplicitAs.facet.loc20_5.1 [concrete = constants.%ImplicitAs.facet.d52] @@ -1873,14 +1874,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc20_5.3: %Cpp.long_long.as.OrderedWith.impl.Less.type.ac9e3b.1 = specific_constant imports.%Core.Less.511, @Cpp.long_long.as.OrderedWith.impl.ef6(constants.%ImplicitAs.facet.d52) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Less.26cbb1.1] // CHECK:STDOUT: %Less.ref.loc20: %Cpp.long_long.as.OrderedWith.impl.Less.type.ac9e3b.1 = name_ref Less, %.loc20_5.3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Less.26cbb1.1] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.bound.loc20: = bound_method %a.ref.loc20, %Less.ref.loc20 -// CHECK:STDOUT: %impl.elem0.loc20_5.2: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc20_5.2: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc20_5.3: = bound_method %int_1.loc20, %impl.elem0.loc20_5.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20_5: init %Cpp.long_long = call %bound_method.loc20_5.3(%int_1.loc20) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc20_5.4: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20_5 [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc20_5.5: %Cpp.long_long = converted %int_1.loc20, %.loc20_5.4 [concrete = constants.%int_1.092] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.specific_fn.loc20: = specific_function %Less.ref.loc20, @Cpp.long_long.as.OrderedWith.impl.Less.2(constants.%ImplicitAs.facet.d52) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.Less.specific_fn.50db42.2] // CHECK:STDOUT: %bound_method.loc20_5.4: = bound_method %a.ref.loc20, %Cpp.long_long.as.OrderedWith.impl.Less.specific_fn.loc20 -// CHECK:STDOUT: %impl.elem0.loc20_7: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc20_7: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc20_7: = bound_method %int_1.loc20, %impl.elem0.loc20_7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20_7: init %Cpp.long_long = call %bound_method.loc20_7(%int_1.loc20) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc20_7.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20_7 [concrete = constants.%int_1.092] @@ -1888,7 +1889,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.Less.call.loc20: init bool = call %bound_method.loc20_5.4(%a.ref.loc20, %.loc20_7.2) // CHECK:STDOUT: %a.ref.loc21: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem3.loc21: %.f68 = impl_witness_access constants.%OrderedWith.impl_witness.31a, element3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1b92ea.2] +// CHECK:STDOUT: %impl.elem3.loc21: %.ea1 = impl_witness_access constants.%OrderedWith.impl_witness.31a, element3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1b92ea.2] // CHECK:STDOUT: %bound_method.loc21_5.1: = bound_method %a.ref.loc21, %impl.elem3.loc21 // CHECK:STDOUT: %ImplicitAs.facet.loc21_5.1: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.82e) [concrete = constants.%ImplicitAs.facet.d52] // CHECK:STDOUT: %.loc21_5.1: %ImplicitAs.type.a03 = converted Core.IntLiteral, %ImplicitAs.facet.loc21_5.1 [concrete = constants.%ImplicitAs.facet.d52] @@ -1899,14 +1900,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc21_5.3: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.23f245.1 = specific_constant imports.%Core.GreaterOrEquivalent.489, @Cpp.long_long.as.OrderedWith.impl.ef6(constants.%ImplicitAs.facet.d52) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1b92ea.1] // CHECK:STDOUT: %GreaterOrEquivalent.ref.loc21: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.type.23f245.1 = name_ref GreaterOrEquivalent, %.loc21_5.3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.1b92ea.1] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.bound.loc21: = bound_method %a.ref.loc21, %GreaterOrEquivalent.ref.loc21 -// CHECK:STDOUT: %impl.elem0.loc21_5: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc21_5: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc21_5.3: = bound_method %int_1.loc21, %impl.elem0.loc21_5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21_5: init %Cpp.long_long = call %bound_method.loc21_5.3(%int_1.loc21) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc21_5.4: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21_5 [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc21_5.5: %Cpp.long_long = converted %int_1.loc21, %.loc21_5.4 [concrete = constants.%int_1.092] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc21: = specific_function %GreaterOrEquivalent.ref.loc21, @Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.2(constants.%ImplicitAs.facet.d52) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.662ddf.2] // CHECK:STDOUT: %bound_method.loc21_5.4: = bound_method %a.ref.loc21, %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc21 -// CHECK:STDOUT: %impl.elem0.loc21_8: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc21_8: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc21_8: = bound_method %int_1.loc21, %impl.elem0.loc21_8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21_8: init %Cpp.long_long = call %bound_method.loc21_8(%int_1.loc21) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc21_8.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21_8 [concrete = constants.%int_1.092] @@ -1914,7 +1915,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.GreaterOrEquivalent.call.loc21: init bool = call %bound_method.loc21_5.4(%a.ref.loc21, %.loc21_8.2) // CHECK:STDOUT: %a.ref.loc22: %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %int_1.loc22: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem1.loc22: %.c1a = impl_witness_access constants.%OrderedWith.impl_witness.31a, element1 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.50ecf5.2] +// CHECK:STDOUT: %impl.elem1.loc22: %.da4 = impl_witness_access constants.%OrderedWith.impl_witness.31a, element1 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.50ecf5.2] // CHECK:STDOUT: %bound_method.loc22_5.1: = bound_method %a.ref.loc22, %impl.elem1.loc22 // CHECK:STDOUT: %ImplicitAs.facet.loc22_5.1: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.82e) [concrete = constants.%ImplicitAs.facet.d52] // CHECK:STDOUT: %.loc22_5.1: %ImplicitAs.type.a03 = converted Core.IntLiteral, %ImplicitAs.facet.loc22_5.1 [concrete = constants.%ImplicitAs.facet.d52] @@ -1925,14 +1926,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc22_5.3: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.e236e2.1 = specific_constant imports.%Core.LessOrEquivalent.aaf, @Cpp.long_long.as.OrderedWith.impl.ef6(constants.%ImplicitAs.facet.d52) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.50ecf5.1] // CHECK:STDOUT: %LessOrEquivalent.ref.loc22: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.type.e236e2.1 = name_ref LessOrEquivalent, %.loc22_5.3 [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.50ecf5.1] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.bound.loc22: = bound_method %a.ref.loc22, %LessOrEquivalent.ref.loc22 -// CHECK:STDOUT: %impl.elem0.loc22_5: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc22_5: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc22_5.3: = bound_method %int_1.loc22, %impl.elem0.loc22_5 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_5: init %Cpp.long_long = call %bound_method.loc22_5.3(%int_1.loc22) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc22_5.4: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_5 [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc22_5.5: %Cpp.long_long = converted %int_1.loc22, %.loc22_5.4 [concrete = constants.%int_1.092] // CHECK:STDOUT: %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc22: = specific_function %LessOrEquivalent.ref.loc22, @Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.2(constants.%ImplicitAs.facet.d52) [concrete = constants.%Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.b1c4c5.2] // CHECK:STDOUT: %bound_method.loc22_5.4: = bound_method %a.ref.loc22, %Cpp.long_long.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc22 -// CHECK:STDOUT: %impl.elem0.loc22_8: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc22_8: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc22_8: = bound_method %int_1.loc22, %impl.elem0.loc22_8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_8: init %Cpp.long_long = call %bound_method.loc22_8(%int_1.loc22) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc22_8.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_8 [concrete = constants.%int_1.092] @@ -1950,17 +1951,15 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long: type = class_type @LongLong64 [concrete] // CHECK:STDOUT: %pattern_type.76e: type = pattern_type %Cpp.long_long [concrete] // CHECK:STDOUT: %ImplicitAs.type.a03: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6e4: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long_long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.82e: = impl_witness imports.%ImplicitAs.impl_witness_table.896 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.d52: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.82e) [concrete] -// CHECK:STDOUT: %.a93: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet.d52 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.dcd: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet.d52) [concrete] +// CHECK:STDOUT: %.a119: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.dcd, %ImplicitAs.facet.d52 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.aba: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.a20: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.aba = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.a20 [concrete] // CHECK:STDOUT: %int_1.092: %Cpp.long_long = int_value 1 [concrete] // CHECK:STDOUT: %EqWith.type.4be: type = facet_type <@EqWith, @EqWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %EqWith.Equal.type.6d5: type = fn_type @EqWith.Equal, @EqWith(%Cpp.long_long) [concrete] -// CHECK:STDOUT: %EqWith.NotEqual.type.c18: type = fn_type @EqWith.NotEqual, @EqWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %T.ea5: %ImplicitAs.type.a03 = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.type.d96a78.1: type = fn_type @T.binding.as_type.as.EqWith.impl.NotEqual.3, @T.binding.as_type.as.EqWith.impl.b07(%T.ea5) [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.83a9a5.1: %T.binding.as_type.as.EqWith.impl.NotEqual.type.d96a78.1 = struct_value () [symbolic] @@ -1982,20 +1981,19 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.type.7cb54d.2: type = fn_type @T.binding.as_type.as.EqWith.impl.NotEqual.3, @T.binding.as_type.as.EqWith.impl.b07(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.bd87a0.2: %T.binding.as_type.as.EqWith.impl.NotEqual.type.7cb54d.2 = struct_value () [concrete] // CHECK:STDOUT: %EqWith.facet.71f: %EqWith.type.4be = facet_value %i64, (%EqWith.impl_witness.52e) [concrete] -// CHECK:STDOUT: %.7df: type = fn_type_with_self_type %EqWith.Equal.type.6d5, %EqWith.facet.71f [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.7b1: type = fn_type @EqWith.WithSelf.Equal, @EqWith(%Cpp.long_long, %EqWith.facet.71f) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.dfc: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith(%Cpp.long_long, %EqWith.facet.71f) [concrete] +// CHECK:STDOUT: %.692: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.7b1, %EqWith.facet.71f [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.14854f.1: = specific_function %T.binding.as_type.as.EqWith.impl.Equal.971403.2, @T.binding.as_type.as.EqWith.impl.Equal.3(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.14854f.2: = specific_function %T.binding.as_type.as.EqWith.impl.Equal.971403.1, @T.binding.as_type.as.EqWith.impl.Equal.4(%ImplicitAs.facet.c59) [concrete] -// CHECK:STDOUT: %.b29: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet.c59 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.653: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet.c59) [concrete] +// CHECK:STDOUT: %.cb1: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.653, %ImplicitAs.facet.c59 [concrete] // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.type: type = fn_type @i64.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert: %i64.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] -// CHECK:STDOUT: %.232: type = fn_type_with_self_type %EqWith.NotEqual.type.c18, %EqWith.facet.71f [concrete] +// CHECK:STDOUT: %.1ce: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.dfc, %EqWith.facet.71f [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.b0f056.1: = specific_function %T.binding.as_type.as.EqWith.impl.NotEqual.bd87a0.2, @T.binding.as_type.as.EqWith.impl.NotEqual.3(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.b0f056.2: = specific_function %T.binding.as_type.as.EqWith.impl.NotEqual.bd87a0.1, @T.binding.as_type.as.EqWith.impl.NotEqual.4(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %OrderedWith.type.65e: type = facet_type <@OrderedWith, @OrderedWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %OrderedWith.Less.type.bc1: type = fn_type @OrderedWith.Less, @OrderedWith(%Cpp.long_long) [concrete] -// CHECK:STDOUT: %OrderedWith.LessOrEquivalent.type.1cc: type = fn_type @OrderedWith.LessOrEquivalent, @OrderedWith(%Cpp.long_long) [concrete] -// CHECK:STDOUT: %OrderedWith.Greater.type.921: type = fn_type @OrderedWith.Greater, @OrderedWith(%Cpp.long_long) [concrete] -// CHECK:STDOUT: %OrderedWith.GreaterOrEquivalent.type.fcf: type = fn_type @OrderedWith.GreaterOrEquivalent, @OrderedWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.b7b4dd.1: type = fn_type @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.3, @T.binding.as_type.as.OrderedWith.impl.895(%T.ea5) [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.06285b.1: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.b7b4dd.1 = struct_value () [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.b7b4dd.2: type = fn_type @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.4, @T.binding.as_type.as.OrderedWith.impl.895(%T.ea5) [symbolic] @@ -2030,16 +2028,20 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.6d7684.2: type = fn_type @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.3, @T.binding.as_type.as.OrderedWith.impl.895(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.7a66f5.2: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.6d7684.2 = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.facet.2d0: %OrderedWith.type.65e = facet_value %i64, (%OrderedWith.impl_witness.5fb) [concrete] -// CHECK:STDOUT: %.ed1: type = fn_type_with_self_type %OrderedWith.Greater.type.921, %OrderedWith.facet.2d0 [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.ee5: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(%Cpp.long_long, %OrderedWith.facet.2d0) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.9f3: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith(%Cpp.long_long, %OrderedWith.facet.2d0) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.c5a: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith(%Cpp.long_long, %OrderedWith.facet.2d0) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.3ba: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith(%Cpp.long_long, %OrderedWith.facet.2d0) [concrete] +// CHECK:STDOUT: %.c4a: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.c5a, %OrderedWith.facet.2d0 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.fc67f6.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.Greater.356766.2, @T.binding.as_type.as.OrderedWith.impl.Greater.3(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.fc67f6.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.Greater.356766.1, @T.binding.as_type.as.OrderedWith.impl.Greater.4(%ImplicitAs.facet.c59) [concrete] -// CHECK:STDOUT: %.c89: type = fn_type_with_self_type %OrderedWith.Less.type.bc1, %OrderedWith.facet.2d0 [concrete] +// CHECK:STDOUT: %.468: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.ee5, %OrderedWith.facet.2d0 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.ab0306.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.Less.4846a7.2, @T.binding.as_type.as.OrderedWith.impl.Less.3(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.ab0306.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.Less.4846a7.1, @T.binding.as_type.as.OrderedWith.impl.Less.4(%ImplicitAs.facet.c59) [concrete] -// CHECK:STDOUT: %.00e: type = fn_type_with_self_type %OrderedWith.GreaterOrEquivalent.type.fcf, %OrderedWith.facet.2d0 [concrete] +// CHECK:STDOUT: %.a3a: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.3ba, %OrderedWith.facet.2d0 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.b93d5d.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.7a66f5.2, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.3(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.b93d5d.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.7a66f5.1, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.4(%ImplicitAs.facet.c59) [concrete] -// CHECK:STDOUT: %.3fe: type = fn_type_with_self_type %OrderedWith.LessOrEquivalent.type.1cc, %OrderedWith.facet.2d0 [concrete] +// CHECK:STDOUT: %.ee9: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.9f3, %OrderedWith.facet.2d0 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.67339b.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.ebfce3.2, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.3(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.67339b.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.ebfce3.1, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.4(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %EqWith.impl_witness.a59: = impl_witness imports.%EqWith.impl_witness_table.7e5, @T.binding.as_type.as.EqWith.impl.b07(%ImplicitAs.facet.d52) [concrete] @@ -2052,14 +2054,16 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.type.635206.2: type = fn_type @T.binding.as_type.as.EqWith.impl.NotEqual.3, @T.binding.as_type.as.EqWith.impl.b07(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.55dccd.2: %T.binding.as_type.as.EqWith.impl.NotEqual.type.635206.2 = struct_value () [concrete] // CHECK:STDOUT: %EqWith.facet.db2: %EqWith.type.4be = facet_value Core.IntLiteral, (%EqWith.impl_witness.a59) [concrete] -// CHECK:STDOUT: %.90a: type = fn_type_with_self_type %EqWith.Equal.type.6d5, %EqWith.facet.db2 [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.634: type = fn_type @EqWith.WithSelf.Equal, @EqWith(%Cpp.long_long, %EqWith.facet.db2) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.297: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith(%Cpp.long_long, %EqWith.facet.db2) [concrete] +// CHECK:STDOUT: %.b72: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.634, %EqWith.facet.db2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.bound.e0853e.1: = bound_method %int_1.5b8, %T.binding.as_type.as.EqWith.impl.Equal.3cf73d.2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.54d028.1: = specific_function %T.binding.as_type.as.EqWith.impl.Equal.3cf73d.2, @T.binding.as_type.as.EqWith.impl.Equal.3(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %bound_method.1699f5.1: = bound_method %int_1.5b8, %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.54d028.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.bound.e0853e.2: = bound_method %int_1.5b8, %T.binding.as_type.as.EqWith.impl.Equal.3cf73d.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.54d028.2: = specific_function %T.binding.as_type.as.EqWith.impl.Equal.3cf73d.1, @T.binding.as_type.as.EqWith.impl.Equal.4(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %bound_method.1699f5.2: = bound_method %int_1.5b8, %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.54d028.2 [concrete] -// CHECK:STDOUT: %.d05: type = fn_type_with_self_type %EqWith.NotEqual.type.c18, %EqWith.facet.db2 [concrete] +// CHECK:STDOUT: %.c36: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.297, %EqWith.facet.db2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.bound.0bb6c5.1: = bound_method %int_1.5b8, %T.binding.as_type.as.EqWith.impl.NotEqual.55dccd.2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.d399fc.1: = specific_function %T.binding.as_type.as.EqWith.impl.NotEqual.55dccd.2, @T.binding.as_type.as.EqWith.impl.NotEqual.3(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %bound_method.7aede5.1: = bound_method %int_1.5b8, %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.d399fc.1 [concrete] @@ -2084,28 +2088,32 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.fc9354.2: type = fn_type @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.3, @T.binding.as_type.as.OrderedWith.impl.895(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.755c9d.2: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.type.fc9354.2 = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.facet.88a: %OrderedWith.type.65e = facet_value Core.IntLiteral, (%OrderedWith.impl_witness.aae) [concrete] -// CHECK:STDOUT: %.5c6: type = fn_type_with_self_type %OrderedWith.Greater.type.921, %OrderedWith.facet.88a [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.d22: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(%Cpp.long_long, %OrderedWith.facet.88a) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.2d9: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith(%Cpp.long_long, %OrderedWith.facet.88a) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.3ab: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith(%Cpp.long_long, %OrderedWith.facet.88a) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.907: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith(%Cpp.long_long, %OrderedWith.facet.88a) [concrete] +// CHECK:STDOUT: %.dee: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.3ab, %OrderedWith.facet.88a [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.bound.483e05.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Greater.9aafa8.2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.d2b07b.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.Greater.9aafa8.2, @T.binding.as_type.as.OrderedWith.impl.Greater.3(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %bound_method.a32da1.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.d2b07b.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.bound.483e05.2: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Greater.9aafa8.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.d2b07b.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.Greater.9aafa8.1, @T.binding.as_type.as.OrderedWith.impl.Greater.4(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %bound_method.a32da1.2: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.d2b07b.2 [concrete] -// CHECK:STDOUT: %.f13: type = fn_type_with_self_type %OrderedWith.Less.type.bc1, %OrderedWith.facet.88a [concrete] +// CHECK:STDOUT: %.97f: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.d22, %OrderedWith.facet.88a [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.bound.66e1cb.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Less.e8fdd7.2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.06ee45.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.Less.e8fdd7.2, @T.binding.as_type.as.OrderedWith.impl.Less.3(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %bound_method.8f808d.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.06ee45.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.bound.66e1cb.2: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Less.e8fdd7.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.06ee45.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.Less.e8fdd7.1, @T.binding.as_type.as.OrderedWith.impl.Less.4(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %bound_method.8f808d.2: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.06ee45.2 [concrete] -// CHECK:STDOUT: %.184: type = fn_type_with_self_type %OrderedWith.GreaterOrEquivalent.type.fcf, %OrderedWith.facet.88a [concrete] +// CHECK:STDOUT: %.d57: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.907, %OrderedWith.facet.88a [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.bound.b10f47.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.755c9d.2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.ca5627.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.755c9d.2, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.3(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %bound_method.2c548f.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.ca5627.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.bound.b10f47.2: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.755c9d.1 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.ca5627.2: = specific_function %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.755c9d.1, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.4(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %bound_method.2c548f.2: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.ca5627.2 [concrete] -// CHECK:STDOUT: %.5f9: type = fn_type_with_self_type %OrderedWith.LessOrEquivalent.type.1cc, %OrderedWith.facet.88a [concrete] +// CHECK:STDOUT: %.ba2: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.2d9, %OrderedWith.facet.88a [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.bound.0b467c.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.9bb133.2 [concrete] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.2d74e0.1: = specific_function %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.9bb133.2, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.3(%ImplicitAs.facet.d52) [concrete] // CHECK:STDOUT: %bound_method.caef99.1: = bound_method %int_1.5b8, %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.2d74e0.1 [concrete] @@ -2126,8 +2134,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %EqWith.impl_witness_table.7e5 = impl_witness_table (%Core.import_ref.eb5, %Core.import_ref.597), @T.binding.as_type.as.EqWith.impl.b07 [concrete] // CHECK:STDOUT: %Core.NotEqual.421: @T.binding.as_type.as.EqWith.impl.b07.%T.binding.as_type.as.EqWith.impl.NotEqual.type.1 (%T.binding.as_type.as.EqWith.impl.NotEqual.type.d96a78.2) = import_ref Core//prelude/types/cpp/int, NotEqual, loaded [symbolic = @T.binding.as_type.as.EqWith.impl.b07.%T.binding.as_type.as.EqWith.impl.NotEqual.1 (constants.%T.binding.as_type.as.EqWith.impl.NotEqual.83a9a5.2)] // CHECK:STDOUT: %Core.Equal.d94: @T.binding.as_type.as.EqWith.impl.b07.%T.binding.as_type.as.EqWith.impl.Equal.type.1 (%T.binding.as_type.as.EqWith.impl.Equal.type.066d1d.2) = import_ref Core//prelude/types/cpp/int, Equal, loaded [symbolic = @T.binding.as_type.as.EqWith.impl.b07.%T.binding.as_type.as.EqWith.impl.Equal.1 (constants.%T.binding.as_type.as.EqWith.impl.Equal.bbf235.2)] -// CHECK:STDOUT: %Core.import_ref.4f4b: %i64.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%i64.as.ImplicitAs.impl.Convert] -// CHECK:STDOUT: %ImplicitAs.impl_witness_table.b19 = impl_witness_table (%Core.import_ref.4f4b), @i64.as.ImplicitAs.impl [concrete] +// CHECK:STDOUT: %Core.import_ref.4f4: %i64.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %ImplicitAs.impl_witness_table.b19 = impl_witness_table (%Core.import_ref.4f4), @i64.as.ImplicitAs.impl [concrete] // CHECK:STDOUT: %Core.import_ref.d4b: @T.binding.as_type.as.OrderedWith.impl.895.%T.binding.as_type.as.OrderedWith.impl.Less.type.2 (%T.binding.as_type.as.OrderedWith.impl.Less.type.4623e2.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.binding.as_type.as.OrderedWith.impl.895.%T.binding.as_type.as.OrderedWith.impl.Less.2 (constants.%T.binding.as_type.as.OrderedWith.impl.Less.31696a.1)] // CHECK:STDOUT: %Core.import_ref.54d: @T.binding.as_type.as.OrderedWith.impl.895.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.type.2 (%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.type.bfda3a.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.binding.as_type.as.OrderedWith.impl.895.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.2 (constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.d63604.1)] // CHECK:STDOUT: %Core.import_ref.aa8: @T.binding.as_type.as.OrderedWith.impl.895.%T.binding.as_type.as.OrderedWith.impl.Greater.type.2 (%T.binding.as_type.as.OrderedWith.impl.Greater.type.1733df.1) = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [symbolic = @T.binding.as_type.as.OrderedWith.impl.895.%T.binding.as_type.as.OrderedWith.impl.Greater.2 (constants.%T.binding.as_type.as.OrderedWith.impl.Greater.07eebf.1)] @@ -2150,7 +2158,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %long_long.ref: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc9: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc9: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long_long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc9_26.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.092] @@ -2158,7 +2166,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %a: %Cpp.long_long = value_binding a, %.loc9_26.2 // CHECK:STDOUT: %b.ref.loc10: %i64 = name_ref b, %b // CHECK:STDOUT: %a.ref.loc10: %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc10_5: %.7df = impl_witness_access constants.%EqWith.impl_witness.52e, element0 [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.971403.2] +// CHECK:STDOUT: %impl.elem0.loc10_5: %.692 = impl_witness_access constants.%EqWith.impl_witness.52e, element0 [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.971403.2] // CHECK:STDOUT: %bound_method.loc10_5.1: = bound_method %b.ref.loc10, %impl.elem0.loc10_5 // CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10_5, @T.binding.as_type.as.EqWith.impl.Equal.3(constants.%ImplicitAs.facet.c59) [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.specific_fn.14854f.1] // CHECK:STDOUT: %bound_method.loc10_5.2: = bound_method %b.ref.loc10, %specific_fn.loc10 @@ -2167,7 +2175,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.bound.loc10: = bound_method %b.ref.loc10, %Equal.ref.loc10 // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.loc10: = specific_function %Equal.ref.loc10, @T.binding.as_type.as.EqWith.impl.Equal.4(constants.%ImplicitAs.facet.c59) [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.specific_fn.14854f.2] // CHECK:STDOUT: %bound_method.loc10_5.3: = bound_method %b.ref.loc10, %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.loc10 -// CHECK:STDOUT: %impl.elem0.loc10_3: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_3: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_3: = bound_method %b.ref.loc10, %impl.elem0.loc10_3 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc10: init %Cpp.long_long = call %bound_method.loc10_3(%b.ref.loc10) // CHECK:STDOUT: %.loc10_3.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc10 @@ -2175,7 +2183,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.call.loc10: init bool = call %bound_method.loc10_5.3(%.loc10_3.2, %a.ref.loc10) // CHECK:STDOUT: %b.ref.loc11: %i64 = name_ref b, %b // CHECK:STDOUT: %a.ref.loc11: %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem1.loc11: %.232 = impl_witness_access constants.%EqWith.impl_witness.52e, element1 [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.bd87a0.2] +// CHECK:STDOUT: %impl.elem1.loc11: %.1ce = impl_witness_access constants.%EqWith.impl_witness.52e, element1 [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.bd87a0.2] // CHECK:STDOUT: %bound_method.loc11_5.1: = bound_method %b.ref.loc11, %impl.elem1.loc11 // CHECK:STDOUT: %specific_fn.loc11: = specific_function %impl.elem1.loc11, @T.binding.as_type.as.EqWith.impl.NotEqual.3(constants.%ImplicitAs.facet.c59) [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.b0f056.1] // CHECK:STDOUT: %bound_method.loc11_5.2: = bound_method %b.ref.loc11, %specific_fn.loc11 @@ -2184,7 +2192,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.bound.loc11: = bound_method %b.ref.loc11, %NotEqual.ref.loc11 // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.loc11: = specific_function %NotEqual.ref.loc11, @T.binding.as_type.as.EqWith.impl.NotEqual.4(constants.%ImplicitAs.facet.c59) [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.b0f056.2] // CHECK:STDOUT: %bound_method.loc11_5.3: = bound_method %b.ref.loc11, %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.loc11 -// CHECK:STDOUT: %impl.elem0.loc11: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc11: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc11_3: = bound_method %b.ref.loc11, %impl.elem0.loc11 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc11: init %Cpp.long_long = call %bound_method.loc11_3(%b.ref.loc11) // CHECK:STDOUT: %.loc11_3.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc11 @@ -2192,7 +2200,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.call.loc11: init bool = call %bound_method.loc11_5.3(%.loc11_3.2, %a.ref.loc11) // CHECK:STDOUT: %b.ref.loc12: %i64 = name_ref b, %b // CHECK:STDOUT: %a.ref.loc12: %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem2.loc12: %.ed1 = impl_witness_access constants.%OrderedWith.impl_witness.5fb, element2 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.356766.2] +// CHECK:STDOUT: %impl.elem2.loc12: %.c4a = impl_witness_access constants.%OrderedWith.impl_witness.5fb, element2 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.356766.2] // CHECK:STDOUT: %bound_method.loc12_5.1: = bound_method %b.ref.loc12, %impl.elem2.loc12 // CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem2.loc12, @T.binding.as_type.as.OrderedWith.impl.Greater.3(constants.%ImplicitAs.facet.c59) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.fc67f6.1] // CHECK:STDOUT: %bound_method.loc12_5.2: = bound_method %b.ref.loc12, %specific_fn.loc12 @@ -2201,7 +2209,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.bound.loc12: = bound_method %b.ref.loc12, %Greater.ref.loc12 // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.loc12: = specific_function %Greater.ref.loc12, @T.binding.as_type.as.OrderedWith.impl.Greater.4(constants.%ImplicitAs.facet.c59) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.fc67f6.2] // CHECK:STDOUT: %bound_method.loc12_5.3: = bound_method %b.ref.loc12, %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.loc12 -// CHECK:STDOUT: %impl.elem0.loc12: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc12: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc12_3: = bound_method %b.ref.loc12, %impl.elem0.loc12 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc12: init %Cpp.long_long = call %bound_method.loc12_3(%b.ref.loc12) // CHECK:STDOUT: %.loc12_3.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc12 @@ -2209,7 +2217,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.call.loc12: init bool = call %bound_method.loc12_5.3(%.loc12_3.2, %a.ref.loc12) // CHECK:STDOUT: %b.ref.loc13: %i64 = name_ref b, %b // CHECK:STDOUT: %a.ref.loc13: %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc13_5: %.c89 = impl_witness_access constants.%OrderedWith.impl_witness.5fb, element0 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.4846a7.2] +// CHECK:STDOUT: %impl.elem0.loc13_5: %.468 = impl_witness_access constants.%OrderedWith.impl_witness.5fb, element0 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.4846a7.2] // CHECK:STDOUT: %bound_method.loc13_5.1: = bound_method %b.ref.loc13, %impl.elem0.loc13_5 // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13_5, @T.binding.as_type.as.OrderedWith.impl.Less.3(constants.%ImplicitAs.facet.c59) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.ab0306.1] // CHECK:STDOUT: %bound_method.loc13_5.2: = bound_method %b.ref.loc13, %specific_fn.loc13 @@ -2218,7 +2226,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.bound.loc13: = bound_method %b.ref.loc13, %Less.ref.loc13 // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.loc13: = specific_function %Less.ref.loc13, @T.binding.as_type.as.OrderedWith.impl.Less.4(constants.%ImplicitAs.facet.c59) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.ab0306.2] // CHECK:STDOUT: %bound_method.loc13_5.3: = bound_method %b.ref.loc13, %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.loc13 -// CHECK:STDOUT: %impl.elem0.loc13_3: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc13_3: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc13_3: = bound_method %b.ref.loc13, %impl.elem0.loc13_3 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc13: init %Cpp.long_long = call %bound_method.loc13_3(%b.ref.loc13) // CHECK:STDOUT: %.loc13_3.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc13 @@ -2226,7 +2234,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.call.loc13: init bool = call %bound_method.loc13_5.3(%.loc13_3.2, %a.ref.loc13) // CHECK:STDOUT: %b.ref.loc14: %i64 = name_ref b, %b // CHECK:STDOUT: %a.ref.loc14: %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem3.loc14: %.00e = impl_witness_access constants.%OrderedWith.impl_witness.5fb, element3 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.7a66f5.2] +// CHECK:STDOUT: %impl.elem3.loc14: %.a3a = impl_witness_access constants.%OrderedWith.impl_witness.5fb, element3 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.7a66f5.2] // CHECK:STDOUT: %bound_method.loc14_5.1: = bound_method %b.ref.loc14, %impl.elem3.loc14 // CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem3.loc14, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.3(constants.%ImplicitAs.facet.c59) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.b93d5d.1] // CHECK:STDOUT: %bound_method.loc14_5.2: = bound_method %b.ref.loc14, %specific_fn.loc14 @@ -2235,7 +2243,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.bound.loc14: = bound_method %b.ref.loc14, %GreaterOrEquivalent.ref.loc14 // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc14: = specific_function %GreaterOrEquivalent.ref.loc14, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.4(constants.%ImplicitAs.facet.c59) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.b93d5d.2] // CHECK:STDOUT: %bound_method.loc14_5.3: = bound_method %b.ref.loc14, %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc14 -// CHECK:STDOUT: %impl.elem0.loc14: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc14: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc14_3: = bound_method %b.ref.loc14, %impl.elem0.loc14 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc14: init %Cpp.long_long = call %bound_method.loc14_3(%b.ref.loc14) // CHECK:STDOUT: %.loc14_3.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc14 @@ -2243,7 +2251,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.call.loc14: init bool = call %bound_method.loc14_5.3(%.loc14_3.2, %a.ref.loc14) // CHECK:STDOUT: %b.ref.loc15: %i64 = name_ref b, %b // CHECK:STDOUT: %a.ref.loc15: %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem1.loc15: %.3fe = impl_witness_access constants.%OrderedWith.impl_witness.5fb, element1 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.ebfce3.2] +// CHECK:STDOUT: %impl.elem1.loc15: %.ee9 = impl_witness_access constants.%OrderedWith.impl_witness.5fb, element1 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.ebfce3.2] // CHECK:STDOUT: %bound_method.loc15_5.1: = bound_method %b.ref.loc15, %impl.elem1.loc15 // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem1.loc15, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.3(constants.%ImplicitAs.facet.c59) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.67339b.1] // CHECK:STDOUT: %bound_method.loc15_5.2: = bound_method %b.ref.loc15, %specific_fn.loc15 @@ -2252,7 +2260,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.bound.loc15: = bound_method %b.ref.loc15, %LessOrEquivalent.ref.loc15 // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc15: = specific_function %LessOrEquivalent.ref.loc15, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.4(constants.%ImplicitAs.facet.c59) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.67339b.2] // CHECK:STDOUT: %bound_method.loc15_5.3: = bound_method %b.ref.loc15, %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc15 -// CHECK:STDOUT: %impl.elem0.loc15: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc15: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc15_3: = bound_method %b.ref.loc15, %impl.elem0.loc15 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc15: init %Cpp.long_long = call %bound_method.loc15_3(%b.ref.loc15) // CHECK:STDOUT: %.loc15_3.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc15 @@ -2260,7 +2268,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.call.loc15: init bool = call %bound_method.loc15_5.3(%.loc15_3.2, %a.ref.loc15) // CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %a.ref.loc17: %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc17_5: %.90a = impl_witness_access constants.%EqWith.impl_witness.a59, element0 [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.3cf73d.2] +// CHECK:STDOUT: %impl.elem0.loc17_5: %.b72 = impl_witness_access constants.%EqWith.impl_witness.a59, element0 [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.3cf73d.2] // CHECK:STDOUT: %bound_method.loc17_5.1: = bound_method %int_1.loc17, %impl.elem0.loc17_5 [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.bound.e0853e.1] // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17_5, @T.binding.as_type.as.EqWith.impl.Equal.3(constants.%ImplicitAs.facet.d52) [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.specific_fn.54d028.1] // CHECK:STDOUT: %bound_method.loc17_5.2: = bound_method %int_1.loc17, %specific_fn.loc17 [concrete = constants.%bound_method.1699f5.1] @@ -2269,7 +2277,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.bound.loc17: = bound_method %int_1.loc17, %Equal.ref.loc17 [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.bound.e0853e.2] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.loc17: = specific_function %Equal.ref.loc17, @T.binding.as_type.as.EqWith.impl.Equal.4(constants.%ImplicitAs.facet.d52) [concrete = constants.%T.binding.as_type.as.EqWith.impl.Equal.specific_fn.54d028.2] // CHECK:STDOUT: %bound_method.loc17_5.3: = bound_method %int_1.loc17, %T.binding.as_type.as.EqWith.impl.Equal.specific_fn.loc17 [concrete = constants.%bound_method.1699f5.2] -// CHECK:STDOUT: %impl.elem0.loc17_3: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc17_3: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc17_3: = bound_method %int_1.loc17, %impl.elem0.loc17_3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17: init %Cpp.long_long = call %bound_method.loc17_3(%int_1.loc17) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc17_3.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17 [concrete = constants.%int_1.092] @@ -2277,7 +2285,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.Equal.call.loc17: init bool = call %bound_method.loc17_5.3(%.loc17_3.2, %a.ref.loc17) // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %a.ref.loc18: %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem1.loc18: %.d05 = impl_witness_access constants.%EqWith.impl_witness.a59, element1 [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.55dccd.2] +// CHECK:STDOUT: %impl.elem1.loc18: %.c36 = impl_witness_access constants.%EqWith.impl_witness.a59, element1 [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.55dccd.2] // CHECK:STDOUT: %bound_method.loc18_5.1: = bound_method %int_1.loc18, %impl.elem1.loc18 [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.bound.0bb6c5.1] // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem1.loc18, @T.binding.as_type.as.EqWith.impl.NotEqual.3(constants.%ImplicitAs.facet.d52) [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.d399fc.1] // CHECK:STDOUT: %bound_method.loc18_5.2: = bound_method %int_1.loc18, %specific_fn.loc18 [concrete = constants.%bound_method.7aede5.1] @@ -2286,7 +2294,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.bound.loc18: = bound_method %int_1.loc18, %NotEqual.ref.loc18 [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.bound.0bb6c5.2] // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.loc18: = specific_function %NotEqual.ref.loc18, @T.binding.as_type.as.EqWith.impl.NotEqual.4(constants.%ImplicitAs.facet.d52) [concrete = constants.%T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.d399fc.2] // CHECK:STDOUT: %bound_method.loc18_5.3: = bound_method %int_1.loc18, %T.binding.as_type.as.EqWith.impl.NotEqual.specific_fn.loc18 [concrete = constants.%bound_method.7aede5.2] -// CHECK:STDOUT: %impl.elem0.loc18: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc18: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc18_3: = bound_method %int_1.loc18, %impl.elem0.loc18 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18: init %Cpp.long_long = call %bound_method.loc18_3(%int_1.loc18) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc18_3.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18 [concrete = constants.%int_1.092] @@ -2294,7 +2302,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.EqWith.impl.NotEqual.call.loc18: init bool = call %bound_method.loc18_5.3(%.loc18_3.2, %a.ref.loc18) // CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %a.ref.loc19: %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem2.loc19: %.5c6 = impl_witness_access constants.%OrderedWith.impl_witness.aae, element2 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.9aafa8.2] +// CHECK:STDOUT: %impl.elem2.loc19: %.dee = impl_witness_access constants.%OrderedWith.impl_witness.aae, element2 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.9aafa8.2] // CHECK:STDOUT: %bound_method.loc19_5.1: = bound_method %int_1.loc19, %impl.elem2.loc19 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.bound.483e05.1] // CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem2.loc19, @T.binding.as_type.as.OrderedWith.impl.Greater.3(constants.%ImplicitAs.facet.d52) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.d2b07b.1] // CHECK:STDOUT: %bound_method.loc19_5.2: = bound_method %int_1.loc19, %specific_fn.loc19 [concrete = constants.%bound_method.a32da1.1] @@ -2303,7 +2311,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.bound.loc19: = bound_method %int_1.loc19, %Greater.ref.loc19 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.bound.483e05.2] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.loc19: = specific_function %Greater.ref.loc19, @T.binding.as_type.as.OrderedWith.impl.Greater.4(constants.%ImplicitAs.facet.d52) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.d2b07b.2] // CHECK:STDOUT: %bound_method.loc19_5.3: = bound_method %int_1.loc19, %T.binding.as_type.as.OrderedWith.impl.Greater.specific_fn.loc19 [concrete = constants.%bound_method.a32da1.2] -// CHECK:STDOUT: %impl.elem0.loc19: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc19: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc19_3: = bound_method %int_1.loc19, %impl.elem0.loc19 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19: init %Cpp.long_long = call %bound_method.loc19_3(%int_1.loc19) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc19_3.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19 [concrete = constants.%int_1.092] @@ -2311,7 +2319,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Greater.call.loc19: init bool = call %bound_method.loc19_5.3(%.loc19_3.2, %a.ref.loc19) // CHECK:STDOUT: %int_1.loc20: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %a.ref.loc20: %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc20_5: %.f13 = impl_witness_access constants.%OrderedWith.impl_witness.aae, element0 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.e8fdd7.2] +// CHECK:STDOUT: %impl.elem0.loc20_5: %.97f = impl_witness_access constants.%OrderedWith.impl_witness.aae, element0 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.e8fdd7.2] // CHECK:STDOUT: %bound_method.loc20_5.1: = bound_method %int_1.loc20, %impl.elem0.loc20_5 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.bound.66e1cb.1] // CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20_5, @T.binding.as_type.as.OrderedWith.impl.Less.3(constants.%ImplicitAs.facet.d52) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.06ee45.1] // CHECK:STDOUT: %bound_method.loc20_5.2: = bound_method %int_1.loc20, %specific_fn.loc20 [concrete = constants.%bound_method.8f808d.1] @@ -2320,7 +2328,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.bound.loc20: = bound_method %int_1.loc20, %Less.ref.loc20 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.bound.66e1cb.2] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.loc20: = specific_function %Less.ref.loc20, @T.binding.as_type.as.OrderedWith.impl.Less.4(constants.%ImplicitAs.facet.d52) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.06ee45.2] // CHECK:STDOUT: %bound_method.loc20_5.3: = bound_method %int_1.loc20, %T.binding.as_type.as.OrderedWith.impl.Less.specific_fn.loc20 [concrete = constants.%bound_method.8f808d.2] -// CHECK:STDOUT: %impl.elem0.loc20_3: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc20_3: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc20_3: = bound_method %int_1.loc20, %impl.elem0.loc20_3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20: init %Cpp.long_long = call %bound_method.loc20_3(%int_1.loc20) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc20_3.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20 [concrete = constants.%int_1.092] @@ -2328,7 +2336,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.Less.call.loc20: init bool = call %bound_method.loc20_5.3(%.loc20_3.2, %a.ref.loc20) // CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %a.ref.loc21: %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem3.loc21: %.184 = impl_witness_access constants.%OrderedWith.impl_witness.aae, element3 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.755c9d.2] +// CHECK:STDOUT: %impl.elem3.loc21: %.d57 = impl_witness_access constants.%OrderedWith.impl_witness.aae, element3 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.755c9d.2] // CHECK:STDOUT: %bound_method.loc21_5.1: = bound_method %int_1.loc21, %impl.elem3.loc21 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.bound.b10f47.1] // CHECK:STDOUT: %specific_fn.loc21: = specific_function %impl.elem3.loc21, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.3(constants.%ImplicitAs.facet.d52) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.ca5627.1] // CHECK:STDOUT: %bound_method.loc21_5.2: = bound_method %int_1.loc21, %specific_fn.loc21 [concrete = constants.%bound_method.2c548f.1] @@ -2337,7 +2345,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.bound.loc21: = bound_method %int_1.loc21, %GreaterOrEquivalent.ref.loc21 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.bound.b10f47.2] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc21: = specific_function %GreaterOrEquivalent.ref.loc21, @T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.4(constants.%ImplicitAs.facet.d52) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.ca5627.2] // CHECK:STDOUT: %bound_method.loc21_5.3: = bound_method %int_1.loc21, %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.specific_fn.loc21 [concrete = constants.%bound_method.2c548f.2] -// CHECK:STDOUT: %impl.elem0.loc21: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc21: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc21_3: = bound_method %int_1.loc21, %impl.elem0.loc21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21: init %Cpp.long_long = call %bound_method.loc21_3(%int_1.loc21) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc21_3.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21 [concrete = constants.%int_1.092] @@ -2345,7 +2353,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.GreaterOrEquivalent.call.loc21: init bool = call %bound_method.loc21_5.3(%.loc21_3.2, %a.ref.loc21) // CHECK:STDOUT: %int_1.loc22: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %a.ref.loc22: %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem1.loc22: %.5f9 = impl_witness_access constants.%OrderedWith.impl_witness.aae, element1 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.9bb133.2] +// CHECK:STDOUT: %impl.elem1.loc22: %.ba2 = impl_witness_access constants.%OrderedWith.impl_witness.aae, element1 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.9bb133.2] // CHECK:STDOUT: %bound_method.loc22_5.1: = bound_method %int_1.loc22, %impl.elem1.loc22 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.bound.0b467c.1] // CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem1.loc22, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.3(constants.%ImplicitAs.facet.d52) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.2d74e0.1] // CHECK:STDOUT: %bound_method.loc22_5.2: = bound_method %int_1.loc22, %specific_fn.loc22 [concrete = constants.%bound_method.caef99.1] @@ -2354,7 +2362,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.bound.loc22: = bound_method %int_1.loc22, %LessOrEquivalent.ref.loc22 [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.bound.0b467c.2] // CHECK:STDOUT: %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc22: = specific_function %LessOrEquivalent.ref.loc22, @T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.4(constants.%ImplicitAs.facet.d52) [concrete = constants.%T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.2d74e0.2] // CHECK:STDOUT: %bound_method.loc22_5.3: = bound_method %int_1.loc22, %T.binding.as_type.as.OrderedWith.impl.LessOrEquivalent.specific_fn.loc22 [concrete = constants.%bound_method.caef99.2] -// CHECK:STDOUT: %impl.elem0.loc22: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc22: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc22_3: = bound_method %int_1.loc22, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22: init %Cpp.long_long = call %bound_method.loc22_3(%int_1.loc22) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc22_3.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22 [concrete = constants.%int_1.092] @@ -2371,20 +2379,19 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %pattern_type.76e: type = pattern_type %Cpp.long_long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.a03: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6e4: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long_long) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %T.035: %Copy.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.ImplicitAs.impl.Convert.type.55d: type = fn_type @T.binding.as_type.as.ImplicitAs.impl.Convert, @T.binding.as_type.as.ImplicitAs.impl(%T.035) [symbolic] // CHECK:STDOUT: %T.binding.as_type.as.ImplicitAs.impl.Convert.19b: %T.binding.as_type.as.ImplicitAs.impl.Convert.type.55d = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.82e: = impl_witness imports.%ImplicitAs.impl_witness_table.896 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.d52: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.82e) [concrete] -// CHECK:STDOUT: %.a93: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet.d52 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.dcd: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet.d52) [concrete] +// CHECK:STDOUT: %.a119: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.dcd, %ImplicitAs.facet.d52 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.092: %Cpp.long_long = int_value 1 [concrete] // CHECK:STDOUT: %AddAssignWith.type.2ec: type = facet_type <@AddAssignWith, @AddAssignWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %AddAssignWith.Op.type.001: type = fn_type @AddAssignWith.Op, @AddAssignWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %U.ea5: %ImplicitAs.type.a03 = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.3e35db.1: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.1, @Cpp.long_long.as.AddAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.cf74e0.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.3e35db.1 = struct_value () [symbolic] @@ -2400,11 +2407,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.26466a.2: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.1, @Cpp.long_long.as.AddAssignWith.impl(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.d128e4.2: %Cpp.long_long.as.AddAssignWith.impl.Op.type.26466a.2 = struct_value () [concrete] // CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.2ec = facet_value %Cpp.long_long, (%AddAssignWith.impl_witness.383) [concrete] -// CHECK:STDOUT: %.5a9: type = fn_type_with_self_type %AddAssignWith.Op.type.001, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.815: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith(%Cpp.long_long, %AddAssignWith.facet) [concrete] +// CHECK:STDOUT: %.4a9: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.815, %AddAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.2b826b.1: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.d128e4.2, @Cpp.long_long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.2b826b.2: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.d128e4.1, @Cpp.long_long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %SubAssignWith.type.b35: type = facet_type <@SubAssignWith, @SubAssignWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %SubAssignWith.Op.type.7fa: type = fn_type @SubAssignWith.Op, @SubAssignWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.type.092242.1: type = fn_type @Cpp.long_long.as.SubAssignWith.impl.Op.1, @Cpp.long_long.as.SubAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.7c6ec4.1: %Cpp.long_long.as.SubAssignWith.impl.Op.type.092242.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.type.092242.2: type = fn_type @Cpp.long_long.as.SubAssignWith.impl.Op.2, @Cpp.long_long.as.SubAssignWith.impl(%U.ea5) [symbolic] @@ -2415,11 +2422,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.type.daa062.2: type = fn_type @Cpp.long_long.as.SubAssignWith.impl.Op.1, @Cpp.long_long.as.SubAssignWith.impl(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.07d295.2: %Cpp.long_long.as.SubAssignWith.impl.Op.type.daa062.2 = struct_value () [concrete] // CHECK:STDOUT: %SubAssignWith.facet: %SubAssignWith.type.b35 = facet_value %Cpp.long_long, (%SubAssignWith.impl_witness.e66) [concrete] -// CHECK:STDOUT: %.9f7: type = fn_type_with_self_type %SubAssignWith.Op.type.7fa, %SubAssignWith.facet [concrete] +// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.55e: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith(%Cpp.long_long, %SubAssignWith.facet) [concrete] +// CHECK:STDOUT: %.858: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.55e, %SubAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.specific_fn.21e13f.1: = specific_function %Cpp.long_long.as.SubAssignWith.impl.Op.07d295.2, @Cpp.long_long.as.SubAssignWith.impl.Op.1(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.specific_fn.21e13f.2: = specific_function %Cpp.long_long.as.SubAssignWith.impl.Op.07d295.1, @Cpp.long_long.as.SubAssignWith.impl.Op.2(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %MulAssignWith.type.112: type = facet_type <@MulAssignWith, @MulAssignWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %MulAssignWith.Op.type.c9f: type = fn_type @MulAssignWith.Op, @MulAssignWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.type.d6e66c.1: type = fn_type @Cpp.long_long.as.MulAssignWith.impl.Op.1, @Cpp.long_long.as.MulAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.b4560e.1: %Cpp.long_long.as.MulAssignWith.impl.Op.type.d6e66c.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.type.d6e66c.2: type = fn_type @Cpp.long_long.as.MulAssignWith.impl.Op.2, @Cpp.long_long.as.MulAssignWith.impl(%U.ea5) [symbolic] @@ -2430,11 +2437,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.type.f5880d.2: type = fn_type @Cpp.long_long.as.MulAssignWith.impl.Op.1, @Cpp.long_long.as.MulAssignWith.impl(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.0edfbc.2: %Cpp.long_long.as.MulAssignWith.impl.Op.type.f5880d.2 = struct_value () [concrete] // CHECK:STDOUT: %MulAssignWith.facet: %MulAssignWith.type.112 = facet_value %Cpp.long_long, (%MulAssignWith.impl_witness.04a) [concrete] -// CHECK:STDOUT: %.486: type = fn_type_with_self_type %MulAssignWith.Op.type.c9f, %MulAssignWith.facet [concrete] +// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.3c8: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith(%Cpp.long_long, %MulAssignWith.facet) [concrete] +// CHECK:STDOUT: %.930: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.3c8, %MulAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.specific_fn.5af50b.1: = specific_function %Cpp.long_long.as.MulAssignWith.impl.Op.0edfbc.2, @Cpp.long_long.as.MulAssignWith.impl.Op.1(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.specific_fn.5af50b.2: = specific_function %Cpp.long_long.as.MulAssignWith.impl.Op.0edfbc.1, @Cpp.long_long.as.MulAssignWith.impl.Op.2(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %DivAssignWith.type.45d: type = facet_type <@DivAssignWith, @DivAssignWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %DivAssignWith.Op.type.b0c: type = fn_type @DivAssignWith.Op, @DivAssignWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.type.93a446.1: type = fn_type @Cpp.long_long.as.DivAssignWith.impl.Op.1, @Cpp.long_long.as.DivAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.12b589.1: %Cpp.long_long.as.DivAssignWith.impl.Op.type.93a446.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.type.93a446.2: type = fn_type @Cpp.long_long.as.DivAssignWith.impl.Op.2, @Cpp.long_long.as.DivAssignWith.impl(%U.ea5) [symbolic] @@ -2445,11 +2452,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.type.fa44cf.2: type = fn_type @Cpp.long_long.as.DivAssignWith.impl.Op.1, @Cpp.long_long.as.DivAssignWith.impl(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.409fa6.2: %Cpp.long_long.as.DivAssignWith.impl.Op.type.fa44cf.2 = struct_value () [concrete] // CHECK:STDOUT: %DivAssignWith.facet: %DivAssignWith.type.45d = facet_value %Cpp.long_long, (%DivAssignWith.impl_witness.5ff) [concrete] -// CHECK:STDOUT: %.ff7: type = fn_type_with_self_type %DivAssignWith.Op.type.b0c, %DivAssignWith.facet [concrete] +// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.f6a: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith(%Cpp.long_long, %DivAssignWith.facet) [concrete] +// CHECK:STDOUT: %.1ba: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.f6a, %DivAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.specific_fn.07c8ad.1: = specific_function %Cpp.long_long.as.DivAssignWith.impl.Op.409fa6.2, @Cpp.long_long.as.DivAssignWith.impl.Op.1(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.specific_fn.07c8ad.2: = specific_function %Cpp.long_long.as.DivAssignWith.impl.Op.409fa6.1, @Cpp.long_long.as.DivAssignWith.impl.Op.2(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %ModAssignWith.type.a2e: type = facet_type <@ModAssignWith, @ModAssignWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %ModAssignWith.Op.type.ca5: type = fn_type @ModAssignWith.Op, @ModAssignWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.type.92274d.1: type = fn_type @Cpp.long_long.as.ModAssignWith.impl.Op.1, @Cpp.long_long.as.ModAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.31c4bc.1: %Cpp.long_long.as.ModAssignWith.impl.Op.type.92274d.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.type.92274d.2: type = fn_type @Cpp.long_long.as.ModAssignWith.impl.Op.2, @Cpp.long_long.as.ModAssignWith.impl(%U.ea5) [symbolic] @@ -2460,11 +2467,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.type.80b19c.2: type = fn_type @Cpp.long_long.as.ModAssignWith.impl.Op.1, @Cpp.long_long.as.ModAssignWith.impl(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.0b732b.2: %Cpp.long_long.as.ModAssignWith.impl.Op.type.80b19c.2 = struct_value () [concrete] // CHECK:STDOUT: %ModAssignWith.facet: %ModAssignWith.type.a2e = facet_value %Cpp.long_long, (%ModAssignWith.impl_witness.afa) [concrete] -// CHECK:STDOUT: %.977: type = fn_type_with_self_type %ModAssignWith.Op.type.ca5, %ModAssignWith.facet [concrete] +// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.4e1: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith(%Cpp.long_long, %ModAssignWith.facet) [concrete] +// CHECK:STDOUT: %.9bd: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.4e1, %ModAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.specific_fn.a3301b.1: = specific_function %Cpp.long_long.as.ModAssignWith.impl.Op.0b732b.2, @Cpp.long_long.as.ModAssignWith.impl.Op.1(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.specific_fn.a3301b.2: = specific_function %Cpp.long_long.as.ModAssignWith.impl.Op.0b732b.1, @Cpp.long_long.as.ModAssignWith.impl.Op.2(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %BitAndAssignWith.type.9bc: type = facet_type <@BitAndAssignWith, @BitAndAssignWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %BitAndAssignWith.Op.type.0ed: type = fn_type @BitAndAssignWith.Op, @BitAndAssignWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.4d9ef1.1: type = fn_type @Cpp.long_long.as.BitAndAssignWith.impl.Op.1, @Cpp.long_long.as.BitAndAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.6a0d28.1: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.4d9ef1.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.4d9ef1.2: type = fn_type @Cpp.long_long.as.BitAndAssignWith.impl.Op.2, @Cpp.long_long.as.BitAndAssignWith.impl(%U.ea5) [symbolic] @@ -2475,11 +2482,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.a7c3f6.2: type = fn_type @Cpp.long_long.as.BitAndAssignWith.impl.Op.1, @Cpp.long_long.as.BitAndAssignWith.impl(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.10a9af.2: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.a7c3f6.2 = struct_value () [concrete] // CHECK:STDOUT: %BitAndAssignWith.facet: %BitAndAssignWith.type.9bc = facet_value %Cpp.long_long, (%BitAndAssignWith.impl_witness.e8f) [concrete] -// CHECK:STDOUT: %.391: type = fn_type_with_self_type %BitAndAssignWith.Op.type.0ed, %BitAndAssignWith.facet [concrete] +// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.a11: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith(%Cpp.long_long, %BitAndAssignWith.facet) [concrete] +// CHECK:STDOUT: %.e9f: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.a11, %BitAndAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.specific_fn.5df9d8.1: = specific_function %Cpp.long_long.as.BitAndAssignWith.impl.Op.10a9af.2, @Cpp.long_long.as.BitAndAssignWith.impl.Op.1(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.specific_fn.5df9d8.2: = specific_function %Cpp.long_long.as.BitAndAssignWith.impl.Op.10a9af.1, @Cpp.long_long.as.BitAndAssignWith.impl.Op.2(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %BitOrAssignWith.type.219: type = facet_type <@BitOrAssignWith, @BitOrAssignWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %BitOrAssignWith.Op.type.1e2: type = fn_type @BitOrAssignWith.Op, @BitOrAssignWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.609f8c.1: type = fn_type @Cpp.long_long.as.BitOrAssignWith.impl.Op.1, @Cpp.long_long.as.BitOrAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.1fac0c.1: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.609f8c.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.609f8c.2: type = fn_type @Cpp.long_long.as.BitOrAssignWith.impl.Op.2, @Cpp.long_long.as.BitOrAssignWith.impl(%U.ea5) [symbolic] @@ -2490,11 +2497,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.367944.2: type = fn_type @Cpp.long_long.as.BitOrAssignWith.impl.Op.1, @Cpp.long_long.as.BitOrAssignWith.impl(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.60d957.2: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.367944.2 = struct_value () [concrete] // CHECK:STDOUT: %BitOrAssignWith.facet: %BitOrAssignWith.type.219 = facet_value %Cpp.long_long, (%BitOrAssignWith.impl_witness.3af) [concrete] -// CHECK:STDOUT: %.bf4: type = fn_type_with_self_type %BitOrAssignWith.Op.type.1e2, %BitOrAssignWith.facet [concrete] +// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.9e0: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith(%Cpp.long_long, %BitOrAssignWith.facet) [concrete] +// CHECK:STDOUT: %.22a: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.9e0, %BitOrAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.specific_fn.857890.1: = specific_function %Cpp.long_long.as.BitOrAssignWith.impl.Op.60d957.2, @Cpp.long_long.as.BitOrAssignWith.impl.Op.1(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.specific_fn.857890.2: = specific_function %Cpp.long_long.as.BitOrAssignWith.impl.Op.60d957.1, @Cpp.long_long.as.BitOrAssignWith.impl.Op.2(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %BitXorAssignWith.type.f9d: type = facet_type <@BitXorAssignWith, @BitXorAssignWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %BitXorAssignWith.Op.type.93f: type = fn_type @BitXorAssignWith.Op, @BitXorAssignWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.85327b.1: type = fn_type @Cpp.long_long.as.BitXorAssignWith.impl.Op.1, @Cpp.long_long.as.BitXorAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.e7c6f2.1: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.85327b.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.85327b.2: type = fn_type @Cpp.long_long.as.BitXorAssignWith.impl.Op.2, @Cpp.long_long.as.BitXorAssignWith.impl(%U.ea5) [symbolic] @@ -2505,11 +2512,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.d7a644.2: type = fn_type @Cpp.long_long.as.BitXorAssignWith.impl.Op.1, @Cpp.long_long.as.BitXorAssignWith.impl(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.c92629.2: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.d7a644.2 = struct_value () [concrete] // CHECK:STDOUT: %BitXorAssignWith.facet: %BitXorAssignWith.type.f9d = facet_value %Cpp.long_long, (%BitXorAssignWith.impl_witness.56d) [concrete] -// CHECK:STDOUT: %.0cd: type = fn_type_with_self_type %BitXorAssignWith.Op.type.93f, %BitXorAssignWith.facet [concrete] +// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.d25: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith(%Cpp.long_long, %BitXorAssignWith.facet) [concrete] +// CHECK:STDOUT: %.270: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.d25, %BitXorAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.specific_fn.97edcc.1: = specific_function %Cpp.long_long.as.BitXorAssignWith.impl.Op.c92629.2, @Cpp.long_long.as.BitXorAssignWith.impl.Op.1(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.specific_fn.97edcc.2: = specific_function %Cpp.long_long.as.BitXorAssignWith.impl.Op.c92629.1, @Cpp.long_long.as.BitXorAssignWith.impl.Op.2(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.type.f24: type = facet_type <@LeftShiftAssignWith, @LeftShiftAssignWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.Op.type.6f9: type = fn_type @LeftShiftAssignWith.Op, @LeftShiftAssignWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.3faef3.1: type = fn_type @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.1, @Cpp.long_long.as.LeftShiftAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.44b51c.1: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.3faef3.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.3faef3.2: type = fn_type @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.2, @Cpp.long_long.as.LeftShiftAssignWith.impl(%U.ea5) [symbolic] @@ -2520,11 +2527,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.bbf90a.2: type = fn_type @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.1, @Cpp.long_long.as.LeftShiftAssignWith.impl(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.ce8f7e.2: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.bbf90a.2 = struct_value () [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.facet: %LeftShiftAssignWith.type.f24 = facet_value %Cpp.long_long, (%LeftShiftAssignWith.impl_witness.824) [concrete] -// CHECK:STDOUT: %.fef: type = fn_type_with_self_type %LeftShiftAssignWith.Op.type.6f9, %LeftShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.cf9: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith(%Cpp.long_long, %LeftShiftAssignWith.facet) [concrete] +// CHECK:STDOUT: %.ecd: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.cf9, %LeftShiftAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.specific_fn.525b00.1: = specific_function %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.ce8f7e.2, @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.1(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.specific_fn.525b00.2: = specific_function %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.ce8f7e.1, @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.2(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %RightShiftAssignWith.type.42e: type = facet_type <@RightShiftAssignWith, @RightShiftAssignWith(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.Op.type.a64: type = fn_type @RightShiftAssignWith.Op, @RightShiftAssignWith(%Cpp.long_long) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.6ccfae.1: type = fn_type @Cpp.long_long.as.RightShiftAssignWith.impl.Op.1, @Cpp.long_long.as.RightShiftAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.2beecc.1: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.6ccfae.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.6ccfae.2: type = fn_type @Cpp.long_long.as.RightShiftAssignWith.impl.Op.2, @Cpp.long_long.as.RightShiftAssignWith.impl(%U.ea5) [symbolic] @@ -2535,7 +2542,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.ff6b73.2: type = fn_type @Cpp.long_long.as.RightShiftAssignWith.impl.Op.1, @Cpp.long_long.as.RightShiftAssignWith.impl(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.4e9b16.2: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.ff6b73.2 = struct_value () [concrete] // CHECK:STDOUT: %RightShiftAssignWith.facet: %RightShiftAssignWith.type.42e = facet_value %Cpp.long_long, (%RightShiftAssignWith.impl_witness.d22) [concrete] -// CHECK:STDOUT: %.4a3: type = fn_type_with_self_type %RightShiftAssignWith.Op.type.a64, %RightShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.eb3: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith(%Cpp.long_long, %RightShiftAssignWith.facet) [concrete] +// CHECK:STDOUT: %.8eb: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.eb3, %RightShiftAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.df86ad.1: = specific_function %Cpp.long_long.as.RightShiftAssignWith.impl.Op.4e9b16.2, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.df86ad.2: = specific_function %Cpp.long_long.as.RightShiftAssignWith.impl.Op.4e9b16.1, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.c8d) [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -2595,7 +2603,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.long_long = var %a.var_patt // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long_long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc8_3: init %Cpp.long_long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.092] @@ -2611,7 +2619,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref %Cpp.long_long = var %b.var_patt // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc9: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc9: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long_long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc9_3: init %Cpp.long_long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.092] @@ -2623,7 +2631,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %b: ref %Cpp.long_long = ref_binding b, %b.var // CHECK:STDOUT: %a.ref.loc11: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc11: ref %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc11: %.5a9 = impl_witness_access constants.%AddAssignWith.impl_witness.383, element0 [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.d128e4.2] +// CHECK:STDOUT: %impl.elem0.loc11: %.4a9 = impl_witness_access constants.%AddAssignWith.impl_witness.383, element0 [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.d128e4.2] // CHECK:STDOUT: %bound_method.loc11_5.1: = bound_method %a.ref.loc11, %impl.elem0.loc11 // CHECK:STDOUT: %ImplicitAs.facet.loc11_5.1: %ImplicitAs.type.a03 = facet_value constants.%Cpp.long_long, (constants.%ImplicitAs.impl_witness.64f) [concrete = constants.%ImplicitAs.facet.c8d] // CHECK:STDOUT: %.loc11_5.1: %ImplicitAs.type.a03 = converted constants.%Cpp.long_long, %ImplicitAs.facet.loc11_5.1 [concrete = constants.%ImplicitAs.facet.c8d] @@ -2640,7 +2648,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc11_5.3(%a.ref.loc11, %.loc11_8) // CHECK:STDOUT: %a.ref.loc12: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc12: ref %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc12: %.9f7 = impl_witness_access constants.%SubAssignWith.impl_witness.e66, element0 [concrete = constants.%Cpp.long_long.as.SubAssignWith.impl.Op.07d295.2] +// CHECK:STDOUT: %impl.elem0.loc12: %.858 = impl_witness_access constants.%SubAssignWith.impl_witness.e66, element0 [concrete = constants.%Cpp.long_long.as.SubAssignWith.impl.Op.07d295.2] // CHECK:STDOUT: %bound_method.loc12_5.1: = bound_method %a.ref.loc12, %impl.elem0.loc12 // CHECK:STDOUT: %ImplicitAs.facet.loc12_5.1: %ImplicitAs.type.a03 = facet_value constants.%Cpp.long_long, (constants.%ImplicitAs.impl_witness.64f) [concrete = constants.%ImplicitAs.facet.c8d] // CHECK:STDOUT: %.loc12_5.1: %ImplicitAs.type.a03 = converted constants.%Cpp.long_long, %ImplicitAs.facet.loc12_5.1 [concrete = constants.%ImplicitAs.facet.c8d] @@ -2657,7 +2665,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc12_5.3(%a.ref.loc12, %.loc12_8) // CHECK:STDOUT: %a.ref.loc13: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc13: ref %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc13: %.486 = impl_witness_access constants.%MulAssignWith.impl_witness.04a, element0 [concrete = constants.%Cpp.long_long.as.MulAssignWith.impl.Op.0edfbc.2] +// CHECK:STDOUT: %impl.elem0.loc13: %.930 = impl_witness_access constants.%MulAssignWith.impl_witness.04a, element0 [concrete = constants.%Cpp.long_long.as.MulAssignWith.impl.Op.0edfbc.2] // CHECK:STDOUT: %bound_method.loc13_5.1: = bound_method %a.ref.loc13, %impl.elem0.loc13 // CHECK:STDOUT: %ImplicitAs.facet.loc13_5.1: %ImplicitAs.type.a03 = facet_value constants.%Cpp.long_long, (constants.%ImplicitAs.impl_witness.64f) [concrete = constants.%ImplicitAs.facet.c8d] // CHECK:STDOUT: %.loc13_5.1: %ImplicitAs.type.a03 = converted constants.%Cpp.long_long, %ImplicitAs.facet.loc13_5.1 [concrete = constants.%ImplicitAs.facet.c8d] @@ -2674,7 +2682,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc13_5.3(%a.ref.loc13, %.loc13_8) // CHECK:STDOUT: %a.ref.loc14: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc14: ref %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc14: %.ff7 = impl_witness_access constants.%DivAssignWith.impl_witness.5ff, element0 [concrete = constants.%Cpp.long_long.as.DivAssignWith.impl.Op.409fa6.2] +// CHECK:STDOUT: %impl.elem0.loc14: %.1ba = impl_witness_access constants.%DivAssignWith.impl_witness.5ff, element0 [concrete = constants.%Cpp.long_long.as.DivAssignWith.impl.Op.409fa6.2] // CHECK:STDOUT: %bound_method.loc14_5.1: = bound_method %a.ref.loc14, %impl.elem0.loc14 // CHECK:STDOUT: %ImplicitAs.facet.loc14_5.1: %ImplicitAs.type.a03 = facet_value constants.%Cpp.long_long, (constants.%ImplicitAs.impl_witness.64f) [concrete = constants.%ImplicitAs.facet.c8d] // CHECK:STDOUT: %.loc14_5.1: %ImplicitAs.type.a03 = converted constants.%Cpp.long_long, %ImplicitAs.facet.loc14_5.1 [concrete = constants.%ImplicitAs.facet.c8d] @@ -2691,7 +2699,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc14_5.3(%a.ref.loc14, %.loc14_8) // CHECK:STDOUT: %a.ref.loc15: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc15: ref %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc15: %.977 = impl_witness_access constants.%ModAssignWith.impl_witness.afa, element0 [concrete = constants.%Cpp.long_long.as.ModAssignWith.impl.Op.0b732b.2] +// CHECK:STDOUT: %impl.elem0.loc15: %.9bd = impl_witness_access constants.%ModAssignWith.impl_witness.afa, element0 [concrete = constants.%Cpp.long_long.as.ModAssignWith.impl.Op.0b732b.2] // CHECK:STDOUT: %bound_method.loc15_5.1: = bound_method %a.ref.loc15, %impl.elem0.loc15 // CHECK:STDOUT: %ImplicitAs.facet.loc15_5.1: %ImplicitAs.type.a03 = facet_value constants.%Cpp.long_long, (constants.%ImplicitAs.impl_witness.64f) [concrete = constants.%ImplicitAs.facet.c8d] // CHECK:STDOUT: %.loc15_5.1: %ImplicitAs.type.a03 = converted constants.%Cpp.long_long, %ImplicitAs.facet.loc15_5.1 [concrete = constants.%ImplicitAs.facet.c8d] @@ -2708,7 +2716,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc15_5.3(%a.ref.loc15, %.loc15_8) // CHECK:STDOUT: %a.ref.loc17: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc17: ref %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc17: %.391 = impl_witness_access constants.%BitAndAssignWith.impl_witness.e8f, element0 [concrete = constants.%Cpp.long_long.as.BitAndAssignWith.impl.Op.10a9af.2] +// CHECK:STDOUT: %impl.elem0.loc17: %.e9f = impl_witness_access constants.%BitAndAssignWith.impl_witness.e8f, element0 [concrete = constants.%Cpp.long_long.as.BitAndAssignWith.impl.Op.10a9af.2] // CHECK:STDOUT: %bound_method.loc17_5.1: = bound_method %a.ref.loc17, %impl.elem0.loc17 // CHECK:STDOUT: %ImplicitAs.facet.loc17_5.1: %ImplicitAs.type.a03 = facet_value constants.%Cpp.long_long, (constants.%ImplicitAs.impl_witness.64f) [concrete = constants.%ImplicitAs.facet.c8d] // CHECK:STDOUT: %.loc17_5.1: %ImplicitAs.type.a03 = converted constants.%Cpp.long_long, %ImplicitAs.facet.loc17_5.1 [concrete = constants.%ImplicitAs.facet.c8d] @@ -2725,7 +2733,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc17_5.3(%a.ref.loc17, %.loc17_8) // CHECK:STDOUT: %a.ref.loc18: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc18: ref %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc18: %.bf4 = impl_witness_access constants.%BitOrAssignWith.impl_witness.3af, element0 [concrete = constants.%Cpp.long_long.as.BitOrAssignWith.impl.Op.60d957.2] +// CHECK:STDOUT: %impl.elem0.loc18: %.22a = impl_witness_access constants.%BitOrAssignWith.impl_witness.3af, element0 [concrete = constants.%Cpp.long_long.as.BitOrAssignWith.impl.Op.60d957.2] // CHECK:STDOUT: %bound_method.loc18_5.1: = bound_method %a.ref.loc18, %impl.elem0.loc18 // CHECK:STDOUT: %ImplicitAs.facet.loc18_5.1: %ImplicitAs.type.a03 = facet_value constants.%Cpp.long_long, (constants.%ImplicitAs.impl_witness.64f) [concrete = constants.%ImplicitAs.facet.c8d] // CHECK:STDOUT: %.loc18_5.1: %ImplicitAs.type.a03 = converted constants.%Cpp.long_long, %ImplicitAs.facet.loc18_5.1 [concrete = constants.%ImplicitAs.facet.c8d] @@ -2742,7 +2750,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18_5.3(%a.ref.loc18, %.loc18_8) // CHECK:STDOUT: %a.ref.loc19: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc19: ref %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc19: %.0cd = impl_witness_access constants.%BitXorAssignWith.impl_witness.56d, element0 [concrete = constants.%Cpp.long_long.as.BitXorAssignWith.impl.Op.c92629.2] +// CHECK:STDOUT: %impl.elem0.loc19: %.270 = impl_witness_access constants.%BitXorAssignWith.impl_witness.56d, element0 [concrete = constants.%Cpp.long_long.as.BitXorAssignWith.impl.Op.c92629.2] // CHECK:STDOUT: %bound_method.loc19_5.1: = bound_method %a.ref.loc19, %impl.elem0.loc19 // CHECK:STDOUT: %ImplicitAs.facet.loc19_5.1: %ImplicitAs.type.a03 = facet_value constants.%Cpp.long_long, (constants.%ImplicitAs.impl_witness.64f) [concrete = constants.%ImplicitAs.facet.c8d] // CHECK:STDOUT: %.loc19_5.1: %ImplicitAs.type.a03 = converted constants.%Cpp.long_long, %ImplicitAs.facet.loc19_5.1 [concrete = constants.%ImplicitAs.facet.c8d] @@ -2759,7 +2767,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc19_5.3(%a.ref.loc19, %.loc19_8) // CHECK:STDOUT: %a.ref.loc20: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc20: ref %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc20: %.fef = impl_witness_access constants.%LeftShiftAssignWith.impl_witness.824, element0 [concrete = constants.%Cpp.long_long.as.LeftShiftAssignWith.impl.Op.ce8f7e.2] +// CHECK:STDOUT: %impl.elem0.loc20: %.ecd = impl_witness_access constants.%LeftShiftAssignWith.impl_witness.824, element0 [concrete = constants.%Cpp.long_long.as.LeftShiftAssignWith.impl.Op.ce8f7e.2] // CHECK:STDOUT: %bound_method.loc20_5.1: = bound_method %a.ref.loc20, %impl.elem0.loc20 // CHECK:STDOUT: %ImplicitAs.facet.loc20_5.1: %ImplicitAs.type.a03 = facet_value constants.%Cpp.long_long, (constants.%ImplicitAs.impl_witness.64f) [concrete = constants.%ImplicitAs.facet.c8d] // CHECK:STDOUT: %.loc20_5.1: %ImplicitAs.type.a03 = converted constants.%Cpp.long_long, %ImplicitAs.facet.loc20_5.1 [concrete = constants.%ImplicitAs.facet.c8d] @@ -2776,7 +2784,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc20_5.3(%a.ref.loc20, %.loc20_9) // CHECK:STDOUT: %a.ref.loc21: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc21: ref %Cpp.long_long = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc21: %.4a3 = impl_witness_access constants.%RightShiftAssignWith.impl_witness.d22, element0 [concrete = constants.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.4e9b16.2] +// CHECK:STDOUT: %impl.elem0.loc21: %.8eb = impl_witness_access constants.%RightShiftAssignWith.impl_witness.d22, element0 [concrete = constants.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.4e9b16.2] // CHECK:STDOUT: %bound_method.loc21_5.1: = bound_method %a.ref.loc21, %impl.elem0.loc21 // CHECK:STDOUT: %ImplicitAs.facet.loc21_5.1: %ImplicitAs.type.a03 = facet_value constants.%Cpp.long_long, (constants.%ImplicitAs.impl_witness.64f) [concrete = constants.%ImplicitAs.facet.c8d] // CHECK:STDOUT: %.loc21_5.1: %ImplicitAs.type.a03 = converted constants.%Cpp.long_long, %ImplicitAs.facet.loc21_5.1 [concrete = constants.%ImplicitAs.facet.c8d] @@ -2810,16 +2818,15 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long: type = class_type @LongLong64 [concrete] // CHECK:STDOUT: %pattern_type.76e: type = pattern_type %Cpp.long_long [concrete] // CHECK:STDOUT: %ImplicitAs.type.a03: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6e4: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long_long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.82e: = impl_witness imports.%ImplicitAs.impl_witness_table.896 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.d52: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.82e) [concrete] -// CHECK:STDOUT: %.a93: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet.d52 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.dcd: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet.d52) [concrete] +// CHECK:STDOUT: %.a119: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.dcd, %ImplicitAs.facet.d52 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.aba: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.a20: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.aba = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.a20 [concrete] // CHECK:STDOUT: %int_1.092: %Cpp.long_long = int_value 1 [concrete] // CHECK:STDOUT: %AddAssignWith.type.d84: type = facet_type <@AddAssignWith, @AddAssignWith(%i64)> [concrete] -// CHECK:STDOUT: %AddAssignWith.Op.type.693: type = fn_type @AddAssignWith.Op, @AddAssignWith(%i64) [concrete] // CHECK:STDOUT: %U.ea5: %ImplicitAs.type.a03 = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.3e35db.1: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.1, @Cpp.long_long.as.AddAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.cf74e0.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.3e35db.1 = struct_value () [symbolic] @@ -2833,14 +2840,15 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.2293dc.2: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.1, @Cpp.long_long.as.AddAssignWith.impl(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.2: %Cpp.long_long.as.AddAssignWith.impl.Op.type.2293dc.2 = struct_value () [concrete] // CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.d84 = facet_value %Cpp.long_long, (%AddAssignWith.impl_witness.767) [concrete] -// CHECK:STDOUT: %.34b: type = fn_type_with_self_type %AddAssignWith.Op.type.693, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.d84: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith(%i64, %AddAssignWith.facet) [concrete] +// CHECK:STDOUT: %.f7b: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.d84, %AddAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.50a783.1: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.2, @Cpp.long_long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet.c59) [concrete] -// CHECK:STDOUT: %.b29: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet.c59 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.653: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet.c59) [concrete] +// CHECK:STDOUT: %.cb1: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.653, %ImplicitAs.facet.c59 [concrete] // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.type: type = fn_type @i64.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert: %i64.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.50a783.2: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.1, @Cpp.long_long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %SubAssignWith.type.d66: type = facet_type <@SubAssignWith, @SubAssignWith(%i64)> [concrete] -// CHECK:STDOUT: %SubAssignWith.Op.type.149: type = fn_type @SubAssignWith.Op, @SubAssignWith(%i64) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.type.092242.1: type = fn_type @Cpp.long_long.as.SubAssignWith.impl.Op.1, @Cpp.long_long.as.SubAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.7c6ec4.1: %Cpp.long_long.as.SubAssignWith.impl.Op.type.092242.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.type.092242.2: type = fn_type @Cpp.long_long.as.SubAssignWith.impl.Op.2, @Cpp.long_long.as.SubAssignWith.impl(%U.ea5) [symbolic] @@ -2851,11 +2859,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.type.b97f87.2: type = fn_type @Cpp.long_long.as.SubAssignWith.impl.Op.1, @Cpp.long_long.as.SubAssignWith.impl(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.268b0a.2: %Cpp.long_long.as.SubAssignWith.impl.Op.type.b97f87.2 = struct_value () [concrete] // CHECK:STDOUT: %SubAssignWith.facet: %SubAssignWith.type.d66 = facet_value %Cpp.long_long, (%SubAssignWith.impl_witness.089) [concrete] -// CHECK:STDOUT: %.eb4: type = fn_type_with_self_type %SubAssignWith.Op.type.149, %SubAssignWith.facet [concrete] +// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.bd6: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith(%i64, %SubAssignWith.facet) [concrete] +// CHECK:STDOUT: %.b43: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.bd6, %SubAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.specific_fn.39aa60.1: = specific_function %Cpp.long_long.as.SubAssignWith.impl.Op.268b0a.2, @Cpp.long_long.as.SubAssignWith.impl.Op.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.specific_fn.39aa60.2: = specific_function %Cpp.long_long.as.SubAssignWith.impl.Op.268b0a.1, @Cpp.long_long.as.SubAssignWith.impl.Op.2(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %MulAssignWith.type.e40: type = facet_type <@MulAssignWith, @MulAssignWith(%i64)> [concrete] -// CHECK:STDOUT: %MulAssignWith.Op.type.d2a: type = fn_type @MulAssignWith.Op, @MulAssignWith(%i64) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.type.d6e66c.1: type = fn_type @Cpp.long_long.as.MulAssignWith.impl.Op.1, @Cpp.long_long.as.MulAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.b4560e.1: %Cpp.long_long.as.MulAssignWith.impl.Op.type.d6e66c.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.type.d6e66c.2: type = fn_type @Cpp.long_long.as.MulAssignWith.impl.Op.2, @Cpp.long_long.as.MulAssignWith.impl(%U.ea5) [symbolic] @@ -2866,11 +2874,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.type.9015f3.2: type = fn_type @Cpp.long_long.as.MulAssignWith.impl.Op.1, @Cpp.long_long.as.MulAssignWith.impl(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.e299d7.2: %Cpp.long_long.as.MulAssignWith.impl.Op.type.9015f3.2 = struct_value () [concrete] // CHECK:STDOUT: %MulAssignWith.facet: %MulAssignWith.type.e40 = facet_value %Cpp.long_long, (%MulAssignWith.impl_witness.435) [concrete] -// CHECK:STDOUT: %.94e: type = fn_type_with_self_type %MulAssignWith.Op.type.d2a, %MulAssignWith.facet [concrete] +// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.dd5: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith(%i64, %MulAssignWith.facet) [concrete] +// CHECK:STDOUT: %.ebf: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.dd5, %MulAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.specific_fn.8da25e.1: = specific_function %Cpp.long_long.as.MulAssignWith.impl.Op.e299d7.2, @Cpp.long_long.as.MulAssignWith.impl.Op.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.specific_fn.8da25e.2: = specific_function %Cpp.long_long.as.MulAssignWith.impl.Op.e299d7.1, @Cpp.long_long.as.MulAssignWith.impl.Op.2(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %DivAssignWith.type.511: type = facet_type <@DivAssignWith, @DivAssignWith(%i64)> [concrete] -// CHECK:STDOUT: %DivAssignWith.Op.type.040: type = fn_type @DivAssignWith.Op, @DivAssignWith(%i64) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.type.93a446.1: type = fn_type @Cpp.long_long.as.DivAssignWith.impl.Op.1, @Cpp.long_long.as.DivAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.12b589.1: %Cpp.long_long.as.DivAssignWith.impl.Op.type.93a446.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.type.93a446.2: type = fn_type @Cpp.long_long.as.DivAssignWith.impl.Op.2, @Cpp.long_long.as.DivAssignWith.impl(%U.ea5) [symbolic] @@ -2881,11 +2889,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.type.868bc4.2: type = fn_type @Cpp.long_long.as.DivAssignWith.impl.Op.1, @Cpp.long_long.as.DivAssignWith.impl(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.6729c8.2: %Cpp.long_long.as.DivAssignWith.impl.Op.type.868bc4.2 = struct_value () [concrete] // CHECK:STDOUT: %DivAssignWith.facet: %DivAssignWith.type.511 = facet_value %Cpp.long_long, (%DivAssignWith.impl_witness.817) [concrete] -// CHECK:STDOUT: %.2d6: type = fn_type_with_self_type %DivAssignWith.Op.type.040, %DivAssignWith.facet [concrete] +// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.e7b: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith(%i64, %DivAssignWith.facet) [concrete] +// CHECK:STDOUT: %.9aa: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.e7b, %DivAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.specific_fn.a29bb8.1: = specific_function %Cpp.long_long.as.DivAssignWith.impl.Op.6729c8.2, @Cpp.long_long.as.DivAssignWith.impl.Op.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.specific_fn.a29bb8.2: = specific_function %Cpp.long_long.as.DivAssignWith.impl.Op.6729c8.1, @Cpp.long_long.as.DivAssignWith.impl.Op.2(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %ModAssignWith.type.2c3: type = facet_type <@ModAssignWith, @ModAssignWith(%i64)> [concrete] -// CHECK:STDOUT: %ModAssignWith.Op.type.400: type = fn_type @ModAssignWith.Op, @ModAssignWith(%i64) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.type.92274d.1: type = fn_type @Cpp.long_long.as.ModAssignWith.impl.Op.1, @Cpp.long_long.as.ModAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.31c4bc.1: %Cpp.long_long.as.ModAssignWith.impl.Op.type.92274d.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.type.92274d.2: type = fn_type @Cpp.long_long.as.ModAssignWith.impl.Op.2, @Cpp.long_long.as.ModAssignWith.impl(%U.ea5) [symbolic] @@ -2896,11 +2904,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.type.afaa70.2: type = fn_type @Cpp.long_long.as.ModAssignWith.impl.Op.1, @Cpp.long_long.as.ModAssignWith.impl(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.49994b.2: %Cpp.long_long.as.ModAssignWith.impl.Op.type.afaa70.2 = struct_value () [concrete] // CHECK:STDOUT: %ModAssignWith.facet: %ModAssignWith.type.2c3 = facet_value %Cpp.long_long, (%ModAssignWith.impl_witness.f7c) [concrete] -// CHECK:STDOUT: %.f4d: type = fn_type_with_self_type %ModAssignWith.Op.type.400, %ModAssignWith.facet [concrete] +// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.202: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith(%i64, %ModAssignWith.facet) [concrete] +// CHECK:STDOUT: %.eb2: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.202, %ModAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.specific_fn.e3c8dd.1: = specific_function %Cpp.long_long.as.ModAssignWith.impl.Op.49994b.2, @Cpp.long_long.as.ModAssignWith.impl.Op.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.specific_fn.e3c8dd.2: = specific_function %Cpp.long_long.as.ModAssignWith.impl.Op.49994b.1, @Cpp.long_long.as.ModAssignWith.impl.Op.2(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %BitAndAssignWith.type.8af: type = facet_type <@BitAndAssignWith, @BitAndAssignWith(%i64)> [concrete] -// CHECK:STDOUT: %BitAndAssignWith.Op.type.7f9: type = fn_type @BitAndAssignWith.Op, @BitAndAssignWith(%i64) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.4d9ef1.1: type = fn_type @Cpp.long_long.as.BitAndAssignWith.impl.Op.1, @Cpp.long_long.as.BitAndAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.6a0d28.1: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.4d9ef1.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.4d9ef1.2: type = fn_type @Cpp.long_long.as.BitAndAssignWith.impl.Op.2, @Cpp.long_long.as.BitAndAssignWith.impl(%U.ea5) [symbolic] @@ -2911,11 +2919,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.9d1673.2: type = fn_type @Cpp.long_long.as.BitAndAssignWith.impl.Op.1, @Cpp.long_long.as.BitAndAssignWith.impl(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.9241d8.2: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.9d1673.2 = struct_value () [concrete] // CHECK:STDOUT: %BitAndAssignWith.facet: %BitAndAssignWith.type.8af = facet_value %Cpp.long_long, (%BitAndAssignWith.impl_witness.80c) [concrete] -// CHECK:STDOUT: %.c2c: type = fn_type_with_self_type %BitAndAssignWith.Op.type.7f9, %BitAndAssignWith.facet [concrete] +// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.e1b: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith(%i64, %BitAndAssignWith.facet) [concrete] +// CHECK:STDOUT: %.ba8: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.e1b, %BitAndAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.specific_fn.00c338.1: = specific_function %Cpp.long_long.as.BitAndAssignWith.impl.Op.9241d8.2, @Cpp.long_long.as.BitAndAssignWith.impl.Op.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.specific_fn.00c338.2: = specific_function %Cpp.long_long.as.BitAndAssignWith.impl.Op.9241d8.1, @Cpp.long_long.as.BitAndAssignWith.impl.Op.2(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %BitOrAssignWith.type.172: type = facet_type <@BitOrAssignWith, @BitOrAssignWith(%i64)> [concrete] -// CHECK:STDOUT: %BitOrAssignWith.Op.type.ded: type = fn_type @BitOrAssignWith.Op, @BitOrAssignWith(%i64) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.609f8c.1: type = fn_type @Cpp.long_long.as.BitOrAssignWith.impl.Op.1, @Cpp.long_long.as.BitOrAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.1fac0c.1: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.609f8c.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.609f8c.2: type = fn_type @Cpp.long_long.as.BitOrAssignWith.impl.Op.2, @Cpp.long_long.as.BitOrAssignWith.impl(%U.ea5) [symbolic] @@ -2926,11 +2934,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.4196b6.2: type = fn_type @Cpp.long_long.as.BitOrAssignWith.impl.Op.1, @Cpp.long_long.as.BitOrAssignWith.impl(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.acdb6d.2: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.4196b6.2 = struct_value () [concrete] // CHECK:STDOUT: %BitOrAssignWith.facet: %BitOrAssignWith.type.172 = facet_value %Cpp.long_long, (%BitOrAssignWith.impl_witness.bd2) [concrete] -// CHECK:STDOUT: %.8b2: type = fn_type_with_self_type %BitOrAssignWith.Op.type.ded, %BitOrAssignWith.facet [concrete] +// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.21a: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith(%i64, %BitOrAssignWith.facet) [concrete] +// CHECK:STDOUT: %.4fb: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.21a, %BitOrAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.specific_fn.b0c3cb.1: = specific_function %Cpp.long_long.as.BitOrAssignWith.impl.Op.acdb6d.2, @Cpp.long_long.as.BitOrAssignWith.impl.Op.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.specific_fn.b0c3cb.2: = specific_function %Cpp.long_long.as.BitOrAssignWith.impl.Op.acdb6d.1, @Cpp.long_long.as.BitOrAssignWith.impl.Op.2(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %BitXorAssignWith.type.2c8: type = facet_type <@BitXorAssignWith, @BitXorAssignWith(%i64)> [concrete] -// CHECK:STDOUT: %BitXorAssignWith.Op.type.9f9: type = fn_type @BitXorAssignWith.Op, @BitXorAssignWith(%i64) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.85327b.1: type = fn_type @Cpp.long_long.as.BitXorAssignWith.impl.Op.1, @Cpp.long_long.as.BitXorAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.e7c6f2.1: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.85327b.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.85327b.2: type = fn_type @Cpp.long_long.as.BitXorAssignWith.impl.Op.2, @Cpp.long_long.as.BitXorAssignWith.impl(%U.ea5) [symbolic] @@ -2941,11 +2949,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.7f7009.2: type = fn_type @Cpp.long_long.as.BitXorAssignWith.impl.Op.1, @Cpp.long_long.as.BitXorAssignWith.impl(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.3aa346.2: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.7f7009.2 = struct_value () [concrete] // CHECK:STDOUT: %BitXorAssignWith.facet: %BitXorAssignWith.type.2c8 = facet_value %Cpp.long_long, (%BitXorAssignWith.impl_witness.f91) [concrete] -// CHECK:STDOUT: %.9cc: type = fn_type_with_self_type %BitXorAssignWith.Op.type.9f9, %BitXorAssignWith.facet [concrete] +// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.452: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith(%i64, %BitXorAssignWith.facet) [concrete] +// CHECK:STDOUT: %.919: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.452, %BitXorAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.specific_fn.8f3086.1: = specific_function %Cpp.long_long.as.BitXorAssignWith.impl.Op.3aa346.2, @Cpp.long_long.as.BitXorAssignWith.impl.Op.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.specific_fn.8f3086.2: = specific_function %Cpp.long_long.as.BitXorAssignWith.impl.Op.3aa346.1, @Cpp.long_long.as.BitXorAssignWith.impl.Op.2(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.type.b97: type = facet_type <@LeftShiftAssignWith, @LeftShiftAssignWith(%i64)> [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.Op.type.d7e: type = fn_type @LeftShiftAssignWith.Op, @LeftShiftAssignWith(%i64) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.3faef3.1: type = fn_type @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.1, @Cpp.long_long.as.LeftShiftAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.44b51c.1: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.3faef3.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.3faef3.2: type = fn_type @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.2, @Cpp.long_long.as.LeftShiftAssignWith.impl(%U.ea5) [symbolic] @@ -2956,11 +2964,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.21cdd1.2: type = fn_type @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.1, @Cpp.long_long.as.LeftShiftAssignWith.impl(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.e91293.2: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.21cdd1.2 = struct_value () [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.facet: %LeftShiftAssignWith.type.b97 = facet_value %Cpp.long_long, (%LeftShiftAssignWith.impl_witness.c81) [concrete] -// CHECK:STDOUT: %.334: type = fn_type_with_self_type %LeftShiftAssignWith.Op.type.d7e, %LeftShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.89e: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith(%i64, %LeftShiftAssignWith.facet) [concrete] +// CHECK:STDOUT: %.64f: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.89e, %LeftShiftAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.specific_fn.1c7fb8.1: = specific_function %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.e91293.2, @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.specific_fn.1c7fb8.2: = specific_function %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.e91293.1, @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.2(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %RightShiftAssignWith.type.721: type = facet_type <@RightShiftAssignWith, @RightShiftAssignWith(%i64)> [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.Op.type.c23: type = fn_type @RightShiftAssignWith.Op, @RightShiftAssignWith(%i64) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.6ccfae.1: type = fn_type @Cpp.long_long.as.RightShiftAssignWith.impl.Op.1, @Cpp.long_long.as.RightShiftAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.2beecc.1: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.6ccfae.1 = struct_value () [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.6ccfae.2: type = fn_type @Cpp.long_long.as.RightShiftAssignWith.impl.Op.2, @Cpp.long_long.as.RightShiftAssignWith.impl(%U.ea5) [symbolic] @@ -2971,7 +2979,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.0ddf2d.2: type = fn_type @Cpp.long_long.as.RightShiftAssignWith.impl.Op.1, @Cpp.long_long.as.RightShiftAssignWith.impl(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.efc522.2: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.0ddf2d.2 = struct_value () [concrete] // CHECK:STDOUT: %RightShiftAssignWith.facet: %RightShiftAssignWith.type.721 = facet_value %Cpp.long_long, (%RightShiftAssignWith.impl_witness.1b7) [concrete] -// CHECK:STDOUT: %.f4a: type = fn_type_with_self_type %RightShiftAssignWith.Op.type.c23, %RightShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.eb9: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith(%i64, %RightShiftAssignWith.facet) [concrete] +// CHECK:STDOUT: %.298: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.eb9, %RightShiftAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.1c2239.1: = specific_function %Cpp.long_long.as.RightShiftAssignWith.impl.Op.efc522.2, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.1(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.1c2239.2: = specific_function %Cpp.long_long.as.RightShiftAssignWith.impl.Op.efc522.1, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.2(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -3028,7 +3037,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.long_long = var %a.var_patt // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc9: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc9: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc9: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long_long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc9_3: init %Cpp.long_long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.092] @@ -3040,7 +3049,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %a: ref %Cpp.long_long = ref_binding a, %a.var // CHECK:STDOUT: %a.ref.loc10: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc10: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc10_5.1: %.34b = impl_witness_access constants.%AddAssignWith.impl_witness.767, element0 [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.2] +// CHECK:STDOUT: %impl.elem0.loc10_5.1: %.f7b = impl_witness_access constants.%AddAssignWith.impl_witness.767, element0 [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.2] // CHECK:STDOUT: %bound_method.loc10_5.1: = bound_method %a.ref.loc10, %impl.elem0.loc10_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc10_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc10_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc10_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -3051,14 +3060,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc10_5.3: %Cpp.long_long.as.AddAssignWith.impl.Op.type.2293dc.1 = specific_constant imports.%Core.Op.57a, @Cpp.long_long.as.AddAssignWith.impl(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.1] // CHECK:STDOUT: %Op.ref.loc10: %Cpp.long_long.as.AddAssignWith.impl.Op.type.2293dc.1 = name_ref Op, %.loc10_5.3 [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.1] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.bound: = bound_method %a.ref.loc10, %Op.ref.loc10 -// CHECK:STDOUT: %impl.elem0.loc10_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_5.3: = bound_method %b.ref.loc10, %impl.elem0.loc10_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc10_5: init %Cpp.long_long = call %bound_method.loc10_5.3(%b.ref.loc10) // CHECK:STDOUT: %.loc10_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc10_5 // CHECK:STDOUT: %.loc10_5.5: %Cpp.long_long = converted %b.ref.loc10, %.loc10_5.4 // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc10, @Cpp.long_long.as.AddAssignWith.impl.Op.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.50a783.2] // CHECK:STDOUT: %bound_method.loc10_5.4: = bound_method %a.ref.loc10, %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc10_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_8: = bound_method %b.ref.loc10, %impl.elem0.loc10_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc10_8: init %Cpp.long_long = call %bound_method.loc10_8(%b.ref.loc10) // CHECK:STDOUT: %.loc10_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc10_8 @@ -3066,7 +3075,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_5.4(%a.ref.loc10, %.loc10_8.2) // CHECK:STDOUT: %a.ref.loc11: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc11: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc11_5.1: %.eb4 = impl_witness_access constants.%SubAssignWith.impl_witness.089, element0 [concrete = constants.%Cpp.long_long.as.SubAssignWith.impl.Op.268b0a.2] +// CHECK:STDOUT: %impl.elem0.loc11_5.1: %.b43 = impl_witness_access constants.%SubAssignWith.impl_witness.089, element0 [concrete = constants.%Cpp.long_long.as.SubAssignWith.impl.Op.268b0a.2] // CHECK:STDOUT: %bound_method.loc11_5.1: = bound_method %a.ref.loc11, %impl.elem0.loc11_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc11_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc11_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc11_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -3077,14 +3086,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc11_5.3: %Cpp.long_long.as.SubAssignWith.impl.Op.type.b97f87.1 = specific_constant imports.%Core.Op.75b, @Cpp.long_long.as.SubAssignWith.impl(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.SubAssignWith.impl.Op.268b0a.1] // CHECK:STDOUT: %Op.ref.loc11: %Cpp.long_long.as.SubAssignWith.impl.Op.type.b97f87.1 = name_ref Op, %.loc11_5.3 [concrete = constants.%Cpp.long_long.as.SubAssignWith.impl.Op.268b0a.1] // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.bound: = bound_method %a.ref.loc11, %Op.ref.loc11 -// CHECK:STDOUT: %impl.elem0.loc11_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc11_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc11_5.3: = bound_method %b.ref.loc11, %impl.elem0.loc11_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc11_5: init %Cpp.long_long = call %bound_method.loc11_5.3(%b.ref.loc11) // CHECK:STDOUT: %.loc11_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc11_5 // CHECK:STDOUT: %.loc11_5.5: %Cpp.long_long = converted %b.ref.loc11, %.loc11_5.4 // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc11, @Cpp.long_long.as.SubAssignWith.impl.Op.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.SubAssignWith.impl.Op.specific_fn.39aa60.2] // CHECK:STDOUT: %bound_method.loc11_5.4: = bound_method %a.ref.loc11, %Cpp.long_long.as.SubAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc11_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc11_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc11_8: = bound_method %b.ref.loc11, %impl.elem0.loc11_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc11_8: init %Cpp.long_long = call %bound_method.loc11_8(%b.ref.loc11) // CHECK:STDOUT: %.loc11_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc11_8 @@ -3092,7 +3101,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.SubAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc11_5.4(%a.ref.loc11, %.loc11_8.2) // CHECK:STDOUT: %a.ref.loc12: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc12: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc12_5.1: %.94e = impl_witness_access constants.%MulAssignWith.impl_witness.435, element0 [concrete = constants.%Cpp.long_long.as.MulAssignWith.impl.Op.e299d7.2] +// CHECK:STDOUT: %impl.elem0.loc12_5.1: %.ebf = impl_witness_access constants.%MulAssignWith.impl_witness.435, element0 [concrete = constants.%Cpp.long_long.as.MulAssignWith.impl.Op.e299d7.2] // CHECK:STDOUT: %bound_method.loc12_5.1: = bound_method %a.ref.loc12, %impl.elem0.loc12_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc12_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc12_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc12_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -3103,14 +3112,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc12_5.3: %Cpp.long_long.as.MulAssignWith.impl.Op.type.9015f3.1 = specific_constant imports.%Core.Op.94e, @Cpp.long_long.as.MulAssignWith.impl(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.MulAssignWith.impl.Op.e299d7.1] // CHECK:STDOUT: %Op.ref.loc12: %Cpp.long_long.as.MulAssignWith.impl.Op.type.9015f3.1 = name_ref Op, %.loc12_5.3 [concrete = constants.%Cpp.long_long.as.MulAssignWith.impl.Op.e299d7.1] // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.bound: = bound_method %a.ref.loc12, %Op.ref.loc12 -// CHECK:STDOUT: %impl.elem0.loc12_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc12_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc12_5.3: = bound_method %b.ref.loc12, %impl.elem0.loc12_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc12_5: init %Cpp.long_long = call %bound_method.loc12_5.3(%b.ref.loc12) // CHECK:STDOUT: %.loc12_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc12_5 // CHECK:STDOUT: %.loc12_5.5: %Cpp.long_long = converted %b.ref.loc12, %.loc12_5.4 // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc12, @Cpp.long_long.as.MulAssignWith.impl.Op.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.MulAssignWith.impl.Op.specific_fn.8da25e.2] // CHECK:STDOUT: %bound_method.loc12_5.4: = bound_method %a.ref.loc12, %Cpp.long_long.as.MulAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc12_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc12_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc12_8: = bound_method %b.ref.loc12, %impl.elem0.loc12_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc12_8: init %Cpp.long_long = call %bound_method.loc12_8(%b.ref.loc12) // CHECK:STDOUT: %.loc12_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc12_8 @@ -3118,7 +3127,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.MulAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc12_5.4(%a.ref.loc12, %.loc12_8.2) // CHECK:STDOUT: %a.ref.loc13: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc13: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc13_5.1: %.2d6 = impl_witness_access constants.%DivAssignWith.impl_witness.817, element0 [concrete = constants.%Cpp.long_long.as.DivAssignWith.impl.Op.6729c8.2] +// CHECK:STDOUT: %impl.elem0.loc13_5.1: %.9aa = impl_witness_access constants.%DivAssignWith.impl_witness.817, element0 [concrete = constants.%Cpp.long_long.as.DivAssignWith.impl.Op.6729c8.2] // CHECK:STDOUT: %bound_method.loc13_5.1: = bound_method %a.ref.loc13, %impl.elem0.loc13_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc13_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc13_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc13_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -3129,14 +3138,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc13_5.3: %Cpp.long_long.as.DivAssignWith.impl.Op.type.868bc4.1 = specific_constant imports.%Core.Op.ec7, @Cpp.long_long.as.DivAssignWith.impl(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.DivAssignWith.impl.Op.6729c8.1] // CHECK:STDOUT: %Op.ref.loc13: %Cpp.long_long.as.DivAssignWith.impl.Op.type.868bc4.1 = name_ref Op, %.loc13_5.3 [concrete = constants.%Cpp.long_long.as.DivAssignWith.impl.Op.6729c8.1] // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.bound: = bound_method %a.ref.loc13, %Op.ref.loc13 -// CHECK:STDOUT: %impl.elem0.loc13_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc13_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc13_5.3: = bound_method %b.ref.loc13, %impl.elem0.loc13_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc13_5: init %Cpp.long_long = call %bound_method.loc13_5.3(%b.ref.loc13) // CHECK:STDOUT: %.loc13_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc13_5 // CHECK:STDOUT: %.loc13_5.5: %Cpp.long_long = converted %b.ref.loc13, %.loc13_5.4 // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc13, @Cpp.long_long.as.DivAssignWith.impl.Op.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.DivAssignWith.impl.Op.specific_fn.a29bb8.2] // CHECK:STDOUT: %bound_method.loc13_5.4: = bound_method %a.ref.loc13, %Cpp.long_long.as.DivAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc13_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc13_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc13_8: = bound_method %b.ref.loc13, %impl.elem0.loc13_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc13_8: init %Cpp.long_long = call %bound_method.loc13_8(%b.ref.loc13) // CHECK:STDOUT: %.loc13_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc13_8 @@ -3144,7 +3153,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.DivAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc13_5.4(%a.ref.loc13, %.loc13_8.2) // CHECK:STDOUT: %a.ref.loc14: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc14: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc14_5.1: %.f4d = impl_witness_access constants.%ModAssignWith.impl_witness.f7c, element0 [concrete = constants.%Cpp.long_long.as.ModAssignWith.impl.Op.49994b.2] +// CHECK:STDOUT: %impl.elem0.loc14_5.1: %.eb2 = impl_witness_access constants.%ModAssignWith.impl_witness.f7c, element0 [concrete = constants.%Cpp.long_long.as.ModAssignWith.impl.Op.49994b.2] // CHECK:STDOUT: %bound_method.loc14_5.1: = bound_method %a.ref.loc14, %impl.elem0.loc14_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc14_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc14_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc14_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -3155,14 +3164,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc14_5.3: %Cpp.long_long.as.ModAssignWith.impl.Op.type.afaa70.1 = specific_constant imports.%Core.Op.6fd, @Cpp.long_long.as.ModAssignWith.impl(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.ModAssignWith.impl.Op.49994b.1] // CHECK:STDOUT: %Op.ref.loc14: %Cpp.long_long.as.ModAssignWith.impl.Op.type.afaa70.1 = name_ref Op, %.loc14_5.3 [concrete = constants.%Cpp.long_long.as.ModAssignWith.impl.Op.49994b.1] // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.bound: = bound_method %a.ref.loc14, %Op.ref.loc14 -// CHECK:STDOUT: %impl.elem0.loc14_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc14_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc14_5.3: = bound_method %b.ref.loc14, %impl.elem0.loc14_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc14_5: init %Cpp.long_long = call %bound_method.loc14_5.3(%b.ref.loc14) // CHECK:STDOUT: %.loc14_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc14_5 // CHECK:STDOUT: %.loc14_5.5: %Cpp.long_long = converted %b.ref.loc14, %.loc14_5.4 // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc14, @Cpp.long_long.as.ModAssignWith.impl.Op.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.ModAssignWith.impl.Op.specific_fn.e3c8dd.2] // CHECK:STDOUT: %bound_method.loc14_5.4: = bound_method %a.ref.loc14, %Cpp.long_long.as.ModAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc14_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc14_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc14_8: = bound_method %b.ref.loc14, %impl.elem0.loc14_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc14_8: init %Cpp.long_long = call %bound_method.loc14_8(%b.ref.loc14) // CHECK:STDOUT: %.loc14_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc14_8 @@ -3170,7 +3179,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.ModAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc14_5.4(%a.ref.loc14, %.loc14_8.2) // CHECK:STDOUT: %a.ref.loc16: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc16: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc16_5.1: %.c2c = impl_witness_access constants.%BitAndAssignWith.impl_witness.80c, element0 [concrete = constants.%Cpp.long_long.as.BitAndAssignWith.impl.Op.9241d8.2] +// CHECK:STDOUT: %impl.elem0.loc16_5.1: %.ba8 = impl_witness_access constants.%BitAndAssignWith.impl_witness.80c, element0 [concrete = constants.%Cpp.long_long.as.BitAndAssignWith.impl.Op.9241d8.2] // CHECK:STDOUT: %bound_method.loc16_5.1: = bound_method %a.ref.loc16, %impl.elem0.loc16_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc16_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc16_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc16_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -3181,14 +3190,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc16_5.3: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.9d1673.1 = specific_constant imports.%Core.Op.c78, @Cpp.long_long.as.BitAndAssignWith.impl(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.BitAndAssignWith.impl.Op.9241d8.1] // CHECK:STDOUT: %Op.ref.loc16: %Cpp.long_long.as.BitAndAssignWith.impl.Op.type.9d1673.1 = name_ref Op, %.loc16_5.3 [concrete = constants.%Cpp.long_long.as.BitAndAssignWith.impl.Op.9241d8.1] // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.bound: = bound_method %a.ref.loc16, %Op.ref.loc16 -// CHECK:STDOUT: %impl.elem0.loc16_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc16_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc16_5.3: = bound_method %b.ref.loc16, %impl.elem0.loc16_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc16_5: init %Cpp.long_long = call %bound_method.loc16_5.3(%b.ref.loc16) // CHECK:STDOUT: %.loc16_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc16_5 // CHECK:STDOUT: %.loc16_5.5: %Cpp.long_long = converted %b.ref.loc16, %.loc16_5.4 // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc16, @Cpp.long_long.as.BitAndAssignWith.impl.Op.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.BitAndAssignWith.impl.Op.specific_fn.00c338.2] // CHECK:STDOUT: %bound_method.loc16_5.4: = bound_method %a.ref.loc16, %Cpp.long_long.as.BitAndAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc16_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc16_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc16_8: = bound_method %b.ref.loc16, %impl.elem0.loc16_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc16_8: init %Cpp.long_long = call %bound_method.loc16_8(%b.ref.loc16) // CHECK:STDOUT: %.loc16_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc16_8 @@ -3196,7 +3205,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitAndAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc16_5.4(%a.ref.loc16, %.loc16_8.2) // CHECK:STDOUT: %a.ref.loc17: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc17: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc17_5.1: %.8b2 = impl_witness_access constants.%BitOrAssignWith.impl_witness.bd2, element0 [concrete = constants.%Cpp.long_long.as.BitOrAssignWith.impl.Op.acdb6d.2] +// CHECK:STDOUT: %impl.elem0.loc17_5.1: %.4fb = impl_witness_access constants.%BitOrAssignWith.impl_witness.bd2, element0 [concrete = constants.%Cpp.long_long.as.BitOrAssignWith.impl.Op.acdb6d.2] // CHECK:STDOUT: %bound_method.loc17_5.1: = bound_method %a.ref.loc17, %impl.elem0.loc17_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc17_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc17_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc17_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -3207,14 +3216,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc17_5.3: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.4196b6.1 = specific_constant imports.%Core.Op.fa0, @Cpp.long_long.as.BitOrAssignWith.impl(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.BitOrAssignWith.impl.Op.acdb6d.1] // CHECK:STDOUT: %Op.ref.loc17: %Cpp.long_long.as.BitOrAssignWith.impl.Op.type.4196b6.1 = name_ref Op, %.loc17_5.3 [concrete = constants.%Cpp.long_long.as.BitOrAssignWith.impl.Op.acdb6d.1] // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.bound: = bound_method %a.ref.loc17, %Op.ref.loc17 -// CHECK:STDOUT: %impl.elem0.loc17_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc17_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc17_5.3: = bound_method %b.ref.loc17, %impl.elem0.loc17_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc17_5: init %Cpp.long_long = call %bound_method.loc17_5.3(%b.ref.loc17) // CHECK:STDOUT: %.loc17_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc17_5 // CHECK:STDOUT: %.loc17_5.5: %Cpp.long_long = converted %b.ref.loc17, %.loc17_5.4 // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc17, @Cpp.long_long.as.BitOrAssignWith.impl.Op.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.BitOrAssignWith.impl.Op.specific_fn.b0c3cb.2] // CHECK:STDOUT: %bound_method.loc17_5.4: = bound_method %a.ref.loc17, %Cpp.long_long.as.BitOrAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc17_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc17_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc17_8: = bound_method %b.ref.loc17, %impl.elem0.loc17_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc17_8: init %Cpp.long_long = call %bound_method.loc17_8(%b.ref.loc17) // CHECK:STDOUT: %.loc17_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc17_8 @@ -3222,7 +3231,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitOrAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc17_5.4(%a.ref.loc17, %.loc17_8.2) // CHECK:STDOUT: %a.ref.loc18: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc18: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc18_5.1: %.9cc = impl_witness_access constants.%BitXorAssignWith.impl_witness.f91, element0 [concrete = constants.%Cpp.long_long.as.BitXorAssignWith.impl.Op.3aa346.2] +// CHECK:STDOUT: %impl.elem0.loc18_5.1: %.919 = impl_witness_access constants.%BitXorAssignWith.impl_witness.f91, element0 [concrete = constants.%Cpp.long_long.as.BitXorAssignWith.impl.Op.3aa346.2] // CHECK:STDOUT: %bound_method.loc18_5.1: = bound_method %a.ref.loc18, %impl.elem0.loc18_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc18_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc18_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc18_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -3233,14 +3242,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc18_5.3: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.7f7009.1 = specific_constant imports.%Core.Op.3d4, @Cpp.long_long.as.BitXorAssignWith.impl(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.BitXorAssignWith.impl.Op.3aa346.1] // CHECK:STDOUT: %Op.ref.loc18: %Cpp.long_long.as.BitXorAssignWith.impl.Op.type.7f7009.1 = name_ref Op, %.loc18_5.3 [concrete = constants.%Cpp.long_long.as.BitXorAssignWith.impl.Op.3aa346.1] // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.bound: = bound_method %a.ref.loc18, %Op.ref.loc18 -// CHECK:STDOUT: %impl.elem0.loc18_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc18_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc18_5.3: = bound_method %b.ref.loc18, %impl.elem0.loc18_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc18_5: init %Cpp.long_long = call %bound_method.loc18_5.3(%b.ref.loc18) // CHECK:STDOUT: %.loc18_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc18_5 // CHECK:STDOUT: %.loc18_5.5: %Cpp.long_long = converted %b.ref.loc18, %.loc18_5.4 // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc18, @Cpp.long_long.as.BitXorAssignWith.impl.Op.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.BitXorAssignWith.impl.Op.specific_fn.8f3086.2] // CHECK:STDOUT: %bound_method.loc18_5.4: = bound_method %a.ref.loc18, %Cpp.long_long.as.BitXorAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc18_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc18_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc18_8: = bound_method %b.ref.loc18, %impl.elem0.loc18_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc18_8: init %Cpp.long_long = call %bound_method.loc18_8(%b.ref.loc18) // CHECK:STDOUT: %.loc18_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc18_8 @@ -3248,7 +3257,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.BitXorAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18_5.4(%a.ref.loc18, %.loc18_8.2) // CHECK:STDOUT: %a.ref.loc19: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc19: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc19_5.1: %.334 = impl_witness_access constants.%LeftShiftAssignWith.impl_witness.c81, element0 [concrete = constants.%Cpp.long_long.as.LeftShiftAssignWith.impl.Op.e91293.2] +// CHECK:STDOUT: %impl.elem0.loc19_5.1: %.64f = impl_witness_access constants.%LeftShiftAssignWith.impl_witness.c81, element0 [concrete = constants.%Cpp.long_long.as.LeftShiftAssignWith.impl.Op.e91293.2] // CHECK:STDOUT: %bound_method.loc19_5.1: = bound_method %a.ref.loc19, %impl.elem0.loc19_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc19_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc19_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc19_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -3259,14 +3268,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc19_5.3: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.21cdd1.1 = specific_constant imports.%Core.Op.1b6, @Cpp.long_long.as.LeftShiftAssignWith.impl(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.LeftShiftAssignWith.impl.Op.e91293.1] // CHECK:STDOUT: %Op.ref.loc19: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.type.21cdd1.1 = name_ref Op, %.loc19_5.3 [concrete = constants.%Cpp.long_long.as.LeftShiftAssignWith.impl.Op.e91293.1] // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.bound: = bound_method %a.ref.loc19, %Op.ref.loc19 -// CHECK:STDOUT: %impl.elem0.loc19_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc19_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc19_5.3: = bound_method %b.ref.loc19, %impl.elem0.loc19_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc19_5: init %Cpp.long_long = call %bound_method.loc19_5.3(%b.ref.loc19) // CHECK:STDOUT: %.loc19_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc19_5 // CHECK:STDOUT: %.loc19_5.5: %Cpp.long_long = converted %b.ref.loc19, %.loc19_5.4 // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc19, @Cpp.long_long.as.LeftShiftAssignWith.impl.Op.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.LeftShiftAssignWith.impl.Op.specific_fn.1c7fb8.2] // CHECK:STDOUT: %bound_method.loc19_5.4: = bound_method %a.ref.loc19, %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc19_9: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc19_9: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc19_9: = bound_method %b.ref.loc19, %impl.elem0.loc19_9 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc19_9: init %Cpp.long_long = call %bound_method.loc19_9(%b.ref.loc19) // CHECK:STDOUT: %.loc19_9.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc19_9 @@ -3274,7 +3283,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.LeftShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc19_5.4(%a.ref.loc19, %.loc19_9.2) // CHECK:STDOUT: %a.ref.loc20: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref.loc20: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc20_5.1: %.f4a = impl_witness_access constants.%RightShiftAssignWith.impl_witness.1b7, element0 [concrete = constants.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.efc522.2] +// CHECK:STDOUT: %impl.elem0.loc20_5.1: %.298 = impl_witness_access constants.%RightShiftAssignWith.impl_witness.1b7, element0 [concrete = constants.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.efc522.2] // CHECK:STDOUT: %bound_method.loc20_5.1: = bound_method %a.ref.loc20, %impl.elem0.loc20_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc20_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc20_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc20_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -3285,14 +3294,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc20_5.3: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.0ddf2d.1 = specific_constant imports.%Core.Op.bcc, @Cpp.long_long.as.RightShiftAssignWith.impl(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.efc522.1] // CHECK:STDOUT: %Op.ref.loc20: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.type.0ddf2d.1 = name_ref Op, %.loc20_5.3 [concrete = constants.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.efc522.1] // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.bound: = bound_method %a.ref.loc20, %Op.ref.loc20 -// CHECK:STDOUT: %impl.elem0.loc20_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc20_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc20_5.3: = bound_method %b.ref.loc20, %impl.elem0.loc20_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc20_5: init %Cpp.long_long = call %bound_method.loc20_5.3(%b.ref.loc20) // CHECK:STDOUT: %.loc20_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc20_5 // CHECK:STDOUT: %.loc20_5.5: %Cpp.long_long = converted %b.ref.loc20, %.loc20_5.4 // CHECK:STDOUT: %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn: = specific_function %Op.ref.loc20, @Cpp.long_long.as.RightShiftAssignWith.impl.Op.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn.1c2239.2] // CHECK:STDOUT: %bound_method.loc20_5.4: = bound_method %a.ref.loc20, %Cpp.long_long.as.RightShiftAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc20_9: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc20_9: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc20_9: = bound_method %b.ref.loc20, %impl.elem0.loc20_9 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc20_9: init %Cpp.long_long = call %bound_method.loc20_9(%b.ref.loc20) // CHECK:STDOUT: %.loc20_9.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc20_9 @@ -3313,16 +3322,15 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %pattern_type.76e: type = pattern_type %Cpp.long_long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.a03: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6e4: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long_long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.82e: = impl_witness imports.%ImplicitAs.impl_witness_table.896 [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.82e) [concrete] -// CHECK:STDOUT: %.a93: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.dcd: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.a119: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.dcd, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.092: %Cpp.long_long = int_value 1 [concrete] // CHECK:STDOUT: %AddAssignWith.type.761: type = facet_type <@AddAssignWith, @AddAssignWith(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %AddAssignWith.Op.type.4fd: type = fn_type @AddAssignWith.Op, @AddAssignWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %U.ea5: %ImplicitAs.type.a03 = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.3e35db.1: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.1, @Cpp.long_long.as.AddAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.cf74e0.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.3e35db.1 = struct_value () [symbolic] @@ -3334,7 +3342,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.11fd63.2: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.1, @Cpp.long_long.as.AddAssignWith.impl(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.d69079.2: %Cpp.long_long.as.AddAssignWith.impl.Op.type.11fd63.2 = struct_value () [concrete] // CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.761 = facet_value %Cpp.long_long, (%AddAssignWith.impl_witness.e3f) [concrete] -// CHECK:STDOUT: %.344: type = fn_type_with_self_type %AddAssignWith.Op.type.4fd, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.58a: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith(Core.IntLiteral, %AddAssignWith.facet) [concrete] +// CHECK:STDOUT: %.883: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.58a, %AddAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.918060.1: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.d69079.2, @Cpp.long_long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.918060.2: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.d69079.1, @Cpp.long_long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -3361,7 +3370,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.long_long = var %a.var_patt // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long_long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc8_3: init %Cpp.long_long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.092] @@ -3373,7 +3382,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %a: ref %Cpp.long_long = ref_binding a, %a.var // CHECK:STDOUT: %a.ref: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc9_5.1: %.344 = impl_witness_access constants.%AddAssignWith.impl_witness.e3f, element0 [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.d69079.2] +// CHECK:STDOUT: %impl.elem0.loc9_5.1: %.883 = impl_witness_access constants.%AddAssignWith.impl_witness.e3f, element0 [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.d69079.2] // CHECK:STDOUT: %bound_method.loc9_5.1: = bound_method %a.ref, %impl.elem0.loc9_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc9_5.1: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.82e) [concrete = constants.%ImplicitAs.facet] // CHECK:STDOUT: %.loc9_5.1: %ImplicitAs.type.a03 = converted Core.IntLiteral, %ImplicitAs.facet.loc9_5.1 [concrete = constants.%ImplicitAs.facet] @@ -3384,14 +3393,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc9_5.3: %Cpp.long_long.as.AddAssignWith.impl.Op.type.11fd63.1 = specific_constant imports.%Core.Op.57a, @Cpp.long_long.as.AddAssignWith.impl(constants.%ImplicitAs.facet) [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.d69079.1] // CHECK:STDOUT: %Op.ref: %Cpp.long_long.as.AddAssignWith.impl.Op.type.11fd63.1 = name_ref Op, %.loc9_5.3 [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.d69079.1] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.bound: = bound_method %a.ref, %Op.ref -// CHECK:STDOUT: %impl.elem0.loc9_5.2: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc9_5.2: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc9_5.3: = bound_method %int_1.loc9, %impl.elem0.loc9_5.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_5: init %Cpp.long_long = call %bound_method.loc9_5.3(%int_1.loc9) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc9_5.4: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_5 [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc9_5.5: %Cpp.long_long = converted %int_1.loc9, %.loc9_5.4 [concrete = constants.%int_1.092] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn: = specific_function %Op.ref, @Cpp.long_long.as.AddAssignWith.impl.Op.2(constants.%ImplicitAs.facet) [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.918060.2] // CHECK:STDOUT: %bound_method.loc9_5.4: = bound_method %a.ref, %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc9_8: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc9_8: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc9_8: = bound_method %int_1.loc9, %impl.elem0.loc9_8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_8: init %Cpp.long_long = call %bound_method.loc9_8(%int_1.loc9) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc9_8.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_8 [concrete = constants.%int_1.092] @@ -3414,12 +3423,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %pattern_type.76e: type = pattern_type %Cpp.long_long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.a03: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6e4: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long_long) [concrete] // CHECK:STDOUT: %ImplicitAs.type.2ad: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.82e: = impl_witness imports.%ImplicitAs.impl_witness_table.896 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.d52: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.82e) [concrete] -// CHECK:STDOUT: %.a93: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet.d52 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.dcd: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet.d52) [concrete] +// CHECK:STDOUT: %.a119: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.dcd, %ImplicitAs.facet.d52 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.aba: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.a20: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.aba = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.a20 [concrete] @@ -3432,13 +3440,13 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.2, @Core.IntLiteral.as.ImplicitAs.impl.b2d(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.d48: %ImplicitAs.type.2ad = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.556) [concrete] -// CHECK:STDOUT: %.567: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet.d48 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.4af: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i64, %ImplicitAs.facet.d48) [concrete] +// CHECK:STDOUT: %.a64: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.4af, %ImplicitAs.facet.d48 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.102: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d, @Core.IntLiteral.as.ImplicitAs.impl.Convert.2(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.41a: %i64 = int_value 1 [concrete] // CHECK:STDOUT: %AddAssignWith.type.d84: type = facet_type <@AddAssignWith, @AddAssignWith(%i64)> [concrete] -// CHECK:STDOUT: %AddAssignWith.Op.type.693: type = fn_type @AddAssignWith.Op, @AddAssignWith(%i64) [concrete] // CHECK:STDOUT: %U.ea5: %ImplicitAs.type.a03 = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.3e35db.1: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.1, @Cpp.long_long.as.AddAssignWith.impl(%U.ea5) [symbolic] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.cf74e0.1: %Cpp.long_long.as.AddAssignWith.impl.Op.type.3e35db.1 = struct_value () [symbolic] @@ -3452,9 +3460,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.type.2293dc.2: type = fn_type @Cpp.long_long.as.AddAssignWith.impl.Op.1, @Cpp.long_long.as.AddAssignWith.impl(%ImplicitAs.facet.c59) [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.2: %Cpp.long_long.as.AddAssignWith.impl.Op.type.2293dc.2 = struct_value () [concrete] // CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.d84 = facet_value %Cpp.long_long, (%AddAssignWith.impl_witness.767) [concrete] -// CHECK:STDOUT: %.34b: type = fn_type_with_self_type %AddAssignWith.Op.type.693, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.d84: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith(%i64, %AddAssignWith.facet) [concrete] +// CHECK:STDOUT: %.f7b: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.d84, %AddAssignWith.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.50a783.1: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.2, @Cpp.long_long.as.AddAssignWith.impl.Op.1(%ImplicitAs.facet.c59) [concrete] -// CHECK:STDOUT: %.b29: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet.c59 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.653: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet.c59) [concrete] +// CHECK:STDOUT: %.cb1: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.653, %ImplicitAs.facet.c59 [concrete] // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.type: type = fn_type @i64.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert: %i64.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.50a783.2: = specific_function %Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.1, @Cpp.long_long.as.AddAssignWith.impl.Op.2(%ImplicitAs.facet.c59) [concrete] @@ -3486,7 +3496,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.long_long = var %a.var_patt // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] +// CHECK:STDOUT: %impl.elem0.loc8: %.a119 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.a20] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.aae] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long_long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc8_3: init %Cpp.long_long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.092] @@ -3504,7 +3514,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc9: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] +// CHECK:STDOUT: %impl.elem0.loc9: %.a64 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] // CHECK:STDOUT: %bound_method.loc9_16.1: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.102] // CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Core.IntLiteral.as.ImplicitAs.impl.Convert.2(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_16.2: = bound_method %int_1.loc9, %specific_fn.loc9 [concrete = constants.%bound_method] @@ -3514,7 +3524,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %b: %i64 = value_binding b, %.loc9_16.2 // CHECK:STDOUT: %a.ref: ref %Cpp.long_long = name_ref a, %a // CHECK:STDOUT: %b.ref: %i64 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0.loc10_5.1: %.34b = impl_witness_access constants.%AddAssignWith.impl_witness.767, element0 [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.2] +// CHECK:STDOUT: %impl.elem0.loc10_5.1: %.f7b = impl_witness_access constants.%AddAssignWith.impl_witness.767, element0 [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.2] // CHECK:STDOUT: %bound_method.loc10_5.1: = bound_method %a.ref, %impl.elem0.loc10_5.1 // CHECK:STDOUT: %ImplicitAs.facet.loc10_5.1: %ImplicitAs.type.a03 = facet_value constants.%i64, (constants.%ImplicitAs.impl_witness.1b3) [concrete = constants.%ImplicitAs.facet.c59] // CHECK:STDOUT: %.loc10_5.1: %ImplicitAs.type.a03 = converted constants.%i64, %ImplicitAs.facet.loc10_5.1 [concrete = constants.%ImplicitAs.facet.c59] @@ -3525,14 +3535,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %.loc10_5.3: %Cpp.long_long.as.AddAssignWith.impl.Op.type.2293dc.1 = specific_constant imports.%Core.Op.57a, @Cpp.long_long.as.AddAssignWith.impl(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.1] // CHECK:STDOUT: %Op.ref: %Cpp.long_long.as.AddAssignWith.impl.Op.type.2293dc.1 = name_ref Op, %.loc10_5.3 [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.fa1912.1] // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.bound: = bound_method %a.ref, %Op.ref -// CHECK:STDOUT: %impl.elem0.loc10_5.2: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_5.2: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_5.3: = bound_method %b.ref, %impl.elem0.loc10_5.2 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc10_5: init %Cpp.long_long = call %bound_method.loc10_5.3(%b.ref) // CHECK:STDOUT: %.loc10_5.4: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc10_5 // CHECK:STDOUT: %.loc10_5.5: %Cpp.long_long = converted %b.ref, %.loc10_5.4 // CHECK:STDOUT: %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn: = specific_function %Op.ref, @Cpp.long_long.as.AddAssignWith.impl.Op.2(constants.%ImplicitAs.facet.c59) [concrete = constants.%Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn.50a783.2] // CHECK:STDOUT: %bound_method.loc10_5.4: = bound_method %a.ref, %Cpp.long_long.as.AddAssignWith.impl.Op.specific_fn -// CHECK:STDOUT: %impl.elem0.loc10_8: %.b29 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc10_8: %.cb1 = impl_witness_access constants.%ImplicitAs.impl_witness.1b3, element0 [concrete = constants.%i64.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc10_8: = bound_method %b.ref, %impl.elem0.loc10_8 // CHECK:STDOUT: %i64.as.ImplicitAs.impl.Convert.call.loc10_8: init %Cpp.long_long = call %bound_method.loc10_8(%b.ref) // CHECK:STDOUT: %.loc10_8.1: %Cpp.long_long = value_of_initializer %i64.as.ImplicitAs.impl.Convert.call.loc10_8 @@ -3553,26 +3563,26 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %pattern_type.76e: type = pattern_type %Cpp.long_long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.a03: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6e4: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long_long) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.82e: = impl_witness imports.%ImplicitAs.impl_witness_table.896 [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.a03 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.82e) [concrete] -// CHECK:STDOUT: %.a93: type = fn_type_with_self_type %ImplicitAs.Convert.type.6e4, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.dcd: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.long_long, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.a11: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.dcd, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.092: %Cpp.long_long = int_value 1 [concrete] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] -// CHECK:STDOUT: %Inc.Op.type: type = fn_type @Inc.Op [concrete] // CHECK:STDOUT: %Inc.impl_witness: = impl_witness imports.%Inc.impl_witness_table [concrete] // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Cpp.long_long, (%Inc.impl_witness) [concrete] -// CHECK:STDOUT: %.905: type = fn_type_with_self_type %Inc.Op.type, %Inc.facet [concrete] +// CHECK:STDOUT: %Inc.WithSelf.Op.type.1f7: type = fn_type @Inc.WithSelf.Op, @Inc(%Inc.facet) [concrete] +// CHECK:STDOUT: %.11e: type = fn_type_with_self_type %Inc.WithSelf.Op.type.1f7, %Inc.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Inc.impl.Op.type: type = fn_type @Cpp.long_long.as.Inc.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Inc.impl.Op: %Cpp.long_long.as.Inc.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Dec.type: type = facet_type <@Dec> [concrete] -// CHECK:STDOUT: %Dec.Op.type: type = fn_type @Dec.Op [concrete] // CHECK:STDOUT: %Dec.impl_witness: = impl_witness imports.%Dec.impl_witness_table [concrete] // CHECK:STDOUT: %Dec.facet: %Dec.type = facet_value %Cpp.long_long, (%Dec.impl_witness) [concrete] -// CHECK:STDOUT: %.ba0: type = fn_type_with_self_type %Dec.Op.type, %Dec.facet [concrete] +// CHECK:STDOUT: %Dec.WithSelf.Op.type.241: type = fn_type @Dec.WithSelf.Op, @Dec(%Dec.facet) [concrete] +// CHECK:STDOUT: %.c6e: type = fn_type_with_self_type %Dec.WithSelf.Op.type.241, %Dec.facet [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Dec.impl.Op.type: type = fn_type @Cpp.long_long.as.Dec.impl.Op [concrete] // CHECK:STDOUT: %Cpp.long_long.as.Dec.impl.Op: %Cpp.long_long.as.Dec.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -3600,7 +3610,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.long_long = var %a.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.a93 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.a11 = impl_witness_access constants.%ImplicitAs.impl_witness.82e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long_long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.092] // CHECK:STDOUT: %.loc8_3: init %Cpp.long_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.092] @@ -3611,11 +3621,11 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a: ref %Cpp.long_long = ref_binding a, %a.var // CHECK:STDOUT: %a.ref.loc9: ref %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc9: %.905 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Cpp.long_long.as.Inc.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc9: %.11e = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Cpp.long_long.as.Inc.impl.Op] // CHECK:STDOUT: %bound_method.loc9: = bound_method %a.ref.loc9, %impl.elem0.loc9 // CHECK:STDOUT: %Cpp.long_long.as.Inc.impl.Op.call: init %empty_tuple.type = call %bound_method.loc9(%a.ref.loc9) // CHECK:STDOUT: %a.ref.loc10: ref %Cpp.long_long = name_ref a, %a -// CHECK:STDOUT: %impl.elem0.loc10: %.ba0 = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%Cpp.long_long.as.Dec.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc10: %.c6e = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%Cpp.long_long.as.Dec.impl.Op] // CHECK:STDOUT: %bound_method.loc10: = bound_method %a.ref.loc10, %impl.elem0.loc10 // CHECK:STDOUT: %Cpp.long_long.as.Dec.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10(%a.ref.loc10) // CHECK:STDOUT: %DestroyOp.bound: = bound_method %a.var, constants.%DestroyOp @@ -3640,15 +3650,13 @@ fn CopyUnsignedLongLong() { // 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.407: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.unsigned_long_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.c4b: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.unsigned_long_long) [concrete] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.584: type = facet_type <@ImplicitAs, @ImplicitAs(%u64)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.c65: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u64) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.4384: = impl_witness imports.%ImplicitAs.impl_witness_table.517 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.195: %ImplicitAs.type.407 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.4384) [concrete] -// CHECK:STDOUT: %.dd7: type = fn_type_with_self_type %ImplicitAs.Convert.type.c4b, %ImplicitAs.facet.195 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.3d9: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.unsigned_long_long, %ImplicitAs.facet.195) [concrete] +// CHECK:STDOUT: %.30f: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.3d9, %ImplicitAs.facet.195 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.bcb: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f87: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.bcb = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f87 [concrete] @@ -3663,7 +3671,8 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %pattern_type.157: type = pattern_type %u64 [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.905: = impl_witness imports.%ImplicitAs.impl_witness_table.182 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.fb4: %ImplicitAs.type.584 = facet_value %Cpp.unsigned_long_long, (%ImplicitAs.impl_witness.905) [concrete] -// CHECK:STDOUT: %.e70: type = fn_type_with_self_type %ImplicitAs.Convert.type.c65, %ImplicitAs.facet.fb4 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.f8a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%u64, %ImplicitAs.facet.fb4) [concrete] +// CHECK:STDOUT: %.c93: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.f8a, %ImplicitAs.facet.fb4 [concrete] // CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type.03b: type = fn_type @Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.1 [concrete] // CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.d3c: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type.03b = struct_value () [concrete] // CHECK:STDOUT: %ULongResult: type = class_type @ULongResult [concrete] @@ -3677,16 +3686,17 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.45a: type = facet_type <@As, @As(%Cpp.unsigned_long_long)> [concrete] -// CHECK:STDOUT: %As.Convert.type.2e6: type = fn_type @As.Convert, @As(%Cpp.unsigned_long_long) [concrete] // CHECK:STDOUT: %As.impl_witness.d1f: = impl_witness imports.%As.impl_witness_table.002 [concrete] // CHECK:STDOUT: %As.facet: %As.type.45a = facet_value Core.IntLiteral, (%As.impl_witness.d1f) [concrete] -// CHECK:STDOUT: %.097: type = fn_type_with_self_type %As.Convert.type.2e6, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.8ce: type = fn_type @As.WithSelf.Convert, @As(%Cpp.unsigned_long_long, %As.facet) [concrete] +// CHECK:STDOUT: %.83e: type = fn_type_with_self_type %As.WithSelf.Convert.type.8ce, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.7c3: = impl_witness imports.%ImplicitAs.impl_witness_table.d12 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.29a: %ImplicitAs.type.139 = facet_value %Cpp.unsigned_long_long, (%ImplicitAs.impl_witness.7c3) [concrete] -// CHECK:STDOUT: %.98c: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.29a [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.314: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.29a) [concrete] +// CHECK:STDOUT: %.66f: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.314, %ImplicitAs.facet.29a [concrete] // CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type.109: type = fn_type @Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.ffb: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.type.109 = struct_value () [concrete] // CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.79a, %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.ffb [concrete] @@ -3697,14 +3707,14 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete] -// CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e4d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f32.97e, %ImplicitAs.facet.945) [concrete] +// CHECK:STDOUT: %.98d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e4d, %ImplicitAs.facet.945 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -3784,7 +3794,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %Cpp.ref.loc15: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %unsigned_long_long.ref.loc15: type = name_ref unsigned_long_long, constants.%Cpp.unsigned_long_long [concrete = constants.%Cpp.unsigned_long_long] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc15: %.dd7 = impl_witness_access constants.%ImplicitAs.impl_witness.4384, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f87] +// CHECK:STDOUT: %impl.elem0.loc15: %.30f = impl_witness_access constants.%ImplicitAs.impl_witness.4384, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f87] // CHECK:STDOUT: %bound_method.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.unsigned_long_long = call %bound_method.loc15(%int_1.loc15) [concrete = constants.%int_1.79a] // CHECK:STDOUT: %.loc15_56.1: %Cpp.unsigned_long_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.79a] @@ -3842,7 +3852,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64] // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc21: %.e70 = impl_witness_access constants.%ImplicitAs.impl_witness.905, element0 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.d3c] +// CHECK:STDOUT: %impl.elem0.loc21: %.c93 = impl_witness_access constants.%ImplicitAs.impl_witness.905, element0 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.d3c] // CHECK:STDOUT: %bound_method.loc21: = bound_method %cpp_unsigned_long_long.ref.loc21, %impl.elem0.loc21 // CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call.loc21: init %u64 = call %bound_method.loc21(%cpp_unsigned_long_long.ref.loc21) // CHECK:STDOUT: %.loc21_25.1: %u64 = value_of_initializer %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call.loc21 @@ -3872,7 +3882,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] // CHECK:STDOUT: %.loc24_57.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] -// CHECK:STDOUT: %impl.elem0.loc24_57: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc24_57: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc24_57.1: = bound_method %float, %impl.elem0.loc24_57 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc24_57, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc24_57.2: = bound_method %float, %specific_fn [concrete = constants.%bound_method] @@ -3890,12 +3900,12 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %Cpp.ref.loc24: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %unsigned_long_long.ref.loc24: type = name_ref unsigned_long_long, constants.%Cpp.unsigned_long_long [concrete = constants.%Cpp.unsigned_long_long] -// CHECK:STDOUT: %impl.elem0.loc24_23.1: %.097 = impl_witness_access constants.%As.impl_witness.d1f, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc24_23.1: %.83e = impl_witness_access constants.%As.impl_witness.d1f, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert] // CHECK:STDOUT: %bound_method.loc24_23.1: = bound_method %int_1.loc24, %impl.elem0.loc24_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.unsigned_long_long = call %bound_method.loc24_23.1(%int_1.loc24) [concrete = constants.%int_1.79a] // CHECK:STDOUT: %.loc24_23.1: %Cpp.unsigned_long_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.79a] // CHECK:STDOUT: %.loc24_23.2: %Cpp.unsigned_long_long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.79a] -// CHECK:STDOUT: %impl.elem0.loc24_23.2: %.98c = impl_witness_access constants.%ImplicitAs.impl_witness.7c3, element0 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.ffb] +// CHECK:STDOUT: %impl.elem0.loc24_23.2: %.66f = impl_witness_access constants.%ImplicitAs.impl_witness.7c3, element0 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.ffb] // CHECK:STDOUT: %bound_method.loc24_23.2: = bound_method %.loc24_23.2, %impl.elem0.loc24_23.2 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call.loc24: init Core.IntLiteral = call %bound_method.loc24_23.2(%.loc24_23.2) [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8] @@ -3924,19 +3934,19 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %pattern_type.ebd: type = pattern_type %Cpp.unsigned_long_long [concrete] // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.407: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.unsigned_long_long)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.c4b: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.unsigned_long_long) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.4384: = impl_witness imports.%ImplicitAs.impl_witness_table.517 [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.407 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.4384) [concrete] -// CHECK:STDOUT: %.dd7: type = fn_type_with_self_type %ImplicitAs.Convert.type.c4b, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.3d9: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Cpp.unsigned_long_long, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.30f: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.3d9, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_1.79a: %Cpp.unsigned_long_long = int_value 1 [concrete] // CHECK:STDOUT: %Copy.impl_witness.95c: = impl_witness imports.%Copy.impl_witness_table.759 [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Cpp.unsigned_long_long, (%Copy.impl_witness.95c) [concrete] -// CHECK:STDOUT: %.429: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.04c: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.d24: type = fn_type_with_self_type %Copy.WithSelf.Op.type.04c, %Copy.facet [concrete] // CHECK:STDOUT: %Cpp.unsigned_long_long.as.Copy.impl.Op.type: type = fn_type @Cpp.unsigned_long_long.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Cpp.unsigned_long_long.as.Copy.impl.Op: %Cpp.unsigned_long_long.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -3962,7 +3972,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %Cpp.unsigned_long_long = var %a.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8: %.dd7 = impl_witness_access constants.%ImplicitAs.impl_witness.4384, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8: %.30f = impl_witness_access constants.%ImplicitAs.impl_witness.4384, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8: = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.unsigned_long_long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.79a] // CHECK:STDOUT: %.loc8_3: init %Cpp.unsigned_long_long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.79a] @@ -3979,7 +3989,7 @@ fn CopyUnsignedLongLong() { // CHECK:STDOUT: %b.var: ref %Cpp.unsigned_long_long = var %b.var_patt // CHECK:STDOUT: %a.ref: ref %Cpp.unsigned_long_long = name_ref a, %a // CHECK:STDOUT: %.loc9_35: %Cpp.unsigned_long_long = acquire_value %a.ref -// CHECK:STDOUT: %impl.elem0.loc9: %.429 = impl_witness_access constants.%Copy.impl_witness.95c, element0 [concrete = constants.%Cpp.unsigned_long_long.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc9: %.d24 = impl_witness_access constants.%Copy.impl_witness.95c, element0 [concrete = constants.%Cpp.unsigned_long_long.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc9: = bound_method %.loc9_35, %impl.elem0.loc9 // CHECK:STDOUT: %Cpp.unsigned_long_long.as.Copy.impl.Op.call: init %Cpp.unsigned_long_long = call %bound_method.loc9(%.loc9_35) // CHECK:STDOUT: assign %b.var, %Cpp.unsigned_long_long.as.Copy.impl.Op.call diff --git a/toolchain/check/testdata/interop/cpp/class/base.carbon b/toolchain/check/testdata/interop/cpp/class/base.carbon index f2ce0cffb6b8..18a20a85500c 100644 --- a/toolchain/check/testdata/interop/cpp/class/base.carbon +++ b/toolchain/check/testdata/interop/cpp/class/base.carbon @@ -480,7 +480,6 @@ class V { // CHECK:STDOUT: %ConvertPtr.type: type = fn_type @ConvertPtr [concrete] // CHECK:STDOUT: %ConvertPtr: %ConvertPtr.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -488,7 +487,8 @@ class V { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.d24: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Base) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.dae: %ptr.as.Copy.impl.Op.type.d24 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.fb2, (%Copy.impl_witness.33f) [concrete] -// CHECK:STDOUT: %.4db: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.326: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.107: type = fn_type_with_self_type %Copy.WithSelf.Op.type.326, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.dae, @ptr.as.Copy.impl.Op(%Base) [concrete] // CHECK:STDOUT: %AcceptVal.type: type = fn_type @AcceptVal [concrete] // CHECK:STDOUT: %AcceptVal: %AcceptVal.type = struct_value () [concrete] @@ -550,7 +550,7 @@ class V { // CHECK:STDOUT: %.loc8_11.2: ref %Base = class_element_access %.loc8_11.1, element0 // CHECK:STDOUT: %addr: %ptr.fb2 = addr_of %.loc8_11.2 // CHECK:STDOUT: %.loc8_11.3: %ptr.fb2 = converted %d.ref, %addr -// CHECK:STDOUT: %impl.elem0: %.4db = impl_witness_access constants.%Copy.impl_witness.33f, element0 [concrete = constants.%ptr.as.Copy.impl.Op.dae] +// CHECK:STDOUT: %impl.elem0: %.107 = impl_witness_access constants.%Copy.impl_witness.33f, element0 [concrete = constants.%ptr.as.Copy.impl.Op.dae] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %.loc8_11.3, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%Base) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %.loc8_11.3, %specific_fn @@ -629,14 +629,14 @@ class V { // CHECK:STDOUT: %Base: type = class_type @Base [concrete] // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -660,7 +660,7 @@ class V { // CHECK:STDOUT: %.loc8_11.2: ref %Base = converted %d.ref, %.loc8_11.1 // CHECK:STDOUT: %.loc8_11.3: ref %i32 = class_element_access %.loc8_11.2, element0 // CHECK:STDOUT: %.loc8_11.4: %i32 = acquire_value %.loc8_11.3 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %.loc8_11.4, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %.loc8_11.4, %specific_fn @@ -678,7 +678,7 @@ class V { // CHECK:STDOUT: %.loc14_11.2: ref %Base = converted %d.ref, %.loc14_11.1 // CHECK:STDOUT: %.loc14_11.3: ref %i32 = class_element_access %.loc14_11.2, element1 // CHECK:STDOUT: %.loc14_11.4: %i32 = acquire_value %.loc14_11.3 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc14_11.1: = bound_method %.loc14_11.4, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_11.2: = bound_method %.loc14_11.4, %specific_fn diff --git a/toolchain/check/testdata/interop/cpp/class/constructor.carbon b/toolchain/check/testdata/interop/cpp/class/constructor.carbon index 7c75f11d880b..d38f508ab2fe 100644 --- a/toolchain/check/testdata/interop/cpp/class/constructor.carbon +++ b/toolchain/check/testdata/interop/cpp/class/constructor.carbon @@ -324,7 +324,6 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete] // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -332,7 +331,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f5c: = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.db6: = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -371,14 +371,14 @@ fn F() { // CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff] // CHECK:STDOUT: %int_456: Core.IntLiteral = int_value 456 [concrete = constants.%int_456.010] // CHECK:STDOUT: %.loc8_34.1: ref %C = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_26: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_26: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_26.1: = bound_method %int_123, %impl.elem0.loc8_26 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f5c] // CHECK:STDOUT: %specific_fn.loc8_26: = specific_function %impl.elem0.loc8_26, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_26.2: = bound_method %int_123, %specific_fn.loc8_26 [concrete = constants.%bound_method.db6] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_26: init %i32 = call %bound_method.loc8_26.2(%int_123) [concrete = constants.%int_123.f7f] // CHECK:STDOUT: %.loc8_26.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_26 [concrete = constants.%int_123.f7f] // CHECK:STDOUT: %.loc8_26.2: %i32 = converted %int_123, %.loc8_26.1 [concrete = constants.%int_123.f7f] -// CHECK:STDOUT: %impl.elem0.loc8_31: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_31: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_31.1: = bound_method %int_456, %impl.elem0.loc8_31 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.266] // CHECK:STDOUT: %specific_fn.loc8_31: = specific_function %impl.elem0.loc8_31, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_31.2: = bound_method %int_456, %specific_fn.loc8_31 [concrete = constants.%bound_method.f41] @@ -418,7 +418,6 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk.type.65f120.2: type = fn_type @C__carbon_thunk.2 [concrete] // CHECK:STDOUT: %C__carbon_thunk.d98342.2: %C__carbon_thunk.type.65f120.2 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -426,7 +425,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f5c: = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.db6: = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -487,14 +487,14 @@ fn F() { // CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff] // CHECK:STDOUT: %int_456: Core.IntLiteral = int_value 456 [concrete = constants.%int_456.010] // CHECK:STDOUT: %.loc9_35.1: ref %C = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc9_27: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_27: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_27.1: = bound_method %int_123, %impl.elem0.loc9_27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f5c] // CHECK:STDOUT: %specific_fn.loc9_27: = specific_function %impl.elem0.loc9_27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_27.2: = bound_method %int_123, %specific_fn.loc9_27 [concrete = constants.%bound_method.db6] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_27: init %i32 = call %bound_method.loc9_27.2(%int_123) [concrete = constants.%int_123.f7f] // CHECK:STDOUT: %.loc9_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_27 [concrete = constants.%int_123.f7f] // CHECK:STDOUT: %.loc9_27.2: %i32 = converted %int_123, %.loc9_27.1 [concrete = constants.%int_123.f7f] -// CHECK:STDOUT: %impl.elem0.loc9_32: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_32: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_32.1: = bound_method %int_456, %impl.elem0.loc9_32 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.266] // CHECK:STDOUT: %specific_fn.loc9_32: = specific_function %impl.elem0.loc9_32, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_32.2: = bound_method %int_456, %specific_fn.loc9_32 [concrete = constants.%bound_method.f41] @@ -534,7 +534,6 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk.type.65f120.1: type = fn_type @C__carbon_thunk.1 [concrete] // CHECK:STDOUT: %C__carbon_thunk.d98342.1: %C__carbon_thunk.type.65f120.1 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -542,7 +541,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f: = bound_method %int_8.b85, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.e07: = bound_method %int_8.b85, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -588,14 +588,14 @@ fn F() { // CHECK:STDOUT: %int_8.loc8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85] // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988] // CHECK:STDOUT: %.loc8_31.1: ref %C = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_27: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_27: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_27.1: = bound_method %int_8.loc8, %impl.elem0.loc8_27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f] // CHECK:STDOUT: %specific_fn.loc8_27: = specific_function %impl.elem0.loc8_27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_27.2: = bound_method %int_8.loc8, %specific_fn.loc8_27 [concrete = constants.%bound_method.e07] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_27: init %i32 = call %bound_method.loc8_27.2(%int_8.loc8) [concrete = constants.%int_8.98c] // CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_27 [concrete = constants.%int_8.98c] // CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int_8.loc8, %.loc8_27.1 [concrete = constants.%int_8.98c] -// CHECK:STDOUT: %impl.elem0.loc8_30: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_30: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_30.1: = bound_method %int_9, %impl.elem0.loc8_30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.87d] // CHECK:STDOUT: %specific_fn.loc8_30: = specific_function %impl.elem0.loc8_30, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_30.2: = bound_method %int_9, %specific_fn.loc8_30 [concrete = constants.%bound_method.661] @@ -620,7 +620,7 @@ fn F() { // CHECK:STDOUT: %C.ref.loc9_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value] // CHECK:STDOUT: %int_8.loc9: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85] // CHECK:STDOUT: %.loc9_28.1: ref %C = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc9: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_27.1: = bound_method %int_8.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f] // CHECK:STDOUT: %specific_fn.loc9: = 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_27.2: = bound_method %int_8.loc9, %specific_fn.loc9 [concrete = constants.%bound_method.e07] @@ -659,7 +659,6 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk.type.65f120.1: type = fn_type @C__carbon_thunk.1 [concrete] // CHECK:STDOUT: %C__carbon_thunk.d98342.1: %C__carbon_thunk.type.65f120.1 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -667,7 +666,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_123.fff, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -677,10 +677,10 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk.type.65f120.2: type = fn_type @C__carbon_thunk.2 [concrete] // CHECK:STDOUT: %C__carbon_thunk.d98342.2: %C__carbon_thunk.type.65f120.2 = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.348: = impl_witness imports.%Copy.impl_witness_table.3cc [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value bool, (%Copy.impl_witness.348) [concrete] -// CHECK:STDOUT: %.56b: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.6dd: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.86d: type = fn_type_with_self_type %Copy.WithSelf.Op.type.6dd, %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: = bound_method %true, %bool.as.Copy.impl.Op [concrete] @@ -732,7 +732,7 @@ fn F() { // CHECK:STDOUT: %C.ref.loc8_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value] // CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff] // CHECK:STDOUT: %.loc8_3: ref %C = splice_block %c1.var {} -// CHECK:STDOUT: %impl.elem0.loc8: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_27.1: = bound_method %int_123, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_27.2: = bound_method %int_123, %specific_fn [concrete = constants.%bound_method] @@ -759,7 +759,7 @@ fn F() { // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %.loc9_3: ref %C = splice_block %c2.var {} // CHECK:STDOUT: %.loc9_27.1: ref bool = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc9: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc9: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc9: = bound_method %true, %impl.elem0.loc9 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method.loc9(%true) [concrete = constants.%true] // CHECK:STDOUT: %.loc9_27.2: ref bool = temporary %.loc9_27.1, %bool.as.Copy.impl.Op.call @@ -821,7 +821,6 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk.type: type = fn_type @C__carbon_thunk [concrete] // CHECK:STDOUT: %C__carbon_thunk: %C__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -829,20 +828,21 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_8.b85, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.e07: = bound_method %int_8.b85, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_8.98c: %i32 = int_value 8 [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.ab6: = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.530: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -878,7 +878,7 @@ fn F() { // CHECK:STDOUT: %C.ref.loc8_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value] // CHECK:STDOUT: %int_8.loc8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85] // CHECK:STDOUT: %.loc8_28.1: ref %C = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_27.1: = bound_method %int_8.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_27.2: = bound_method %int_8.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.e07] @@ -901,7 +901,7 @@ fn F() { // CHECK:STDOUT: %int_8.loc9: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc9: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0.loc9: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc9_21.1: = bound_method %int_8.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_21.2: = bound_method %int_8.loc9, %specific_fn.loc9 [concrete = constants.%bound_method.530] @@ -943,7 +943,6 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk.type.65f120.1: type = fn_type @C__carbon_thunk.1 [concrete] // CHECK:STDOUT: %C__carbon_thunk.d98342.1: %C__carbon_thunk.type.65f120.1 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -951,7 +950,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f: = bound_method %int_8.b85, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.e07: = bound_method %int_8.b85, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -962,14 +962,14 @@ fn F() { // CHECK:STDOUT: %C__carbon_thunk.type.65f120.2: type = fn_type @C__carbon_thunk.2 [concrete] // CHECK:STDOUT: %C__carbon_thunk.d98342.2: %C__carbon_thunk.type.65f120.2 = struct_value () [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.ab6: = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.530: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -1011,14 +1011,14 @@ fn F() { // CHECK:STDOUT: %int_8.loc8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85] // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988] // CHECK:STDOUT: %.loc8_31.1: ref %C = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_27: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_27: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_27.1: = bound_method %int_8.loc8, %impl.elem0.loc8_27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f] // CHECK:STDOUT: %specific_fn.loc8_27: = specific_function %impl.elem0.loc8_27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_27.2: = bound_method %int_8.loc8, %specific_fn.loc8_27 [concrete = constants.%bound_method.e07] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_27: init %i32 = call %bound_method.loc8_27.2(%int_8.loc8) [concrete = constants.%int_8.98c] // CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_27 [concrete = constants.%int_8.98c] // CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int_8.loc8, %.loc8_27.1 [concrete = constants.%int_8.98c] -// CHECK:STDOUT: %impl.elem0.loc8_30: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_30: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_30.1: = bound_method %int_9, %impl.elem0.loc8_30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.87d] // CHECK:STDOUT: %specific_fn.loc8_30: = specific_function %impl.elem0.loc8_30, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_30.2: = bound_method %int_9, %specific_fn.loc8_30 [concrete = constants.%bound_method.661] @@ -1043,7 +1043,7 @@ fn F() { // CHECK:STDOUT: %C.ref.loc9_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value] // CHECK:STDOUT: %int_8.loc9: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85] // CHECK:STDOUT: %.loc9_28.1: ref %C = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc9: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_27.1: = bound_method %int_8.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f] // CHECK:STDOUT: %specific_fn.loc9: = 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_27.2: = bound_method %int_8.loc9, %specific_fn.loc9 [concrete = constants.%bound_method.e07] @@ -1066,7 +1066,7 @@ fn F() { // CHECK:STDOUT: %int_8.loc10: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc10: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0.loc10: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc10_21.1: = bound_method %int_8.loc10, %impl.elem0.loc10 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_21.2: = bound_method %int_8.loc10, %specific_fn.loc10 [concrete = constants.%bound_method.530] diff --git a/toolchain/check/testdata/interop/cpp/class/field.carbon b/toolchain/check/testdata/interop/cpp/class/field.carbon index 211cfceb7231..98779145c320 100644 --- a/toolchain/check/testdata/interop/cpp/class/field.carbon +++ b/toolchain/check/testdata/interop/cpp/class/field.carbon @@ -214,7 +214,6 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %Optional.Get.a4b: %Optional.Get.type.c63 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic] // CHECK:STDOUT: %Destroy.lookup_impl_witness.e1f: = lookup_impl_witness %ptr.e8f, @Destroy [symbolic] @@ -237,7 +236,8 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.de4: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -287,14 +287,14 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %.loc8_41.2: %const.12f = acquire_value %.loc8_41.1 // CHECK:STDOUT: %.loc8_39.1: ref %i32 = deref %.loc8_41.2 // CHECK:STDOUT: %.loc8_43.1: %tuple.type.a78 = tuple_literal (%.loc8_12.2, %.loc8_17.2, %.loc8_21.1, %.loc8_27.1, %.loc8_39.1) -// CHECK:STDOUT: %impl.elem0.loc8_12: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc8_12: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %.loc8_12.2, %impl.elem0.loc8_12 // CHECK:STDOUT: %specific_fn.loc8_12: = specific_function %impl.elem0.loc8_12, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %.loc8_12.2, %specific_fn.loc8_12 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc8_12: init %i32 = call %bound_method.loc8_12.2(%.loc8_12.2) // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return.param, element0 // CHECK:STDOUT: %.loc8_43.2: init %i32 to %tuple.elem0 = in_place_init %Int.as.Copy.impl.Op.call.loc8_12 -// CHECK:STDOUT: %impl.elem0.loc8_17: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc8_17: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc8_17.1: = bound_method %.loc8_17.2, %impl.elem0.loc8_17 // CHECK:STDOUT: %specific_fn.loc8_17: = specific_function %impl.elem0.loc8_17, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_17.2: = bound_method %.loc8_17.2, %specific_fn.loc8_17 @@ -302,7 +302,7 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %return.param, element1 // CHECK:STDOUT: %.loc8_43.3: init %i32 to %tuple.elem1 = in_place_init %Int.as.Copy.impl.Op.call.loc8_17 // CHECK:STDOUT: %.loc8_21.2: %i32 = acquire_value %.loc8_21.1 -// CHECK:STDOUT: %impl.elem0.loc8_21: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc8_21: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc8_21.1: = bound_method %.loc8_21.2, %impl.elem0.loc8_21 // CHECK:STDOUT: %specific_fn.loc8_21: = specific_function %impl.elem0.loc8_21, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_21.2: = bound_method %.loc8_21.2, %specific_fn.loc8_21 @@ -310,7 +310,7 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %tuple.elem2: ref %i32 = tuple_access %return.param, element2 // CHECK:STDOUT: %.loc8_43.4: init %i32 to %tuple.elem2 = in_place_init %Int.as.Copy.impl.Op.call.loc8_21 // CHECK:STDOUT: %.loc8_27.2: %i32 = acquire_value %.loc8_27.1 -// CHECK:STDOUT: %impl.elem0.loc8_27: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc8_27: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc8_27.1: = bound_method %.loc8_27.2, %impl.elem0.loc8_27 // CHECK:STDOUT: %specific_fn.loc8_27: = specific_function %impl.elem0.loc8_27, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_27.2: = bound_method %.loc8_27.2, %specific_fn.loc8_27 @@ -318,7 +318,7 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %tuple.elem3: ref %i32 = tuple_access %return.param, element3 // CHECK:STDOUT: %.loc8_43.5: init %i32 to %tuple.elem3 = in_place_init %Int.as.Copy.impl.Op.call.loc8_27 // CHECK:STDOUT: %.loc8_39.2: %i32 = acquire_value %.loc8_39.1 -// CHECK:STDOUT: %impl.elem0.loc8_39: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc8_39: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc8_39.1: = bound_method %.loc8_39.2, %impl.elem0.loc8_39 // CHECK:STDOUT: %specific_fn.loc8_39: = specific_function %impl.elem0.loc8_39, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_39.2: = bound_method %.loc8_39.2, %specific_fn.loc8_39 @@ -341,14 +341,14 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %Union.elem.92a: type = unbound_element_type %Union, %ptr.235 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -363,7 +363,7 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %a.ref: %Union.elem.041 = name_ref a, @Union.%.1 [concrete = @Union.%.1] // CHECK:STDOUT: %.loc8_11.1: ref %i32 = class_element_access %u.ref, element0 // CHECK:STDOUT: %.loc8_11.2: %i32 = acquire_value %.loc8_11.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %.loc8_11.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %.loc8_11.2, %specific_fn @@ -377,7 +377,7 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %b.ref: %Union.elem.041 = name_ref b, @Union.%.2 [concrete = @Union.%.2] // CHECK:STDOUT: %.loc14_11.1: ref %i32 = class_element_access %u.ref, element1 // CHECK:STDOUT: %.loc14_11.2: %i32 = acquire_value %.loc14_11.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc14_11.1: = bound_method %.loc14_11.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_11.2: = bound_method %.loc14_11.2, %specific_fn @@ -393,7 +393,7 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %.loc20_12.2: %ptr.235 = acquire_value %.loc20_12.1 // CHECK:STDOUT: %.loc20_10.1: ref %i32 = deref %.loc20_12.2 // CHECK:STDOUT: %.loc20_10.2: %i32 = acquire_value %.loc20_10.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc20_10.1: = bound_method %.loc20_10.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc20_10.2: = bound_method %.loc20_10.2, %specific_fn @@ -410,14 +410,14 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %Struct.elem: type = unbound_element_type %Struct, %i32 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Union: type = class_type @Union [concrete] // CHECK:STDOUT: %Union.elem: type = unbound_element_type %Union, %i32 [concrete] @@ -434,7 +434,7 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %a.ref: %Struct.elem = name_ref a, @Struct.%.1 [concrete = @Struct.%.1] // CHECK:STDOUT: %.loc8_11.1: ref %i32 = class_element_access %s.ref, element0 // CHECK:STDOUT: %.loc8_11.2: %i32 = acquire_value %.loc8_11.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %.loc8_11.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %.loc8_11.2, %specific_fn @@ -448,7 +448,7 @@ fn Test(m: Cpp.UnsupportedMembers*) { // CHECK:STDOUT: %c.ref: %Union.elem = name_ref c, @Union.%.1 [concrete = @Union.%.1] // CHECK:STDOUT: %.loc14_11.1: ref %i32 = class_element_access %s.ref, element0 // CHECK:STDOUT: %.loc14_11.2: %i32 = acquire_value %.loc14_11.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc14_11.1: = bound_method %.loc14_11.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_11.2: = bound_method %.loc14_11.2, %specific_fn diff --git a/toolchain/check/testdata/interop/cpp/class/template.carbon b/toolchain/check/testdata/interop/cpp/class/template.carbon index 9f8a648f70d0..44738ca6884a 100644 --- a/toolchain/check/testdata/interop/cpp/class/template.carbon +++ b/toolchain/check/testdata/interop/cpp/class/template.carbon @@ -95,7 +95,6 @@ var y: Cpp.Xint.r#type = 0; // CHECK:STDOUT: %f__carbon_thunk.type: type = fn_type @f__carbon_thunk [concrete] // CHECK:STDOUT: %f__carbon_thunk: %f__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] @@ -105,7 +104,8 @@ var y: Cpp.Xint.r#type = 0; // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.de4: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %A.0bedf0.2: type = class_type @A.2 [concrete] // CHECK:STDOUT: %ptr.270: type = ptr_type %A.0bedf0.2 [concrete] @@ -114,7 +114,8 @@ var y: Cpp.Xint.r#type = 0; // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.d24: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Base) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.dae: %ptr.as.Copy.impl.Op.type.d24 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.855: %Copy.type = facet_value %ptr.fb2, (%Copy.impl_witness.33f) [concrete] -// CHECK:STDOUT: %.4db: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.855 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.326: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.855) [concrete] +// CHECK:STDOUT: %.107: type = fn_type_with_self_type %Copy.WithSelf.Op.type.326, %Copy.facet.855 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.dae, @ptr.as.Copy.impl.Op(%Base) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -141,7 +142,7 @@ var y: Cpp.Xint.r#type = 0; // CHECK:STDOUT: %n.ref: %A.elem.c3f = name_ref n, @A.1.%.2 [concrete = @A.1.%.2] // CHECK:STDOUT: %.loc10_11.1: ref %i32 = class_element_access %x.ref.loc10, element1 // CHECK:STDOUT: %.loc10_11.2: %i32 = acquire_value %.loc10_11.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc10_11.1: = bound_method %.loc10_11.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc10_11.2: = bound_method %.loc10_11.2, %specific_fn @@ -156,7 +157,7 @@ var y: Cpp.Xint.r#type = 0; // CHECK:STDOUT: %.loc17_11.2: ref %Base = class_element_access %.loc17_11.1, element0 // CHECK:STDOUT: %addr: %ptr.fb2 = addr_of %.loc17_11.2 // CHECK:STDOUT: %.loc17_11.3: %ptr.fb2 = converted %p.ref, %addr -// CHECK:STDOUT: %impl.elem0: %.4db = impl_witness_access constants.%Copy.impl_witness.33f, element0 [concrete = constants.%ptr.as.Copy.impl.Op.dae] +// CHECK:STDOUT: %impl.elem0: %.107 = impl_witness_access constants.%Copy.impl_witness.33f, element0 [concrete = constants.%ptr.as.Copy.impl.Op.dae] // CHECK:STDOUT: %bound_method.loc17_11.1: = bound_method %.loc17_11.3, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%Base) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_11.2: = bound_method %.loc17_11.3, %specific_fn @@ -173,7 +174,6 @@ var y: Cpp.Xint.r#type = 0; // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -181,7 +181,8 @@ var y: Cpp.Xint.r#type = 0; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -231,7 +232,7 @@ var y: Cpp.Xint.r#type = 0; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0.loc15: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc15: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_1.1: = bound_method %int_0.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_1.2: = bound_method %int_0.loc15, %specific_fn.loc15 [concrete = constants.%bound_method] @@ -239,7 +240,7 @@ var y: Cpp.Xint.r#type = 0; // CHECK:STDOUT: %.loc15: init %i32 = converted %int_0.loc15, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: assign file.%x.var, %.loc15 // CHECK:STDOUT: %int_0.loc21: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc21: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc21: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc21_1.1: = bound_method %int_0.loc21, %impl.elem0.loc21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // 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_1.2: = bound_method %int_0.loc21, %specific_fn.loc21 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interop/cpp/enum/convert.carbon b/toolchain/check/testdata/interop/cpp/enum/convert.carbon index ec3377f8657e..d2c00ac3ded7 100644 --- a/toolchain/check/testdata/interop/cpp/enum/convert.carbon +++ b/toolchain/check/testdata/interop/cpp/enum/convert.carbon @@ -99,7 +99,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.ebf: type = pattern_type %Enum [concrete] // CHECK:STDOUT: %int_42.20e: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -107,7 +106,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete] -// CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2c0: type = fn_type @As.WithSelf.Convert, @As(%i16, %As.facet) [concrete] +// CHECK:STDOUT: %.70c: type = fn_type_with_self_type %As.WithSelf.Convert.type.2c0, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_42.20e, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -159,7 +159,7 @@ fn F() { // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %int_16.loc9: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %i16.loc9: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] -// CHECK:STDOUT: %impl.elem0: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] +// CHECK:STDOUT: %impl.elem0: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] // CHECK:STDOUT: %bound_method.loc9_25.1: = bound_method %int_42, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_25.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interop/cpp/function/arithmetic_types_bridged.carbon b/toolchain/check/testdata/interop/cpp/function/arithmetic_types_bridged.carbon index 9013ead5236e..50ef21e116e7 100644 --- a/toolchain/check/testdata/interop/cpp/function/arithmetic_types_bridged.carbon +++ b/toolchain/check/testdata/interop/cpp/function/arithmetic_types_bridged.carbon @@ -566,10 +566,10 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.348: = impl_witness imports.%Copy.impl_witness_table.3cc [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value bool, (%Copy.impl_witness.348) [concrete] -// CHECK:STDOUT: %.56b: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.6dd: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.86d: type = fn_type_with_self_type %Copy.WithSelf.Op.type.6dd, %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: = bound_method %true, %bool.as.Copy.impl.Op [concrete] @@ -598,7 +598,7 @@ fn F() { // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] // CHECK:STDOUT: %.loc8_11.1: ref bool = temporary_storage -// CHECK:STDOUT: %impl.elem0: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %true, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%true) [concrete = constants.%true] // CHECK:STDOUT: %.loc8_11.2: ref bool = temporary %.loc8_11.1, %bool.as.Copy.impl.Op.call @@ -622,10 +622,10 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.348: = impl_witness imports.%Copy.impl_witness_table.3cc [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value bool, (%Copy.impl_witness.348) [concrete] -// CHECK:STDOUT: %.56b: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.6dd: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.86d: type = fn_type_with_self_type %Copy.WithSelf.Op.type.6dd, %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: = bound_method %false, %bool.as.Copy.impl.Op [concrete] @@ -654,7 +654,7 @@ fn F() { // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false] // CHECK:STDOUT: %.loc8_11.1: ref bool = temporary_storage -// CHECK:STDOUT: %impl.elem0: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %false, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%false) [concrete = constants.%false] // CHECK:STDOUT: %.loc8_11.2: ref bool = temporary %.loc8_11.1, %bool.as.Copy.impl.Op.call @@ -675,10 +675,10 @@ fn F() { // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete] // CHECK:STDOUT: %Negate.impl_witness: = impl_witness imports.%Negate.impl_witness_table [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness) [concrete] -// CHECK:STDOUT: %.826: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.4dd: type = fn_type @Negate.WithSelf.Op, @Negate(%Negate.facet) [concrete] +// CHECK:STDOUT: %.b42: type = fn_type_with_self_type %Negate.WithSelf.Op.type.4dd, %Negate.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.type: type = fn_type @Core.IntLiteral.as.Negate.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op: %Core.IntLiteral.as.Negate.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.bound: = bound_method %int_1, %Core.IntLiteral.as.Negate.impl.Op [concrete] @@ -690,17 +690,16 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.ee6: type = facet_type <@ImplicitAs, @ImplicitAs(%i8)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.e79: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i8) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.446: = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_8) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.394: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_8) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.6d4: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.394 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.ee6 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.446) [concrete] -// CHECK:STDOUT: %.6f0: type = fn_type_with_self_type %ImplicitAs.Convert.type.e79, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.bac: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i8, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.69b: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.bac, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_-1.638, %Core.IntLiteral.as.ImplicitAs.impl.Convert.6d4 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.6d4, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_8) [concrete] // CHECK:STDOUT: %bound_method.e91: = bound_method %int_-1.638, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -711,7 +710,8 @@ fn F() { // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.8c8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_8) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.817: %Int.as.Copy.impl.Op.type.8c8 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i8, (%Copy.impl_witness.75f) [concrete] -// CHECK:STDOUT: %.784: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.dc1: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.bf0: type = fn_type_with_self_type %Copy.WithSelf.Op.type.dc1, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_-1.416, %Int.as.Copy.impl.Op.817 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.817, @Int.as.Copy.impl.Op(%int_8) [concrete] // CHECK:STDOUT: %bound_method.81a: = bound_method %int_-1.416, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -744,10 +744,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %impl.elem1: %.826 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.b42 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_1, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op.bound] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.call: init Core.IntLiteral = call %bound_method.loc8_11.1(%int_1) [concrete = constants.%int_-1.638] -// CHECK:STDOUT: %impl.elem0.loc8_11.1: %.6f0 = impl_witness_access constants.%ImplicitAs.impl_witness.446, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6d4] +// CHECK:STDOUT: %impl.elem0.loc8_11.1: %.69b = impl_witness_access constants.%ImplicitAs.impl_witness.446, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6d4] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %impl.elem0.loc8_11.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_11.1: = specific_function %impl.elem0.loc8_11.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_8) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.3: = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %specific_fn.loc8_11.1 [concrete = constants.%bound_method.e91] @@ -757,7 +757,7 @@ fn F() { // CHECK:STDOUT: %.loc8_11.3: %i8 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_-1.416] // CHECK:STDOUT: %.loc8_11.4: %i8 = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc8_11.3 [concrete = constants.%int_-1.416] // CHECK:STDOUT: %.loc8_11.5: ref %i8 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_11.2: %.784 = impl_witness_access constants.%Copy.impl_witness.75f, element0 [concrete = constants.%Int.as.Copy.impl.Op.817] +// CHECK:STDOUT: %impl.elem0.loc8_11.2: %.bf0 = impl_witness_access constants.%Copy.impl_witness.75f, element0 [concrete = constants.%Int.as.Copy.impl.Op.817] // CHECK:STDOUT: %bound_method.loc8_11.4: = bound_method %.loc8_11.4, %impl.elem0.loc8_11.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_11.2: = specific_function %impl.elem0.loc8_11.2, @Int.as.Copy.impl.Op(constants.%int_8) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.5: = bound_method %.loc8_11.4, %specific_fn.loc8_11.2 [concrete = constants.%bound_method.81a] @@ -786,17 +786,16 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.8ae: type = facet_type <@ImplicitAs, @ImplicitAs(%u8)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.951: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u8) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.46e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.7d6: = impl_witness imports.%ImplicitAs.impl_witness_table.899, @Core.IntLiteral.as.ImplicitAs.impl(%int_8) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.2bc: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_8) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.23a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.2bc = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.8ae = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.7d6) [concrete] -// CHECK:STDOUT: %.e9e: type = fn_type_with_self_type %ImplicitAs.Convert.type.951, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.0b0: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%u8, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.254: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.0b0, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.23a [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.23a, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_8) [concrete] // CHECK:STDOUT: %bound_method.e8e: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -807,7 +806,8 @@ fn F() { // CHECK:STDOUT: %UInt.as.Copy.impl.Op.type.ba7: type = fn_type @UInt.as.Copy.impl.Op, @UInt.as.Copy.impl(%int_8) [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.ccb: %UInt.as.Copy.impl.Op.type.ba7 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %u8, (%Copy.impl_witness.c60) [concrete] -// CHECK:STDOUT: %.eea: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.39d: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.9da: type = fn_type_with_self_type %Copy.WithSelf.Op.type.39d, %Copy.facet [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.bound: = bound_method %int_1.e80, %UInt.as.Copy.impl.Op.ccb [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.specific_fn: = specific_function %UInt.as.Copy.impl.Op.ccb, @UInt.as.Copy.impl.Op(%int_8) [concrete] // CHECK:STDOUT: %bound_method.98f: = bound_method %int_1.e80, %UInt.as.Copy.impl.Op.specific_fn [concrete] @@ -837,7 +837,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8_11.1: %.e9e = impl_witness_access constants.%ImplicitAs.impl_witness.7d6, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.23a] +// CHECK:STDOUT: %impl.elem0.loc8_11.1: %.254 = impl_witness_access constants.%ImplicitAs.impl_witness.7d6, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.23a] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_1, %impl.elem0.loc8_11.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_11.1: = specific_function %impl.elem0.loc8_11.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_8) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %int_1, %specific_fn.loc8_11.1 [concrete = constants.%bound_method.e8e] @@ -845,7 +845,7 @@ fn F() { // CHECK:STDOUT: %.loc8_11.1: %u8 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.e80] // CHECK:STDOUT: %.loc8_11.2: %u8 = converted %int_1, %.loc8_11.1 [concrete = constants.%int_1.e80] // CHECK:STDOUT: %.loc8_11.3: ref %u8 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_11.2: %.eea = impl_witness_access constants.%Copy.impl_witness.c60, element0 [concrete = constants.%UInt.as.Copy.impl.Op.ccb] +// CHECK:STDOUT: %impl.elem0.loc8_11.2: %.9da = impl_witness_access constants.%Copy.impl_witness.c60, element0 [concrete = constants.%UInt.as.Copy.impl.Op.ccb] // CHECK:STDOUT: %bound_method.loc8_11.3: = bound_method %.loc8_11.2, %impl.elem0.loc8_11.2 [concrete = constants.%UInt.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_11.2: = specific_function %impl.elem0.loc8_11.2, @UInt.as.Copy.impl.Op(constants.%int_8) [concrete = constants.%UInt.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.4: = bound_method %.loc8_11.2, %specific_fn.loc8_11.2 [concrete = constants.%bound_method.98f] @@ -872,19 +872,19 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.d99: type = facet_type <@ImplicitAs, @ImplicitAs(%char)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.f57: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%char) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.158: = impl_witness imports.%ImplicitAs.impl_witness_table.4bc [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d99 = facet_value Core.CharLiteral, (%ImplicitAs.impl_witness.158) [concrete] -// CHECK:STDOUT: %.93b: type = fn_type_with_self_type %ImplicitAs.Convert.type.f57, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.95b: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%char, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.734: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.95b, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.CharLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert: %Core.CharLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %.d16, %Core.CharLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %int_88: %char = int_value 88 [concrete] // CHECK:STDOUT: %Copy.impl_witness.bd9: = impl_witness imports.%Copy.impl_witness_table.5ef [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %char, (%Copy.impl_witness.bd9) [concrete] -// CHECK:STDOUT: %.11f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.cf0: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.bf3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.cf0, %Copy.facet [concrete] // CHECK:STDOUT: %char.as.Copy.impl.Op.type: type = fn_type @char.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %char.as.Copy.impl.Op: %char.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %char.as.Copy.impl.Op.bound: = bound_method %int_88, %char.as.Copy.impl.Op [concrete] @@ -914,13 +914,13 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %.loc8_11.1: Core.CharLiteral = char_value U+0058 [concrete = constants.%.d16] -// CHECK:STDOUT: %impl.elem0.loc8_11.1: %.93b = impl_witness_access constants.%ImplicitAs.impl_witness.158, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc8_11.1: %.734 = impl_witness_access constants.%ImplicitAs.impl_witness.158, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %.loc8_11.1, %impl.elem0.loc8_11.1 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.call: init %char = call %bound_method.loc8_11.1(%.loc8_11.1) [concrete = constants.%int_88] // CHECK:STDOUT: %.loc8_11.2: %char = value_of_initializer %Core.CharLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_88] // CHECK:STDOUT: %.loc8_11.3: %char = converted %.loc8_11.1, %.loc8_11.2 [concrete = constants.%int_88] // CHECK:STDOUT: %.loc8_11.4: ref %char = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_11.2: %.11f = impl_witness_access constants.%Copy.impl_witness.bd9, element0 [concrete = constants.%char.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc8_11.2: %.bf3 = impl_witness_access constants.%Copy.impl_witness.bd9, element0 [concrete = constants.%char.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %.loc8_11.3, %impl.elem0.loc8_11.2 [concrete = constants.%char.as.Copy.impl.Op.bound] // CHECK:STDOUT: %char.as.Copy.impl.Op.call: init %char = call %bound_method.loc8_11.2(%.loc8_11.3) [concrete = constants.%int_88] // CHECK:STDOUT: %.loc8_11.5: ref %char = temporary %.loc8_11.4, %char.as.Copy.impl.Op.call @@ -969,7 +969,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -977,7 +976,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1005,7 +1005,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_11.1: = bound_method %int_1, %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_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -1075,7 +1075,6 @@ fn F() { // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete] // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete] // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -1083,7 +1082,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete] -// CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2c0: type = fn_type @As.WithSelf.Convert, @As(%i16, %As.facet) [concrete] +// CHECK:STDOUT: %.70c: type = fn_type_with_self_type %As.WithSelf.Convert.type.2c0, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.4da: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -1092,14 +1092,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.e99: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete] -// CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d1f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.eb3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d1f, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.0da [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete] // CHECK:STDOUT: %bound_method.a48: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -1131,7 +1131,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] -// CHECK:STDOUT: %impl.elem0.loc8_13.1: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] +// CHECK:STDOUT: %impl.elem0.loc8_13.1: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] // CHECK:STDOUT: %bound_method.loc8_13.1: = bound_method %int_1, %impl.elem0.loc8_13.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_13.1: = specific_function %impl.elem0.loc8_13.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.2: = bound_method %int_1, %specific_fn.loc8_13.1 [concrete = constants.%bound_method.4da] @@ -1139,7 +1139,7 @@ fn F() { // CHECK:STDOUT: %.loc8_13.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc8_13.2: %i16 = converted %int_1, %.loc8_13.1 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc8_13.3: ref %i16 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_13.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] +// CHECK:STDOUT: %impl.elem0.loc8_13.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] // CHECK:STDOUT: %bound_method.loc8_13.3: = bound_method %.loc8_13.2, %impl.elem0.loc8_13.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_13.2: = specific_function %impl.elem0.loc8_13.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.4: = bound_method %.loc8_13.2, %specific_fn.loc8_13.2 [concrete = constants.%bound_method.a48] @@ -1168,17 +1168,16 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.9fb: type = facet_type <@ImplicitAs, @ImplicitAs(%i16)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.fa6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i16) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.882: = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.c54: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.c54 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9fb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.882) [concrete] -// CHECK:STDOUT: %.bbf: type = fn_type_with_self_type %ImplicitAs.Convert.type.fa6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.89b: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i16, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.3ce: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.89b, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_32767.f4b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.0ae: = bound_method %int_32767.f4b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1189,7 +1188,8 @@ fn F() { // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete] -// CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d1f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.eb3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d1f, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_32767.faa, %Int.as.Copy.impl.Op.0da [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete] // CHECK:STDOUT: %bound_method.964: = bound_method %int_32767.faa, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -1219,7 +1219,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_32767: Core.IntLiteral = int_value 32767 [concrete = constants.%int_32767.f4b] -// CHECK:STDOUT: %impl.elem0.loc8_11.1: %.bbf = impl_witness_access constants.%ImplicitAs.impl_witness.882, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9] +// CHECK:STDOUT: %impl.elem0.loc8_11.1: %.3ce = impl_witness_access constants.%ImplicitAs.impl_witness.882, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_32767, %impl.elem0.loc8_11.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_11.1: = specific_function %impl.elem0.loc8_11.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %int_32767, %specific_fn.loc8_11.1 [concrete = constants.%bound_method.0ae] @@ -1227,7 +1227,7 @@ fn F() { // CHECK:STDOUT: %.loc8_11.1: %i16 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_32767.faa] // CHECK:STDOUT: %.loc8_11.2: %i16 = converted %int_32767, %.loc8_11.1 [concrete = constants.%int_32767.faa] // CHECK:STDOUT: %.loc8_11.3: ref %i16 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_11.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] +// CHECK:STDOUT: %impl.elem0.loc8_11.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] // CHECK:STDOUT: %bound_method.loc8_11.3: = bound_method %.loc8_11.2, %impl.elem0.loc8_11.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_11.2: = specific_function %impl.elem0.loc8_11.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.4: = bound_method %.loc8_11.2, %specific_fn.loc8_11.2 [concrete = constants.%bound_method.964] @@ -1250,10 +1250,10 @@ fn F() { // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete] // CHECK:STDOUT: %Negate.impl_witness: = impl_witness imports.%Negate.impl_witness_table [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness) [concrete] -// CHECK:STDOUT: %.826: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.4dd: type = fn_type @Negate.WithSelf.Op, @Negate(%Negate.facet) [concrete] +// CHECK:STDOUT: %.b42: type = fn_type_with_self_type %Negate.WithSelf.Op.type.4dd, %Negate.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.type: type = fn_type @Core.IntLiteral.as.Negate.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op: %Core.IntLiteral.as.Negate.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.bound: = bound_method %int_32768, %Core.IntLiteral.as.Negate.impl.Op [concrete] @@ -1265,17 +1265,16 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.9fb: type = facet_type <@ImplicitAs, @ImplicitAs(%i16)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.fa6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i16) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.882: = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.c54: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.c54 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.9fb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.882) [concrete] -// CHECK:STDOUT: %.bbf: type = fn_type_with_self_type %ImplicitAs.Convert.type.fa6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.89b: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i16, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.3ce: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.89b, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_-32768.882, %Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.868: = bound_method %int_-32768.882, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1286,7 +1285,8 @@ fn F() { // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete] -// CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d1f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.eb3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d1f, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_-32768.7e5, %Int.as.Copy.impl.Op.0da [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete] // CHECK:STDOUT: %bound_method.971: = bound_method %int_-32768.7e5, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -1319,10 +1319,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_32768: Core.IntLiteral = int_value 32768 [concrete = constants.%int_32768] -// CHECK:STDOUT: %impl.elem1: %.826 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.b42 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_32768, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op.bound] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.call: init Core.IntLiteral = call %bound_method.loc8_11.1(%int_32768) [concrete = constants.%int_-32768.882] -// CHECK:STDOUT: %impl.elem0.loc8_11.1: %.bbf = impl_witness_access constants.%ImplicitAs.impl_witness.882, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9] +// CHECK:STDOUT: %impl.elem0.loc8_11.1: %.3ce = impl_witness_access constants.%ImplicitAs.impl_witness.882, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %impl.elem0.loc8_11.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_11.1: = specific_function %impl.elem0.loc8_11.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.3: = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %specific_fn.loc8_11.1 [concrete = constants.%bound_method.868] @@ -1332,7 +1332,7 @@ fn F() { // CHECK:STDOUT: %.loc8_11.3: %i16 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_-32768.7e5] // CHECK:STDOUT: %.loc8_11.4: %i16 = converted %Core.IntLiteral.as.Negate.impl.Op.call, %.loc8_11.3 [concrete = constants.%int_-32768.7e5] // CHECK:STDOUT: %.loc8_11.5: ref %i16 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_11.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] +// CHECK:STDOUT: %impl.elem0.loc8_11.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] // CHECK:STDOUT: %bound_method.loc8_11.4: = bound_method %.loc8_11.4, %impl.elem0.loc8_11.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_11.2: = specific_function %impl.elem0.loc8_11.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.5: = bound_method %.loc8_11.4, %specific_fn.loc8_11.2 [concrete = constants.%bound_method.971] @@ -1358,7 +1358,6 @@ fn F() { // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete] // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete] // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -1366,7 +1365,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete] -// CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2c0: type = fn_type @As.WithSelf.Convert, @As(%i16, %As.facet) [concrete] +// CHECK:STDOUT: %.70c: type = fn_type_with_self_type %As.WithSelf.Convert.type.2c0, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.4da: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -1375,14 +1375,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.e99: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete] -// CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d1f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.eb3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d1f, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.0da [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete] // CHECK:STDOUT: %bound_method.a48: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -1414,7 +1414,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] -// CHECK:STDOUT: %impl.elem0.loc8_13.1: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] +// CHECK:STDOUT: %impl.elem0.loc8_13.1: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] // CHECK:STDOUT: %bound_method.loc8_13.1: = bound_method %int_1, %impl.elem0.loc8_13.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_13.1: = specific_function %impl.elem0.loc8_13.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.2: = bound_method %int_1, %specific_fn.loc8_13.1 [concrete = constants.%bound_method.4da] @@ -1422,7 +1422,7 @@ fn F() { // CHECK:STDOUT: %.loc8_13.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc8_13.2: %i16 = converted %int_1, %.loc8_13.1 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc8_13.3: ref %i16 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_13.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] +// CHECK:STDOUT: %impl.elem0.loc8_13.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] // CHECK:STDOUT: %bound_method.loc8_13.3: = bound_method %.loc8_13.2, %impl.elem0.loc8_13.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_13.2: = specific_function %impl.elem0.loc8_13.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.4: = bound_method %.loc8_13.2, %specific_fn.loc8_13.2 [concrete = constants.%bound_method.a48] @@ -1448,7 +1448,6 @@ fn F() { // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete] // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete] // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -1456,7 +1455,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete] -// CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2c0: type = fn_type @As.WithSelf.Convert, @As(%i16, %As.facet) [concrete] +// CHECK:STDOUT: %.70c: type = fn_type_with_self_type %As.WithSelf.Convert.type.2c0, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.4da: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -1465,14 +1465,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.e99: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete] -// CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d1f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.eb3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d1f, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.0da [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete] // CHECK:STDOUT: %bound_method.a48: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -1504,7 +1504,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] -// CHECK:STDOUT: %impl.elem0.loc8_13.1: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] +// CHECK:STDOUT: %impl.elem0.loc8_13.1: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] // CHECK:STDOUT: %bound_method.loc8_13.1: = bound_method %int_1, %impl.elem0.loc8_13.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_13.1: = specific_function %impl.elem0.loc8_13.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.2: = bound_method %int_1, %specific_fn.loc8_13.1 [concrete = constants.%bound_method.4da] @@ -1512,7 +1512,7 @@ fn F() { // CHECK:STDOUT: %.loc8_13.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc8_13.2: %i16 = converted %int_1, %.loc8_13.1 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc8_13.3: ref %i16 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_13.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] +// CHECK:STDOUT: %impl.elem0.loc8_13.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] // CHECK:STDOUT: %bound_method.loc8_13.3: = bound_method %.loc8_13.2, %impl.elem0.loc8_13.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_13.2: = specific_function %impl.elem0.loc8_13.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.4: = bound_method %.loc8_13.2, %specific_fn.loc8_13.2 [concrete = constants.%bound_method.a48] @@ -1538,7 +1538,6 @@ fn F() { // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete] // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete] // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -1546,7 +1545,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete] -// CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2c0: type = fn_type @As.WithSelf.Convert, @As(%i16, %As.facet) [concrete] +// CHECK:STDOUT: %.70c: type = fn_type_with_self_type %As.WithSelf.Convert.type.2c0, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.4da: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -1555,14 +1555,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.e99: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete] -// CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d1f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.eb3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d1f, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.0da [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete] // CHECK:STDOUT: %bound_method.a48: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -1594,7 +1594,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] -// CHECK:STDOUT: %impl.elem0.loc8_13.1: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] +// CHECK:STDOUT: %impl.elem0.loc8_13.1: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] // CHECK:STDOUT: %bound_method.loc8_13.1: = bound_method %int_1, %impl.elem0.loc8_13.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_13.1: = specific_function %impl.elem0.loc8_13.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.2: = bound_method %int_1, %specific_fn.loc8_13.1 [concrete = constants.%bound_method.4da] @@ -1602,7 +1602,7 @@ fn F() { // CHECK:STDOUT: %.loc8_13.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc8_13.2: %i16 = converted %int_1, %.loc8_13.1 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc8_13.3: ref %i16 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_13.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] +// CHECK:STDOUT: %impl.elem0.loc8_13.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] // CHECK:STDOUT: %bound_method.loc8_13.3: = bound_method %.loc8_13.2, %impl.elem0.loc8_13.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_13.2: = specific_function %impl.elem0.loc8_13.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.4: = bound_method %.loc8_13.2, %specific_fn.loc8_13.2 [concrete = constants.%bound_method.a48] @@ -1628,7 +1628,6 @@ fn F() { // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete] // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete] // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.fe9) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -1636,7 +1635,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete] -// CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2c0: type = fn_type @As.WithSelf.Convert, @As(%i16, %As.facet) [concrete] +// CHECK:STDOUT: %.70c: type = fn_type_with_self_type %As.WithSelf.Convert.type.2c0, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.4da: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -1645,14 +1645,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.e99: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete] -// CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d1f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.eb3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d1f, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.0da [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete] // CHECK:STDOUT: %bound_method.a48: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -1684,7 +1684,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] -// CHECK:STDOUT: %impl.elem0.loc8_13.1: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] +// CHECK:STDOUT: %impl.elem0.loc8_13.1: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] // CHECK:STDOUT: %bound_method.loc8_13.1: = bound_method %int_1, %impl.elem0.loc8_13.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_13.1: = specific_function %impl.elem0.loc8_13.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.2: = bound_method %int_1, %specific_fn.loc8_13.1 [concrete = constants.%bound_method.4da] @@ -1692,7 +1692,7 @@ fn F() { // CHECK:STDOUT: %.loc8_13.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc8_13.2: %i16 = converted %int_1, %.loc8_13.1 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc8_13.3: ref %i16 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_13.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] +// CHECK:STDOUT: %impl.elem0.loc8_13.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] // CHECK:STDOUT: %bound_method.loc8_13.3: = bound_method %.loc8_13.2, %impl.elem0.loc8_13.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_13.2: = specific_function %impl.elem0.loc8_13.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.4: = bound_method %.loc8_13.2, %specific_fn.loc8_13.2 [concrete = constants.%bound_method.a48] @@ -1718,14 +1718,14 @@ fn F() { // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %f16.a6a: type = class_type @Float, @Float(%int_16) [concrete] // CHECK:STDOUT: %As.type.b64: type = facet_type <@As, @As(%f16.a6a)> [concrete] -// CHECK:STDOUT: %As.Convert.type.c23: type = fn_type @As.Convert, @As(%f16.a6a) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.882: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.27d: %Core.FloatLiteral.as.As.impl.Convert.type.882 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.0d1: = impl_witness imports.%As.impl_witness_table.7c1, @Core.FloatLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.ae9: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.3fd: %Core.FloatLiteral.as.As.impl.Convert.type.ae9 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.b64 = facet_value Core.FloatLiteral, (%As.impl_witness.0d1) [concrete] -// CHECK:STDOUT: %.ebc: type = fn_type_with_self_type %As.Convert.type.c23, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.a0a: type = fn_type @As.WithSelf.Convert, @As(%f16.a6a, %As.facet) [concrete] +// CHECK:STDOUT: %.9fd: type = fn_type_with_self_type %As.WithSelf.Convert.type.a0a, %As.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.bound: = bound_method %float.c64, %Core.FloatLiteral.as.As.impl.Convert.3fd [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.As.impl.Convert.3fd, @Core.FloatLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.8cf: = bound_method %float.c64, %Core.FloatLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -1734,14 +1734,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.2fe: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Float.as.Copy.impl.Op.240: %Float.as.Copy.impl.Op.type.2fe = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.9fb: = impl_witness imports.%Copy.impl_witness_table.119, @Float.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.6d0: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.d96: %Float.as.Copy.impl.Op.type.6d0 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %f16.a6a, (%Copy.impl_witness.9fb) [concrete] -// CHECK:STDOUT: %.5ca: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.229: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8eb: type = fn_type_with_self_type %Copy.WithSelf.Op.type.229, %Copy.facet [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.bound: = bound_method %float.032, %Float.as.Copy.impl.Op.d96 [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.specific_fn: = specific_function %Float.as.Copy.impl.Op.d96, @Float.as.Copy.impl.Op(%int_16) [concrete] // CHECK:STDOUT: %bound_method.670: = bound_method %float.032, %Float.as.Copy.impl.Op.specific_fn [concrete] @@ -1773,7 +1773,7 @@ fn F() { // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 8e-1 [concrete = constants.%float.c64] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %f16: type = class_type @Float, @Float(constants.%int_16) [concrete = constants.%f16.a6a] -// CHECK:STDOUT: %impl.elem0.loc8_15.1: %.ebc = impl_witness_access constants.%As.impl_witness.0d1, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.3fd] +// CHECK:STDOUT: %impl.elem0.loc8_15.1: %.9fd = impl_witness_access constants.%As.impl_witness.0d1, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.3fd] // CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %float, %impl.elem0.loc8_15.1 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_15.1: = specific_function %impl.elem0.loc8_15.1, @Core.FloatLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %float, %specific_fn.loc8_15.1 [concrete = constants.%bound_method.8cf] @@ -1781,7 +1781,7 @@ fn F() { // CHECK:STDOUT: %.loc8_15.1: %f16.a6a = value_of_initializer %Core.FloatLiteral.as.As.impl.Convert.call [concrete = constants.%float.032] // CHECK:STDOUT: %.loc8_15.2: %f16.a6a = converted %float, %.loc8_15.1 [concrete = constants.%float.032] // CHECK:STDOUT: %.loc8_15.3: ref %f16.a6a = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_15.2: %.5ca = impl_witness_access constants.%Copy.impl_witness.9fb, element0 [concrete = constants.%Float.as.Copy.impl.Op.d96] +// CHECK:STDOUT: %impl.elem0.loc8_15.2: %.8eb = impl_witness_access constants.%Copy.impl_witness.9fb, element0 [concrete = constants.%Float.as.Copy.impl.Op.d96] // CHECK:STDOUT: %bound_method.loc8_15.3: = bound_method %.loc8_15.2, %impl.elem0.loc8_15.2 [concrete = constants.%Float.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_15.2: = specific_function %impl.elem0.loc8_15.2, @Float.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Float.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.4: = bound_method %.loc8_15.2, %specific_fn.loc8_15.2 [concrete = constants.%bound_method.670] @@ -1807,14 +1807,14 @@ fn F() { // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete] // CHECK:STDOUT: %As.type.9fc: type = facet_type <@As, @As(%f32.97e)> [concrete] -// CHECK:STDOUT: %As.Convert.type.f5e: type = fn_type @As.Convert, @As(%f32.97e) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.882: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.27d: %Core.FloatLiteral.as.As.impl.Convert.type.882 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.748: = impl_witness imports.%As.impl_witness_table.7c1, @Core.FloatLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.847: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.683: %Core.FloatLiteral.as.As.impl.Convert.type.847 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.9fc = facet_value Core.FloatLiteral, (%As.impl_witness.748) [concrete] -// CHECK:STDOUT: %.a86: type = fn_type_with_self_type %As.Convert.type.f5e, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.85f: type = fn_type @As.WithSelf.Convert, @As(%f32.97e, %As.facet) [concrete] +// CHECK:STDOUT: %.49e: type = fn_type_with_self_type %As.WithSelf.Convert.type.85f, %As.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.bound: = bound_method %float.c64, %Core.FloatLiteral.as.As.impl.Convert.683 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.As.impl.Convert.683, @Core.FloatLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.f4f: = bound_method %float.c64, %Core.FloatLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -1823,14 +1823,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.2fe: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Float.as.Copy.impl.Op.240: %Float.as.Copy.impl.Op.type.2fe = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f95: = impl_witness imports.%Copy.impl_witness_table.119, @Float.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.254: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.27a: %Float.as.Copy.impl.Op.type.254 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %f32.97e, (%Copy.impl_witness.f95) [concrete] -// CHECK:STDOUT: %.091: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.6f8: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.509: type = fn_type_with_self_type %Copy.WithSelf.Op.type.6f8, %Copy.facet [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.bound: = bound_method %float.4cb, %Float.as.Copy.impl.Op.27a [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.specific_fn: = specific_function %Float.as.Copy.impl.Op.27a, @Float.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d87: = bound_method %float.4cb, %Float.as.Copy.impl.Op.specific_fn [concrete] @@ -1862,7 +1862,7 @@ fn F() { // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 8e-1 [concrete = constants.%float.c64] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e] -// CHECK:STDOUT: %impl.elem0.loc8_15.1: %.a86 = impl_witness_access constants.%As.impl_witness.748, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.683] +// CHECK:STDOUT: %impl.elem0.loc8_15.1: %.49e = impl_witness_access constants.%As.impl_witness.748, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.683] // CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %float, %impl.elem0.loc8_15.1 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_15.1: = specific_function %impl.elem0.loc8_15.1, @Core.FloatLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %float, %specific_fn.loc8_15.1 [concrete = constants.%bound_method.f4f] @@ -1870,7 +1870,7 @@ fn F() { // CHECK:STDOUT: %.loc8_15.1: %f32.97e = value_of_initializer %Core.FloatLiteral.as.As.impl.Convert.call [concrete = constants.%float.4cb] // CHECK:STDOUT: %.loc8_15.2: %f32.97e = converted %float, %.loc8_15.1 [concrete = constants.%float.4cb] // CHECK:STDOUT: %.loc8_15.3: ref %f32.97e = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_15.2: %.091 = impl_witness_access constants.%Copy.impl_witness.f95, element0 [concrete = constants.%Float.as.Copy.impl.Op.27a] +// CHECK:STDOUT: %impl.elem0.loc8_15.2: %.509 = impl_witness_access constants.%Copy.impl_witness.f95, element0 [concrete = constants.%Float.as.Copy.impl.Op.27a] // CHECK:STDOUT: %bound_method.loc8_15.3: = bound_method %.loc8_15.2, %impl.elem0.loc8_15.2 [concrete = constants.%Float.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_15.2: = specific_function %impl.elem0.loc8_15.2, @Float.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Float.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.4: = bound_method %.loc8_15.2, %specific_fn.loc8_15.2 [concrete = constants.%bound_method.d87] @@ -1896,14 +1896,14 @@ fn F() { // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %f64.d77: type = class_type @Float, @Float(%int_64) [concrete] // CHECK:STDOUT: %As.type.a57: type = facet_type <@As, @As(%f64.d77)> [concrete] -// CHECK:STDOUT: %As.Convert.type.8fc: type = fn_type @As.Convert, @As(%f64.d77) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.882: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.27d: %Core.FloatLiteral.as.As.impl.Convert.type.882 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.187: = impl_witness imports.%As.impl_witness_table.7c1, @Core.FloatLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.07c: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.4b9: %Core.FloatLiteral.as.As.impl.Convert.type.07c = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.a57 = facet_value Core.FloatLiteral, (%As.impl_witness.187) [concrete] -// CHECK:STDOUT: %.cd4: type = fn_type_with_self_type %As.Convert.type.8fc, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.dab: type = fn_type @As.WithSelf.Convert, @As(%f64.d77, %As.facet) [concrete] +// CHECK:STDOUT: %.293: type = fn_type_with_self_type %As.WithSelf.Convert.type.dab, %As.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.bound: = bound_method %float.c64, %Core.FloatLiteral.as.As.impl.Convert.4b9 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.As.impl.Convert.4b9, @Core.FloatLiteral.as.As.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.083: = bound_method %float.c64, %Core.FloatLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -1912,14 +1912,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.2fe: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Float.as.Copy.impl.Op.240: %Float.as.Copy.impl.Op.type.2fe = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.1e3: = impl_witness imports.%Copy.impl_witness_table.119, @Float.as.Copy.impl(%int_64) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.07e: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%int_64) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.f05: %Float.as.Copy.impl.Op.type.07e = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %f64.d77, (%Copy.impl_witness.1e3) [concrete] -// CHECK:STDOUT: %.c41: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.fb6: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.59b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.fb6, %Copy.facet [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.bound: = bound_method %float.0fc, %Float.as.Copy.impl.Op.f05 [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.specific_fn: = specific_function %Float.as.Copy.impl.Op.f05, @Float.as.Copy.impl.Op(%int_64) [concrete] // CHECK:STDOUT: %bound_method.36b: = bound_method %float.0fc, %Float.as.Copy.impl.Op.specific_fn [concrete] @@ -1951,7 +1951,7 @@ fn F() { // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 8e-1 [concrete = constants.%float.c64] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64] // CHECK:STDOUT: %f64: type = class_type @Float, @Float(constants.%int_64) [concrete = constants.%f64.d77] -// CHECK:STDOUT: %impl.elem0.loc8_15.1: %.cd4 = impl_witness_access constants.%As.impl_witness.187, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.4b9] +// CHECK:STDOUT: %impl.elem0.loc8_15.1: %.293 = impl_witness_access constants.%As.impl_witness.187, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.4b9] // CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %float, %impl.elem0.loc8_15.1 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_15.1: = specific_function %impl.elem0.loc8_15.1, @Core.FloatLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %float, %specific_fn.loc8_15.1 [concrete = constants.%bound_method.083] @@ -1959,7 +1959,7 @@ fn F() { // CHECK:STDOUT: %.loc8_15.1: %f64.d77 = value_of_initializer %Core.FloatLiteral.as.As.impl.Convert.call [concrete = constants.%float.0fc] // CHECK:STDOUT: %.loc8_15.2: %f64.d77 = converted %float, %.loc8_15.1 [concrete = constants.%float.0fc] // CHECK:STDOUT: %.loc8_15.3: ref %f64.d77 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_15.2: %.c41 = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05] +// CHECK:STDOUT: %impl.elem0.loc8_15.2: %.59b = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05] // CHECK:STDOUT: %bound_method.loc8_15.3: = bound_method %.loc8_15.2, %impl.elem0.loc8_15.2 [concrete = constants.%Float.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_15.2: = specific_function %impl.elem0.loc8_15.2, @Float.as.Copy.impl.Op(constants.%int_64) [concrete = constants.%Float.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.4: = bound_method %.loc8_15.2, %specific_fn.loc8_15.2 [concrete = constants.%bound_method.36b] @@ -1985,14 +1985,14 @@ fn F() { // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic] // CHECK:STDOUT: %f128.b8c: type = class_type @Float, @Float(%int_128) [concrete] // CHECK:STDOUT: %As.type.6c6: type = facet_type <@As, @As(%f128.b8c)> [concrete] -// CHECK:STDOUT: %As.Convert.type.3bf: type = fn_type @As.Convert, @As(%f128.b8c) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.882: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.27d: %Core.FloatLiteral.as.As.impl.Convert.type.882 = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.738: = impl_witness imports.%As.impl_witness_table.7c1, @Core.FloatLiteral.as.As.impl(%int_128) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.type.e6b: type = fn_type @Core.FloatLiteral.as.As.impl.Convert, @Core.FloatLiteral.as.As.impl(%int_128) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.3b3: %Core.FloatLiteral.as.As.impl.Convert.type.e6b = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.6c6 = facet_value Core.FloatLiteral, (%As.impl_witness.738) [concrete] -// CHECK:STDOUT: %.198: type = fn_type_with_self_type %As.Convert.type.3bf, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.c62: type = fn_type @As.WithSelf.Convert, @As(%f128.b8c, %As.facet) [concrete] +// CHECK:STDOUT: %.d5b: type = fn_type_with_self_type %As.WithSelf.Convert.type.c62, %As.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.bound: = bound_method %float.c64, %Core.FloatLiteral.as.As.impl.Convert.3b3 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.As.impl.Convert.3b3, @Core.FloatLiteral.as.As.impl.Convert(%int_128) [concrete] // CHECK:STDOUT: %bound_method.bae: = bound_method %float.c64, %Core.FloatLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -2001,14 +2001,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.2fe: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Float.as.Copy.impl.Op.240: %Float.as.Copy.impl.Op.type.2fe = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.775: = impl_witness imports.%Copy.impl_witness_table.119, @Float.as.Copy.impl(%int_128) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.ff0: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%int_128) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.021: %Float.as.Copy.impl.Op.type.ff0 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %f128.b8c, (%Copy.impl_witness.775) [concrete] -// CHECK:STDOUT: %.460: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.ddd: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.c96: type = fn_type_with_self_type %Copy.WithSelf.Op.type.ddd, %Copy.facet [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.bound: = bound_method %float.709, %Float.as.Copy.impl.Op.021 [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.specific_fn: = specific_function %Float.as.Copy.impl.Op.021, @Float.as.Copy.impl.Op(%int_128) [concrete] // CHECK:STDOUT: %bound_method.6ed: = bound_method %float.709, %Float.as.Copy.impl.Op.specific_fn [concrete] @@ -2040,7 +2040,7 @@ fn F() { // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 8e-1 [concrete = constants.%float.c64] // CHECK:STDOUT: %int_128: Core.IntLiteral = int_value 128 [concrete = constants.%int_128] // CHECK:STDOUT: %f128: type = class_type @Float, @Float(constants.%int_128) [concrete = constants.%f128.b8c] -// CHECK:STDOUT: %impl.elem0.loc8_15.1: %.198 = impl_witness_access constants.%As.impl_witness.738, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.3b3] +// CHECK:STDOUT: %impl.elem0.loc8_15.1: %.d5b = impl_witness_access constants.%As.impl_witness.738, element0 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.3b3] // CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %float, %impl.elem0.loc8_15.1 [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8_15.1: = specific_function %impl.elem0.loc8_15.1, @Core.FloatLiteral.as.As.impl.Convert(constants.%int_128) [concrete = constants.%Core.FloatLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %float, %specific_fn.loc8_15.1 [concrete = constants.%bound_method.bae] @@ -2048,7 +2048,7 @@ fn F() { // CHECK:STDOUT: %.loc8_15.1: %f128.b8c = value_of_initializer %Core.FloatLiteral.as.As.impl.Convert.call [concrete = constants.%float.709] // CHECK:STDOUT: %.loc8_15.2: %f128.b8c = converted %float, %.loc8_15.1 [concrete = constants.%float.709] // CHECK:STDOUT: %.loc8_15.3: ref %f128.b8c = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_15.2: %.460 = impl_witness_access constants.%Copy.impl_witness.775, element0 [concrete = constants.%Float.as.Copy.impl.Op.021] +// CHECK:STDOUT: %impl.elem0.loc8_15.2: %.c96 = impl_witness_access constants.%Copy.impl_witness.775, element0 [concrete = constants.%Float.as.Copy.impl.Op.021] // CHECK:STDOUT: %bound_method.loc8_15.3: = bound_method %.loc8_15.2, %impl.elem0.loc8_15.2 [concrete = constants.%Float.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_15.2: = specific_function %impl.elem0.loc8_15.2, @Float.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Float.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.4: = bound_method %.loc8_15.2, %specific_fn.loc8_15.2 [concrete = constants.%bound_method.6ed] diff --git a/toolchain/check/testdata/interop/cpp/function/arithmetic_types_direct.carbon b/toolchain/check/testdata/interop/cpp/function/arithmetic_types_direct.carbon index a047ca1c9b92..018b26e33af1 100644 --- a/toolchain/check/testdata/interop/cpp/function/arithmetic_types_direct.carbon +++ b/toolchain/check/testdata/interop/cpp/function/arithmetic_types_direct.carbon @@ -328,7 +328,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -336,7 +335,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -363,7 +363,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_1, %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.loc8_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -386,7 +386,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -394,7 +393,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_2147483647.d89, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_2147483647.d89, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -421,7 +421,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [concrete = constants.%int_2147483647.d89] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_2147483647, %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.loc8_11.2: = bound_method %int_2147483647, %specific_fn [concrete = constants.%bound_method] @@ -440,10 +440,10 @@ fn F() { // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %int_2147483648: Core.IntLiteral = int_value 2147483648 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete] // CHECK:STDOUT: %Negate.impl_witness: = impl_witness imports.%Negate.impl_witness_table [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness) [concrete] -// CHECK:STDOUT: %.826: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.4dd: type = fn_type @Negate.WithSelf.Op, @Negate(%Negate.facet) [concrete] +// CHECK:STDOUT: %.b42: type = fn_type_with_self_type %Negate.WithSelf.Op.type.4dd, %Negate.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.type: type = fn_type @Core.IntLiteral.as.Negate.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op: %Core.IntLiteral.as.Negate.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.bound: = bound_method %int_2147483648, %Core.IntLiteral.as.Negate.impl.Op [concrete] @@ -453,7 +453,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -461,7 +460,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_-2147483648.3b9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_-2147483648.3b9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -491,10 +491,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_2147483648: Core.IntLiteral = int_value 2147483648 [concrete = constants.%int_2147483648] -// CHECK:STDOUT: %impl.elem1: %.826 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.b42 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_2147483648, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op.bound] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.call: init Core.IntLiteral = call %bound_method.loc8_11.1(%int_2147483648) [concrete = constants.%int_-2147483648.3b9] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %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.loc8_11.3: = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %specific_fn [concrete = constants.%bound_method] @@ -519,7 +519,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -527,7 +526,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -554,7 +554,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_1, %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.loc8_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -577,7 +577,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -585,7 +584,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -612,7 +612,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_1, %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.loc8_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -635,7 +635,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.146: type = facet_type <@ImplicitAs, @ImplicitAs(%u32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.92a: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.46e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6 = struct_value () [symbolic] @@ -643,7 +642,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b07: 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.90e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b07 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.146 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.29e) [concrete] -// CHECK:STDOUT: %.aab: type = fn_type_with_self_type %ImplicitAs.Convert.type.92a, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a88: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%u32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.b47: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a88, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.90e [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.90e, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -670,7 +670,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.aab = impl_witness_access constants.%ImplicitAs.impl_witness.29e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.90e] +// CHECK:STDOUT: %impl.elem0: %.b47 = impl_witness_access constants.%ImplicitAs.impl_witness.29e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.90e] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_1, %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.loc8_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -693,7 +693,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -701,7 +700,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -728,7 +728,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_1, %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.loc8_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -752,7 +752,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -760,7 +759,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -791,14 +791,14 @@ fn F() { // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc8_11: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_11: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_1, %impl.elem0.loc8_11 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc8_11: = specific_function %impl.elem0.loc8_11, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %int_1, %specific_fn.loc8_11 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_11: init %i32 = call %bound_method.loc8_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_11.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_11 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_11.2: %i32 = converted %int_1, %.loc8_11.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc8_14: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_14: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_14.1: = bound_method %int_2, %impl.elem0.loc8_14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc8_14: = specific_function %impl.elem0.loc8_14, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_14.2: = bound_method %int_2, %specific_fn.loc8_14 [concrete = constants.%bound_method.646] @@ -822,7 +822,6 @@ fn F() { // CHECK:STDOUT: %foo1.type: type = fn_type @foo1 [concrete] // CHECK:STDOUT: %foo1: %foo1.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -830,7 +829,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -880,14 +880,14 @@ fn F() { // CHECK:STDOUT: %foo1.ref: %foo1.cpp_overload_set.type = name_ref foo1, imports.%foo1.cpp_overload_set.value [concrete = constants.%foo1.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc8_12: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_12: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_12.1: = bound_method %int_1, %impl.elem0.loc8_12 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc8_12: = specific_function %impl.elem0.loc8_12, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_12.2: = bound_method %int_1, %specific_fn.loc8_12 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_12: init %i32 = call %bound_method.loc8_12.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_12.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_12 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_12.2: %i32 = converted %int_1, %.loc8_12.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc8_15: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_15: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_15.1: = bound_method %int_2, %impl.elem0.loc8_15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc8_15: = specific_function %impl.elem0.loc8_15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_15.2: = bound_method %int_2, %specific_fn.loc8_15 [concrete = constants.%bound_method.646] @@ -899,14 +899,14 @@ fn F() { // CHECK:STDOUT: %foo2.ref: %foo2.cpp_overload_set.type = name_ref foo2, imports.%foo2.cpp_overload_set.value [concrete = constants.%foo2.cpp_overload_set.value] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc9_12: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_12: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_12.1: = bound_method %int_3, %impl.elem0.loc9_12 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc9_12: = specific_function %impl.elem0.loc9_12, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_12.2: = bound_method %int_3, %specific_fn.loc9_12 [concrete = constants.%bound_method.fa7] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_12: init %i32 = call %bound_method.loc9_12.2(%int_3) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc9_12.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_12 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc9_12.2: %i32 = converted %int_3, %.loc9_12.1 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc9_15: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_15: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_15.1: = bound_method %int_4, %impl.elem0.loc9_15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc9_15: = specific_function %impl.elem0.loc9_15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_15.2: = bound_method %int_4, %specific_fn.loc9_15 [concrete = constants.%bound_method.6d7] @@ -929,7 +929,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -937,7 +936,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -964,7 +964,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_1, %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.loc8_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -1026,7 +1026,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.2ad: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1034,7 +1033,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.2ad = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.556) [concrete] -// CHECK:STDOUT: %.567: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.4af: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i64, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.a64: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.4af, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1061,7 +1061,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] +// CHECK:STDOUT: %impl.elem0: %.a64 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_1, %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_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interop/cpp/function/decayed_param.carbon b/toolchain/check/testdata/interop/cpp/function/decayed_param.carbon index d81ac377ebcf..49fe3fff45dd 100644 --- a/toolchain/check/testdata/interop/cpp/function/decayed_param.carbon +++ b/toolchain/check/testdata/interop/cpp/function/decayed_param.carbon @@ -88,7 +88,6 @@ fn F() { // CHECK:STDOUT: %TakesArray.cpp_overload_set.value: %TakesArray.cpp_overload_set.type = cpp_overload_set_value @TakesArray.cpp_overload_set [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -97,7 +96,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -120,7 +120,6 @@ fn F() { // CHECK:STDOUT: %TakesArray.type: type = fn_type @TakesArray [concrete] // CHECK:STDOUT: %TakesArray: %TakesArray.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.121: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.75d)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.761: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Optional.75d) [concrete] // CHECK:STDOUT: %OptionalAs.type.ea5: type = facet_type <@OptionalAs, @OptionalAs(%T.542)> [symbolic] // CHECK:STDOUT: %U.2d2: %OptionalAs.type.ea5 = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.4c5: type = fn_type @U.binding.as_type.as.ImplicitAs.impl.Convert.2, @U.binding.as_type.as.ImplicitAs.impl.71c(%T.542, %U.2d2) [symbolic] @@ -134,7 +133,8 @@ fn F() { // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.cc7: type = fn_type @U.binding.as_type.as.ImplicitAs.impl.Convert.2, @U.binding.as_type.as.ImplicitAs.impl.71c(%OptionalStorage.facet.6bd, %OptionalAs.facet) [concrete] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.37e: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.cc7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.8cd: %ImplicitAs.type.121 = facet_value %ptr.235, (%ImplicitAs.impl_witness.2c0) [concrete] -// CHECK:STDOUT: %.07d: type = fn_type_with_self_type %ImplicitAs.Convert.type.761, %ImplicitAs.facet.8cd [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.944: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Optional.75d, %ImplicitAs.facet.8cd) [concrete] +// CHECK:STDOUT: %.c75: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.944, %ImplicitAs.facet.8cd [concrete] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %U.binding.as_type.as.ImplicitAs.impl.Convert.37e, @U.binding.as_type.as.ImplicitAs.impl.Convert.2(%OptionalStorage.facet.6bd, %OptionalAs.facet) [concrete] // CHECK:STDOUT: %Cpp.nullptr_t: type = class_type @NullptrT [concrete] // CHECK:STDOUT: %uninit: %Cpp.nullptr_t = uninitialized_value [concrete] @@ -144,7 +144,8 @@ fn F() { // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.type.9ab: type = fn_type @Cpp.nullptr_t.as.ImplicitAs.impl.Convert, @Cpp.nullptr_t.as.ImplicitAs.impl(%i32) [concrete] // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.a00: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.type.9ab = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.cf9: %ImplicitAs.type.121 = facet_value %Cpp.nullptr_t, (%ImplicitAs.impl_witness.aac) [concrete] -// CHECK:STDOUT: %.99d: type = fn_type_with_self_type %ImplicitAs.Convert.type.761, %ImplicitAs.facet.cf9 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.4aa: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Optional.75d, %ImplicitAs.facet.cf9) [concrete] +// CHECK:STDOUT: %.153: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.4aa, %ImplicitAs.facet.cf9 [concrete] // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.bound: = bound_method %uninit, %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.a00 [concrete] // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.a00, @Cpp.nullptr_t.as.ImplicitAs.impl.Convert(%i32) [concrete] // CHECK:STDOUT: %bound_method.3ee: = bound_method %uninit, %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -209,7 +210,7 @@ fn F() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc11_21: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc11_21: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc11_21.1: = bound_method %int_0, %impl.elem0.loc11_21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc11_21: = specific_function %impl.elem0.loc11_21, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_21.2: = bound_method %int_0, %specific_fn.loc11_21 [concrete = constants.%bound_method.d2e] @@ -218,7 +219,7 @@ fn F() { // CHECK:STDOUT: %.loc11_21.2: %i32 = converted %int_0, %.loc11_21.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc11_22: ref %i32 = array_index %n.ref, %.loc11_21.2 // CHECK:STDOUT: %addr: %ptr.235 = addr_of %.loc11_22 -// CHECK:STDOUT: %impl.elem0.loc11_18: %.07d = impl_witness_access constants.%ImplicitAs.impl_witness.2c0, element0 [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.37e] +// CHECK:STDOUT: %impl.elem0.loc11_18: %.c75 = impl_witness_access constants.%ImplicitAs.impl_witness.2c0, element0 [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.37e] // CHECK:STDOUT: %bound_method.loc11_18.1: = bound_method %addr, %impl.elem0.loc11_18 // CHECK:STDOUT: %specific_fn.loc11_18: = specific_function %impl.elem0.loc11_18, @U.binding.as_type.as.ImplicitAs.impl.Convert.2(constants.%OptionalStorage.facet.6bd, constants.%OptionalAs.facet) [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_18.2: = bound_method %addr, %specific_fn.loc11_18 @@ -233,7 +234,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc13_18: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: // CHECK:STDOUT: %nullptr.ref: %Cpp.nullptr_t = name_ref nullptr, %uninit [concrete = constants.%uninit] -// CHECK:STDOUT: %impl.elem0.loc13: %.99d = impl_witness_access constants.%ImplicitAs.impl_witness.aac, element0 [concrete = constants.%Cpp.nullptr_t.as.ImplicitAs.impl.Convert.a00] +// CHECK:STDOUT: %impl.elem0.loc13: %.153 = impl_witness_access constants.%ImplicitAs.impl_witness.aac, element0 [concrete = constants.%Cpp.nullptr_t.as.ImplicitAs.impl.Convert.a00] // CHECK:STDOUT: %bound_method.loc13_21.1: = bound_method %nullptr.ref, %impl.elem0.loc13 [concrete = constants.%Cpp.nullptr_t.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Cpp.nullptr_t.as.ImplicitAs.impl.Convert(constants.%i32) [concrete = constants.%Cpp.nullptr_t.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_21.2: = bound_method %nullptr.ref, %specific_fn.loc13 [concrete = constants.%bound_method.3ee] @@ -273,7 +274,6 @@ fn F() { // CHECK:STDOUT: %pattern_type.b6e: type = pattern_type %array_type [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -281,7 +281,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -333,7 +334,7 @@ fn F() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc31: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc31: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc31_24.1: = bound_method %int_0, %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.loc31_24.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interop/cpp/function/default_arg.carbon b/toolchain/check/testdata/interop/cpp/function/default_arg.carbon index de4af25069ee..1e75fd153e58 100644 --- a/toolchain/check/testdata/interop/cpp/function/default_arg.carbon +++ b/toolchain/check/testdata/interop/cpp/function/default_arg.carbon @@ -151,7 +151,6 @@ fn Call() { // CHECK:STDOUT: %GlobalNoReturn.type: type = fn_type @GlobalNoReturn [concrete] // CHECK:STDOUT: %GlobalNoReturn: %GlobalNoReturn.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -159,7 +158,8 @@ fn Call() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -253,28 +253,28 @@ fn Call() { // CHECK:STDOUT: %int_2.loc8: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc8: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_4.loc8: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc8_22: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_22.1: = bound_method %int_1.loc8, %impl.elem0.loc8_22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc8_22: = specific_function %impl.elem0.loc8_22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_22.2: = bound_method %int_1.loc8, %specific_fn.loc8_22 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_22: init %i32 = call %bound_method.loc8_22.2(%int_1.loc8) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_22 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_22.2: %i32 = converted %int_1.loc8, %.loc8_22.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc8_25: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_25.1: = bound_method %int_2.loc8, %impl.elem0.loc8_25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc8_25: = 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.loc8, %specific_fn.loc8_25 [concrete = constants.%bound_method.646] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_25: init %i32 = call %bound_method.loc8_25.2(%int_2.loc8) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc8_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_25 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc8_25.2: %i32 = converted %int_2.loc8, %.loc8_25.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc8_28: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_28: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_28.1: = bound_method %int_3.loc8, %impl.elem0.loc8_28 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc8_28: = specific_function %impl.elem0.loc8_28, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_28.2: = bound_method %int_3.loc8, %specific_fn.loc8_28 [concrete = constants.%bound_method.fa7] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_28: init %i32 = call %bound_method.loc8_28.2(%int_3.loc8) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc8_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_28 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc8_28.2: %i32 = converted %int_3.loc8, %.loc8_28.1 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc8_31: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_31: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_31.1: = bound_method %int_4.loc8, %impl.elem0.loc8_31 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc8_31: = specific_function %impl.elem0.loc8_31, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_31.2: = bound_method %int_4.loc8, %specific_fn.loc8_31 [concrete = constants.%bound_method.6d7] @@ -291,28 +291,28 @@ fn Call() { // CHECK:STDOUT: %int_2.loc9: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3.loc9: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_4.loc9: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc9_40: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_40: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_40.1: = bound_method %int_1.loc9, %impl.elem0.loc9_40 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc9_40: = specific_function %impl.elem0.loc9_40, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_40.2: = bound_method %int_1.loc9, %specific_fn.loc9_40 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_40: init %i32 = call %bound_method.loc9_40.2(%int_1.loc9) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_40.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_40 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_40.2: %i32 = converted %int_1.loc9, %.loc9_40.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc9_43: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_43: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_43.1: = bound_method %int_2.loc9, %impl.elem0.loc9_43 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc9_43: = specific_function %impl.elem0.loc9_43, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_43.2: = bound_method %int_2.loc9, %specific_fn.loc9_43 [concrete = constants.%bound_method.646] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_43: init %i32 = call %bound_method.loc9_43.2(%int_2.loc9) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc9_43.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_43 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc9_43.2: %i32 = converted %int_2.loc9, %.loc9_43.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc9_46: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_46: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_46.1: = bound_method %int_3.loc9, %impl.elem0.loc9_46 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc9_46: = specific_function %impl.elem0.loc9_46, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_46.2: = bound_method %int_3.loc9, %specific_fn.loc9_46 [concrete = constants.%bound_method.fa7] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_46: init %i32 = call %bound_method.loc9_46.2(%int_3.loc9) [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc9_46.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_46 [concrete = constants.%int_3.822] // CHECK:STDOUT: %.loc9_46.2: %i32 = converted %int_3.loc9, %.loc9_46.1 [concrete = constants.%int_3.822] -// CHECK:STDOUT: %impl.elem0.loc9_49: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_49: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_49.1: = bound_method %int_4.loc9, %impl.elem0.loc9_49 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc9_49: = specific_function %impl.elem0.loc9_49, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_49.2: = bound_method %int_4.loc9, %specific_fn.loc9_49 [concrete = constants.%bound_method.6d7] @@ -338,14 +338,14 @@ fn Call() { // CHECK:STDOUT: %bound_method.loc10_16: = bound_method %.loc10_7, %B.ref // CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc10: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc10_19: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_19: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_19.1: = bound_method %int_1.loc10, %impl.elem0.loc10_19 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc10_19: = specific_function %impl.elem0.loc10_19, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_19.2: = bound_method %int_1.loc10, %specific_fn.loc10_19 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_19: init %i32 = call %bound_method.loc10_19.2(%int_1.loc10) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_19 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_19.2: %i32 = converted %int_1.loc10, %.loc10_19.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc10_22: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_22.1: = bound_method %int_2.loc10, %impl.elem0.loc10_22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc10_22: = specific_function %impl.elem0.loc10_22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_22.2: = bound_method %int_2.loc10, %specific_fn.loc10_22 [concrete = constants.%bound_method.646] @@ -358,14 +358,14 @@ fn Call() { // CHECK:STDOUT: %C.ref: %X.C.cpp_overload_set.type = name_ref C, imports.%X.C.cpp_overload_set.value [concrete = constants.%X.C.cpp_overload_set.value] // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc11_11: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc11_11: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc11_11.1: = bound_method %int_1.loc11, %impl.elem0.loc11_11 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc11_11: = specific_function %impl.elem0.loc11_11, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_11.2: = bound_method %int_1.loc11, %specific_fn.loc11_11 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_11: init %i32 = call %bound_method.loc11_11.2(%int_1.loc11) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc11_11.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_11 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc11_11.2: %i32 = converted %int_1.loc11, %.loc11_11.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc11_14: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc11_14: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc11_14.1: = bound_method %int_2.loc11, %impl.elem0.loc11_14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc11_14: = specific_function %impl.elem0.loc11_14, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_14.2: = bound_method %int_2.loc11, %specific_fn.loc11_14 [concrete = constants.%bound_method.646] @@ -385,14 +385,14 @@ fn Call() { // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc12: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc12_7.2: %X = acquire_value %.loc12_7.1 -// CHECK:STDOUT: %impl.elem0.loc12_19: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc12_19: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_19.1: = bound_method %int_1.loc12, %impl.elem0.loc12_19 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc12_19: = specific_function %impl.elem0.loc12_19, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_19.2: = bound_method %int_1.loc12, %specific_fn.loc12_19 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_19: init %i32 = call %bound_method.loc12_19.2(%int_1.loc12) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc12_19.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_19 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc12_19.2: %i32 = converted %int_1.loc12, %.loc12_19.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc12_22: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc12_22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_22.1: = bound_method %int_2.loc12, %impl.elem0.loc12_22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc12_22: = specific_function %impl.elem0.loc12_22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_22.2: = bound_method %int_2.loc12, %specific_fn.loc12_22 [concrete = constants.%bound_method.646] @@ -429,7 +429,6 @@ fn Call() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -437,7 +436,8 @@ fn Call() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -650,14 +650,14 @@ fn Call() { // CHECK:STDOUT: %GlobalNoReturn.ref.loc8: %GlobalNoReturn.cpp_overload_set.type = name_ref GlobalNoReturn, imports.%GlobalNoReturn.cpp_overload_set.value [concrete = constants.%GlobalNoReturn.cpp_overload_set.value] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc8: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc8_22: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_22.1: = bound_method %int_1.loc8, %impl.elem0.loc8_22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc8_22: = specific_function %impl.elem0.loc8_22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_22.2: = bound_method %int_1.loc8, %specific_fn.loc8_22 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_22: init %i32 = call %bound_method.loc8_22.2(%int_1.loc8) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_22 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_22.2: %i32 = converted %int_1.loc8, %.loc8_22.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc8_25: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_25.1: = bound_method %int_2.loc8, %impl.elem0.loc8_25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc8_25: = 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.loc8, %specific_fn.loc8_25 [concrete = constants.%bound_method.646] @@ -672,14 +672,14 @@ fn Call() { // CHECK:STDOUT: %GlobalReturnInt.ref: %GlobalReturnInt.cpp_overload_set.type = name_ref GlobalReturnInt, imports.%GlobalReturnInt.cpp_overload_set.value [concrete = constants.%GlobalReturnInt.cpp_overload_set.value] // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc9: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc9_40: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_40: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_40.1: = bound_method %int_1.loc9, %impl.elem0.loc9_40 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc9_40: = specific_function %impl.elem0.loc9_40, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_40.2: = bound_method %int_1.loc9, %specific_fn.loc9_40 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_40: init %i32 = call %bound_method.loc9_40.2(%int_1.loc9) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_40.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_40 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc9_40.2: %i32 = converted %int_1.loc9, %.loc9_40.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc9_43: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_43: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_43.1: = bound_method %int_2.loc9, %impl.elem0.loc9_43 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc9_43: = specific_function %impl.elem0.loc9_43, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_43.2: = bound_method %int_2.loc9, %specific_fn.loc9_43 [concrete = constants.%bound_method.646] @@ -699,21 +699,21 @@ fn Call() { // CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc10: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc10_22: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_22.1: = bound_method %int_1.loc10, %impl.elem0.loc10_22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc10_22: = specific_function %impl.elem0.loc10_22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_22.2: = bound_method %int_1.loc10, %specific_fn.loc10_22 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_22: init %i32 = call %bound_method.loc10_22.2(%int_1.loc10) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_22 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_22.2: %i32 = converted %int_1.loc10, %.loc10_22.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc10_25: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_25.1: = bound_method %int_2.loc10, %impl.elem0.loc10_25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc10_25: = specific_function %impl.elem0.loc10_25, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_25.2: = bound_method %int_2.loc10, %specific_fn.loc10_25 [concrete = constants.%bound_method.646] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_25: init %i32 = call %bound_method.loc10_25.2(%int_2.loc10) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc10_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_25 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc10_25.2: %i32 = converted %int_2.loc10, %.loc10_25.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc10_28: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_28: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_28.1: = bound_method %int_3, %impl.elem0.loc10_28 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc10_28: = specific_function %impl.elem0.loc10_28, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_28.2: = bound_method %int_3, %specific_fn.loc10_28 [concrete = constants.%bound_method.fa7] @@ -731,7 +731,7 @@ fn Call() { // CHECK:STDOUT: %B.ref: %X.B.cpp_overload_set.type = name_ref B, imports.%X.B.cpp_overload_set.value [concrete = constants.%X.B.cpp_overload_set.value] // CHECK:STDOUT: %bound_method.loc11_16: = bound_method %.loc11_7, %B.ref // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc11: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc11: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc11_19.1: = bound_method %int_1.loc11, %impl.elem0.loc11 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc11: = specific_function %impl.elem0.loc11, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_19.2: = bound_method %int_1.loc11, %specific_fn.loc11 [concrete = constants.%bound_method.38b] @@ -743,7 +743,7 @@ fn Call() { // CHECK:STDOUT: %X.ref.loc12: type = name_ref X, imports.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %C.ref: %X.C.cpp_overload_set.type = name_ref C, imports.%X.C.cpp_overload_set.value [concrete = constants.%X.C.cpp_overload_set.value] // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc12: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc12: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_11.1: = bound_method %int_1.loc12, %impl.elem0.loc12 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_11.2: = bound_method %int_1.loc12, %specific_fn.loc12 [concrete = constants.%bound_method.38b] @@ -762,7 +762,7 @@ fn Call() { // CHECK:STDOUT: %bound_method.loc13_16: = bound_method %.loc13_7.1, %D.ref // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc13_7.2: %X = acquire_value %.loc13_7.1 -// CHECK:STDOUT: %impl.elem0.loc13: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc13: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_19.1: = bound_method %int_1.loc13, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_19.2: = bound_method %int_1.loc13, %specific_fn.loc13 [concrete = constants.%bound_method.38b] diff --git a/toolchain/check/testdata/interop/cpp/function/extern_c.carbon b/toolchain/check/testdata/interop/cpp/function/extern_c.carbon index 0e28115fecf2..6b409d2f866a 100644 --- a/toolchain/check/testdata/interop/cpp/function/extern_c.carbon +++ b/toolchain/check/testdata/interop/cpp/function/extern_c.carbon @@ -110,7 +110,6 @@ fn MyF(a: Cpp.X, b: Cpp.X) -> Cpp.X { // CHECK:STDOUT: %foo.type.a5abd1.2: type = fn_type @foo.2 [concrete] // CHECK:STDOUT: %foo.23ea43.2: %foo.type.a5abd1.2 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -118,7 +117,8 @@ fn MyF(a: Cpp.X, b: Cpp.X) -> Cpp.X { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -149,7 +149,7 @@ fn MyF(a: Cpp.X, b: Cpp.X) -> Cpp.X { // CHECK:STDOUT: %Cpp.ref.loc12: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref.loc12: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_11.1: = bound_method %int_5, %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.loc12_11.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method] @@ -168,14 +168,14 @@ fn MyF(a: Cpp.X, b: Cpp.X) -> Cpp.X { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -197,7 +197,7 @@ fn MyF(a: Cpp.X, b: Cpp.X) -> Cpp.X { // CHECK:STDOUT: // CHECK:STDOUT: %foo.ref: ref %i32 = name_ref foo, imports.%foo.var [concrete = imports.%foo.var] // CHECK:STDOUT: %.loc10: %i32 = acquire_value %foo.ref -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc10_13.1: = bound_method %.loc10, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc10_13.2: = bound_method %.loc10, %specific_fn diff --git a/toolchain/check/testdata/interop/cpp/function/full_semir.carbon b/toolchain/check/testdata/interop/cpp/function/full_semir.carbon index d5dec2041a72..a215408eb43f 100644 --- a/toolchain/check/testdata/interop/cpp/function/full_semir.carbon +++ b/toolchain/check/testdata/interop/cpp/function/full_semir.carbon @@ -82,7 +82,6 @@ fn F() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -90,7 +89,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete] -// CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2c0: type = fn_type @As.WithSelf.Convert, @As(%i16, %As.facet) [concrete] +// CHECK:STDOUT: %.70c: type = fn_type_with_self_type %As.WithSelf.Convert.type.2c0, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.4da: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -100,14 +100,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.e99: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete] -// CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d1f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.eb3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d1f, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.0da [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete] // CHECK:STDOUT: %bound_method.a48: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -171,7 +171,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] -// CHECK:STDOUT: %impl.elem0.loc7_13.1: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] +// CHECK:STDOUT: %impl.elem0.loc7_13.1: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_1, %impl.elem0.loc7_13.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc7_13.1: = specific_function %impl.elem0.loc7_13.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_1, %specific_fn.loc7_13.1 [concrete = constants.%bound_method.4da] @@ -179,7 +179,7 @@ fn F() { // CHECK:STDOUT: %.loc7_13.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_13.2: %i16 = converted %int_1, %.loc7_13.1 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_13.3: ref %i16 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc7_13.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] +// CHECK:STDOUT: %impl.elem0.loc7_13.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] // CHECK:STDOUT: %bound_method.loc7_13.3: = bound_method %.loc7_13.2, %impl.elem0.loc7_13.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc7_13.2: = specific_function %impl.elem0.loc7_13.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.4: = bound_method %.loc7_13.2, %specific_fn.loc7_13.2 [concrete = constants.%bound_method.a48] @@ -217,7 +217,6 @@ fn F() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -225,7 +224,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -279,7 +279,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc7_11.1: = bound_method %int_1, %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.loc7_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interop/cpp/function/function.carbon b/toolchain/check/testdata/interop/cpp/function/function.carbon index 8afc48e48268..ea6ae079043c 100644 --- a/toolchain/check/testdata/interop/cpp/function/function.carbon +++ b/toolchain/check/testdata/interop/cpp/function/function.carbon @@ -324,7 +324,6 @@ fn G() -> i32 { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -332,7 +331,8 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -374,7 +374,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc8_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -392,7 +392,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc14_20.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_20.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interop/cpp/function/in_template.carbon b/toolchain/check/testdata/interop/cpp/function/in_template.carbon index 5ba1d80a9e48..fb2410f398f3 100644 --- a/toolchain/check/testdata/interop/cpp/function/in_template.carbon +++ b/toolchain/check/testdata/interop/cpp/function/in_template.carbon @@ -46,7 +46,6 @@ fn F() { // CHECK:STDOUT: %X.f.type: type = fn_type @X.f [concrete] // CHECK:STDOUT: %X.f: %X.f.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -54,7 +53,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -83,7 +83,7 @@ fn F() { // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%X.decl [concrete = constants.%X] // CHECK:STDOUT: %f.ref: %X.f.cpp_overload_set.type = name_ref f, imports.%X.f.cpp_overload_set.value [concrete = constants.%X.f.cpp_overload_set.value] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_42, %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.loc8_11.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interop/cpp/function/inline.carbon b/toolchain/check/testdata/interop/cpp/function/inline.carbon index 2ce2fe2640e2..2b86dca575d7 100644 --- a/toolchain/check/testdata/interop/cpp/function/inline.carbon +++ b/toolchain/check/testdata/interop/cpp/function/inline.carbon @@ -157,7 +157,6 @@ fn MyF() { // CHECK:STDOUT: %WithoutThunk.type: type = fn_type @WithoutThunk [concrete] // CHECK:STDOUT: %WithoutThunk: %WithoutThunk.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -165,7 +164,8 @@ fn MyF() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709 [concrete] @@ -179,25 +179,25 @@ fn MyF() { // CHECK:STDOUT: %ThunkOnArg__carbon_thunk.type: type = fn_type @ThunkOnArg__carbon_thunk [concrete] // CHECK:STDOUT: %ThunkOnArg__carbon_thunk: %ThunkOnArg__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.9fb: type = facet_type <@ImplicitAs, @ImplicitAs(%i16)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.fa6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i16) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.882: = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.c54: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.c54 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.44d: %ImplicitAs.type.9fb = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.882) [concrete] -// CHECK:STDOUT: %.bbf: type = fn_type_with_self_type %ImplicitAs.Convert.type.fa6, %ImplicitAs.facet.44d [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.89b: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i16, %ImplicitAs.facet.44d) [concrete] +// CHECK:STDOUT: %.3ce: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.89b, %ImplicitAs.facet.44d [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7e8: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.a76: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.576: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.a76 [concrete] // CHECK:STDOUT: %int_1.f90: %i16 = int_value 1 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.e99: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete] -// CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d1f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.eb3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d1f, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.0da [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete] // CHECK:STDOUT: %bound_method.a48: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -259,7 +259,7 @@ fn MyF() { // CHECK:STDOUT: %Cpp.ref.loc13: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %WithoutThunk.ref: %WithoutThunk.cpp_overload_set.type = name_ref WithoutThunk, imports.%WithoutThunk.cpp_overload_set.value [concrete = constants.%WithoutThunk.cpp_overload_set.value] // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc13: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc13: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_34.1: = bound_method %int_1.loc13, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709] // CHECK:STDOUT: %bound_method.loc13_34.2: = bound_method %int_1.loc13, %specific_fn.loc13 [concrete = constants.%bound_method.38b] @@ -280,7 +280,7 @@ fn MyF() { // CHECK:STDOUT: %Cpp.ref.loc14: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %ThunkOnArg.ref: %ThunkOnArg.cpp_overload_set.type = name_ref ThunkOnArg, imports.%ThunkOnArg.cpp_overload_set.value [concrete = constants.%ThunkOnArg.cpp_overload_set.value] // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc14_32.1: %.bbf = impl_witness_access constants.%ImplicitAs.impl_witness.882, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9] +// CHECK:STDOUT: %impl.elem0.loc14_32.1: %.3ce = impl_witness_access constants.%ImplicitAs.impl_witness.882, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9] // CHECK:STDOUT: %bound_method.loc14_32.1: = bound_method %int_1.loc14, %impl.elem0.loc14_32.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7e8] // CHECK:STDOUT: %specific_fn.loc14_32.1: = specific_function %impl.elem0.loc14_32.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.a76] // CHECK:STDOUT: %bound_method.loc14_32.2: = bound_method %int_1.loc14, %specific_fn.loc14_32.1 [concrete = constants.%bound_method.576] @@ -288,7 +288,7 @@ fn MyF() { // CHECK:STDOUT: %.loc14_32.1: %i16 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc14_32.2: %i16 = converted %int_1.loc14, %.loc14_32.1 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc14_32.3: ref %i16 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc14_32.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] +// CHECK:STDOUT: %impl.elem0.loc14_32.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] // CHECK:STDOUT: %bound_method.loc14_32.3: = bound_method %.loc14_32.2, %impl.elem0.loc14_32.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc14_32.2: = specific_function %impl.elem0.loc14_32.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc14_32.4: = bound_method %.loc14_32.2, %specific_fn.loc14_32.2 [concrete = constants.%bound_method.a48] @@ -309,7 +309,7 @@ fn MyF() { // CHECK:STDOUT: %Cpp.ref.loc15: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %ThunkOnReturn.ref: %ThunkOnReturn.cpp_overload_set.type = name_ref ThunkOnReturn, imports.%ThunkOnReturn.cpp_overload_set.value [concrete = constants.%ThunkOnReturn.cpp_overload_set.value] // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc15: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_35.1: = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709] // CHECK:STDOUT: %bound_method.loc15_35.2: = bound_method %int_1.loc15, %specific_fn.loc15 [concrete = constants.%bound_method.38b] @@ -333,7 +333,7 @@ fn MyF() { // CHECK:STDOUT: %Cpp.ref.loc16: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %ThunkOnBoth.ref: %ThunkOnBoth.cpp_overload_set.type = name_ref ThunkOnBoth, imports.%ThunkOnBoth.cpp_overload_set.value [concrete = constants.%ThunkOnBoth.cpp_overload_set.value] // CHECK:STDOUT: %int_1.loc16: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc16_33.1: %.bbf = impl_witness_access constants.%ImplicitAs.impl_witness.882, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9] +// CHECK:STDOUT: %impl.elem0.loc16_33.1: %.3ce = impl_witness_access constants.%ImplicitAs.impl_witness.882, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9] // CHECK:STDOUT: %bound_method.loc16_33.1: = bound_method %int_1.loc16, %impl.elem0.loc16_33.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7e8] // CHECK:STDOUT: %specific_fn.loc16_33.1: = specific_function %impl.elem0.loc16_33.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.a76] // CHECK:STDOUT: %bound_method.loc16_33.2: = bound_method %int_1.loc16, %specific_fn.loc16_33.1 [concrete = constants.%bound_method.576] @@ -341,7 +341,7 @@ fn MyF() { // CHECK:STDOUT: %.loc16_33.1: %i16 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc16_33.2: %i16 = converted %int_1.loc16, %.loc16_33.1 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc16_33.3: ref %i16 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc16_33.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] +// CHECK:STDOUT: %impl.elem0.loc16_33.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] // CHECK:STDOUT: %bound_method.loc16_33.3: = bound_method %.loc16_33.2, %impl.elem0.loc16_33.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc16_33.2: = specific_function %impl.elem0.loc16_33.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_33.4: = bound_method %.loc16_33.2, %specific_fn.loc16_33.2 [concrete = constants.%bound_method.a48] diff --git a/toolchain/check/testdata/interop/cpp/function/operators.carbon b/toolchain/check/testdata/interop/cpp/function/operators.carbon index 61e392fd0486..17edf4a154be 100644 --- a/toolchain/check/testdata/interop/cpp/function/operators.carbon +++ b/toolchain/check/testdata/interop/cpp/function/operators.carbon @@ -1208,7 +1208,6 @@ fn F() { // CHECK:STDOUT: %operator_LessLess__carbon_thunk.type: type = fn_type @operator_LessLess__carbon_thunk [concrete] // CHECK:STDOUT: %operator_LessLess__carbon_thunk: %operator_LessLess__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1216,7 +1215,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.fa7: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1652,7 +1652,7 @@ fn F() { // CHECK:STDOUT: %int_3.loc22: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc22_30.1: ref %C = temporary_storage // CHECK:STDOUT: %.loc22_27.1: %C = acquire_value %c1.ref.loc22 -// CHECK:STDOUT: %impl.elem0.loc22: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc22_33.1: = bound_method %int_3.loc22, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // 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_33.2: = bound_method %int_3.loc22, %specific_fn.loc22 [concrete = constants.%bound_method.fa7] @@ -1678,7 +1678,7 @@ fn F() { // CHECK:STDOUT: %int_5.loc23: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] // CHECK:STDOUT: %.loc23_31.1: ref %C = temporary_storage // CHECK:STDOUT: %.loc23_28.1: %C = acquire_value %c1.ref.loc23 -// CHECK:STDOUT: %impl.elem0.loc23: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc23: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc23_34.1: = bound_method %int_5.loc23, %impl.elem0.loc23 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005] // 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_34.2: = bound_method %int_5.loc23, %specific_fn.loc23 [concrete = constants.%bound_method.e9d] @@ -1747,7 +1747,7 @@ fn F() { // CHECK:STDOUT: %operator_CaretEqual__carbon_thunk.call: ref %C = call imports.%operator_CaretEqual__carbon_thunk.decl(%c1.ref.loc35, %addr.loc35) // CHECK:STDOUT: %c1.ref.loc36: ref %C = name_ref c1, %c1 // CHECK:STDOUT: %int_3.loc36: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc36: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc36: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc36_10.1: = bound_method %int_3.loc36, %impl.elem0.loc36 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc36: = specific_function %impl.elem0.loc36, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc36_10.2: = bound_method %int_3.loc36, %specific_fn.loc36 [concrete = constants.%bound_method.fa7] @@ -1757,7 +1757,7 @@ fn F() { // CHECK:STDOUT: %cpp_operator.call.loc36: ref %C = call imports.%cpp_operator.decl.4206c9.19(%c1.ref.loc36, %.loc36_10.2) // CHECK:STDOUT: %c1.ref.loc37: ref %C = name_ref c1, %c1 // CHECK:STDOUT: %int_5.loc37: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0.loc37: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc37: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc37_10.1: = bound_method %int_5.loc37, %impl.elem0.loc37 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005] // CHECK:STDOUT: %specific_fn.loc37: = specific_function %impl.elem0.loc37, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc37_10.2: = bound_method %int_5.loc37, %specific_fn.loc37 [concrete = constants.%bound_method.e9d] @@ -1909,7 +1909,7 @@ fn F() { // CHECK:STDOUT: %c1.ref.loc48: ref %C = name_ref c1, %c1 // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] // CHECK:STDOUT: %C.cpp_operator.bound: = bound_method %c1.ref.loc48, imports.%C.cpp_operator.decl -// CHECK:STDOUT: %impl.elem0.loc48: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc48: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc48_23.1: = bound_method %int_42, %impl.elem0.loc48 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.c83] // CHECK:STDOUT: %specific_fn.loc48: = specific_function %impl.elem0.loc48, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc48_23.2: = bound_method %int_42, %specific_fn.loc48 [concrete = constants.%bound_method.cb9] diff --git a/toolchain/check/testdata/interop/cpp/function/overloads.carbon b/toolchain/check/testdata/interop/cpp/function/overloads.carbon index 7235ed1213d5..5999efccbef4 100644 --- a/toolchain/check/testdata/interop/cpp/function/overloads.carbon +++ b/toolchain/check/testdata/interop/cpp/function/overloads.carbon @@ -807,7 +807,6 @@ fn F() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -815,7 +814,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete] -// CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2c0: type = fn_type @As.WithSelf.Convert, @As(%i16, %As.facet) [concrete] +// CHECK:STDOUT: %.70c: type = fn_type_with_self_type %As.WithSelf.Convert.type.2c0, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.4da: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -825,14 +825,14 @@ fn F() { // CHECK:STDOUT: %bar__carbon_thunk.type: type = fn_type @bar__carbon_thunk [concrete] // CHECK:STDOUT: %bar__carbon_thunk: %bar__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.e99: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete] -// CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d1f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.eb3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d1f, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.0da [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete] // CHECK:STDOUT: %bound_method.a48: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -896,7 +896,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] -// CHECK:STDOUT: %impl.elem0.loc7_13.1: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] +// CHECK:STDOUT: %impl.elem0.loc7_13.1: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_1, %impl.elem0.loc7_13.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc7_13.1: = specific_function %impl.elem0.loc7_13.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_1, %specific_fn.loc7_13.1 [concrete = constants.%bound_method.4da] @@ -904,7 +904,7 @@ fn F() { // CHECK:STDOUT: %.loc7_13.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_13.2: %i16 = converted %int_1, %.loc7_13.1 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc7_13.3: ref %i16 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc7_13.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] +// CHECK:STDOUT: %impl.elem0.loc7_13.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] // CHECK:STDOUT: %bound_method.loc7_13.3: = bound_method %.loc7_13.2, %impl.elem0.loc7_13.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc7_13.2: = specific_function %impl.elem0.loc7_13.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.4: = bound_method %.loc7_13.2, %specific_fn.loc7_13.2 [concrete = constants.%bound_method.a48] @@ -939,7 +939,6 @@ fn F() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -947,7 +946,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] @@ -1006,7 +1006,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -1036,7 +1036,6 @@ fn F() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -1044,7 +1043,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet.d6e: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet.d6e [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet.d6e) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet.d6e [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.bd3: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.fab: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] @@ -1055,12 +1055,12 @@ fn F() { // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete] // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete] // CHECK:STDOUT: %As.impl_witness.b61: = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete] // CHECK:STDOUT: %As.facet.071: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete] -// CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet.071 [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2c0: type = fn_type @As.WithSelf.Convert, @As(%i16, %As.facet.071) [concrete] +// CHECK:STDOUT: %.70c: type = fn_type_with_self_type %As.WithSelf.Convert.type.2c0, %As.facet.071 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.896: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn.00b: = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method.4da: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn.00b [concrete] @@ -1070,14 +1070,14 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.e99: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.97f: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_16) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.0da: %Int.as.Copy.impl.Op.type.97f = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i16, (%Copy.impl_witness.e99) [concrete] -// CHECK:STDOUT: %.03d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.d1f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.eb3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.d1f, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.0da [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.0da, @Int.as.Copy.impl.Op(%int_16) [concrete] // CHECK:STDOUT: %bound_method.a48: = bound_method %int_1.f90, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -1152,7 +1152,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc7: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0.loc7: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.bd3] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.fab] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method.290] @@ -1165,7 +1165,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] -// CHECK:STDOUT: %impl.elem0.loc8_13.1: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] +// CHECK:STDOUT: %impl.elem0.loc8_13.1: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] // CHECK:STDOUT: %bound_method.loc8_13.1: = bound_method %int_1.loc8, %impl.elem0.loc8_13.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.896] // CHECK:STDOUT: %specific_fn.loc8_13.1: = specific_function %impl.elem0.loc8_13.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn.00b] // CHECK:STDOUT: %bound_method.loc8_13.2: = bound_method %int_1.loc8, %specific_fn.loc8_13.1 [concrete = constants.%bound_method.4da] @@ -1173,7 +1173,7 @@ fn F() { // CHECK:STDOUT: %.loc8_13.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc8 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc8_13.2: %i16 = converted %int_1.loc8, %.loc8_13.1 [concrete = constants.%int_1.f90] // CHECK:STDOUT: %.loc8_13.3: ref %i16 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_13.2: %.03d = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] +// CHECK:STDOUT: %impl.elem0.loc8_13.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da] // CHECK:STDOUT: %bound_method.loc8_13.3: = bound_method %.loc8_13.2, %impl.elem0.loc8_13.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc8_13.2: = specific_function %impl.elem0.loc8_13.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.4: = bound_method %.loc8_13.2, %specific_fn.loc8_13.2 [concrete = constants.%bound_method.a48] @@ -1210,7 +1210,6 @@ fn F() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -1218,7 +1217,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] @@ -1294,7 +1294,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc7: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0.loc7: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %int_1.loc7, %impl.elem0.loc7 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %int_1.loc7, %specific_fn.loc7 [concrete = constants.%bound_method] @@ -1307,7 +1307,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc8: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0.loc8: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc8_13.1: = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_13.2: = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method] @@ -1342,7 +1342,6 @@ fn F() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1350,7 +1349,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5e6: = bound_method %int_2147483647.d89, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.076: = bound_method %int_2147483647.d89, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709 [concrete] @@ -1362,12 +1362,12 @@ fn F() { // CHECK:STDOUT: %foo.type.a5abd1.2: type = fn_type @foo.2 [concrete] // CHECK:STDOUT: %foo.23ea43.2: %foo.type.a5abd1.2 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.2ad: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.556: = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.d48: %ImplicitAs.type.2ad = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.556) [concrete] -// CHECK:STDOUT: %.567: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet.d48 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.4af: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i64, %ImplicitAs.facet.d48) [concrete] +// CHECK:STDOUT: %.a64: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.4af, %ImplicitAs.facet.d48 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4: = bound_method %int_2147483648.1db, %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.41d: = bound_method %int_2147483648.1db, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7 [concrete] @@ -1385,25 +1385,25 @@ fn F() { // CHECK:STDOUT: %foo__carbon_thunk.type: type = fn_type @foo__carbon_thunk [concrete] // CHECK:STDOUT: %foo__carbon_thunk: %foo__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e19: type = facet_type <@ImplicitAs, @ImplicitAs(%i128)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.812: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i128) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.47a: = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_128) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.74a: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_128) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.75a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.74a = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.daa: %ImplicitAs.type.e19 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.47a) [concrete] -// CHECK:STDOUT: %.700: type = fn_type_with_self_type %ImplicitAs.Convert.type.812, %ImplicitAs.facet.daa [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.869: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i128, %ImplicitAs.facet.daa) [concrete] +// CHECK:STDOUT: %.44c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.869, %ImplicitAs.facet.daa [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6a8: = bound_method %int_9223372036854775808.293, %Core.IntLiteral.as.ImplicitAs.impl.Convert.75a [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.75a, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_128) [concrete] // CHECK:STDOUT: %bound_method.561: = bound_method %int_9223372036854775808.293, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59 [concrete] // CHECK:STDOUT: %int_9223372036854775808.f14: %i128 = int_value 9223372036854775808 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.a35: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_128) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3b0: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_128) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bc1: %Int.as.Copy.impl.Op.type.3b0 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i128, (%Copy.impl_witness.a35) [concrete] -// CHECK:STDOUT: %.80a: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.9e8: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.0e6: type = fn_type_with_self_type %Copy.WithSelf.Op.type.9e8, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.def: = bound_method %int_9223372036854775808.f14, %Int.as.Copy.impl.Op.bc1 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.bc1, @Int.as.Copy.impl.Op(%int_128) [concrete] // CHECK:STDOUT: %bound_method.b4e: = bound_method %int_9223372036854775808.f14, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -1528,7 +1528,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref.loc8: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [concrete = constants.%int_2147483647.d89] -// CHECK:STDOUT: %impl.elem0.loc8: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_24.1: = bound_method %int_2147483647, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5e6] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709] // CHECK:STDOUT: %bound_method.loc8_24.2: = bound_method %int_2147483647, %specific_fn.loc8 [concrete = constants.%bound_method.076] @@ -1549,7 +1549,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc13: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref.loc13: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_2147483648.loc13: Core.IntLiteral = int_value 2147483648 [concrete = constants.%int_2147483648.1db] -// CHECK:STDOUT: %impl.elem0.loc13: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] +// CHECK:STDOUT: %impl.elem0.loc13: %.a64 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] // CHECK:STDOUT: %bound_method.loc13_24.1: = bound_method %int_2147483648.loc13, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7] // CHECK:STDOUT: %bound_method.loc13_24.2: = bound_method %int_2147483648.loc13, %specific_fn.loc13 [concrete = constants.%bound_method.41d] @@ -1570,7 +1570,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc14: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref.loc14: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_2147483648.loc14: Core.IntLiteral = int_value 2147483648 [concrete = constants.%int_2147483648.1db] -// CHECK:STDOUT: %impl.elem0.loc14: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] +// CHECK:STDOUT: %impl.elem0.loc14: %.a64 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] // CHECK:STDOUT: %bound_method.loc14_29.1: = bound_method %int_2147483648.loc14, %impl.elem0.loc14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4] // CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7] // CHECK:STDOUT: %bound_method.loc14_29.2: = bound_method %int_2147483648.loc14, %specific_fn.loc14 [concrete = constants.%bound_method.41d] @@ -1591,7 +1591,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc15: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref.loc15: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_2147483648.loc15: Core.IntLiteral = int_value 2147483648 [concrete = constants.%int_2147483648.1db] -// CHECK:STDOUT: %impl.elem0.loc15: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] +// CHECK:STDOUT: %impl.elem0.loc15: %.a64 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] // CHECK:STDOUT: %bound_method.loc15_31.1: = bound_method %int_2147483648.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7] // CHECK:STDOUT: %bound_method.loc15_31.2: = bound_method %int_2147483648.loc15, %specific_fn.loc15 [concrete = constants.%bound_method.41d] @@ -1612,7 +1612,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc18: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref.loc18: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_9223372036854775807: Core.IntLiteral = int_value 9223372036854775807 [concrete = constants.%int_9223372036854775807.e6f] -// CHECK:STDOUT: %impl.elem0.loc18: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] +// CHECK:STDOUT: %impl.elem0.loc18: %.a64 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d] // CHECK:STDOUT: %bound_method.loc18_24.1: = bound_method %int_9223372036854775807, %impl.elem0.loc18 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6d9] // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7] // CHECK:STDOUT: %bound_method.loc18_24.2: = bound_method %int_9223372036854775807, %specific_fn.loc18 [concrete = constants.%bound_method.ef8] @@ -1633,7 +1633,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc22: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref.loc22: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_9223372036854775808: Core.IntLiteral = int_value 9223372036854775808 [concrete = constants.%int_9223372036854775808.293] -// CHECK:STDOUT: %impl.elem0.loc22_25.1: %.700 = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a] +// CHECK:STDOUT: %impl.elem0.loc22_25.1: %.44c = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a] // CHECK:STDOUT: %bound_method.loc22_25.1: = bound_method %int_9223372036854775808, %impl.elem0.loc22_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6a8] // CHECK:STDOUT: %specific_fn.loc22_25.1: = specific_function %impl.elem0.loc22_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59] // CHECK:STDOUT: %bound_method.loc22_25.2: = bound_method %int_9223372036854775808, %specific_fn.loc22_25.1 [concrete = constants.%bound_method.561] @@ -1641,7 +1641,7 @@ fn F() { // CHECK:STDOUT: %.loc22_25.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22 [concrete = constants.%int_9223372036854775808.f14] // CHECK:STDOUT: %.loc22_25.2: %i128 = converted %int_9223372036854775808, %.loc22_25.1 [concrete = constants.%int_9223372036854775808.f14] // CHECK:STDOUT: %.loc22_25.3: ref %i128 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc22_25.2: %.80a = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1] +// CHECK:STDOUT: %impl.elem0.loc22_25.2: %.0e6 = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1] // CHECK:STDOUT: %bound_method.loc22_25.3: = bound_method %.loc22_25.2, %impl.elem0.loc22_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.def] // CHECK:STDOUT: %specific_fn.loc22_25.2: = specific_function %impl.elem0.loc22_25.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc22_25.4: = bound_method %.loc22_25.2, %specific_fn.loc22_25.2 [concrete = constants.%bound_method.b4e] @@ -1665,7 +1665,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc25: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref.loc25: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_18446744073709551615: Core.IntLiteral = int_value 18446744073709551615 [concrete = constants.%int_18446744073709551615.5ec] -// CHECK:STDOUT: %impl.elem0.loc25_25.1: %.700 = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a] +// CHECK:STDOUT: %impl.elem0.loc25_25.1: %.44c = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a] // CHECK:STDOUT: %bound_method.loc25_25.1: = bound_method %int_18446744073709551615, %impl.elem0.loc25_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9ac] // CHECK:STDOUT: %specific_fn.loc25_25.1: = specific_function %impl.elem0.loc25_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59] // CHECK:STDOUT: %bound_method.loc25_25.2: = bound_method %int_18446744073709551615, %specific_fn.loc25_25.1 [concrete = constants.%bound_method.422] @@ -1673,7 +1673,7 @@ fn F() { // CHECK:STDOUT: %.loc25_25.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25 [concrete = constants.%int_18446744073709551615.f56] // CHECK:STDOUT: %.loc25_25.2: %i128 = converted %int_18446744073709551615, %.loc25_25.1 [concrete = constants.%int_18446744073709551615.f56] // CHECK:STDOUT: %.loc25_25.3: ref %i128 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc25_25.2: %.80a = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1] +// CHECK:STDOUT: %impl.elem0.loc25_25.2: %.0e6 = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1] // CHECK:STDOUT: %bound_method.loc25_25.3: = bound_method %.loc25_25.2, %impl.elem0.loc25_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.cf0] // CHECK:STDOUT: %specific_fn.loc25_25.2: = specific_function %impl.elem0.loc25_25.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc25_25.4: = bound_method %.loc25_25.2, %specific_fn.loc25_25.2 [concrete = constants.%bound_method.2cb] @@ -1697,7 +1697,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc28: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref.loc28: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_18446744073709551616: Core.IntLiteral = int_value 18446744073709551616 [concrete = constants.%int_18446744073709551616.1ee] -// CHECK:STDOUT: %impl.elem0.loc28_25.1: %.700 = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a] +// CHECK:STDOUT: %impl.elem0.loc28_25.1: %.44c = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a] // CHECK:STDOUT: %bound_method.loc28_25.1: = bound_method %int_18446744073709551616, %impl.elem0.loc28_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6a3] // CHECK:STDOUT: %specific_fn.loc28_25.1: = specific_function %impl.elem0.loc28_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59] // CHECK:STDOUT: %bound_method.loc28_25.2: = bound_method %int_18446744073709551616, %specific_fn.loc28_25.1 [concrete = constants.%bound_method.e31] @@ -1705,7 +1705,7 @@ fn F() { // CHECK:STDOUT: %.loc28_25.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc28 [concrete = constants.%int_18446744073709551616.92b] // CHECK:STDOUT: %.loc28_25.2: %i128 = converted %int_18446744073709551616, %.loc28_25.1 [concrete = constants.%int_18446744073709551616.92b] // CHECK:STDOUT: %.loc28_25.3: ref %i128 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc28_25.2: %.80a = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1] +// CHECK:STDOUT: %impl.elem0.loc28_25.2: %.0e6 = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1] // CHECK:STDOUT: %bound_method.loc28_25.3: = bound_method %.loc28_25.2, %impl.elem0.loc28_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.bcd] // CHECK:STDOUT: %specific_fn.loc28_25.2: = specific_function %impl.elem0.loc28_25.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc28_25.4: = bound_method %.loc28_25.2, %specific_fn.loc28_25.2 [concrete = constants.%bound_method.6a9] @@ -1729,7 +1729,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc31: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref.loc31: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_170141183460469231731687303715884105727: Core.IntLiteral = int_value 170141183460469231731687303715884105727 [concrete = constants.%int_170141183460469231731687303715884105727.fea] -// CHECK:STDOUT: %impl.elem0.loc31_25.1: %.700 = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a] +// CHECK:STDOUT: %impl.elem0.loc31_25.1: %.44c = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a] // CHECK:STDOUT: %bound_method.loc31_25.1: = bound_method %int_170141183460469231731687303715884105727, %impl.elem0.loc31_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8e8] // CHECK:STDOUT: %specific_fn.loc31_25.1: = specific_function %impl.elem0.loc31_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59] // CHECK:STDOUT: %bound_method.loc31_25.2: = bound_method %int_170141183460469231731687303715884105727, %specific_fn.loc31_25.1 [concrete = constants.%bound_method.d00] @@ -1737,7 +1737,7 @@ fn F() { // CHECK:STDOUT: %.loc31_25.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31 [concrete = constants.%int_170141183460469231731687303715884105727.ff5] // CHECK:STDOUT: %.loc31_25.2: %i128 = converted %int_170141183460469231731687303715884105727, %.loc31_25.1 [concrete = constants.%int_170141183460469231731687303715884105727.ff5] // CHECK:STDOUT: %.loc31_25.3: ref %i128 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc31_25.2: %.80a = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1] +// CHECK:STDOUT: %impl.elem0.loc31_25.2: %.0e6 = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1] // CHECK:STDOUT: %bound_method.loc31_25.3: = bound_method %.loc31_25.2, %impl.elem0.loc31_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.78b] // CHECK:STDOUT: %specific_fn.loc31_25.2: = specific_function %impl.elem0.loc31_25.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc31_25.4: = bound_method %.loc31_25.2, %specific_fn.loc31_25.2 [concrete = constants.%bound_method.2fb] @@ -1852,10 +1852,10 @@ fn F() { // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete] // CHECK:STDOUT: %Negate.impl_witness: = impl_witness imports.%Negate.impl_witness_table [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness) [concrete] -// CHECK:STDOUT: %.826: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.4dd: type = fn_type @Negate.WithSelf.Op, @Negate(%Negate.facet) [concrete] +// CHECK:STDOUT: %.b42: type = fn_type_with_self_type %Negate.WithSelf.Op.type.4dd, %Negate.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.type: type = fn_type @Core.IntLiteral.as.Negate.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op: %Core.IntLiteral.as.Negate.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.bound: = bound_method %int_1, %Core.IntLiteral.as.Negate.impl.Op [concrete] @@ -1870,7 +1870,6 @@ fn F() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1878,7 +1877,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_-1.638, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_-1.638, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1937,10 +1937,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %impl.elem1: %.826 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.b42 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_1, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op.bound] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.call: init Core.IntLiteral = call %bound_method.loc8_11.1(%int_1) [concrete = constants.%int_-1.638] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_11.2: = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %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.loc8_11.3: = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %specific_fn [concrete = constants.%bound_method] @@ -1965,10 +1965,10 @@ fn F() { // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete] // CHECK:STDOUT: %Negate.impl_witness: = impl_witness imports.%Negate.impl_witness_table [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value Core.IntLiteral, (%Negate.impl_witness) [concrete] -// CHECK:STDOUT: %.826: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.4dd: type = fn_type @Negate.WithSelf.Op, @Negate(%Negate.facet) [concrete] +// CHECK:STDOUT: %.b42: type = fn_type_with_self_type %Negate.WithSelf.Op.type.4dd, %Negate.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.type: type = fn_type @Core.IntLiteral.as.Negate.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op: %Core.IntLiteral.as.Negate.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.bound: = bound_method %int_1, %Core.IntLiteral.as.Negate.impl.Op [concrete] @@ -1983,7 +1983,6 @@ fn F() { // 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.146: type = facet_type <@ImplicitAs, @ImplicitAs(%u32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.92a: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.46e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6 = struct_value () [symbolic] @@ -1991,7 +1990,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b07: 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.90e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b07 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.146 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.29e) [concrete] -// CHECK:STDOUT: %.aab: type = fn_type_with_self_type %ImplicitAs.Convert.type.92a, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a88: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%u32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.b47: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a88, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_-1.638, %Core.IntLiteral.as.ImplicitAs.impl.Convert.90e [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.90e, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_-1.638, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -2050,10 +2050,10 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1] -// CHECK:STDOUT: %impl.elem1: %.826 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.b42 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op] // CHECK:STDOUT: %bound_method.loc15_11.1: = bound_method %int_1, %impl.elem1 [concrete = constants.%Core.IntLiteral.as.Negate.impl.Op.bound] // CHECK:STDOUT: %Core.IntLiteral.as.Negate.impl.Op.call: init Core.IntLiteral = call %bound_method.loc15_11.1(%int_1) [concrete = constants.%int_-1.638] -// CHECK:STDOUT: %impl.elem0: %.aab = impl_witness_access constants.%ImplicitAs.impl_witness.29e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.90e] +// CHECK:STDOUT: %impl.elem0: %.b47 = impl_witness_access constants.%ImplicitAs.impl_witness.29e, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.90e] // CHECK:STDOUT: %bound_method.loc15_11.2: = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %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_11.3: = bound_method %Core.IntLiteral.as.Negate.impl.Op.call, %specific_fn [concrete = constants.%bound_method] @@ -2090,7 +2090,6 @@ fn F() { // 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.4a8: type = facet_type <@ImplicitAs, @ImplicitAs(%f64.d77)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.726: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f64.d77) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] @@ -2098,20 +2097,21 @@ fn F() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.4a8 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.cb2) [concrete] -// CHECK:STDOUT: %.b13: type = fn_type_with_self_type %ImplicitAs.Convert.type.726, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a33: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f64.d77, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.6c5: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a33, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.581: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.d20: %f64.d77 = float_value 1 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.2fe: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Float.as.Copy.impl.Op.240: %Float.as.Copy.impl.Op.type.2fe = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.1e3: = impl_witness imports.%Copy.impl_witness_table.119, @Float.as.Copy.impl(%int_64) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.07e: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%int_64) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.f05: %Float.as.Copy.impl.Op.type.07e = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %f64.d77, (%Copy.impl_witness.1e3) [concrete] -// CHECK:STDOUT: %.c41: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.fb6: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.59b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.fb6, %Copy.facet [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.bound: = bound_method %float.d20, %Float.as.Copy.impl.Op.f05 [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.specific_fn: = specific_function %Float.as.Copy.impl.Op.f05, @Float.as.Copy.impl.Op(%int_64) [concrete] // CHECK:STDOUT: %bound_method.9b6: = bound_method %float.d20, %Float.as.Copy.impl.Op.specific_fn [concrete] @@ -2184,7 +2184,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] -// CHECK:STDOUT: %impl.elem0.loc7_24.1: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] +// CHECK:STDOUT: %impl.elem0.loc7_24.1: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] // CHECK:STDOUT: %bound_method.loc7_24.1: = bound_method %float, %impl.elem0.loc7_24.1 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc7_24.1: = specific_function %impl.elem0.loc7_24.1, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_24.2: = bound_method %float, %specific_fn.loc7_24.1 [concrete = constants.%bound_method.581] @@ -2192,7 +2192,7 @@ fn F() { // CHECK:STDOUT: %.loc7_24.1: %f64.d77 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.d20] // CHECK:STDOUT: %.loc7_24.2: %f64.d77 = converted %float, %.loc7_24.1 [concrete = constants.%float.d20] // CHECK:STDOUT: %.loc7_24.3: ref %f64.d77 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc7_24.2: %.c41 = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05] +// CHECK:STDOUT: %impl.elem0.loc7_24.2: %.59b = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05] // CHECK:STDOUT: %bound_method.loc7_24.3: = bound_method %.loc7_24.2, %impl.elem0.loc7_24.2 [concrete = constants.%Float.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc7_24.2: = specific_function %impl.elem0.loc7_24.2, @Float.as.Copy.impl.Op(constants.%int_64) [concrete = constants.%Float.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_24.4: = bound_method %.loc7_24.2, %specific_fn.loc7_24.2 [concrete = constants.%bound_method.9b6] @@ -2244,7 +2244,6 @@ fn F() { // 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.4a8: type = facet_type <@ImplicitAs, @ImplicitAs(%f64.d77)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.726: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f64.d77) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] @@ -2252,19 +2251,20 @@ fn F() { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.4a8 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.cb2) [concrete] -// CHECK:STDOUT: %.b13: type = fn_type_with_self_type %ImplicitAs.Convert.type.726, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a33: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f64.d77, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.6c5: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a33, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.2fe: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Float.as.Copy.impl.Op.240: %Float.as.Copy.impl.Op.type.2fe = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.1e3: = impl_witness imports.%Copy.impl_witness_table.119, @Float.as.Copy.impl(%int_64) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.07e: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%int_64) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.f05: %Float.as.Copy.impl.Op.type.07e = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %f64.d77, (%Copy.impl_witness.1e3) [concrete] -// CHECK:STDOUT: %.c41: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.fb6: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.59b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.fb6, %Copy.facet [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.specific_fn: = specific_function %Float.as.Copy.impl.Op.f05, @Float.as.Copy.impl.Op(%int_64) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -2332,7 +2332,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 18e307 [concrete = constants.%float] -// CHECK:STDOUT: %impl.elem0.loc15_11.1: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] +// CHECK:STDOUT: %impl.elem0.loc15_11.1: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] // CHECK:STDOUT: %bound_method.loc15_11.1: = bound_method %float, %impl.elem0.loc15_11.1 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc15_11.1: = specific_function %impl.elem0.loc15_11.1, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_11.2: = bound_method %float, %specific_fn.loc15_11.1 [concrete = constants.%bound_method] @@ -2340,7 +2340,7 @@ fn F() { // CHECK:STDOUT: %.loc15_11.1: %f64.d77 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = ] // CHECK:STDOUT: %.loc15_11.2: %f64.d77 = converted %float, %.loc15_11.1 [concrete = ] // CHECK:STDOUT: %.loc15_11.3: ref %f64.d77 = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc15_11.2: %.c41 = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05] +// CHECK:STDOUT: %impl.elem0.loc15_11.2: %.59b = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05] // CHECK:STDOUT: %bound_method.loc15_11.3: = bound_method %.loc15_11.2, %impl.elem0.loc15_11.2 [concrete = ] // CHECK:STDOUT: %specific_fn.loc15_11.2: = specific_function %impl.elem0.loc15_11.2, @Float.as.Copy.impl.Op(constants.%int_64) [concrete = constants.%Float.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_11.4: = bound_method %.loc15_11.2, %specific_fn.loc15_11.2 [concrete = ] @@ -3450,7 +3450,6 @@ fn F() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -3458,7 +3457,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete] -// CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2c0: type = fn_type @As.WithSelf.Convert, @As(%i16, %As.facet) [concrete] +// CHECK:STDOUT: %.70c: type = fn_type_with_self_type %As.WithSelf.Convert.type.2c0, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -3523,7 +3523,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] -// CHECK:STDOUT: %impl.elem0: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] +// CHECK:STDOUT: %impl.elem0: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] // CHECK:STDOUT: %bound_method.loc18_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -3553,7 +3553,6 @@ fn F() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -3561,7 +3560,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -3627,7 +3627,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc18_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -3659,7 +3659,6 @@ fn F() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.229: type = facet_type <@As, @As(%i64)> [concrete] -// CHECK:STDOUT: %As.Convert.type.d57: type = fn_type @As.Convert, @As(%i64) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -3667,7 +3666,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.cee: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a54: %Core.IntLiteral.as.As.impl.Convert.type.cee = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.229 = facet_value Core.IntLiteral, (%As.impl_witness.c71) [concrete] -// CHECK:STDOUT: %.aba: type = fn_type_with_self_type %As.Convert.type.d57, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.188: type = fn_type @As.WithSelf.Convert, @As(%i64, %As.facet) [concrete] +// CHECK:STDOUT: %.fc7: type = fn_type_with_self_type %As.WithSelf.Convert.type.188, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a54 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a54, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -3712,7 +3712,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64] -// CHECK:STDOUT: %impl.elem0: %.aba = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54] +// CHECK:STDOUT: %impl.elem0: %.fc7 = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54] // CHECK:STDOUT: %bound_method.loc15_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -3737,7 +3737,6 @@ fn F() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.229: type = facet_type <@As, @As(%i64)> [concrete] -// CHECK:STDOUT: %As.Convert.type.d57: type = fn_type @As.Convert, @As(%i64) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -3745,7 +3744,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.cee: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a54: %Core.IntLiteral.as.As.impl.Convert.type.cee = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.229 = facet_value Core.IntLiteral, (%As.impl_witness.c71) [concrete] -// CHECK:STDOUT: %.aba: type = fn_type_with_self_type %As.Convert.type.d57, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.188: type = fn_type @As.WithSelf.Convert, @As(%i64, %As.facet) [concrete] +// CHECK:STDOUT: %.fc7: type = fn_type_with_self_type %As.WithSelf.Convert.type.188, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a54 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a54, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -3790,7 +3790,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64] -// CHECK:STDOUT: %impl.elem0: %.aba = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54] +// CHECK:STDOUT: %impl.elem0: %.fc7 = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54] // CHECK:STDOUT: %bound_method.loc19_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -3815,7 +3815,6 @@ fn F() { // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -3823,7 +3822,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -3868,7 +3868,7 @@ fn F() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc19_13.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_13.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method] @@ -3945,6 +3945,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -3975,6 +3976,10 @@ fn F() { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @EchoValue(constants.%ValueT, constants.%value) { // CHECK:STDOUT: %ValueT.loc10_14.1 => constants.%ValueT // CHECK:STDOUT: %ValueT.binding.as_type => constants.%ValueT.binding.as_type diff --git a/toolchain/check/testdata/interop/cpp/function/pointer.carbon b/toolchain/check/testdata/interop/cpp/function/pointer.carbon index 6703b004546c..7a6ff9bc9345 100644 --- a/toolchain/check/testdata/interop/cpp/function/pointer.carbon +++ b/toolchain/check/testdata/interop/cpp/function/pointer.carbon @@ -562,7 +562,6 @@ fn F() { // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] // CHECK:STDOUT: %pattern_type.259: type = pattern_type %ptr.5c7 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -570,7 +569,8 @@ fn F() { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.8cf: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%S) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.85d: %ptr.as.Copy.impl.Op.type.8cf = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.5c7, (%Copy.impl_witness.26a) [concrete] -// CHECK:STDOUT: %.0a1: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.c46: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.1c4: type = fn_type_with_self_type %Copy.WithSelf.Op.type.c46, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.85d, @ptr.as.Copy.impl.Op(%S) [concrete] // CHECK:STDOUT: %foo.cpp_overload_set.type: type = cpp_overload_set_type @foo.cpp_overload_set [concrete] // CHECK:STDOUT: %foo.cpp_overload_set.value: %foo.cpp_overload_set.type = cpp_overload_set_value @foo.cpp_overload_set [concrete] @@ -623,7 +623,7 @@ fn F() { // CHECK:STDOUT: %p.var: ref %ptr.5c7 = var %p.var_patt // CHECK:STDOUT: %s.ref: ref %S = name_ref s, %s // CHECK:STDOUT: %addr.loc9: %ptr.5c7 = addr_of %s.ref -// CHECK:STDOUT: %impl.elem0: %.0a1 = impl_witness_access constants.%Copy.impl_witness.26a, element0 [concrete = constants.%ptr.as.Copy.impl.Op.85d] +// CHECK:STDOUT: %impl.elem0: %.1c4 = impl_witness_access constants.%Copy.impl_witness.26a, element0 [concrete = constants.%ptr.as.Copy.impl.Op.85d] // CHECK:STDOUT: %bound_method.loc9_19.1: = bound_method %addr.loc9, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%S) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_19.2: = bound_method %addr.loc9, %specific_fn @@ -925,7 +925,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.1a0: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.065)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.398: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Optional.065) [concrete] // CHECK:STDOUT: %ImplicitAs.type.031604.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T.67d)> [symbolic] // CHECK:STDOUT: %U.738: %ImplicitAs.type.031604.2 = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %const.as.ImplicitAs.impl.Convert.type.4fd: type = fn_type @const.as.ImplicitAs.impl.Convert, @const.as.ImplicitAs.impl(%T.67d, %U.738) [symbolic] @@ -945,7 +944,8 @@ fn F() { // CHECK:STDOUT: %const.as.ImplicitAs.impl.Convert.type.ddd: type = fn_type @const.as.ImplicitAs.impl.Convert, @const.as.ImplicitAs.impl(%Optional.065, %ImplicitAs.facet.77f) [concrete] // CHECK:STDOUT: %const.as.ImplicitAs.impl.Convert.af2: %const.as.ImplicitAs.impl.Convert.type.ddd = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.1bd: %ImplicitAs.type.1a0 = facet_value %const.b9a, (%ImplicitAs.impl_witness.8b7) [concrete] -// CHECK:STDOUT: %.8b3: type = fn_type_with_self_type %ImplicitAs.Convert.type.398, %ImplicitAs.facet.1bd [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.05e: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Optional.065, %ImplicitAs.facet.1bd) [concrete] +// CHECK:STDOUT: %.b4e: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.05e, %ImplicitAs.facet.1bd [concrete] // CHECK:STDOUT: %const.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %const.as.ImplicitAs.impl.Convert.af2, @const.as.ImplicitAs.impl.Convert(%Optional.065, %ImplicitAs.facet.77f) [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc11 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.2: %DestroyOp.type.3e79c2.2 = struct_value () [concrete] @@ -1006,7 +1006,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %p.ref: ref %const.b9a = name_ref p, %p -// CHECK:STDOUT: %impl.elem0: %.8b3 = impl_witness_access constants.%ImplicitAs.impl_witness.8b7, element0 [concrete = constants.%const.as.ImplicitAs.impl.Convert.af2] +// CHECK:STDOUT: %impl.elem0: %.b4e = impl_witness_access constants.%ImplicitAs.impl_witness.8b7, element0 [concrete = constants.%const.as.ImplicitAs.impl.Convert.af2] // CHECK:STDOUT: %bound_method.loc11_11.1: = bound_method %p.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @const.as.ImplicitAs.impl.Convert(constants.%Optional.065, constants.%ImplicitAs.facet.77f) [concrete = constants.%const.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_11.2: = bound_method %p.ref, %specific_fn @@ -1057,7 +1057,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.1a0: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.065)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.398: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Optional.065) [concrete] // CHECK:STDOUT: %OptionalAs.type.ea5: type = facet_type <@OptionalAs, @OptionalAs(%T.542)> [symbolic] // CHECK:STDOUT: %U.2d2: %OptionalAs.type.ea5 = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.4c5: type = fn_type @U.binding.as_type.as.ImplicitAs.impl.Convert.2, @U.binding.as_type.as.ImplicitAs.impl.71c(%T.542, %U.2d2) [symbolic] @@ -1071,7 +1070,8 @@ fn F() { // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.ce6: type = fn_type @U.binding.as_type.as.ImplicitAs.impl.Convert.2, @U.binding.as_type.as.ImplicitAs.impl.71c(%OptionalStorage.facet.872, %OptionalAs.facet) [concrete] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.bd4: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.ce6 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.77f: %ImplicitAs.type.1a0 = facet_value %ptr.5c7, (%ImplicitAs.impl_witness.3a6) [concrete] -// CHECK:STDOUT: %.4f7: type = fn_type_with_self_type %ImplicitAs.Convert.type.398, %ImplicitAs.facet.77f [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.0a72: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Optional.065, %ImplicitAs.facet.77f) [concrete] +// CHECK:STDOUT: %.9b3: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.0a72, %ImplicitAs.facet.77f [concrete] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %U.binding.as_type.as.ImplicitAs.impl.Convert.bd4, @U.binding.as_type.as.ImplicitAs.impl.Convert.2(%OptionalStorage.facet.872, %OptionalAs.facet) [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc11 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.2: %DestroyOp.type.3e79c2.2 = struct_value () [concrete] @@ -1127,7 +1127,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %p.ref: ref %ptr.5c7 = name_ref p, %p -// CHECK:STDOUT: %impl.elem0: %.4f7 = impl_witness_access constants.%ImplicitAs.impl_witness.3a6, element0 [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.bd4] +// CHECK:STDOUT: %impl.elem0: %.9b3 = impl_witness_access constants.%ImplicitAs.impl_witness.3a6, element0 [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.bd4] // CHECK:STDOUT: %bound_method.loc11_11.1: = bound_method %p.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @U.binding.as_type.as.ImplicitAs.impl.Convert.2(constants.%OptionalStorage.facet.872, constants.%OptionalAs.facet) [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_11.2: = bound_method %p.ref, %specific_fn @@ -1309,7 +1309,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.1a0: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.065)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.398: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Optional.065) [concrete] // CHECK:STDOUT: %OptionalAs.type.ea5: type = facet_type <@OptionalAs, @OptionalAs(%T.542)> [symbolic] // CHECK:STDOUT: %U.2d2: %OptionalAs.type.ea5 = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.4c5: type = fn_type @U.binding.as_type.as.ImplicitAs.impl.Convert.2, @U.binding.as_type.as.ImplicitAs.impl.71c(%T.542, %U.2d2) [symbolic] @@ -1323,7 +1322,8 @@ fn F() { // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.ce6: type = fn_type @U.binding.as_type.as.ImplicitAs.impl.Convert.2, @U.binding.as_type.as.ImplicitAs.impl.71c(%OptionalStorage.facet.872, %OptionalAs.facet) [concrete] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.bd4: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.ce6 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.77f: %ImplicitAs.type.1a0 = facet_value %ptr.5c7, (%ImplicitAs.impl_witness.3a6) [concrete] -// CHECK:STDOUT: %.4f7: type = fn_type_with_self_type %ImplicitAs.Convert.type.398, %ImplicitAs.facet.77f [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.0a72: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Optional.065, %ImplicitAs.facet.77f) [concrete] +// CHECK:STDOUT: %.9b3: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.0a72, %ImplicitAs.facet.77f [concrete] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %U.binding.as_type.as.ImplicitAs.impl.Convert.bd4, @U.binding.as_type.as.ImplicitAs.impl.Convert.2(%OptionalStorage.facet.872, %OptionalAs.facet) [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc9 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.2: %DestroyOp.type.3e79c2.2 = struct_value () [concrete] @@ -1382,7 +1382,7 @@ fn F() { // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %s.ref: ref %S = name_ref s, %s // CHECK:STDOUT: %addr: %ptr.5c7 = addr_of %s.ref -// CHECK:STDOUT: %impl.elem0: %.4f7 = impl_witness_access constants.%ImplicitAs.impl_witness.3a6, element0 [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.bd4] +// CHECK:STDOUT: %impl.elem0: %.9b3 = impl_witness_access constants.%ImplicitAs.impl_witness.3a6, element0 [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.bd4] // CHECK:STDOUT: %bound_method.loc9_11.1: = bound_method %addr, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @U.binding.as_type.as.ImplicitAs.impl.Convert.2(constants.%OptionalStorage.facet.872, constants.%OptionalAs.facet) [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_11.2: = bound_method %addr, %specific_fn @@ -1808,7 +1808,6 @@ fn F() { // 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.1a0: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.065)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.398: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Optional.065) [concrete] // CHECK:STDOUT: %OptionalAs.type.ea5: type = facet_type <@OptionalAs, @OptionalAs(%T.542)> [symbolic] // CHECK:STDOUT: %U.2d2: %OptionalAs.type.ea5 = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.4c5: type = fn_type @U.binding.as_type.as.ImplicitAs.impl.Convert.2, @U.binding.as_type.as.ImplicitAs.impl.71c(%T.542, %U.2d2) [symbolic] @@ -1822,7 +1821,8 @@ fn F() { // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.ce6: type = fn_type @U.binding.as_type.as.ImplicitAs.impl.Convert.2, @U.binding.as_type.as.ImplicitAs.impl.71c(%OptionalStorage.facet.872, %OptionalAs.facet) [concrete] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.bd4: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.ce6 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.77f: %ImplicitAs.type.1a0 = facet_value %ptr.5c7, (%ImplicitAs.impl_witness.3a6) [concrete] -// CHECK:STDOUT: %.4f7: type = fn_type_with_self_type %ImplicitAs.Convert.type.398, %ImplicitAs.facet.77f [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.0a72: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Optional.065, %ImplicitAs.facet.77f) [concrete] +// CHECK:STDOUT: %.9b3: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.0a72, %ImplicitAs.facet.77f [concrete] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %U.binding.as_type.as.ImplicitAs.impl.Convert.bd4, @U.binding.as_type.as.ImplicitAs.impl.Convert.2(%OptionalStorage.facet.872, %OptionalAs.facet) [concrete] // CHECK:STDOUT: %Indirect.cpp_overload_set.type: type = cpp_overload_set_type @Indirect.cpp_overload_set [concrete] // CHECK:STDOUT: %Indirect.cpp_overload_set.value: %Indirect.cpp_overload_set.type = cpp_overload_set_value @Indirect.cpp_overload_set [concrete] @@ -1908,7 +1908,7 @@ fn F() { // CHECK:STDOUT: %Direct.ref: %Direct.cpp_overload_set.type = name_ref Direct, imports.%Direct.cpp_overload_set.value [concrete = constants.%Direct.cpp_overload_set.value] // CHECK:STDOUT: %s.ref: ref %S = name_ref s, %s // CHECK:STDOUT: %addr.loc11: %ptr.5c7 = addr_of %s.ref -// CHECK:STDOUT: %impl.elem0: %.4f7 = impl_witness_access constants.%ImplicitAs.impl_witness.3a6, element0 [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.bd4] +// CHECK:STDOUT: %impl.elem0: %.9b3 = impl_witness_access constants.%ImplicitAs.impl_witness.3a6, element0 [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.bd4] // CHECK:STDOUT: %bound_method.loc11_14.1: = bound_method %addr.loc11, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @U.binding.as_type.as.ImplicitAs.impl.Convert.2(constants.%OptionalStorage.facet.872, constants.%OptionalAs.facet) [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_14.2: = bound_method %addr.loc11, %specific_fn diff --git a/toolchain/check/testdata/interop/cpp/function/qualified_param.carbon b/toolchain/check/testdata/interop/cpp/function/qualified_param.carbon index 01cb10995707..c4c9488a42b5 100644 --- a/toolchain/check/testdata/interop/cpp/function/qualified_param.carbon +++ b/toolchain/check/testdata/interop/cpp/function/qualified_param.carbon @@ -45,7 +45,6 @@ fn F() { // CHECK:STDOUT: %TakesConstInt.type: type = fn_type @TakesConstInt [concrete] // CHECK:STDOUT: %TakesConstInt: %TakesConstInt.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -53,7 +52,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -103,7 +103,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc8: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %TakesConstInt.ref: %TakesConstInt.cpp_overload_set.type = name_ref TakesConstInt, imports.%TakesConstInt.cpp_overload_set.value [concrete = constants.%TakesConstInt.cpp_overload_set.value] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_21.1: = bound_method %int_42, %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.loc8_21.2: = bound_method %int_42, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interop/cpp/function/variadic.carbon b/toolchain/check/testdata/interop/cpp/function/variadic.carbon index cd149fadf778..9a8f603d0a0a 100644 --- a/toolchain/check/testdata/interop/cpp/function/variadic.carbon +++ b/toolchain/check/testdata/interop/cpp/function/variadic.carbon @@ -51,7 +51,6 @@ fn Call3() { // CHECK:STDOUT: %foo.type.a5abd1.1: type = fn_type @foo.1 [concrete] // CHECK:STDOUT: %foo.23ea43.1: %foo.type.a5abd1.1 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -59,7 +58,8 @@ fn Call3() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -108,7 +108,7 @@ fn Call3() { // CHECK:STDOUT: %Cpp.ref: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_11.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // 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.loc8_11.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.38b] @@ -125,14 +125,14 @@ fn Call3() { // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc14_11: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc14_11: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc14_11.1: = bound_method %int_1, %impl.elem0.loc14_11 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc14_11: = specific_function %impl.elem0.loc14_11, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_11.2: = bound_method %int_1, %specific_fn.loc14_11 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14_11: init %i32 = call %bound_method.loc14_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_11.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14_11 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc14_11.2: %i32 = converted %int_1, %.loc14_11.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc14_14: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc14_14: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc14_14.1: = bound_method %int_2, %impl.elem0.loc14_14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc14_14: = specific_function %impl.elem0.loc14_14, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_14.2: = bound_method %int_2, %specific_fn.loc14_14 [concrete = constants.%bound_method.646] @@ -150,21 +150,21 @@ fn Call3() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc20_11: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc20_11: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc20_11.1: = bound_method %int_1, %impl.elem0.loc20_11 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc20_11: = specific_function %impl.elem0.loc20_11, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_11.2: = bound_method %int_1, %specific_fn.loc20_11 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20_11: init %i32 = call %bound_method.loc20_11.2(%int_1) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc20_11.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20_11 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc20_11.2: %i32 = converted %int_1, %.loc20_11.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc20_14: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc20_14: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc20_14.1: = bound_method %int_2, %impl.elem0.loc20_14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc20_14: = specific_function %impl.elem0.loc20_14, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_14.2: = bound_method %int_2, %specific_fn.loc20_14 [concrete = constants.%bound_method.646] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20_14: init %i32 = call %bound_method.loc20_14.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc20_14.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc20_14 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc20_14.2: %i32 = converted %int_2, %.loc20_14.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc20_17: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc20_17: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc20_17.1: = bound_method %int_3, %impl.elem0.loc20_17 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc20_17: = specific_function %impl.elem0.loc20_17, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_17.2: = bound_method %int_3, %specific_fn.loc20_17 [concrete = constants.%bound_method.fa7] diff --git a/toolchain/check/testdata/interop/cpp/function/void_pointer.carbon b/toolchain/check/testdata/interop/cpp/function/void_pointer.carbon index 2e4d3bf25404..5d39c082fa60 100644 --- a/toolchain/check/testdata/interop/cpp/function/void_pointer.carbon +++ b/toolchain/check/testdata/interop/cpp/function/void_pointer.carbon @@ -216,7 +216,6 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.3c0: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.804)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.520: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Optional.804) [concrete] // CHECK:STDOUT: %OptionalAs.type.ea5: type = facet_type <@OptionalAs, @OptionalAs(%T.542)> [symbolic] // CHECK:STDOUT: %U.2d2: %OptionalAs.type.ea5 = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.4c5: type = fn_type @U.binding.as_type.as.ImplicitAs.impl.Convert.2, @U.binding.as_type.as.ImplicitAs.impl.71c(%T.542, %U.2d2) [symbolic] @@ -230,7 +229,8 @@ fn F() { // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.4b4: type = fn_type @U.binding.as_type.as.ImplicitAs.impl.Convert.2, @U.binding.as_type.as.ImplicitAs.impl.71c(%OptionalStorage.facet.92c, %OptionalAs.facet) [concrete] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.d74: %U.binding.as_type.as.ImplicitAs.impl.Convert.type.4b4 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.d14: %ImplicitAs.type.3c0 = facet_value %ptr.874, (%ImplicitAs.impl_witness.a7d) [concrete] -// CHECK:STDOUT: %.235: type = fn_type_with_self_type %ImplicitAs.Convert.type.520, %ImplicitAs.facet.d14 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.baa: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Optional.804, %ImplicitAs.facet.d14) [concrete] +// CHECK:STDOUT: %.73c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.baa, %ImplicitAs.facet.d14 [concrete] // CHECK:STDOUT: %U.binding.as_type.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %U.binding.as_type.as.ImplicitAs.impl.Convert.d74, @U.binding.as_type.as.ImplicitAs.impl.Convert.2(%OptionalStorage.facet.92c, %OptionalAs.facet) [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc10 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.2: %DestroyOp.type.3e79c2.2 = struct_value () [concrete] @@ -271,7 +271,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value] // CHECK:STDOUT: %input.ref: %ptr.874 = name_ref input, %input -// CHECK:STDOUT: %impl.elem0: %.235 = impl_witness_access constants.%ImplicitAs.impl_witness.a7d, element0 [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.d74] +// CHECK:STDOUT: %impl.elem0: %.73c = impl_witness_access constants.%ImplicitAs.impl_witness.a7d, element0 [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.d74] // CHECK:STDOUT: %bound_method.loc10_11.1: = bound_method %input.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @U.binding.as_type.as.ImplicitAs.impl.Convert.2(constants.%OptionalStorage.facet.92c, constants.%OptionalAs.facet) [concrete = constants.%U.binding.as_type.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_11.2: = bound_method %input.ref, %specific_fn diff --git a/toolchain/check/testdata/interop/cpp/impls/copy.carbon b/toolchain/check/testdata/interop/cpp/impls/copy.carbon index 50837e9f4612..27f0598358a2 100644 --- a/toolchain/check/testdata/interop/cpp/impls/copy.carbon +++ b/toolchain/check/testdata/interop/cpp/impls/copy.carbon @@ -198,7 +198,6 @@ fn EqualWitnesses(p: Wrap(Cpp.Copyable)*) -> Wrap(Cpp.Copyable)* { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Copyable: type = class_type @Copyable [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copyable.Copyable.type: type = fn_type @Copyable.Copyable [concrete] // CHECK:STDOUT: %Copyable.Copyable: %Copyable.Copyable.type = struct_value () [concrete] // CHECK:STDOUT: %const.622: type = const_type %Copyable [concrete] @@ -210,7 +209,8 @@ fn EqualWitnesses(p: Wrap(Cpp.Copyable)*) -> Wrap(Cpp.Copyable)* { // CHECK:STDOUT: %Copyable.Op: %Copyable.Op.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.847: = custom_witness (%Copyable.Op), @Copy [concrete] // CHECK:STDOUT: %Copy.facet.c39: %Copy.type = facet_value %Copyable, (%custom_witness.847) [concrete] -// CHECK:STDOUT: %.6e0: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c39 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.4d1: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.c39) [concrete] +// CHECK:STDOUT: %.75c: type = fn_type_with_self_type %Copy.WithSelf.Op.type.4d1, %Copy.facet.c39 [concrete] // CHECK:STDOUT: %ExplicitCopy: type = class_type @ExplicitCopy [concrete] // CHECK:STDOUT: %ExplicitCopy.ExplicitCopy.type: type = fn_type @ExplicitCopy.ExplicitCopy [concrete] // CHECK:STDOUT: %ExplicitCopy.ExplicitCopy: %ExplicitCopy.ExplicitCopy.type = struct_value () [concrete] @@ -223,7 +223,8 @@ fn EqualWitnesses(p: Wrap(Cpp.Copyable)*) -> Wrap(Cpp.Copyable)* { // CHECK:STDOUT: %ExplicitCopy.Op: %ExplicitCopy.Op.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.e04: = custom_witness (%ExplicitCopy.Op), @Copy [concrete] // CHECK:STDOUT: %Copy.facet.b38: %Copy.type = facet_value %ExplicitCopy, (%custom_witness.e04) [concrete] -// CHECK:STDOUT: %.680: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.b38 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.00a: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.b38) [concrete] +// CHECK:STDOUT: %.dc2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.00a, %Copy.facet.b38 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -253,7 +254,7 @@ fn EqualWitnesses(p: Wrap(Cpp.Copyable)*) -> Wrap(Cpp.Copyable)* { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %Copyable = name_ref c, %c // CHECK:STDOUT: -// CHECK:STDOUT: %impl.elem0: %.6e0 = impl_witness_access constants.%custom_witness.847, element0 [concrete = constants.%Copyable.Op] +// CHECK:STDOUT: %impl.elem0: %.75c = impl_witness_access constants.%custom_witness.847, element0 [concrete = constants.%Copyable.Op] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %.loc8_10.1: ref %Copyable = temporary_storage // CHECK:STDOUT: %Op.ref: %Copyable.Copyable.type = name_ref Op, imports.%Copyable.Copyable.decl [concrete = constants.%Copyable.Copyable] @@ -272,7 +273,7 @@ fn EqualWitnesses(p: Wrap(Cpp.Copyable)*) -> Wrap(Cpp.Copyable)* { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %ExplicitCopy = name_ref c, %c // CHECK:STDOUT: -// CHECK:STDOUT: %impl.elem0: %.680 = impl_witness_access constants.%custom_witness.e04, element0 [concrete = constants.%ExplicitCopy.Op] +// CHECK:STDOUT: %impl.elem0: %.dc2 = impl_witness_access constants.%custom_witness.e04, element0 [concrete = constants.%ExplicitCopy.Op] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %.loc14_10.1: ref %ExplicitCopy = temporary_storage // CHECK:STDOUT: %Op.ref: %ExplicitCopy.ExplicitCopy.type = name_ref Op, imports.%ExplicitCopy.ExplicitCopy.decl [concrete = constants.%ExplicitCopy.ExplicitCopy] @@ -293,7 +294,6 @@ fn EqualWitnesses(p: Wrap(Cpp.Copyable)*) -> Wrap(Cpp.Copyable)* { // CHECK:STDOUT: %Copy.type.fb2: type = facet_type <@Copy.1> [concrete] // CHECK:STDOUT: %Copy.type.4b4: type = fn_type @Copy.loc6 [concrete] // CHECK:STDOUT: %Copy: %Copy.type.4b4 = struct_value () [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -309,7 +309,8 @@ fn EqualWitnesses(p: Wrap(Cpp.Copyable)*) -> Wrap(Cpp.Copyable)* { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.45d: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%Wrap.99f) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.96a: %ptr.as.Copy.impl.Op.type.45d = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.9be: %Copy.type.fb2 = facet_value %ptr.fba, (%Copy.impl_witness.146) [concrete] -// CHECK:STDOUT: %.de0: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.9be [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.5f6: type = fn_type @Copy.WithSelf.Op, @Copy.1(%Copy.facet.9be) [concrete] +// CHECK:STDOUT: %.86b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.5f6, %Copy.facet.9be [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.96a, @ptr.as.Copy.impl.Op(%Wrap.99f) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -336,7 +337,7 @@ fn EqualWitnesses(p: Wrap(Cpp.Copyable)*) -> Wrap(Cpp.Copyable)* { // CHECK:STDOUT: fn @EqualWitnesses(%p.param: %ptr.fba) -> out %return.param: %ptr.fba { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.fba = name_ref p, %p -// CHECK:STDOUT: %impl.elem0: %.de0 = impl_witness_access constants.%Copy.impl_witness.146, element0 [concrete = constants.%ptr.as.Copy.impl.Op.96a] +// CHECK:STDOUT: %impl.elem0: %.86b = impl_witness_access constants.%Copy.impl_witness.146, element0 [concrete = constants.%ptr.as.Copy.impl.Op.96a] // CHECK:STDOUT: %bound_method.loc20_10.1: = bound_method %p.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%Wrap.99f) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc20_10.2: = bound_method %p.ref, %specific_fn diff --git a/toolchain/check/testdata/interop/cpp/impls/implicit_as.carbon b/toolchain/check/testdata/interop/cpp/impls/implicit_as.carbon index de0375625b9a..90b79289a490 100644 --- a/toolchain/check/testdata/interop/cpp/impls/implicit_as.carbon +++ b/toolchain/check/testdata/interop/cpp/impls/implicit_as.carbon @@ -1043,7 +1043,6 @@ fn InitFromStruct() { // CHECK:STDOUT: %Two__carbon_thunk.type: type = fn_type @Two__carbon_thunk [concrete] // CHECK:STDOUT: %Two__carbon_thunk: %Two__carbon_thunk.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1051,7 +1050,8 @@ fn InitFromStruct() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1118,14 +1118,14 @@ fn InitFromStruct() { // CHECK:STDOUT: %Two.ref: type = name_ref Two, imports.%Two.decl [concrete = constants.%Two] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc8_25.2: ref %Two = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_21: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_21: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_21.1: = bound_method %int_1.loc8, %impl.elem0.loc8_21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc8_21: = specific_function %impl.elem0.loc8_21, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_21.2: = bound_method %int_1.loc8, %specific_fn.loc8_21 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_21: init %i32 = call %bound_method.loc8_21.2(%int_1.loc8) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_21.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_21 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc8_21.2: %i32 = converted %int_1.loc8, %.loc8_21.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc8_24: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_24: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_24.1: = bound_method %int_2.loc8, %impl.elem0.loc8_24 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc8_24: = specific_function %impl.elem0.loc8_24, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_24.2: = bound_method %int_2.loc8, %specific_fn.loc8_24 [concrete = constants.%bound_method.646] @@ -1150,14 +1150,14 @@ fn InitFromStruct() { // CHECK:STDOUT: %ThreeWithDefault.ref.loc10: type = name_ref ThreeWithDefault, imports.%ThreeWithDefault.decl [concrete = constants.%ThreeWithDefault] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc10_38.2: ref %ThreeWithDefault = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc10_34: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_34.1: = bound_method %int_1.loc10, %impl.elem0.loc10_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc10_34: = specific_function %impl.elem0.loc10_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_34.2: = bound_method %int_1.loc10, %specific_fn.loc10_34 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_34: init %i32 = call %bound_method.loc10_34.2(%int_1.loc10) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_34 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_34.2: %i32 = converted %int_1.loc10, %.loc10_34.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc10_37: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_37: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_37.1: = bound_method %int_2.loc10, %impl.elem0.loc10_37 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc10_37: = specific_function %impl.elem0.loc10_37, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_37.2: = bound_method %int_2.loc10, %specific_fn.loc10_37 [concrete = constants.%bound_method.646] @@ -1183,21 +1183,21 @@ fn InitFromStruct() { // CHECK:STDOUT: %ThreeWithDefault.ref.loc12: type = name_ref ThreeWithDefault, imports.%ThreeWithDefault.decl [concrete = constants.%ThreeWithDefault] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc12_41.2: ref %ThreeWithDefault = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc12_34: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc12_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_34.1: = bound_method %int_1.loc12, %impl.elem0.loc12_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc12_34: = specific_function %impl.elem0.loc12_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_34.2: = bound_method %int_1.loc12, %specific_fn.loc12_34 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_34: init %i32 = call %bound_method.loc12_34.2(%int_1.loc12) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc12_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_34 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc12_34.2: %i32 = converted %int_1.loc12, %.loc12_34.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc12_37: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc12_37: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_37.1: = bound_method %int_2.loc12, %impl.elem0.loc12_37 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc12_37: = specific_function %impl.elem0.loc12_37, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_37.2: = bound_method %int_2.loc12, %specific_fn.loc12_37 [concrete = constants.%bound_method.646] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_37: init %i32 = call %bound_method.loc12_37.2(%int_2.loc12) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc12_37.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12_37 [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc12_37.2: %i32 = converted %int_2.loc12, %.loc12_37.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc12_40: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc12_40: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_40.1: = bound_method %int_3, %impl.elem0.loc12_40 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc12_40: = specific_function %impl.elem0.loc12_40, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_40.2: = bound_method %int_3, %specific_fn.loc12_40 [concrete = constants.%bound_method.fa7] @@ -1360,7 +1360,6 @@ fn InitFromStruct() { // CHECK:STDOUT: %NonAggregate__carbon_thunk.type.8d64dd.2: type = fn_type @NonAggregate__carbon_thunk.2 [concrete] // CHECK:STDOUT: %NonAggregate__carbon_thunk.0020a5.2: %NonAggregate__carbon_thunk.type.8d64dd.2 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -1368,7 +1367,8 @@ fn InitFromStruct() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1438,7 +1438,7 @@ fn InitFromStruct() { // CHECK:STDOUT: %NonAggregate.ref.loc9: type = name_ref NonAggregate, imports.%NonAggregate.decl [concrete = constants.%NonAggregate] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc9_32.2: ref %NonAggregate = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc9: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_30.1: = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc9: = 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_30.2: = bound_method %int_1.loc9, %specific_fn.loc9 [concrete = constants.%bound_method.38b] @@ -1463,14 +1463,14 @@ fn InitFromStruct() { // CHECK:STDOUT: %NonAggregate.ref.loc10: type = name_ref NonAggregate, imports.%NonAggregate.decl [concrete = constants.%NonAggregate] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc10_34.2: ref %NonAggregate = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc10_30: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_30: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_30.1: = bound_method %int_1.loc10, %impl.elem0.loc10_30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc10_30: = specific_function %impl.elem0.loc10_30, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_30.2: = bound_method %int_1.loc10, %specific_fn.loc10_30 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_30: init %i32 = call %bound_method.loc10_30.2(%int_1.loc10) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_30.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10_30 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc10_30.2: %i32 = converted %int_1.loc10, %.loc10_30.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc10_33: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_33: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_33.1: = bound_method %int_2, %impl.elem0.loc10_33 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc10_33: = specific_function %impl.elem0.loc10_33, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_33.2: = bound_method %int_2, %specific_fn.loc10_33 [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/interop/cpp/import.carbon b/toolchain/check/testdata/interop/cpp/import.carbon index b4d98054ab22..6268d0509635 100644 --- a/toolchain/check/testdata/interop/cpp/import.carbon +++ b/toolchain/check/testdata/interop/cpp/import.carbon @@ -182,7 +182,6 @@ fn F() { // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(%int_16) [concrete] // CHECK:STDOUT: %As.type.359: type = facet_type <@As, @As(%i16)> [concrete] -// CHECK:STDOUT: %As.Convert.type.be5: type = fn_type @As.Convert, @As(%i16) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -190,7 +189,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.c60: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_16) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a42: %Core.IntLiteral.as.As.impl.Convert.type.c60 = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.359 = facet_value Core.IntLiteral, (%As.impl_witness.b61) [concrete] -// CHECK:STDOUT: %.240: type = fn_type_with_self_type %As.Convert.type.be5, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.2c0: type = fn_type @As.WithSelf.Convert, @As(%i16, %As.facet) [concrete] +// CHECK:STDOUT: %.70c: type = fn_type_with_self_type %As.WithSelf.Convert.type.2c0, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.a42 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.a42, @Core.IntLiteral.as.As.impl.Convert(%int_16) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_8.b85, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -211,7 +211,7 @@ fn F() { // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16] -// CHECK:STDOUT: %impl.elem0: %.240 = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] +// CHECK:STDOUT: %impl.elem0: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42] // CHECK:STDOUT: %bound_method.loc16_14.1: = bound_method %int_8, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_14.2: = bound_method %int_8, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interop/cpp/macros.carbon b/toolchain/check/testdata/interop/cpp/macros.carbon index 2e30b4ca2ddf..2ea790fe36fa 100644 --- a/toolchain/check/testdata/interop/cpp/macros.carbon +++ b/toolchain/check/testdata/interop/cpp/macros.carbon @@ -970,7 +970,6 @@ fn F() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic] @@ -978,7 +977,8 @@ fn F() { // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.290: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete] -// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.290 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.290) [concrete] +// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet.290 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5d2, %Int.as.ImplicitAs.impl.Convert.dd4 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.04c: = bound_method %int_1.5d2, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -990,14 +990,14 @@ fn F() { // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete] -// CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.e4d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f32.97e, %ImplicitAs.facet.945) [concrete] +// CHECK:STDOUT: %.98d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.e4d, %ImplicitAs.facet.945 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete] // CHECK:STDOUT: %pattern_type.201: type = pattern_type %f32.97e [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -1037,7 +1037,7 @@ fn F() { // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674] // CHECK:STDOUT: %.loc10_35.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple] -// CHECK:STDOUT: %impl.elem0.loc10_35: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] +// CHECK:STDOUT: %impl.elem0.loc10_35: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55] // CHECK:STDOUT: %bound_method.loc10_35.1: = bound_method %float, %impl.elem0.loc10_35 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc10_35: = specific_function %impl.elem0.loc10_35, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_35.2: = bound_method %float, %specific_fn.loc10_35 [concrete = constants.%bound_method.1e4] @@ -1055,7 +1055,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc10: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: // CHECK:STDOUT: %n.ref.loc10: %i32 = name_ref n, imports.%int_1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc10_24: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %impl.elem0.loc10_24: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] // CHECK:STDOUT: %bound_method.loc10_24.1: = bound_method %n.ref.loc10, %impl.elem0.loc10_24 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc10_24: = specific_function %impl.elem0.loc10_24, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_24.2: = bound_method %n.ref.loc10, %specific_fn.loc10_24 [concrete = constants.%bound_method.04c] @@ -1750,14 +1750,14 @@ fn F() { // CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete] // CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.33d: type = facet_type <@ImplicitAs, @ImplicitAs(%Optional.1d0)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.6a4: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Optional.1d0) [concrete] // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.type.90e: type = fn_type @Cpp.nullptr_t.as.ImplicitAs.impl.Convert, @Cpp.nullptr_t.as.ImplicitAs.impl(%T.67d) [symbolic] // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.079: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.type.90e = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.24d: = impl_witness imports.%ImplicitAs.impl_witness_table.23f, @Cpp.nullptr_t.as.ImplicitAs.impl(%i32) [concrete] // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.type.c6e: type = fn_type @Cpp.nullptr_t.as.ImplicitAs.impl.Convert, @Cpp.nullptr_t.as.ImplicitAs.impl(%i32) [concrete] // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.0f5: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.type.c6e = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.33d = facet_value %Cpp.nullptr_t, (%ImplicitAs.impl_witness.24d) [concrete] -// CHECK:STDOUT: %.8b7: type = fn_type_with_self_type %ImplicitAs.Convert.type.6a4, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.93a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%Optional.1d0, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.5c6: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.93a, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.bound: = bound_method %uninit, %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.0f5 [concrete] // CHECK:STDOUT: %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.0f5, @Cpp.nullptr_t.as.ImplicitAs.impl.Convert(%i32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %uninit, %Cpp.nullptr_t.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -1801,7 +1801,7 @@ fn F() { // CHECK:STDOUT: %Cpp.ref.loc11_11: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: // CHECK:STDOUT: %MyNullPtr.ref: %Cpp.nullptr_t = name_ref MyNullPtr, %uninit [concrete = constants.%uninit] -// CHECK:STDOUT: %impl.elem0: %.8b7 = impl_witness_access constants.%ImplicitAs.impl_witness.24d, element0 [concrete = constants.%Cpp.nullptr_t.as.ImplicitAs.impl.Convert.0f5] +// CHECK:STDOUT: %impl.elem0: %.5c6 = impl_witness_access constants.%ImplicitAs.impl_witness.24d, element0 [concrete = constants.%Cpp.nullptr_t.as.ImplicitAs.impl.Convert.0f5] // CHECK:STDOUT: %bound_method.loc11_14.1: = bound_method %MyNullPtr.ref, %impl.elem0 [concrete = constants.%Cpp.nullptr_t.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Cpp.nullptr_t.as.ImplicitAs.impl.Convert(constants.%i32) [concrete = constants.%Cpp.nullptr_t.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_14.2: = bound_method %MyNullPtr.ref, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon b/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon index ecb1a513a5e7..b889fde6c522 100644 --- a/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon +++ b/toolchain/check/testdata/interop/cpp/stdlib/initializer_list.carbon @@ -74,7 +74,6 @@ fn F() { // CHECK:STDOUT: %initializer_list.initializer_list.643507.1: %initializer_list.initializer_list.type.9fcb7f.1 = struct_value () [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -82,7 +81,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -197,7 +197,7 @@ fn F() { // CHECK:STDOUT: %int_3.loc8_50: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %array_type.loc8: type = array_type %int_3.loc8_50, %i32.1 [concrete = constants.%array_type] // CHECK:STDOUT: %.loc8_50.2: ref %initializer_list = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc8_50.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_50.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_50.1: = bound_method %int_1.loc8_43, %impl.elem0.loc8_50.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc8_50.1: = specific_function %impl.elem0.loc8_50.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_50.2: = bound_method %int_1.loc8_43, %specific_fn.loc8_50.1 [concrete = constants.%bound_method.38b] @@ -207,7 +207,7 @@ fn F() { // CHECK:STDOUT: %int_0.loc8: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc8_50.5: ref %i32 = array_index %.loc8_50.4, %int_0.loc8 // CHECK:STDOUT: %.loc8_50.6: init %i32 to %.loc8_50.5 = in_place_init %.loc8_50.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc8_50.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_50.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_50.3: = bound_method %int_2.loc8_46, %impl.elem0.loc8_50.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc8_50.2: = specific_function %impl.elem0.loc8_50.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_50.4: = bound_method %int_2.loc8_46, %specific_fn.loc8_50.2 [concrete = constants.%bound_method.646] @@ -216,7 +216,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc8_50: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc8_50.8: ref %i32 = array_index %.loc8_50.4, %int_1.loc8_50 // CHECK:STDOUT: %.loc8_50.9: init %i32 to %.loc8_50.8 = in_place_init %.loc8_50.7 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc8_50.3: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_50.3: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_50.5: = bound_method %int_3.loc8_49, %impl.elem0.loc8_50.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc8_50.3: = specific_function %impl.elem0.loc8_50.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_50.6: = bound_method %int_3.loc8_49, %specific_fn.loc8_50.3 [concrete = constants.%bound_method.fa7] @@ -244,7 +244,7 @@ fn F() { // CHECK:STDOUT: %int_3.loc10_23: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %array_type.loc10: type = array_type %int_3.loc10_23, %i32.2 [concrete = constants.%array_type] // CHECK:STDOUT: %.loc10_23.2: ref %initializer_list = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc10_23.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_23.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_23.1: = bound_method %int_1.loc10_16, %impl.elem0.loc10_23.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc10_23.1: = specific_function %impl.elem0.loc10_23.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_23.2: = bound_method %int_1.loc10_16, %specific_fn.loc10_23.1 [concrete = constants.%bound_method.38b] @@ -254,7 +254,7 @@ fn F() { // CHECK:STDOUT: %int_0.loc10: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc10_23.5: ref %i32 = array_index %.loc10_23.4, %int_0.loc10 // CHECK:STDOUT: %.loc10_23.6: init %i32 to %.loc10_23.5 = in_place_init %.loc10_23.3 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc10_23.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_23.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_23.3: = bound_method %int_2.loc10_19, %impl.elem0.loc10_23.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc10_23.2: = specific_function %impl.elem0.loc10_23.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_23.4: = bound_method %int_2.loc10_19, %specific_fn.loc10_23.2 [concrete = constants.%bound_method.646] @@ -263,7 +263,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc10_23: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc10_23.8: ref %i32 = array_index %.loc10_23.4, %int_1.loc10_23 // CHECK:STDOUT: %.loc10_23.9: init %i32 to %.loc10_23.8 = in_place_init %.loc10_23.7 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc10_23.3: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_23.3: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_23.5: = bound_method %int_3.loc10_22, %impl.elem0.loc10_23.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc10_23.3: = specific_function %impl.elem0.loc10_23.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_23.6: = bound_method %int_3.loc10_22, %specific_fn.loc10_23.3 [concrete = constants.%bound_method.fa7] @@ -299,7 +299,7 @@ fn F() { // CHECK:STDOUT: %int_3.loc12_44: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %array_type.loc12: type = array_type %int_3.loc12_44, %i32.3 [concrete = constants.%array_type] // CHECK:STDOUT: %.loc12_44.3: ref %initializer_list = temporary_storage -// CHECK:STDOUT: %impl.elem0.loc12_44.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc12_44.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_44.1: = bound_method %int_1.loc12_37, %impl.elem0.loc12_44.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc12_44.1: = specific_function %impl.elem0.loc12_44.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_44.2: = bound_method %int_1.loc12_37, %specific_fn.loc12_44.1 [concrete = constants.%bound_method.38b] @@ -309,7 +309,7 @@ fn F() { // CHECK:STDOUT: %int_0.loc12: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %.loc12_44.6: ref %i32 = array_index %.loc12_44.5, %int_0.loc12 // CHECK:STDOUT: %.loc12_44.7: init %i32 to %.loc12_44.6 = in_place_init %.loc12_44.4 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc12_44.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc12_44.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_44.3: = bound_method %int_2.loc12_40, %impl.elem0.loc12_44.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc12_44.2: = specific_function %impl.elem0.loc12_44.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_44.4: = bound_method %int_2.loc12_40, %specific_fn.loc12_44.2 [concrete = constants.%bound_method.646] @@ -318,7 +318,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc12_44: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc12_44.9: ref %i32 = array_index %.loc12_44.5, %int_1.loc12_44 // CHECK:STDOUT: %.loc12_44.10: init %i32 to %.loc12_44.9 = in_place_init %.loc12_44.8 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %impl.elem0.loc12_44.3: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc12_44.3: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_44.5: = bound_method %int_3.loc12_43, %impl.elem0.loc12_44.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc12_44.3: = specific_function %impl.elem0.loc12_44.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_44.6: = bound_method %int_3.loc12_43, %specific_fn.loc12_44.3 [concrete = constants.%bound_method.fa7] diff --git a/toolchain/check/testdata/interop/cpp/typedef.carbon b/toolchain/check/testdata/interop/cpp/typedef.carbon index dbb79ec8234d..d006eaf24092 100644 --- a/toolchain/check/testdata/interop/cpp/typedef.carbon +++ b/toolchain/check/testdata/interop/cpp/typedef.carbon @@ -58,7 +58,6 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %int_42.20e: Core.IntLiteral = int_value 42 [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -66,7 +65,8 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_42.20e, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -74,7 +74,6 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %ptr.235 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -82,7 +81,8 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.c3c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc10 [concrete] // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete] @@ -110,7 +110,7 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var %n.var_patt // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [concrete = constants.%int_42.20e] -// CHECK:STDOUT: %impl.elem0.loc8: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_3.1: = bound_method %int_42, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_3.2: = bound_method %int_42, %specific_fn.loc8 [concrete = constants.%bound_method] @@ -130,7 +130,7 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %p.var: ref %ptr.235 = var %p.var_patt // CHECK:STDOUT: %n.ref: ref %i32 = name_ref n, %n // CHECK:STDOUT: %addr: %ptr.235 = addr_of %n.ref -// CHECK:STDOUT: %impl.elem0.loc10: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc10: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc10_21.1: = bound_method %addr, %impl.elem0.loc10 // CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc10_21.2: = bound_method %addr, %specific_fn.loc10 @@ -162,7 +162,6 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %ptr.d9e: type = ptr_type %C [concrete] // CHECK:STDOUT: %pattern_type.a31: type = pattern_type %ptr.d9e [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -170,7 +169,8 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.e61: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%C) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.f1d: %ptr.as.Copy.impl.Op.type.e61 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.d9e, (%Copy.impl_witness.83a) [concrete] -// CHECK:STDOUT: %.f9d: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.5d0: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.798: type = fn_type_with_self_type %Copy.WithSelf.Op.type.5d0, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.f1d, @ptr.as.Copy.impl.Op(%C) [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] @@ -196,7 +196,7 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %pd.var: ref %ptr.d9e = var %pd.var_patt // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %addr.loc9: %ptr.d9e = addr_of %c.ref -// CHECK:STDOUT: %impl.elem0.loc9: %.f9d = impl_witness_access constants.%Copy.impl_witness.83a, element0 [concrete = constants.%ptr.as.Copy.impl.Op.f1d] +// CHECK:STDOUT: %impl.elem0.loc9: %.798 = impl_witness_access constants.%Copy.impl_witness.83a, element0 [concrete = constants.%ptr.as.Copy.impl.Op.f1d] // CHECK:STDOUT: %bound_method.loc9_20.1: = bound_method %addr.loc9, %impl.elem0.loc9 // CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @ptr.as.Copy.impl.Op(constants.%C) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_20.2: = bound_method %addr.loc9, %specific_fn.loc9 @@ -215,7 +215,7 @@ fn H(var c: Cpp.C, var d: Cpp.D) { // CHECK:STDOUT: %pc.var: ref %ptr.d9e = var %pc.var_patt // CHECK:STDOUT: %d.ref: ref %C = name_ref d, %d // CHECK:STDOUT: %addr.loc10: %ptr.d9e = addr_of %d.ref -// CHECK:STDOUT: %impl.elem0.loc10: %.f9d = impl_witness_access constants.%Copy.impl_witness.83a, element0 [concrete = constants.%ptr.as.Copy.impl.Op.f1d] +// CHECK:STDOUT: %impl.elem0.loc10: %.798 = impl_witness_access constants.%Copy.impl_witness.83a, element0 [concrete = constants.%ptr.as.Copy.impl.Op.f1d] // CHECK:STDOUT: %bound_method.loc10_20.1: = bound_method %addr.loc10, %impl.elem0.loc10 // CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10, @ptr.as.Copy.impl.Op(constants.%C) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc10_20.2: = bound_method %addr.loc10, %specific_fn.loc10 diff --git a/toolchain/check/testdata/interop/cpp/void_pointer.carbon b/toolchain/check/testdata/interop/cpp/void_pointer.carbon index 7d1b4728e056..4a62971b6568 100644 --- a/toolchain/check/testdata/interop/cpp/void_pointer.carbon +++ b/toolchain/check/testdata/interop/cpp/void_pointer.carbon @@ -145,7 +145,6 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.874: type = ptr_type %Cpp.void [concrete] // CHECK:STDOUT: %pattern_type.9fb: type = pattern_type %ptr.874 [concrete] // CHECK:STDOUT: %ImplicitAs.type.02d: type = facet_type <@ImplicitAs, @ImplicitAs(%ptr.874)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.9be: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%ptr.874) [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.type.ccd: type = fn_type @ptr.as.ImplicitAs.impl.Convert.1, @ptr.as.ImplicitAs.impl.334(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.1ec: %ptr.as.ImplicitAs.impl.Convert.type.ccd = struct_value () [symbolic] @@ -153,7 +152,8 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.type.f61: type = fn_type @ptr.as.ImplicitAs.impl.Convert.1, @ptr.as.ImplicitAs.impl.334(%S) [concrete] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.d8d: %ptr.as.ImplicitAs.impl.Convert.type.f61 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.02d = facet_value %ptr.5c7, (%ImplicitAs.impl_witness.ffd) [concrete] -// CHECK:STDOUT: %.caa: type = fn_type_with_self_type %ImplicitAs.Convert.type.9be, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b31: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%ptr.874, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.751: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b31, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.specific_fn.ffe: = specific_function %ptr.as.ImplicitAs.impl.Convert.d8d, @ptr.as.ImplicitAs.impl.Convert.1(%S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -179,7 +179,7 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %void.ref: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void] // CHECK:STDOUT: %ptr.loc10: type = ptr_type %void.ref [concrete = constants.%ptr.874] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.caa = impl_witness_access constants.%ImplicitAs.impl_witness.ffd, element0 [concrete = constants.%ptr.as.ImplicitAs.impl.Convert.d8d] +// CHECK:STDOUT: %impl.elem0: %.751 = impl_witness_access constants.%ImplicitAs.impl_witness.ffd, element0 [concrete = constants.%ptr.as.ImplicitAs.impl.Convert.d8d] // CHECK:STDOUT: %bound_method.loc10_22.1: = bound_method %input.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.ImplicitAs.impl.Convert.1(constants.%S) [concrete = constants.%ptr.as.ImplicitAs.impl.Convert.specific_fn.ffe] // CHECK:STDOUT: %bound_method.loc10_22.2: = bound_method %input.ref, %specific_fn @@ -199,7 +199,6 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.874: type = ptr_type %Cpp.void [concrete] // CHECK:STDOUT: %pattern_type.9fb: type = pattern_type %ptr.874 [concrete] // CHECK:STDOUT: %ImplicitAs.type.02d: type = facet_type <@ImplicitAs, @ImplicitAs(%ptr.874)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.9be: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%ptr.874) [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.type.ccd: type = fn_type @ptr.as.ImplicitAs.impl.Convert.1, @ptr.as.ImplicitAs.impl.334(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.1ec: %ptr.as.ImplicitAs.impl.Convert.type.ccd = struct_value () [symbolic] @@ -207,7 +206,8 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.type.155: type = fn_type @ptr.as.ImplicitAs.impl.Convert.1, @ptr.as.ImplicitAs.impl.334(%C) [concrete] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.1f8: %ptr.as.ImplicitAs.impl.Convert.type.155 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.02d = facet_value %ptr.31e, (%ImplicitAs.impl_witness.39c) [concrete] -// CHECK:STDOUT: %.2b2: type = fn_type_with_self_type %ImplicitAs.Convert.type.9be, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.514: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%ptr.874, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.9d0: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.514, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.specific_fn.384: = specific_function %ptr.as.ImplicitAs.impl.Convert.1f8, @ptr.as.ImplicitAs.impl.Convert.1(%C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -231,7 +231,7 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %void.ref: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void] // CHECK:STDOUT: %ptr.loc10: type = ptr_type %void.ref [concrete = constants.%ptr.874] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.2b2 = impl_witness_access constants.%ImplicitAs.impl_witness.39c, element0 [concrete = constants.%ptr.as.ImplicitAs.impl.Convert.1f8] +// CHECK:STDOUT: %impl.elem0: %.9d0 = impl_witness_access constants.%ImplicitAs.impl_witness.39c, element0 [concrete = constants.%ptr.as.ImplicitAs.impl.Convert.1f8] // CHECK:STDOUT: %bound_method.loc10_22.1: = bound_method %input.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.ImplicitAs.impl.Convert.1(constants.%C) [concrete = constants.%ptr.as.ImplicitAs.impl.Convert.specific_fn.384] // CHECK:STDOUT: %bound_method.loc10_22.2: = bound_method %input.ref, %specific_fn @@ -251,7 +251,6 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.874: type = ptr_type %Cpp.void [concrete] // CHECK:STDOUT: %pattern_type.9fb: type = pattern_type %ptr.874 [concrete] // CHECK:STDOUT: %As.type.d24: type = facet_type <@As, @As(%ptr.874)> [concrete] -// CHECK:STDOUT: %As.Convert.type.97f: type = fn_type @As.Convert, @As(%ptr.874) [concrete] // CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.031604.2: type = facet_type <@ImplicitAs, @ImplicitAs(%U.67d)> [symbolic] // CHECK:STDOUT: %T.738: %ImplicitAs.type.031604.2 = symbolic_binding T, 1 [symbolic] @@ -267,7 +266,8 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %T.binding.as_type.as.As.impl.Convert.type.b2a: type = fn_type @T.binding.as_type.as.As.impl.Convert, @T.binding.as_type.as.As.impl(%ptr.874, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.As.impl.Convert.e7d: %T.binding.as_type.as.As.impl.Convert.type.b2a = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.d24 = facet_value %ptr.5c7, (%As.impl_witness.9e9) [concrete] -// CHECK:STDOUT: %.a02: type = fn_type_with_self_type %As.Convert.type.97f, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.23e: type = fn_type @As.WithSelf.Convert, @As(%ptr.874, %As.facet) [concrete] +// CHECK:STDOUT: %.bb8: type = fn_type_with_self_type %As.WithSelf.Convert.type.23e, %As.facet [concrete] // CHECK:STDOUT: %T.binding.as_type.as.As.impl.Convert.specific_fn: = specific_function %T.binding.as_type.as.As.impl.Convert.e7d, @T.binding.as_type.as.As.impl.Convert(%ptr.874, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -293,7 +293,7 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %Cpp.ref.loc10_31: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %void.ref.loc10_34: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void] // CHECK:STDOUT: %ptr.loc10_39: type = ptr_type %void.ref.loc10_34 [concrete = constants.%ptr.874] -// CHECK:STDOUT: %impl.elem0: %.a02 = impl_witness_access constants.%As.impl_witness.9e9, element0 [concrete = constants.%T.binding.as_type.as.As.impl.Convert.e7d] +// CHECK:STDOUT: %impl.elem0: %.bb8 = impl_witness_access constants.%As.impl_witness.9e9, element0 [concrete = constants.%T.binding.as_type.as.As.impl.Convert.e7d] // CHECK:STDOUT: %bound_method.loc10_28.1: = bound_method %input.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @T.binding.as_type.as.As.impl.Convert(constants.%ptr.874, constants.%ImplicitAs.facet) [concrete = constants.%T.binding.as_type.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_28.2: = bound_method %input.ref, %specific_fn @@ -318,7 +318,6 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.874: type = ptr_type %Cpp.void [concrete] // CHECK:STDOUT: %pattern_type.9fb: type = pattern_type %ptr.874 [concrete] // CHECK:STDOUT: %As.type.d24: type = facet_type <@As, @As(%ptr.874)> [concrete] -// CHECK:STDOUT: %As.Convert.type.97f: type = fn_type @As.Convert, @As(%ptr.874) [concrete] // CHECK:STDOUT: %U.67d: type = symbolic_binding U, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.031604.2: type = facet_type <@ImplicitAs, @ImplicitAs(%U.67d)> [symbolic] // CHECK:STDOUT: %T.738: %ImplicitAs.type.031604.2 = symbolic_binding T, 1 [symbolic] @@ -334,7 +333,8 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %T.binding.as_type.as.As.impl.Convert.type.05b: type = fn_type @T.binding.as_type.as.As.impl.Convert, @T.binding.as_type.as.As.impl(%ptr.874, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: %T.binding.as_type.as.As.impl.Convert.483: %T.binding.as_type.as.As.impl.Convert.type.05b = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.d24 = facet_value %ptr.31e, (%As.impl_witness.fa1) [concrete] -// CHECK:STDOUT: %.cf8: type = fn_type_with_self_type %As.Convert.type.97f, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.056: type = fn_type @As.WithSelf.Convert, @As(%ptr.874, %As.facet) [concrete] +// CHECK:STDOUT: %.99e: type = fn_type_with_self_type %As.WithSelf.Convert.type.056, %As.facet [concrete] // CHECK:STDOUT: %T.binding.as_type.as.As.impl.Convert.specific_fn: = specific_function %T.binding.as_type.as.As.impl.Convert.483, @T.binding.as_type.as.As.impl.Convert(%ptr.874, %ImplicitAs.facet) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -358,7 +358,7 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %Cpp.ref.loc10_31: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %void.ref.loc10_34: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void] // CHECK:STDOUT: %ptr.loc10_39: type = ptr_type %void.ref.loc10_34 [concrete = constants.%ptr.874] -// CHECK:STDOUT: %impl.elem0: %.cf8 = impl_witness_access constants.%As.impl_witness.fa1, element0 [concrete = constants.%T.binding.as_type.as.As.impl.Convert.483] +// CHECK:STDOUT: %impl.elem0: %.99e = impl_witness_access constants.%As.impl_witness.fa1, element0 [concrete = constants.%T.binding.as_type.as.As.impl.Convert.483] // CHECK:STDOUT: %bound_method.loc10_28.1: = bound_method %input.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @T.binding.as_type.as.As.impl.Convert(constants.%ptr.874, constants.%ImplicitAs.facet) [concrete = constants.%T.binding.as_type.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_28.2: = bound_method %input.ref, %specific_fn @@ -451,7 +451,6 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.5c7: type = ptr_type %S [concrete] // CHECK:STDOUT: %pattern_type.259: type = pattern_type %ptr.5c7 [concrete] // CHECK:STDOUT: %UnsafeAs.type.0ee: type = facet_type <@UnsafeAs, @UnsafeAs(%ptr.5c7)> [concrete] -// CHECK:STDOUT: %UnsafeAs.Convert.type.e91: type = fn_type @UnsafeAs.Convert, @UnsafeAs(%ptr.5c7) [concrete] // CHECK:STDOUT: %U.091: type = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.UnsafeAs.impl.Convert.type.f06: type = fn_type @ptr.as.UnsafeAs.impl.Convert, @ptr.as.UnsafeAs.impl(%T.67d, %U.091) [symbolic] @@ -460,7 +459,8 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.as.UnsafeAs.impl.Convert.type.2b8: type = fn_type @ptr.as.UnsafeAs.impl.Convert, @ptr.as.UnsafeAs.impl(%Cpp.void, %S) [concrete] // CHECK:STDOUT: %ptr.as.UnsafeAs.impl.Convert.fe3: %ptr.as.UnsafeAs.impl.Convert.type.2b8 = struct_value () [concrete] // CHECK:STDOUT: %UnsafeAs.facet: %UnsafeAs.type.0ee = facet_value %ptr.874, (%UnsafeAs.impl_witness.080) [concrete] -// CHECK:STDOUT: %.f7a: type = fn_type_with_self_type %UnsafeAs.Convert.type.e91, %UnsafeAs.facet [concrete] +// CHECK:STDOUT: %UnsafeAs.WithSelf.Convert.type.3f6: type = fn_type @UnsafeAs.WithSelf.Convert, @UnsafeAs(%ptr.5c7, %UnsafeAs.facet) [concrete] +// CHECK:STDOUT: %.fba: type = fn_type_with_self_type %UnsafeAs.WithSelf.Convert.type.3f6, %UnsafeAs.facet [concrete] // CHECK:STDOUT: %ptr.as.UnsafeAs.impl.Convert.specific_fn: = specific_function %ptr.as.UnsafeAs.impl.Convert.fe3, @ptr.as.UnsafeAs.impl.Convert(%Cpp.void, %S) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -484,7 +484,7 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %Cpp.ref.loc10_35: = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp] // CHECK:STDOUT: %S.ref.loc10_38: type = name_ref S, imports.%S.decl [concrete = constants.%S] // CHECK:STDOUT: %ptr.loc10_40: type = ptr_type %S.ref.loc10_38 [concrete = constants.%ptr.5c7] -// CHECK:STDOUT: %impl.elem0: %.f7a = impl_witness_access constants.%UnsafeAs.impl_witness.080, element0 [concrete = constants.%ptr.as.UnsafeAs.impl.Convert.fe3] +// CHECK:STDOUT: %impl.elem0: %.fba = impl_witness_access constants.%UnsafeAs.impl_witness.080, element0 [concrete = constants.%ptr.as.UnsafeAs.impl.Convert.fe3] // CHECK:STDOUT: %bound_method.loc10_32.1: = bound_method %input.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.UnsafeAs.impl.Convert(constants.%Cpp.void, constants.%S) [concrete = constants.%ptr.as.UnsafeAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_32.2: = bound_method %input.ref, %specific_fn @@ -509,7 +509,6 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.31e: type = ptr_type %C [concrete] // CHECK:STDOUT: %pattern_type.506: type = pattern_type %ptr.31e [concrete] // CHECK:STDOUT: %UnsafeAs.type.1ec: type = facet_type <@UnsafeAs, @UnsafeAs(%ptr.31e)> [concrete] -// CHECK:STDOUT: %UnsafeAs.Convert.type.b51: type = fn_type @UnsafeAs.Convert, @UnsafeAs(%ptr.31e) [concrete] // CHECK:STDOUT: %U.091: type = symbolic_binding U, 1 [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.UnsafeAs.impl.Convert.type.f06: type = fn_type @ptr.as.UnsafeAs.impl.Convert, @ptr.as.UnsafeAs.impl(%T.67d, %U.091) [symbolic] @@ -518,7 +517,8 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %ptr.as.UnsafeAs.impl.Convert.type.04a: type = fn_type @ptr.as.UnsafeAs.impl.Convert, @ptr.as.UnsafeAs.impl(%Cpp.void, %C) [concrete] // CHECK:STDOUT: %ptr.as.UnsafeAs.impl.Convert.409: %ptr.as.UnsafeAs.impl.Convert.type.04a = struct_value () [concrete] // CHECK:STDOUT: %UnsafeAs.facet: %UnsafeAs.type.1ec = facet_value %ptr.874, (%UnsafeAs.impl_witness.2f5) [concrete] -// CHECK:STDOUT: %.ce8: type = fn_type_with_self_type %UnsafeAs.Convert.type.b51, %UnsafeAs.facet [concrete] +// CHECK:STDOUT: %UnsafeAs.WithSelf.Convert.type.d81: type = fn_type @UnsafeAs.WithSelf.Convert, @UnsafeAs(%ptr.31e, %UnsafeAs.facet) [concrete] +// CHECK:STDOUT: %.53b: type = fn_type_with_self_type %UnsafeAs.WithSelf.Convert.type.d81, %UnsafeAs.facet [concrete] // CHECK:STDOUT: %ptr.as.UnsafeAs.impl.Convert.specific_fn: = specific_function %ptr.as.UnsafeAs.impl.Convert.409, @ptr.as.UnsafeAs.impl.Convert(%Cpp.void, %C) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -535,7 +535,7 @@ fn F(input: Cpp.void*) { // CHECK:STDOUT: %input.ref: %ptr.874 = name_ref input, %input // CHECK:STDOUT: %C.ref.loc10_31: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %ptr.loc10_32: type = ptr_type %C.ref.loc10_31 [concrete = constants.%ptr.31e] -// CHECK:STDOUT: %impl.elem0: %.ce8 = impl_witness_access constants.%UnsafeAs.impl_witness.2f5, element0 [concrete = constants.%ptr.as.UnsafeAs.impl.Convert.409] +// CHECK:STDOUT: %impl.elem0: %.53b = impl_witness_access constants.%UnsafeAs.impl_witness.2f5, element0 [concrete = constants.%ptr.as.UnsafeAs.impl.Convert.409] // CHECK:STDOUT: %bound_method.loc10_28.1: = bound_method %input.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.UnsafeAs.impl.Convert(constants.%Cpp.void, constants.%C) [concrete = constants.%ptr.as.UnsafeAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_28.2: = bound_method %input.ref, %specific_fn diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index 4ad1ca4203bb..45a4b6fd9640 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -504,9 +504,9 @@ impl i32 as Empty { // CHECK:STDOUT: %impl.elem0: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic] // CHECK:STDOUT: %.7e6: Core.Form = init_form %impl.elem0, call_param0 [symbolic] // CHECK:STDOUT: %pattern_type.92d: type = pattern_type %impl.elem0 [symbolic] -// CHECK:STDOUT: %I.F.type: type = fn_type @I.F [concrete] -// CHECK:STDOUT: %I.F: %I.F.type = struct_value () [concrete] -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%I.F.decl [concrete] +// CHECK:STDOUT: %I.WithSelf.F.type: type = fn_type @I.WithSelf.F, @I(%Self) [symbolic] +// CHECK:STDOUT: %I.WithSelf.F: %I.WithSelf.F.type = struct_value () [symbolic] +// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%I.WithSelf.F.decl [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -528,52 +528,49 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { -// CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self.loc4: %I.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] { // CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] { -// CHECK:STDOUT: %return.patt: @I.F.%pattern_type (%pattern_type.92d) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @I.F.%pattern_type (%pattern_type.92d) = out_param_pattern %return.patt, call_param0 [concrete] +// CHECK:STDOUT: %I.WithSelf.F.decl: @I.%I.WithSelf.F.type (%I.WithSelf.F.type) = fn_decl @I.WithSelf.F [symbolic = @I.%I.WithSelf.F (constants.%I.WithSelf.F)] { +// CHECK:STDOUT: %return.patt: @I.WithSelf.F.%pattern_type (%pattern_type.92d) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @I.WithSelf.F.%pattern_type (%pattern_type.92d) = out_param_pattern %return.patt, call_param0 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %impl.elem0.loc6_13.2: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_13.1 (constants.%impl.elem0)] // CHECK:STDOUT: %T.ref: type = name_ref T, %impl.elem0.loc6_13.2 [symbolic = %impl.elem0.loc6_13.1 (constants.%impl.elem0)] // CHECK:STDOUT: %.loc6_13.2: Core.Form = init_form %T.ref, call_param0 [symbolic = %.loc6_13.1 (constants.%.7e6)] -// CHECK:STDOUT: %return.param: ref @I.F.%impl.elem0.loc6_13.1 (%impl.elem0) = out_param call_param0 -// CHECK:STDOUT: %return: ref @I.F.%impl.elem0.loc6_13.1 (%impl.elem0) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @I.WithSelf.F.%impl.elem0.loc6_13.1 (%impl.elem0) = out_param call_param0 +// CHECK:STDOUT: %return: ref @I.WithSelf.F.%impl.elem0.loc6_13.1 (%impl.elem0) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %I.F.decl [concrete = constants.%assoc1] +// 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: .Self = %Self.loc4 // CHECK:STDOUT: .T = @T.%assoc0 // CHECK:STDOUT: .F = %assoc1 -// CHECK:STDOUT: witness = (%T, %I.F.decl) +// CHECK:STDOUT: witness = (%T, %I.WithSelf.F.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) { -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: -// CHECK:STDOUT: assoc_const T:! type = %i32; -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.F(@I.%Self: %I.type) { +// CHECK:STDOUT: generic fn @I.WithSelf.F(@I.%Self.loc4: %I.type) { // CHECK:STDOUT: %Self: %I.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %Self, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] // CHECK:STDOUT: %impl.elem0.loc6_13.1: type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_13.1 (constants.%impl.elem0)] // CHECK:STDOUT: %.loc6_13.1: Core.Form = init_form %impl.elem0.loc6_13.1, call_param0 [symbolic = %.loc6_13.1 (constants.%.7e6)] // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc6_13.1 [symbolic = %pattern_type (constants.%pattern_type.92d)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> out %return.param: @I.F.%impl.elem0.loc6_13.1 (%impl.elem0); +// CHECK:STDOUT: fn() -> out %return.param: @I.WithSelf.F.%impl.elem0.loc6_13.1 (%impl.elem0); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @T(constants.%Self) {} +// CHECK:STDOUT: specific @I(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.F(constants.%Self) { +// CHECK:STDOUT: specific @I.WithSelf.F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self // CHECK:STDOUT: %I.lookup_impl_witness => constants.%I.lookup_impl_witness // CHECK:STDOUT: %impl.elem0.loc6_13.1 => constants.%impl.elem0 @@ -704,7 +701,6 @@ impl i32 as Empty { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -712,11 +708,13 @@ impl i32 as Empty { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] +// CHECK:STDOUT: %Empty.facet: %Empty.type = facet_value %i32, (%Empty.impl_witness) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -748,6 +746,7 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: interface @Empty { // CHECK:STDOUT: %Self: %Empty.type = symbolic_binding Self, 0 [symbolic = constants.%Self.61e] +// CHECK:STDOUT: interface_with_self_decl @Empty [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -766,7 +765,7 @@ impl i32 as Empty { // CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc11_20.1: = bound_method %int_0, %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.loc11_20.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -782,3 +781,11 @@ impl i32 as Empty { // CHECK:STDOUT: witness = %Empty.impl_witness // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%Self.61e) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%Empty.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index 2a49d008b992..af8512d32619 100644 --- a/toolchain/check/testdata/let/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/let/fail_duplicate_decl.carbon @@ -38,7 +38,6 @@ fn F() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -46,7 +45,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -89,7 +89,7 @@ fn F() { // CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_16.1: = bound_method %int_1, %impl.elem0.loc16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_16.2: = bound_method %int_1, %specific_fn.loc16 [concrete = constants.%bound_method.38b] @@ -105,7 +105,7 @@ fn F() { // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc24: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc24: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc24_16.1: = bound_method %int_2, %impl.elem0.loc24 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // 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_16.2: = bound_method %int_2, %specific_fn.loc24 [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/let/fail_modifiers.carbon b/toolchain/check/testdata/let/fail_modifiers.carbon index 684952d8a2d0..cdc43b9d389b 100644 --- a/toolchain/check/testdata/let/fail_modifiers.carbon +++ b/toolchain/check/testdata/let/fail_modifiers.carbon @@ -100,7 +100,6 @@ protected protected let i: i32 = 1; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -108,7 +107,8 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -148,7 +148,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc19: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc19: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc19_24.1: = bound_method @__global_init.%int_1.loc19, %impl.elem0.loc19 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_24.2: = bound_method @__global_init.%int_1.loc19, %specific_fn.loc19 [concrete = constants.%bound_method] @@ -163,7 +163,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc25: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc25_22.1: = bound_method @__global_init.%int_1.loc25, %impl.elem0.loc25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // 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_22.2: = bound_method @__global_init.%int_1.loc25, %specific_fn.loc25 [concrete = constants.%bound_method] @@ -178,7 +178,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc31: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc31: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc31: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc31: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc31_20.1: = bound_method @__global_init.%int_1.loc31, %impl.elem0.loc31 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc31: = specific_function %impl.elem0.loc31, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc31_20.2: = bound_method @__global_init.%int_1.loc31, %specific_fn.loc31 [concrete = constants.%bound_method] @@ -193,7 +193,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc37: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc37: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc37: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc37: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc37_22.1: = bound_method @__global_init.%int_1.loc37, %impl.elem0.loc37 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc37: = specific_function %impl.elem0.loc37, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc37_22.2: = bound_method @__global_init.%int_1.loc37, %specific_fn.loc37 [concrete = constants.%bound_method] @@ -208,7 +208,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc50: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc50: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc50: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc50: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc50_28.1: = bound_method @__global_init.%int_1.loc50, %impl.elem0.loc50 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc50: = specific_function %impl.elem0.loc50, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc50_28.2: = bound_method @__global_init.%int_1.loc50, %specific_fn.loc50 [concrete = constants.%bound_method] @@ -223,7 +223,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc63: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc63: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc63: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc63: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc63_30.1: = bound_method @__global_init.%int_1.loc63, %impl.elem0.loc63 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc63: = specific_function %impl.elem0.loc63, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc63_30.2: = bound_method @__global_init.%int_1.loc63, %specific_fn.loc63 [concrete = constants.%bound_method] @@ -238,7 +238,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc76: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc76: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc76: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc76: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc76_32.1: = bound_method @__global_init.%int_1.loc76, %impl.elem0.loc76 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc76: = specific_function %impl.elem0.loc76, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc76_32.2: = bound_method @__global_init.%int_1.loc76, %specific_fn.loc76 [concrete = constants.%bound_method] @@ -253,7 +253,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %int_32.loc89: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc89: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc89: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc89: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc89_34.1: = bound_method @__global_init.%int_1.loc89, %impl.elem0.loc89 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc89: = specific_function %impl.elem0.loc89, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc89_34.2: = bound_method @__global_init.%int_1.loc89, %specific_fn.loc89 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/let/global.carbon b/toolchain/check/testdata/let/global.carbon index f4f3517ba30c..0434295d8ef5 100644 --- a/toolchain/check/testdata/let/global.carbon +++ b/toolchain/check/testdata/let/global.carbon @@ -29,7 +29,6 @@ fn F() -> i32 { return n; } // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -37,7 +36,8 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -46,14 +46,14 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -88,7 +88,7 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_14.1: = bound_method @__global_init.%int_1, %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_14.2: = bound_method @__global_init.%int_1, %specific_fn [concrete = constants.%bound_method] @@ -111,7 +111,7 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: fn @F() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, file.%n -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc17_24.1: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_24.2: = bound_method %n.ref, %specific_fn diff --git a/toolchain/check/testdata/let/local.carbon b/toolchain/check/testdata/let/local.carbon index 9462f9e9c79e..7ff8270f2a1d 100644 --- a/toolchain/check/testdata/let/local.carbon +++ b/toolchain/check/testdata/let/local.carbon @@ -46,14 +46,14 @@ fn CallF() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -74,7 +74,7 @@ fn CallF() { // CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = value_binding b, %a.ref // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %b.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %b.ref, %specific_fn diff --git a/toolchain/check/testdata/let/shadowed_decl.carbon b/toolchain/check/testdata/let/shadowed_decl.carbon index 8cebf36e09ce..b6509bb70c1c 100644 --- a/toolchain/check/testdata/let/shadowed_decl.carbon +++ b/toolchain/check/testdata/let/shadowed_decl.carbon @@ -34,7 +34,6 @@ fn F(a: i32) -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -42,20 +41,21 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -112,7 +112,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_16.1: = bound_method %int_1, %impl.elem0.loc16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_16.2: = bound_method %int_1, %specific_fn.loc16 [concrete = constants.%bound_method] @@ -121,7 +121,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %.loc16_16.2: %i32 = converted %int_1, %.loc16_16.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %a.loc16: %i32 = value_binding a, %.loc16_16.2 // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a.loc16 -// CHECK:STDOUT: %impl.elem0.loc18: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc18: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc18_10.1: = bound_method %a.ref, %impl.elem0.loc18 // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc18_10.2: = bound_method %a.ref, %specific_fn.loc18 diff --git a/toolchain/check/testdata/main_run/return_i32.carbon b/toolchain/check/testdata/main_run/return_i32.carbon index 936d6154c586..d84f32132f56 100644 --- a/toolchain/check/testdata/main_run/return_i32.carbon +++ b/toolchain/check/testdata/main_run/return_i32.carbon @@ -39,7 +39,6 @@ fn Run(argc: i32, argv: i32*) -> i32 { return 0; } // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -47,7 +46,8 @@ fn Run(argc: i32, argv: i32*) -> i32 { return 0; } // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -90,7 +90,7 @@ fn Run(argc: i32, argv: i32*) -> i32 { return 0; } // CHECK:STDOUT: fn @Run() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc4_27.1: = bound_method %int_0, %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.loc4_27.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -116,7 +116,6 @@ fn Run(argc: i32, argv: i32*) -> i32 { return 0; } // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -124,7 +123,8 @@ fn Run(argc: i32, argv: i32*) -> i32 { return 0; } // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -186,7 +186,7 @@ fn Run(argc: i32, argv: i32*) -> i32 { return 0; } // CHECK:STDOUT: fn @Run(%argc.param: %i32, %argv.param: %ptr) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc5_48.1: = bound_method %int_0, %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.loc5_48.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/named_constraint/basic.carbon b/toolchain/check/testdata/named_constraint/basic.carbon index d57cbc7957c8..196f5588341d 100644 --- a/toolchain/check/testdata/named_constraint/basic.carbon +++ b/toolchain/check/testdata/named_constraint/basic.carbon @@ -68,6 +68,7 @@ constraint Declared {} // CHECK:STDOUT: // CHECK:STDOUT: constraint @Declared { // CHECK:STDOUT: %Self: %Declared.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: constraint_with_self_decl @Declared [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -75,6 +76,8 @@ constraint Declared {} // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Declared(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- forward_declaration.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -92,6 +95,7 @@ constraint Declared {} // CHECK:STDOUT: // CHECK:STDOUT: constraint @ForwardDeclared { // CHECK:STDOUT: %Self: %ForwardDeclared.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: constraint_with_self_decl @ForwardDeclared [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -99,3 +103,5 @@ constraint Declared {} // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @ForwardDeclared(constants.%Self) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/named_constraint/convert.carbon b/toolchain/check/testdata/named_constraint/convert.carbon index 18085dd20d3a..da038ae34d7d 100644 --- a/toolchain/check/testdata/named_constraint/convert.carbon +++ b/toolchain/check/testdata/named_constraint/convert.carbon @@ -69,10 +69,10 @@ fn G(T:! Z) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.type.b10: type = facet_type <@BitAndWith, @BitAndWith(type)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.9a3: type = fn_type @BitAndWith.Op, @BitAndWith(type) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness imports.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.b10 = facet_value type, (%BitAndWith.impl_witness) [concrete] -// CHECK:STDOUT: %.890: type = fn_type_with_self_type %BitAndWith.Op.type.9a3, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4bd: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(type, %BitAndWith.facet) [concrete] +// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4bd, %BitAndWith.facet [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.type: type = fn_type @type.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.bound: = bound_method %E.type, %type.as.BitAndWith.impl.Op [concrete] @@ -94,7 +94,7 @@ fn G(T:! Z) { // CHECK:STDOUT: // CHECK:STDOUT: %E.ref.loc8_10: type = name_ref E, file.%E.decl [concrete = constants.%E.type] // CHECK:STDOUT: %E.ref.loc8_14: type = name_ref E, file.%E.decl [concrete = constants.%E.type] -// CHECK:STDOUT: %impl.elem0: %.890 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.d15 = impl_witness_access constants.%BitAndWith.impl_witness, element0 [concrete = constants.%type.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %E.ref.loc8_10, %impl.elem0 [concrete = constants.%type.as.BitAndWith.impl.Op.bound] // CHECK:STDOUT: %type.as.BitAndWith.impl.Op.call: init type = call %bound_method(%E.ref.loc8_10, %E.ref.loc8_14) [concrete = constants.%E.type] // CHECK:STDOUT: %.loc8_12.2: type = value_of_initializer %type.as.BitAndWith.impl.Op.call [concrete = constants.%E.type] diff --git a/toolchain/check/testdata/named_constraint/empty_generic.carbon b/toolchain/check/testdata/named_constraint/empty_generic.carbon index a0c83baa790c..be067ba64170 100644 --- a/toolchain/check/testdata/named_constraint/empty_generic.carbon +++ b/toolchain/check/testdata/named_constraint/empty_generic.carbon @@ -30,6 +30,7 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] +// CHECK:STDOUT: %type: type = facet_type [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %Empty.type.19a: type = generic_named_constaint_type @Empty [concrete] @@ -52,14 +53,17 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: %G: %G.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete] // CHECK:STDOUT: %empty_struct.a40: %empty_struct_type = struct_value () [concrete] +// CHECK:STDOUT: %Self.31c17c.2: %Empty.type.d682d6.2 = symbolic_binding Self, 1 [symbolic] +// CHECK:STDOUT: %empty_struct.type.facet: %type = facet_value %empty_struct_type, () [concrete] // CHECK:STDOUT: %Empty.facet.76f: %Empty.type.d682d6.2 = facet_value %empty_struct_type, () [symbolic] // CHECK:STDOUT: %F.specific_fn.5f9: = specific_function %F, @F(%T.binding.as_type, %Empty.facet.76f) [symbolic] +// CHECK:STDOUT: %facet_value.2cb: %type = facet_value type, () [concrete] // CHECK:STDOUT: %Empty.facet.2cb: %Empty.type.d682d6.2 = facet_value type, () [symbolic] // CHECK:STDOUT: %F.specific_fn.ff8: = specific_function %F, @F(%T.binding.as_type, %Empty.facet.2cb) [symbolic] // CHECK:STDOUT: %Empty.facet.4f8: %Empty.type.d682d6.2 = facet_value %T.binding.as_type, () [symbolic] // CHECK:STDOUT: %F.specific_fn.55f: = specific_function %F, @F(%T.binding.as_type, %Empty.facet.4f8) [symbolic] -// CHECK:STDOUT: %Self.31c17c.2: %Empty.type.d682d6.2 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %F.specific_fn.5c5: = specific_function %F, @F(%T.binding.as_type, %U.e1f642.2) [symbolic] +// CHECK:STDOUT: %facet_value.ed5: %type = facet_value %V, () [symbolic] // CHECK:STDOUT: %Empty.facet.ed5: %Empty.type.d682d6.2 = facet_value %V, () [symbolic] // CHECK:STDOUT: %F.specific_fn.bb1: = specific_function %F, @F(%T.binding.as_type, %Empty.facet.ed5) [symbolic] // CHECK:STDOUT: } @@ -118,6 +122,7 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: %Self.loc16_28.1: @Empty.%Empty.type (%Empty.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self.loc16_28.2 (constants.%Self.31c17c.1)] +// CHECK:STDOUT: constraint_with_self_decl @Empty [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc16_28.1 @@ -213,6 +218,8 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: %T.loc16_18.1 => constants.%T.67d // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%T.67d, constants.%Self.31c17c.1) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.67d, constants.%U.e1f642.1) { // CHECK:STDOUT: %T.loc18_6.1 => constants.%T.67d // CHECK:STDOUT: %Empty.type.loc18_27.1 => constants.%Empty.type.d682d6.1 @@ -237,6 +244,14 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: %V.loc20_27.1 => constants.%V // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%T.binding.as_type, constants.%Self.31c17c.1) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%T.binding.as_type, constants.%empty_struct.type.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.binding.as_type, constants.%Empty.facet.76f) { // CHECK:STDOUT: %T.loc18_6.1 => constants.%T.binding.as_type // CHECK:STDOUT: %Empty.type.loc18_27.1 => constants.%Empty.type.d682d6.2 @@ -246,6 +261,10 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%T.binding.as_type, constants.%facet_value.2cb) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.binding.as_type, constants.%Empty.facet.2cb) { // CHECK:STDOUT: %T.loc18_6.1 => constants.%T.binding.as_type // CHECK:STDOUT: %Empty.type.loc18_27.1 => constants.%Empty.type.d682d6.2 @@ -255,6 +274,10 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%T.binding.as_type, constants.%T.ea3) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.binding.as_type, constants.%Empty.facet.4f8) { // CHECK:STDOUT: %T.loc18_6.1 => constants.%T.binding.as_type // CHECK:STDOUT: %Empty.type.loc18_27.1 => constants.%Empty.type.d682d6.2 @@ -273,6 +296,10 @@ fn G(T:! Z, U:! Empty(T), V:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Empty(constants.%T.binding.as_type, constants.%facet_value.ed5) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%T.binding.as_type, constants.%Empty.facet.ed5) { // CHECK:STDOUT: %T.loc18_6.1 => constants.%T.binding.as_type // CHECK:STDOUT: %Empty.type.loc18_27.1 => constants.%Empty.type.d682d6.2 diff --git a/toolchain/check/testdata/named_constraint/generic.carbon b/toolchain/check/testdata/named_constraint/generic.carbon index ad1dea4838f0..e55b1c693ba6 100644 --- a/toolchain/check/testdata/named_constraint/generic.carbon +++ b/toolchain/check/testdata/named_constraint/generic.carbon @@ -139,6 +139,7 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: interface @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.c59] +// CHECK:STDOUT: interface_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -156,6 +157,7 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: %Self.loc4_34.1: @GenericType.%GenericType.type (%GenericType.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc4_34.2 (constants.%Self.31c17c.1)] +// CHECK:STDOUT: constraint_with_self_decl @GenericType [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_34.1 @@ -173,6 +175,7 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: %Self.loc7_28.1: @GenericZ.%GenericZ.type (%GenericZ.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc7_28.2 (constants.%Self.31c17c.2)] +// CHECK:STDOUT: constraint_with_self_decl @GenericZ [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc7_28.1 @@ -190,6 +193,7 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: %Self.loc10_45.1: @ForwardDeclaredGeneric.%ForwardDeclaredGeneric.type (%ForwardDeclaredGeneric.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc10_45.2 (constants.%Self.31c17c.3)] +// CHECK:STDOUT: constraint_with_self_decl @ForwardDeclaredGeneric [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc10_45.1 @@ -202,11 +206,19 @@ fn F(T:! Generic((), ())) {} // CHECK:STDOUT: %T.loc4_24.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericType(constants.%T, constants.%Self.31c17c.1) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Self.c59) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @GenericZ(constants.%U) { // CHECK:STDOUT: %U.loc7_21.1 => constants.%U // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @GenericZ(constants.%U, constants.%Self.31c17c.2) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @ForwardDeclaredGeneric(constants.%T) { // CHECK:STDOUT: %T.loc9_35.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @ForwardDeclaredGeneric(constants.%T, constants.%Self.31c17c.3) {} +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/named_constraint/import_constraint_decl.carbon b/toolchain/check/testdata/named_constraint/import_constraint_decl.carbon index bd2808e6a426..ed07c9b7f559 100644 --- a/toolchain/check/testdata/named_constraint/import_constraint_decl.carbon +++ b/toolchain/check/testdata/named_constraint/import_constraint_decl.carbon @@ -84,6 +84,7 @@ impl C as B {} // CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete] // CHECK:STDOUT: %Self.f45: %B.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete] +// CHECK:STDOUT: %Self.651: %I.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.f45 [symbolic] // CHECK:STDOUT: %T: %B.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %pattern_type: type = pattern_type %B.type [concrete] @@ -94,12 +95,12 @@ impl C as B {} // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I = import_ref Main//b, I, unloaded // CHECK:STDOUT: %Main.B: type = import_ref Main//b, B, loaded [concrete = constants.%B.type] +// CHECK:STDOUT: %Main.import_ref.fa0 = import_ref Main//b, loc5_25, unloaded // CHECK:STDOUT: %Main.import_ref.c82 = import_ref Main//b, loc3_13, unloaded -// CHECK:STDOUT: %Main.import_ref.67f: type = import_ref Main//b, loc5_18, loaded [symbolic = @B.Self.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)] +// CHECK:STDOUT: %Main.import_ref.67f: type = import_ref Main//b, loc5_18, loaded [symbolic = @B.WithSelf.Self.binding.as_type.impls.I.type.require.%Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Main.import_ref.72a: type = import_ref Main//b, loc5_24, loaded [concrete = constants.%I.type] -// CHECK:STDOUT: %Main.import_ref.e33: %B.type = import_ref Main//b, loc4_14, loaded [symbolic = constants.%Self.f45] -// CHECK:STDOUT: %Main.import_ref.65b437.1 = import_ref Main//b, loc4_14, unloaded -// CHECK:STDOUT: %Main.import_ref.121 = import_ref Main//b, loc5_25, unloaded +// CHECK:STDOUT: %Main.import_ref.e33cd1.2: %B.type = import_ref Main//b, loc4_14, loaded [symbolic = constants.%Self.f45] +// CHECK:STDOUT: %Main.import_ref.65b = import_ref Main//b, loc4_14, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -131,16 +132,16 @@ impl C as B {} // CHECK:STDOUT: // CHECK:STDOUT: constraint @B [from "b.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%Main.import_ref.65b437.1 -// CHECK:STDOUT: extend imports.%Main.import_ref.121 +// CHECK:STDOUT: .Self = imports.%Main.import_ref.65b +// CHECK:STDOUT: extend imports.%Main.import_ref.fa0 // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @B.Self.binding.as_type.impls.I.type.require { +// CHECK:STDOUT: @B.WithSelf.Self.binding.as_type.impls.I.type.require { // CHECK:STDOUT: require imports.%Main.import_ref.67f impls imports.%Main.import_ref.72a // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @B.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.e33: %B.type) [from "b.carbon"] { +// CHECK:STDOUT: generic require @B.WithSelf.Self.binding.as_type.impls.I.type.require(imports.%Main.import_ref.e33cd1.2: %B.type) [from "b.carbon"] { // CHECK:STDOUT: %Self: %B.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.f45)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } @@ -156,7 +157,13 @@ impl C as B {} // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @B.Self.binding.as_type.impls.I.type.require(constants.%Self.f45) { +// CHECK:STDOUT: specific @B(constants.%Self.f45) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @I(constants.%Self.651) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @B.WithSelf.Self.binding.as_type.impls.I.type.require(constants.%Self.f45) { // CHECK:STDOUT: %Self => constants.%Self.f45 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/named_constraint/require.carbon b/toolchain/check/testdata/named_constraint/require.carbon index 5a96c59b4470..7a1b1cadea7e 100644 --- a/toolchain/check/testdata/named_constraint/require.carbon +++ b/toolchain/check/testdata/named_constraint/require.carbon @@ -102,7 +102,7 @@ constraint Z { fn F(T:! Z) { // This should fail name lookup since Z does not extend Y. // - // CHECK:STDERR: fail_implicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInInstScope] + // CHECK:STDERR: fail_implicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: T.YY(); // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -123,7 +123,7 @@ constraint Z { fn F(T:! Z) { // This should fail name lookup since Z does not extend Y. // - // CHECK:STDERR: fail_explicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInInstScope] + // CHECK:STDERR: fail_explicit_self_no_extend_name_lookup_fails.carbon:[[@LINE+4]]:3: error: member name `YY` not found in `Z` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: T.YY(); // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -519,10 +519,9 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Y.type: type = facet_type <@Y> [concrete] -// CHECK:STDOUT: %Y.YY.type: type = fn_type @Y.YY [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y [concrete] -// CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, @Y.%Y.YY.decl [concrete] +// CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, @Y.%Y.WithSelf.YY.decl [concrete] // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] // CHECK:STDOUT: %Self.550: %Z.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.550 [symbolic] @@ -531,9 +530,10 @@ fn F() { // CHECK:STDOUT: %pattern_type.349: type = pattern_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %T, @Y [symbolic] // CHECK:STDOUT: %Y.facet: %Y.type = facet_value %T.binding.as_type, (%Y.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.bb4: type = fn_type_with_self_type %Y.YY.type, %Y.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.bb4 = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Y.YY(%Y.facet) [symbolic] +// CHECK:STDOUT: %Y.WithSelf.YY.type.7ea: type = fn_type @Y.WithSelf.YY, @Y(%Y.facet) [symbolic] +// CHECK:STDOUT: %.1b4: type = fn_type_with_self_type %Y.WithSelf.YY.type.7ea, %Y.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.1b4 = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Y.WithSelf.YY(%Y.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -545,27 +545,31 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constraint @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.550] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Y.type.require [concrete] { +// CHECK:STDOUT: constraint_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Y.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %Y.ref // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: type = specific_constant @Z.Self.binding.as_type.impls.Y.type.require.%Y.ref, @Z.Self.binding.as_type.impls.Y.type.require(constants.%Self.550) [concrete = constants.%Y.type] +// CHECK:STDOUT: %.loc9: type = specific_constant @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.ref, @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.550) [concrete = constants.%Y.type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: .YY = // CHECK:STDOUT: extend %.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Y.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Y.type.require.%Self.as_type impls @Z.Self.binding.as_type.impls.Y.type.require.%Y.ref +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Y.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Self.as_type impls @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.ref // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.550)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } @@ -577,9 +581,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %T.loc13_6.1, @Y [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)] // CHECK:STDOUT: %Y.facet.loc15: %Y.type = facet_value %T.binding.as_type, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)] -// CHECK:STDOUT: %.loc15_4.2: type = fn_type_with_self_type constants.%Y.YY.type, %Y.facet.loc15 [symbolic = %.loc15_4.2 (constants.%.bb4)] -// CHECK:STDOUT: %impl.elem0.loc15_4.2: @F.%.loc15_4.2 (%.bb4) = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc15_4.2: = specific_impl_function %impl.elem0.loc15_4.2, @Y.YY(%Y.facet.loc15) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Y.WithSelf.YY.type: type = fn_type @Y.WithSelf.YY, @Y(%Y.facet.loc15) [symbolic = %Y.WithSelf.YY.type (constants.%Y.WithSelf.YY.type.7ea)] +// CHECK:STDOUT: %.loc15_4.2: type = fn_type_with_self_type %Y.WithSelf.YY.type, %Y.facet.loc15 [symbolic = %.loc15_4.2 (constants.%.1b4)] +// CHECK:STDOUT: %impl.elem0.loc15_4.2: @F.%.loc15_4.2 (%.1b4) = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc15_4.2: = specific_impl_function %impl.elem0.loc15_4.2, @Y.WithSelf.YY(%Y.facet.loc15) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @F.%T.binding.as_type (%T.binding.as_type)) { // CHECK:STDOUT: !entry: @@ -587,28 +592,32 @@ fn F() { // CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc15_4.1: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %YY.ref.loc15: %Y.assoc_type = name_ref YY, @Y.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc15_4.1: @F.%.loc15_4.2 (%.bb4) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc15_4.1: = specific_impl_function %impl.elem0.loc15_4.1, @Y.YY(constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %Y.YY.call.loc15: init %empty_tuple.type = call %specific_impl_fn.loc15_4.1() +// CHECK:STDOUT: %impl.elem0.loc15_4.1: @F.%.loc15_4.2 (%.1b4) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc15_4.1: = specific_impl_function %impl.elem0.loc15_4.1, @Y.WithSelf.YY(constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Y.WithSelf.YY.call.loc15: init %empty_tuple.type = call %specific_impl_fn.loc15_4.1() // CHECK:STDOUT: %T.ref.loc16: %Z.type = name_ref T, %T.loc13_6.2 [symbolic = %T.loc13_6.1 (constants.%T)] // CHECK:STDOUT: %Y.ref: type = name_ref Y, file.%Y.decl [concrete = constants.%Y.type] // CHECK:STDOUT: %YY.ref.loc16: %Y.assoc_type = name_ref YY, @Y.%assoc0 [concrete = constants.%assoc0] // CHECK:STDOUT: %T.as_type.loc16: type = facet_access_type %T.ref.loc16 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %Y.facet.loc16: %Y.type = facet_value %T.as_type.loc16, (constants.%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)] // CHECK:STDOUT: %.loc16: %Y.type = converted %T.ref.loc16, %Y.facet.loc16 [symbolic = %Y.facet.loc15 (constants.%Y.facet)] -// CHECK:STDOUT: %impl.elem0.loc16: @F.%.loc15_4.2 (%.bb4) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc16: = specific_impl_function %impl.elem0.loc16, @Y.YY(constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %Y.YY.call.loc16: init %empty_tuple.type = call %specific_impl_fn.loc16() +// CHECK:STDOUT: %impl.elem0.loc16: @F.%.loc15_4.2 (%.1b4) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc16: = specific_impl_function %impl.elem0.loc16, @Y.WithSelf.YY(constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Y.WithSelf.YY.call.loc16: init %empty_tuple.type = call %specific_impl_fn.loc16() // CHECK:STDOUT: %t.ref: @F.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t // CHECK:STDOUT: %YY.ref.loc18: %Y.assoc_type = name_ref YY, @Y.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc18: @F.%.loc15_4.2 (%.bb4) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc18: = specific_impl_function %impl.elem0.loc18, @Y.YY(constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %Y.YY.call.loc18: init %empty_tuple.type = call %specific_impl_fn.loc18() +// CHECK:STDOUT: %impl.elem0.loc18: @F.%.loc15_4.2 (%.1b4) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc18: = specific_impl_function %impl.elem0.loc18, @Y.WithSelf.YY(constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Y.WithSelf.YY.call.loc18: init %empty_tuple.type = call %specific_impl_fn.loc18() // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y.type.require(constants.%Self.550) { +// CHECK:STDOUT: specific @Z(constants.%Self.550) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.550) { // CHECK:STDOUT: %Self => constants.%Self.550 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: } @@ -619,7 +628,11 @@ fn F() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.349 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y.type.require(constants.%T) { +// CHECK:STDOUT: specific @Z(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%T) { // CHECK:STDOUT: %Self => constants.%T // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: } @@ -627,26 +640,30 @@ fn F() { // CHECK:STDOUT: --- extend_with_self.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %Y.type.82b: type = generic_interface_type @Y [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Y.generic: %Y.type.82b = struct_value () [concrete] +// CHECK:STDOUT: %Y.type.a16: type = facet_type <@Y, @Y(%T.67d)> [symbolic] +// CHECK:STDOUT: %Self.6f4: %Y.type.a16 = symbolic_binding Self, 1 [symbolic] // CHECK:STDOUT: %Z.type: type = facet_type <@Z> [concrete] // CHECK:STDOUT: %Self.550: %Z.type = symbolic_binding Self, 0 [symbolic] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self.550 [symbolic] // CHECK:STDOUT: %Y.type.83d: type = facet_type <@Y, @Y(%Self.binding.as_type)> [symbolic] +// CHECK:STDOUT: %require_complete.057: = require_complete_type %Y.type.83d [symbolic] // CHECK:STDOUT: %T.f45: %Z.type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %T.binding.as_type: type = symbolic_binding_type T, 0, %T.f45 [symbolic] // CHECK:STDOUT: %pattern_type.349: type = pattern_type %T.binding.as_type [symbolic] // CHECK:STDOUT: %Y.type.55c: type = facet_type <@Y, @Y(%T.binding.as_type)> [symbolic] -// CHECK:STDOUT: %Y.YY.type.fde: type = fn_type @Y.YY, @Y(%T.binding.as_type) [symbolic] -// CHECK:STDOUT: %Y.assoc_type.eee: type = assoc_entity_type @Y, @Y(%T.binding.as_type) [symbolic] -// CHECK:STDOUT: %assoc0.950: %Y.assoc_type.eee = assoc_entity element0, @Y.%Y.YY.decl [symbolic] // CHECK:STDOUT: %require_complete.ec2: = require_complete_type %Y.type.55c [symbolic] +// CHECK:STDOUT: %Y.assoc_type.eee: type = assoc_entity_type @Y, @Y(%T.binding.as_type) [symbolic] +// CHECK:STDOUT: %assoc0.e42: %Y.assoc_type.eee = assoc_entity element0, @Y.%Y.WithSelf.YY.decl [symbolic] // CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %T.f45, @Y, @Y(%T.binding.as_type) [symbolic] // CHECK:STDOUT: %Y.facet: %Y.type.55c = facet_value %T.binding.as_type, (%Y.lookup_impl_witness) [symbolic] -// CHECK:STDOUT: %.c0b: type = fn_type_with_self_type %Y.YY.type.fde, %Y.facet [symbolic] -// CHECK:STDOUT: %impl.elem0: %.c0b = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic] -// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Y.YY(%T.binding.as_type, %Y.facet) [symbolic] +// CHECK:STDOUT: %Y.WithSelf.YY.type.aeb: type = fn_type @Y.WithSelf.YY, @Y(%T.binding.as_type, %Y.facet) [symbolic] +// CHECK:STDOUT: %.b61: type = fn_type_with_self_type %Y.WithSelf.YY.type.aeb, %Y.facet [symbolic] +// CHECK:STDOUT: %impl.elem0: %.b61 = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic] +// CHECK:STDOUT: %specific_impl_fn: = specific_impl_function %impl.elem0, @Y.WithSelf.YY(%T.binding.as_type, %Y.facet) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -657,32 +674,36 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: constraint @Z { -// CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.550] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Y.type.require [concrete] { +// CHECK:STDOUT: %Self.loc8: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.550] +// CHECK:STDOUT: constraint_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Y.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type.loc9_18 impls %Y.type.loc9_30.1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.as_type.loc9_18: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] +// CHECK:STDOUT: %Self.as_type.loc9_18: type = facet_access_type @Z.%Self.loc8 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Y.ref: %Y.type.82b = name_ref Y, file.%Y.decl [concrete = constants.%Y.generic] -// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.550)] +// CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self.loc8 [symbolic = %Self (constants.%Self.550)] // CHECK:STDOUT: %Self.as_type.loc9_30: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc9: type = converted %Self.ref, %Self.as_type.loc9_30 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Y.type.loc9_30.1: type = facet_type <@Y, @Y(constants.%Self.binding.as_type)> [symbolic = %Y.type.loc9_30.2 (constants.%Y.type.83d)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: type = specific_constant @Z.Self.binding.as_type.impls.Y.type.require.%Y.type.loc9_30.1, @Z.Self.binding.as_type.impls.Y.type.require(constants.%Self.550) [symbolic = constants.%Y.type.83d] +// CHECK:STDOUT: %.loc9: type = specific_constant @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.type.loc9_30.1, @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.550) [symbolic = %Y.type (constants.%Y.type.83d)] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc8 +// CHECK:STDOUT: .Y = // CHECK:STDOUT: .Y = // CHECK:STDOUT: .YY = // CHECK:STDOUT: extend %.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Y.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Y.type.require.%Self.as_type.loc9_18 impls @Z.Self.binding.as_type.impls.Y.type.require.%Y.type.loc9_30.1 +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Y.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Self.as_type.loc9_18 impls @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.type.loc9_30.1 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(@Z.%Self.loc8: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.550)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Y.type.loc9_30.2: type = facet_type <@Y, @Y(%Self.binding.as_type)> [symbolic = %Y.type.loc9_30.2 (constants.%Y.type.83d)] @@ -696,49 +717,57 @@ fn F() { // CHECK:STDOUT: %Y.type.loc15: type = facet_type <@Y, @Y(%T.binding.as_type)> [symbolic = %Y.type.loc15 (constants.%Y.type.55c)] // CHECK:STDOUT: %require_complete.loc15: = require_complete_type %Y.type.loc15 [symbolic = %require_complete.loc15 (constants.%require_complete.ec2)] // CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type @Y, @Y(%T.binding.as_type) [symbolic = %Y.assoc_type (constants.%Y.assoc_type.eee)] -// CHECK:STDOUT: %assoc0: @F.%Y.assoc_type (%Y.assoc_type.eee) = assoc_entity element0, @Y.%Y.YY.decl [symbolic = %assoc0 (constants.%assoc0.950)] +// CHECK:STDOUT: %assoc0: @F.%Y.assoc_type (%Y.assoc_type.eee) = assoc_entity element0, @Y.%Y.WithSelf.YY.decl [symbolic = %assoc0 (constants.%assoc0.e42)] // CHECK:STDOUT: %Y.lookup_impl_witness: = lookup_impl_witness %T.loc13_6.1, @Y, @Y(%T.binding.as_type) [symbolic = %Y.lookup_impl_witness (constants.%Y.lookup_impl_witness)] -// CHECK:STDOUT: %Y.YY.type: type = fn_type @Y.YY, @Y(%T.binding.as_type) [symbolic = %Y.YY.type (constants.%Y.YY.type.fde)] // CHECK:STDOUT: %Y.facet.loc15: @F.%Y.type.loc15 (%Y.type.55c) = facet_value %T.binding.as_type, (%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)] -// CHECK:STDOUT: %.loc15_4.3: type = fn_type_with_self_type %Y.YY.type, %Y.facet.loc15 [symbolic = %.loc15_4.3 (constants.%.c0b)] -// CHECK:STDOUT: %impl.elem0.loc15_4.2: @F.%.loc15_4.3 (%.c0b) = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc15_4.2: = specific_impl_function %impl.elem0.loc15_4.2, @Y.YY(%T.binding.as_type, %Y.facet.loc15) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Y.WithSelf.YY.type: type = fn_type @Y.WithSelf.YY, @Y(%T.binding.as_type, %Y.facet.loc15) [symbolic = %Y.WithSelf.YY.type (constants.%Y.WithSelf.YY.type.aeb)] +// CHECK:STDOUT: %.loc15_4.3: type = fn_type_with_self_type %Y.WithSelf.YY.type, %Y.facet.loc15 [symbolic = %.loc15_4.3 (constants.%.b61)] +// CHECK:STDOUT: %impl.elem0.loc15_4.2: @F.%.loc15_4.3 (%.b61) = impl_witness_access %Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc15_4.2: = specific_impl_function %impl.elem0.loc15_4.2, @Y.WithSelf.YY(%T.binding.as_type, %Y.facet.loc15) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @F.%T.binding.as_type (%T.binding.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref.loc15: %Z.type = name_ref T, %T.loc13_6.2 [symbolic = %T.loc13_6.1 (constants.%T.f45)] // CHECK:STDOUT: %T.as_type.loc15: type = facet_access_type %T.ref.loc15 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc15_4.1: type = converted %T.ref.loc15, %T.as_type.loc15 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc15_4.2: @F.%Y.assoc_type (%Y.assoc_type.eee) = specific_constant @Y.%assoc0.loc4_10.1, @Y(constants.%T.binding.as_type) [symbolic = %assoc0 (constants.%assoc0.950)] -// CHECK:STDOUT: %YY.ref.loc15: @F.%Y.assoc_type (%Y.assoc_type.eee) = name_ref YY, %.loc15_4.2 [symbolic = %assoc0 (constants.%assoc0.950)] -// CHECK:STDOUT: %impl.elem0.loc15_4.1: @F.%.loc15_4.3 (%.c0b) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc15_4.1: = specific_impl_function %impl.elem0.loc15_4.1, @Y.YY(constants.%T.binding.as_type, constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %Y.YY.call.loc15: init %empty_tuple.type = call %specific_impl_fn.loc15_4.1() +// CHECK:STDOUT: %.loc15_4.2: @F.%Y.assoc_type (%Y.assoc_type.eee) = specific_constant @Y.%assoc0.loc4_10.1, @Y(constants.%T.binding.as_type, constants.%T.f45) [symbolic = %assoc0 (constants.%assoc0.e42)] +// CHECK:STDOUT: %YY.ref.loc15: @F.%Y.assoc_type (%Y.assoc_type.eee) = name_ref YY, %.loc15_4.2 [symbolic = %assoc0 (constants.%assoc0.e42)] +// CHECK:STDOUT: %impl.elem0.loc15_4.1: @F.%.loc15_4.3 (%.b61) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc15_4.1: = specific_impl_function %impl.elem0.loc15_4.1, @Y.WithSelf.YY(constants.%T.binding.as_type, constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Y.WithSelf.YY.call.loc15: init %empty_tuple.type = call %specific_impl_fn.loc15_4.1() // CHECK:STDOUT: %T.ref.loc16_3: %Z.type = name_ref T, %T.loc13_6.2 [symbolic = %T.loc13_6.1 (constants.%T.f45)] // CHECK:STDOUT: %Y.ref: %Y.type.82b = name_ref Y, file.%Y.decl [concrete = constants.%Y.generic] // CHECK:STDOUT: %T.ref.loc16_8: %Z.type = name_ref T, %T.loc13_6.2 [symbolic = %T.loc13_6.1 (constants.%T.f45)] // CHECK:STDOUT: %T.as_type.loc16_9: type = facet_access_type %T.ref.loc16_8 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc16_9: type = converted %T.ref.loc16_8, %T.as_type.loc16_9 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %Y.type.loc16: type = facet_type <@Y, @Y(constants.%T.binding.as_type)> [symbolic = %Y.type.loc15 (constants.%Y.type.55c)] -// CHECK:STDOUT: %.loc16_10: @F.%Y.assoc_type (%Y.assoc_type.eee) = specific_constant @Y.%assoc0.loc4_10.1, @Y(constants.%T.binding.as_type) [symbolic = %assoc0 (constants.%assoc0.950)] -// CHECK:STDOUT: %YY.ref.loc16: @F.%Y.assoc_type (%Y.assoc_type.eee) = name_ref YY, %.loc16_10 [symbolic = %assoc0 (constants.%assoc0.950)] +// CHECK:STDOUT: %.loc16_10: @F.%Y.assoc_type (%Y.assoc_type.eee) = specific_constant @Y.%assoc0.loc4_10.1, @Y(constants.%T.binding.as_type, constants.%Self.6f4) [symbolic = %assoc0 (constants.%assoc0.e42)] +// CHECK:STDOUT: %YY.ref.loc16: @F.%Y.assoc_type (%Y.assoc_type.eee) = name_ref YY, %.loc16_10 [symbolic = %assoc0 (constants.%assoc0.e42)] // CHECK:STDOUT: %T.as_type.loc16_4: type = facet_access_type %T.ref.loc16_3 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %Y.facet.loc16: @F.%Y.type.loc15 (%Y.type.55c) = facet_value %T.as_type.loc16_4, (constants.%Y.lookup_impl_witness) [symbolic = %Y.facet.loc15 (constants.%Y.facet)] // CHECK:STDOUT: %.loc16_4: @F.%Y.type.loc15 (%Y.type.55c) = converted %T.ref.loc16_3, %Y.facet.loc16 [symbolic = %Y.facet.loc15 (constants.%Y.facet)] -// CHECK:STDOUT: %impl.elem0.loc16: @F.%.loc15_4.3 (%.c0b) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc16: = specific_impl_function %impl.elem0.loc16, @Y.YY(constants.%T.binding.as_type, constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %Y.YY.call.loc16: init %empty_tuple.type = call %specific_impl_fn.loc16() +// CHECK:STDOUT: %impl.elem0.loc16: @F.%.loc15_4.3 (%.b61) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc16: = specific_impl_function %impl.elem0.loc16, @Y.WithSelf.YY(constants.%T.binding.as_type, constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Y.WithSelf.YY.call.loc16: init %empty_tuple.type = call %specific_impl_fn.loc16() // CHECK:STDOUT: %t.ref: @F.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t -// CHECK:STDOUT: %.loc18: @F.%Y.assoc_type (%Y.assoc_type.eee) = specific_constant @Y.%assoc0.loc4_10.1, @Y(constants.%T.binding.as_type) [symbolic = %assoc0 (constants.%assoc0.950)] -// CHECK:STDOUT: %YY.ref.loc18: @F.%Y.assoc_type (%Y.assoc_type.eee) = name_ref YY, %.loc18 [symbolic = %assoc0 (constants.%assoc0.950)] -// CHECK:STDOUT: %impl.elem0.loc18: @F.%.loc15_4.3 (%.c0b) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %specific_impl_fn.loc18: = specific_impl_function %impl.elem0.loc18, @Y.YY(constants.%T.binding.as_type, constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %Y.YY.call.loc18: init %empty_tuple.type = call %specific_impl_fn.loc18() +// CHECK:STDOUT: %.loc18: @F.%Y.assoc_type (%Y.assoc_type.eee) = specific_constant @Y.%assoc0.loc4_10.1, @Y(constants.%T.binding.as_type, constants.%T.f45) [symbolic = %assoc0 (constants.%assoc0.e42)] +// CHECK:STDOUT: %YY.ref.loc18: @F.%Y.assoc_type (%Y.assoc_type.eee) = name_ref YY, %.loc18 [symbolic = %assoc0 (constants.%assoc0.e42)] +// CHECK:STDOUT: %impl.elem0.loc18: @F.%.loc15_4.3 (%.b61) = impl_witness_access constants.%Y.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %specific_impl_fn.loc18: = specific_impl_function %impl.elem0.loc18, @Y.WithSelf.YY(constants.%T.binding.as_type, constants.%Y.facet) [symbolic = %specific_impl_fn.loc15_4.2 (constants.%specific_impl_fn)] +// CHECK:STDOUT: %Y.WithSelf.YY.call.loc18: init %empty_tuple.type = call %specific_impl_fn.loc18() // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y.type.require(constants.%Self.550) { +// CHECK:STDOUT: specific @Z(constants.%Self.550) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%Self.550 +// CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type +// CHECK:STDOUT: %Y.type => constants.%Y.type.83d +// CHECK:STDOUT: %require_complete => constants.%require_complete.057 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.550) { // CHECK:STDOUT: %Self => constants.%Self.550 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %Y.type.loc9_30.2 => constants.%Y.type.83d @@ -750,7 +779,15 @@ fn F() { // CHECK:STDOUT: %pattern_type => constants.%pattern_type.349 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y.type.require(constants.%T.f45) { +// CHECK:STDOUT: specific @Z(constants.%T.f45) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc9 => constants.%T.f45 +// CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type +// CHECK:STDOUT: %Y.type => constants.%Y.type.55c +// CHECK:STDOUT: %require_complete => constants.%require_complete.ec2 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%T.f45) { // CHECK:STDOUT: %Self => constants.%T.f45 // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: %Y.type.loc9_30.2 => constants.%Y.type.55c @@ -776,7 +813,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constraint @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.550] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Y.type.require [concrete] { +// CHECK:STDOUT: constraint_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Y.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %Y.ref // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -786,24 +826,33 @@ fn F() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Y.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Y.type.require.%Self.as_type impls @Z.Self.binding.as_type.impls.Y.type.require.%Y.ref +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Y.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Self.as_type impls @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.ref // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.550)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y.type.require(constants.%Self.550) { +// CHECK:STDOUT: specific @Z(constants.%Self.550) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.550) { // CHECK:STDOUT: %Self => constants.%Self.550 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y.type.require(constants.%T) { +// CHECK:STDOUT: specific @Z(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%T) { // CHECK:STDOUT: %Self => constants.%T // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: } @@ -828,7 +877,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constraint @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.550] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Y.type.require [concrete] { +// CHECK:STDOUT: constraint_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Y.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Y.type.require [concrete] { // CHECK:STDOUT: require %.loc9 impls %Y.ref // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %Z.type = name_ref Self, @Z.%Self [symbolic = %Self (constants.%Self.550)] @@ -840,24 +892,33 @@ fn F() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Y.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Y.type.require.%.loc9 impls @Z.Self.binding.as_type.impls.Y.type.require.%Y.ref +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Y.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%.loc9 impls @Z.WithSelf.Self.binding.as_type.impls.Y.type.require.%Y.ref // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(@Z.%Self: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.550)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y.type.require(constants.%Self.550) { +// CHECK:STDOUT: specific @Z(constants.%Self.550) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%Self.550) { // CHECK:STDOUT: %Self => constants.%Self.550 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y.type.require(constants.%T) { +// CHECK:STDOUT: specific @Z(constants.%T) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y.type.require(constants.%T) { // CHECK:STDOUT: %Self => constants.%T // CHECK:STDOUT: %Self.binding.as_type => constants.%T.binding.as_type // CHECK:STDOUT: } @@ -883,7 +944,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constraint @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.550] -// CHECK:STDOUT: %Z.C.impls.Y.type.require.decl = require_decl @Z.C.impls.Y.type.require [concrete] { +// CHECK:STDOUT: constraint_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.C.impls.Y.type.require.decl = require_decl @Z.WithSelf.C.impls.Y.type.require [concrete] { // CHECK:STDOUT: require %C.loc9_17.1 impls %Y.ref // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] @@ -898,20 +962,24 @@ fn F() { // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .C = // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .C = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.C.impls.Y.type.require { -// CHECK:STDOUT: require @Z.C.impls.Y.type.require.%C.loc9_17.1 impls @Z.C.impls.Y.type.require.%Y.ref +// CHECK:STDOUT: @Z.WithSelf.C.impls.Y.type.require { +// CHECK:STDOUT: require @Z.WithSelf.C.impls.Y.type.require.%C.loc9_17.1 impls @Z.WithSelf.C.impls.Y.type.require.%Y.ref // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.C.impls.Y.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.C.impls.Y.type.require(@Z.%Self: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.550)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %C.loc9_17.2: type = class_type @C, @C(%Self.binding.as_type) [symbolic = %C.loc9_17.2 (constants.%C.237)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.C.impls.Y.type.require(constants.%Self.550) { +// CHECK:STDOUT: specific @Z(constants.%Self.550) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.C.impls.Y.type.require(constants.%Self.550) { // CHECK:STDOUT: %Self => constants.%Self.550 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %C.loc9_17.2 => constants.%C.237 @@ -944,7 +1012,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constraint @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.550] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Y_where.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Y_where.type.require [concrete] { +// CHECK:STDOUT: constraint_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type impls %.loc7_19 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -966,19 +1037,22 @@ fn F() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Y_where.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Y_where.type.require.%Self.as_type impls @Z.Self.binding.as_type.impls.Y_where.type.require.%.loc7_19 +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require.%Self.as_type impls @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require.%.loc7_19 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Y_where.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require(@Z.%Self: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.550)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y_where.type.require(constants.%Self.550) { +// CHECK:STDOUT: specific @Z(constants.%Self.550) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require(constants.%Self.550) { // CHECK:STDOUT: %Self => constants.%Self.550 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: } @@ -999,14 +1073,18 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constraint @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: constraint_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_require_impls_incomplete_self.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1023,14 +1101,18 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constraint @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: constraint_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Z = +// CHECK:STDOUT: .Z = // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- fail_require_impls_incomplete_self_specific.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1064,11 +1146,14 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: %Self.loc4_24.1: @Z.%Z.type (%Z.type.d682d6.1) = symbolic_binding Self, 1 [symbolic = %Self.loc4_24.2 (constants.%Self)] +// CHECK:STDOUT: constraint_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_24.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .Z = +// CHECK:STDOUT: .T = +// CHECK:STDOUT: .Z = // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -1078,6 +1163,8 @@ fn F() { // CHECK:STDOUT: %T.loc4_14.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%T, constants.%Self) {} +// CHECK:STDOUT: // CHECK:STDOUT: specific @Z(constants.%Self.binding.as_type) { // CHECK:STDOUT: %T.loc4_14.1 => constants.%Self.binding.as_type // CHECK:STDOUT: } @@ -1114,11 +1201,14 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constraint { // CHECK:STDOUT: %Self.loc8_24.1: @Z.%Z.type (%Z.type.d68) = symbolic_binding Self, 1 [symbolic = %Self.loc8_24.2 (constants.%Self.31c)] +// CHECK:STDOUT: constraint_with_self_decl @Z [concrete] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc8_24.1 // CHECK:STDOUT: .T = // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .T = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } @@ -1128,6 +1218,8 @@ fn F() { // CHECK:STDOUT: %T.loc8_14.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @Z(constants.%T, constants.%Self.31c) {} +// CHECK:STDOUT: // CHECK:STDOUT: --- require_self_in_requirement.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { @@ -1153,7 +1245,10 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: constraint @Z { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = constants.%Self.550] -// CHECK:STDOUT: %Z.Self.binding.as_type.impls.Y_where.type.require.decl = require_decl @Z.Self.binding.as_type.impls.Y_where.type.require [concrete] { +// CHECK:STDOUT: constraint_with_self_decl @Z [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require.decl = require_decl @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require [concrete] { // CHECK:STDOUT: require %Self.as_type.loc10_11 impls %.loc10_19 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.as_type.loc10_11: type = facet_access_type @Z.%Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] @@ -1176,20 +1271,23 @@ fn F() { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self // CHECK:STDOUT: .Y = +// CHECK:STDOUT: .Y = // CHECK:STDOUT: // CHECK:STDOUT: !requires: -// CHECK:STDOUT: @Z.Self.binding.as_type.impls.Y_where.type.require { -// CHECK:STDOUT: require @Z.Self.binding.as_type.impls.Y_where.type.require.%Self.as_type.loc10_11 impls @Z.Self.binding.as_type.impls.Y_where.type.require.%.loc10_19 +// CHECK:STDOUT: @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require { +// CHECK:STDOUT: require @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require.%Self.as_type.loc10_11 impls @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require.%.loc10_19 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic require @Z.Self.binding.as_type.impls.Y_where.type.require(@Z.%Self: %Z.type) { +// CHECK:STDOUT: generic require @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require(@Z.%Self: %Z.type) { // CHECK:STDOUT: %Self: %Z.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.550)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %Y_where.type: type = facet_type <@Y where constants.%impl.elem0 = %Self.binding.as_type> [symbolic = %Y_where.type (constants.%Y_where.type)] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Z.Self.binding.as_type.impls.Y_where.type.require(constants.%Self.550) { +// CHECK:STDOUT: specific @Z(constants.%Self.550) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Z.WithSelf.Self.binding.as_type.impls.Y_where.type.require(constants.%Self.550) { // CHECK:STDOUT: %Self => constants.%Self.550 // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type // CHECK:STDOUT: %Y_where.type => constants.%Y_where.type diff --git a/toolchain/check/testdata/namespace/add_to_import.carbon b/toolchain/check/testdata/namespace/add_to_import.carbon index 63da0ec32007..2bd47e62bb39 100644 --- a/toolchain/check/testdata/namespace/add_to_import.carbon +++ b/toolchain/check/testdata/namespace/add_to_import.carbon @@ -59,7 +59,6 @@ var a: i32 = NS.A(); // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -67,7 +66,8 @@ var a: i32 = NS.A(); // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -125,7 +125,7 @@ var a: i32 = NS.A(); // CHECK:STDOUT: fn @A() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc4_28.1: = bound_method %int_0, %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.loc4_28.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/namespace/alias.carbon b/toolchain/check/testdata/namespace/alias.carbon index f8bcbe08a561..9602b6f19b86 100644 --- a/toolchain/check/testdata/namespace/alias.carbon +++ b/toolchain/check/testdata/namespace/alias.carbon @@ -39,7 +39,6 @@ fn D() -> i32 { return C(); } // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -47,7 +46,8 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -124,7 +124,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: fn @A() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc19_28.1: = bound_method %int_0, %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.loc19_28.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon index a97f3d60e94e..b7483d1cb310 100644 --- a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon +++ b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon @@ -41,7 +41,6 @@ fn ns.A() -> i32 { return 0; } // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -49,7 +48,8 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -94,7 +94,7 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: fn @A() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc27_28.1: = bound_method %int_0, %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.loc27_28.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/namespace/fail_not_top_level.carbon b/toolchain/check/testdata/namespace/fail_not_top_level.carbon index 827d24e69cfb..0107cf371b53 100644 --- a/toolchain/check/testdata/namespace/fail_not_top_level.carbon +++ b/toolchain/check/testdata/namespace/fail_not_top_level.carbon @@ -53,8 +53,8 @@ interface I { // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [concrete] // CHECK:STDOUT: %I.type.c78: type = facet_type <@I.loc33> [concrete] // CHECK:STDOUT: %Self: %I.type.c78 = symbolic_binding Self, 0 [symbolic] -// CHECK:STDOUT: %I.type.aee: type = fn_type @I.loc39 [concrete] -// CHECK:STDOUT: %I: %I.type.aee = struct_value () [concrete] +// CHECK:STDOUT: %I.type.4dd: type = fn_type @I.loc39, @I.loc33(%Self) [symbolic] +// CHECK:STDOUT: %I: %I.type.4dd = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -78,14 +78,17 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I.loc33 { -// CHECK:STDOUT: %Self: %I.type.c78 = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %Self.loc33: %I.type.c78 = symbolic_binding Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: interface_with_self_decl @I.loc33 [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: // CHECK:STDOUT: %N: = namespace [concrete] { // CHECK:STDOUT: .I = %I.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %I.decl: %I.type.aee = fn_decl @I.loc39 [concrete = constants.%I] {} {} +// CHECK:STDOUT: %I.decl: @I.loc33.%I.type (%I.type.4dd) = fn_decl @I.loc39 [symbolic = @I.loc33.%I (constants.%I)] {} {} // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .Self = %Self.loc33 // CHECK:STDOUT: .N = %N // CHECK:STDOUT: witness = () // CHECK:STDOUT: @@ -124,7 +127,7 @@ interface I { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @I.loc39(@I.loc33.%Self: %I.type.c78) { +// CHECK:STDOUT: generic fn @I.loc39(@I.loc33.%Self.loc33: %I.type.c78) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -133,5 +136,12 @@ interface I { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @I.loc33(constants.%Self) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %Self.loc39 => constants.%Self +// CHECK:STDOUT: %I.type => constants.%I.type.4dd +// CHECK:STDOUT: %I => constants.%I +// CHECK:STDOUT: } +// CHECK:STDOUT: // CHECK:STDOUT: specific @I.loc39(constants.%Self) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index 251d660aabd0..03e391a331f6 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -53,7 +53,6 @@ fn N.M.B() -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -61,20 +60,21 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -147,7 +147,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %A.var: ref %i32 = var %A.var_patt // CHECK:STDOUT: %int_0.loc26: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc26: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc26: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc26_5.1: = bound_method %int_0.loc26, %impl.elem0.loc26 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // 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_5.2: = bound_method %int_0.loc26, %specific_fn.loc26 [concrete = constants.%bound_method] @@ -161,7 +161,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %A: ref %i32 = ref_binding A, %A.var // CHECK:STDOUT: %A.ref.loc29: ref %i32 = name_ref A, %A // CHECK:STDOUT: %.loc29: %i32 = acquire_value %A.ref.loc29 -// CHECK:STDOUT: %impl.elem0.loc29: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc29: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc29_12.1: = bound_method %.loc29, %impl.elem0.loc29 // CHECK:STDOUT: %specific_fn.loc29: = specific_function %impl.elem0.loc29, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc29_12.2: = bound_method %.loc29, %specific_fn.loc29 @@ -172,7 +172,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_0.loc31: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc31: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc31: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc31_11.1: = bound_method %int_0.loc31, %impl.elem0.loc31 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc31: = specific_function %impl.elem0.loc31, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc31_11.2: = bound_method %int_0.loc31, %specific_fn.loc31 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/operators/builtin/and.carbon b/toolchain/check/testdata/operators/builtin/and.carbon index 7700c5f0ce65..adb3e921e266 100644 --- a/toolchain/check/testdata/operators/builtin/and.carbon +++ b/toolchain/check/testdata/operators/builtin/and.carbon @@ -42,10 +42,10 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.348: = impl_witness imports.%Copy.impl_witness_table.3cc [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value bool, (%Copy.impl_witness.348) [concrete] -// CHECK:STDOUT: %.56b: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.6dd: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.86d: type = fn_type_with_self_type %Copy.WithSelf.Op.type.6dd, %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: = bound_method %true, %bool.as.Copy.impl.Op [concrete] @@ -143,7 +143,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: fn @F() -> out %return.param: bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %true, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%true) [concrete = constants.%true] // CHECK:STDOUT: return %bool.as.Copy.impl.Op.call @@ -152,7 +152,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: fn @G() -> out %return.param: bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %true, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%true) [concrete = constants.%true] // CHECK:STDOUT: return %bool.as.Copy.impl.Op.call @@ -176,7 +176,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !and.result: // CHECK:STDOUT: %.loc19_14.5: bool = block_arg !and.result -// CHECK:STDOUT: %impl.elem0: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc19_14.5, %impl.elem0 // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%.loc19_14.5) // CHECK:STDOUT: return %bool.as.Copy.impl.Op.call @@ -190,7 +190,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref bool = var %a.var_patt // CHECK:STDOUT: %true.loc23_47: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %true.loc23_47, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%true.loc23_47) [concrete = constants.%true] // CHECK:STDOUT: assign %a.var, %bool.as.Copy.impl.Op.call diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index e9601df75e2c..8a163c779c0c 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -45,7 +45,6 @@ fn Main() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -53,7 +52,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.230: = bound_method %int_12.6a3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.906: = bound_method %int_12.6a3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -94,7 +94,6 @@ fn Main() { // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %ptr.235 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -102,7 +101,8 @@ fn Main() { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.c3c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005: = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] @@ -160,7 +160,7 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %i32 = var %a.var_patt // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [concrete = constants.%int_12.6a3] -// CHECK:STDOUT: %impl.elem0.loc16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %int_12, %impl.elem0.loc16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.230] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_12, %specific_fn.loc16 [concrete = constants.%bound_method.906] @@ -174,7 +174,7 @@ fn Main() { // CHECK:STDOUT: %a: ref %i32 = ref_binding a, %a.var // CHECK:STDOUT: %a.ref.loc17: ref %i32 = name_ref a, %a // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988] -// CHECK:STDOUT: %impl.elem0.loc17: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc17: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc17_5.1: = bound_method %int_9, %impl.elem0.loc17 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.87d] // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_5.2: = bound_method %int_9, %specific_fn.loc17 [concrete = constants.%bound_method.661] @@ -189,7 +189,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc19: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc19_28.1: %tuple.type.f94 = tuple_literal (%int_1.loc19, %int_2.loc19) [concrete = constants.%tuple.ad8] -// CHECK:STDOUT: %impl.elem0.loc19_28.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc19_28.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc19_28.1: = bound_method %int_1.loc19, %impl.elem0.loc19_28.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc19_28.1: = specific_function %impl.elem0.loc19_28.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_28.2: = bound_method %int_1.loc19, %specific_fn.loc19_28.1 [concrete = constants.%bound_method.38b] @@ -197,7 +197,7 @@ fn Main() { // CHECK:STDOUT: %.loc19_28.2: init %i32 = converted %int_1.loc19, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc19_28.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %tuple.elem0.loc19: ref %i32 = tuple_access %b.var, element0 // CHECK:STDOUT: %.loc19_28.3: init %i32 to %tuple.elem0.loc19 = in_place_init %.loc19_28.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc19_28.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc19_28.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc19_28.3: = bound_method %int_2.loc19, %impl.elem0.loc19_28.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc19_28.2: = specific_function %impl.elem0.loc19_28.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc19_28.4: = bound_method %int_2.loc19, %specific_fn.loc19_28.2 [concrete = constants.%bound_method.646] @@ -221,7 +221,7 @@ fn Main() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0.loc20: ref %i32 = tuple_access %b.ref.loc20, element0 // CHECK:STDOUT: %int_3.loc20: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc20: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc20: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc20_7.1: = bound_method %int_3.loc20, %impl.elem0.loc20 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_7.2: = bound_method %int_3.loc20, %specific_fn.loc20 [concrete = constants.%bound_method.fa7] @@ -232,7 +232,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1.loc21: ref %i32 = tuple_access %b.ref.loc21, element1 // CHECK:STDOUT: %int_4.loc21: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc21: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc21: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc21_7.1: = bound_method %int_4.loc21, %impl.elem0.loc21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // 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_7.2: = bound_method %int_4.loc21, %specific_fn.loc21 [concrete = constants.%bound_method.6d7] @@ -247,7 +247,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc23: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc23: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc23_46.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc23, %int_2.loc23) [concrete = constants.%struct.4aa] -// CHECK:STDOUT: %impl.elem0.loc23_46.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc23_46.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc23_46.1: = bound_method %int_1.loc23, %impl.elem0.loc23_46.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc23_46.1: = specific_function %impl.elem0.loc23_46.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_46.2: = bound_method %int_1.loc23, %specific_fn.loc23_46.1 [concrete = constants.%bound_method.38b] @@ -255,7 +255,7 @@ fn Main() { // CHECK:STDOUT: %.loc23_46.2: init %i32 = converted %int_1.loc23, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc23_46.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc23_46.3: ref %i32 = struct_access %c.var, element0 // CHECK:STDOUT: %.loc23_46.4: init %i32 to %.loc23_46.3 = in_place_init %.loc23_46.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc23_46.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc23_46.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc23_46.3: = bound_method %int_2.loc23, %impl.elem0.loc23_46.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc23_46.2: = specific_function %impl.elem0.loc23_46.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_46.4: = bound_method %int_2.loc23, %specific_fn.loc23_46.2 [concrete = constants.%bound_method.646] @@ -277,7 +277,7 @@ fn Main() { // CHECK:STDOUT: %c.ref.loc24: ref %struct_type.a.b.501 = name_ref c, %c // CHECK:STDOUT: %.loc24_4: ref %i32 = struct_access %c.ref.loc24, element0 // CHECK:STDOUT: %int_3.loc24: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc24: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc24: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc24_7.1: = bound_method %int_3.loc24, %impl.elem0.loc24 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // 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_7.2: = bound_method %int_3.loc24, %specific_fn.loc24 [concrete = constants.%bound_method.fa7] @@ -287,7 +287,7 @@ fn Main() { // CHECK:STDOUT: %c.ref.loc25: ref %struct_type.a.b.501 = name_ref c, %c // CHECK:STDOUT: %.loc25_4: ref %i32 = struct_access %c.ref.loc25, element1 // CHECK:STDOUT: %int_4.loc25: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc25: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc25_7.1: = bound_method %int_4.loc25, %impl.elem0.loc25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // 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_7.2: = bound_method %int_4.loc25, %specific_fn.loc25 [concrete = constants.%bound_method.6d7] @@ -301,7 +301,7 @@ fn Main() { // CHECK:STDOUT: %p.var: ref %ptr.235 = var %p.var_patt // CHECK:STDOUT: %a.ref.loc27: ref %i32 = name_ref a, %a // CHECK:STDOUT: %addr.loc27: %ptr.235 = addr_of %a.ref.loc27 -// CHECK:STDOUT: %impl.elem0.loc27: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc27: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc27_17.1: = bound_method %addr.loc27, %impl.elem0.loc27 // CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc27_17.2: = bound_method %addr.loc27, %specific_fn.loc27 @@ -317,7 +317,7 @@ fn Main() { // CHECK:STDOUT: %.loc28_4: %ptr.235 = acquire_value %p.ref.loc28 // CHECK:STDOUT: %.loc28_3: ref %i32 = deref %.loc28_4 // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0.loc28: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc28: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc28_6.1: = bound_method %int_5, %impl.elem0.loc28 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005] // CHECK:STDOUT: %specific_fn.loc28: = specific_function %impl.elem0.loc28, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc28_6.2: = bound_method %int_5, %specific_fn.loc28 [concrete = constants.%bound_method.e9d] @@ -341,7 +341,7 @@ fn Main() { // CHECK:STDOUT: %.loc30_5: %ptr.235 = block_arg !if.expr.result // CHECK:STDOUT: %.loc30_3: ref %i32 = deref %.loc30_5 // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10.64f] -// CHECK:STDOUT: %impl.elem0.loc30: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc30: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc30_29.1: = bound_method %int_10, %impl.elem0.loc30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2bf] // CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc30_29.2: = bound_method %int_10, %specific_fn.loc30 [concrete = constants.%bound_method.409] diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon index 865df7ca311b..bd8ebe36a4a4 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon @@ -95,10 +95,10 @@ fn F() { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %f64: type = class_type @Float, @Float(%int_64) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.b47: = impl_witness .inst{{[0-9A-F]+}} [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value type, (%Copy.impl_witness.b47) [concrete] -// CHECK:STDOUT: %.436: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.a4f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.070: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a4f, %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: } @@ -120,7 +120,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc6: type = block_arg !if.expr.result -// CHECK:STDOUT: %impl.elem0: %.436 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.070 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc6, %impl.elem0 // CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method(%.loc6) // CHECK:STDOUT: return %type.as.Copy.impl.Op.call @@ -139,10 +139,10 @@ fn F() { // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete] // CHECK:STDOUT: %f64: type = class_type @Float, @Float(%int_64) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.b47: = impl_witness .inst{{[0-9A-F]+}} [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value type, (%Copy.impl_witness.b47) [concrete] -// CHECK:STDOUT: %.436: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.a4f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.070: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a4f, %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: } @@ -164,7 +164,7 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: // CHECK:STDOUT: %.loc6: type = block_arg !if.expr.result -// CHECK:STDOUT: %impl.elem0: %.436 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.070 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc6, %impl.elem0 // CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method(%.loc6) // CHECK:STDOUT: return %type.as.Copy.impl.Op.call diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon index 4c6439b6f517..4d4b6a10b58e 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon @@ -78,17 +78,16 @@ fn Main() { // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete] // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.98e: = impl_witness imports.%Copy.impl_witness_table.d8f [concrete] // CHECK:STDOUT: %Copy.facet.34f: %Copy.type = facet_value Core.IntLiteral, (%Copy.impl_witness.98e) [concrete] -// CHECK:STDOUT: %.6b5: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.34f [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.42e: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.34f) [concrete] +// CHECK:STDOUT: %.5e6: type = fn_type_with_self_type %Copy.WithSelf.Op.type.42e, %Copy.facet.34f [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.type: type = fn_type @Core.IntLiteral.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op: %Core.IntLiteral.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.bound.74e: = bound_method %int_2.ecc, %Core.IntLiteral.as.Copy.impl.Op [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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -96,7 +95,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -120,7 +120,8 @@ fn Main() { // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %Copy.impl_witness.b47: = impl_witness imports.%Copy.impl_witness_table.b1c [concrete] // CHECK:STDOUT: %Copy.facet.4b0: %Copy.type = facet_value type, (%Copy.impl_witness.b47) [concrete] -// CHECK:STDOUT: %.436: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.4b0 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.a4f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.4b0) [concrete] +// CHECK:STDOUT: %.070: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a4f, %Copy.facet.4b0 [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: = bound_method %ptr.235, %type.as.Copy.impl.Op [concrete] @@ -187,14 +188,14 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1.loc22: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc22: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc22: %.6b5 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc22: %.5e6 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc22: = bound_method %int_2.loc22, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op.bound.74e] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.call.loc22: init Core.IntLiteral = call %bound_method.loc22(%int_2.loc22) [concrete = constants.%int_2.ecc] // CHECK:STDOUT: assign %int_1.loc22, %Core.IntLiteral.as.Copy.impl.Op.call.loc22 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F] // CHECK:STDOUT: %F.call: init %i32 = call %F.ref() // CHECK:STDOUT: %int_1.loc27: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc27: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc27: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc27_7.1: = bound_method %int_1.loc27, %impl.elem0.loc27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_7.2: = bound_method %int_1.loc27, %specific_fn.loc27 [concrete = constants.%bound_method.38b] @@ -207,12 +208,12 @@ fn Main() { // CHECK:STDOUT: %int_3.loc32: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_4.loc32: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %.loc32_17.1: %tuple.type.f94 = tuple_literal (%int_3.loc32, %int_4.loc32) [concrete = constants.%tuple.302] -// CHECK:STDOUT: %impl.elem0.loc32_13: %.6b5 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc32_13: %.5e6 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc32_13: = bound_method %int_3.loc32, %impl.elem0.loc32_13 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op.bound.04c] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.call.loc32_13: init Core.IntLiteral = call %bound_method.loc32_13(%int_3.loc32) [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %tuple.elem0.loc32: Core.IntLiteral = tuple_access %.loc32_8.1, element0 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc32_17.2: init Core.IntLiteral to %tuple.elem0.loc32 = in_place_init %Core.IntLiteral.as.Copy.impl.Op.call.loc32_13 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc32_16: %.6b5 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc32_16: %.5e6 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc32_16: = bound_method %int_4.loc32, %impl.elem0.loc32_16 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op.bound.e8e] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.call.loc32_16: init Core.IntLiteral = call %bound_method.loc32_16(%int_4.loc32) [concrete = constants.%int_4] // CHECK:STDOUT: %tuple.elem1.loc32: Core.IntLiteral = tuple_access %.loc32_8.1, element1 [concrete = constants.%int_2.ecc] @@ -228,7 +229,7 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var %n.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc33: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc33: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc33_3.1: = bound_method %int_0, %impl.elem0.loc33 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc33: = specific_function %impl.elem0.loc33, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc33_3.2: = bound_method %int_0, %specific_fn.loc33 [concrete = constants.%bound_method.d2e] @@ -246,7 +247,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc38: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc38: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc38_17.1: %tuple.type.f94 = tuple_literal (%int_1.loc38, %int_2.loc38) [concrete = constants.%tuple.ad8] -// CHECK:STDOUT: %impl.elem0.loc38_17.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc38_17.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc38_17.1: = bound_method %int_1.loc38, %impl.elem0.loc38_17.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc38_17.1: = specific_function %impl.elem0.loc38_17.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc38_17.2: = bound_method %int_1.loc38, %specific_fn.loc38_17.1 [concrete = constants.%bound_method.38b] @@ -254,7 +255,7 @@ fn Main() { // CHECK:STDOUT: %.loc38_17.2: init %i32 = converted %int_1.loc38, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc38_17.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %tuple.elem0.loc38: %i32 = tuple_access %.loc38_8.1, element0 // CHECK:STDOUT: %.loc38_17.3: init %i32 to %tuple.elem0.loc38 = in_place_init %.loc38_17.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc38_17.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc38_17.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc38_17.3: = bound_method %int_2.loc38, %impl.elem0.loc38_17.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc38_17.2: = specific_function %impl.elem0.loc38_17.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc38_17.4: = bound_method %int_2.loc38, %specific_fn.loc38_17.2 [concrete = constants.%bound_method.646] @@ -274,7 +275,7 @@ fn Main() { // CHECK:STDOUT: %int_32.loc43_9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc43_9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32.loc43_9 [concrete = constants.%ptr.235] -// CHECK:STDOUT: %impl.elem0.loc43: %.436 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc43: %.070 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc43: = bound_method %ptr, %impl.elem0.loc43 [concrete = constants.%type.as.Copy.impl.Op.bound] // CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method.loc43(%ptr) [concrete = constants.%ptr.235] // CHECK:STDOUT: assign %i32.loc43_3, %type.as.Copy.impl.Op.call @@ -284,12 +285,12 @@ fn Main() { // CHECK:STDOUT: %int_3.loc48: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %int_4.loc48: Core.IntLiteral = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %.loc48_37.1: %struct_type.x.y = struct_literal (%int_3.loc48, %int_4.loc48) [concrete = constants.%struct.a0d] -// CHECK:STDOUT: %impl.elem0.loc48_28: %.6b5 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc48_28: %.5e6 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc48_28: = bound_method %int_3.loc48, %impl.elem0.loc48_28 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op.bound.04c] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.call.loc48_28: init Core.IntLiteral = call %bound_method.loc48_28(%int_3.loc48) [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc48_37.2: Core.IntLiteral = struct_access %.loc48_18.1, element0 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc48_37.3: init Core.IntLiteral to %.loc48_37.2 = in_place_init %Core.IntLiteral.as.Copy.impl.Op.call.loc48_28 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc48_36: %.6b5 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc48_36: %.5e6 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc48_36: = bound_method %int_4.loc48, %impl.elem0.loc48_36 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op.bound.e8e] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.call.loc48_36: init Core.IntLiteral = call %bound_method.loc48_36(%int_4.loc48) [concrete = constants.%int_4] // CHECK:STDOUT: %.loc48_37.4: Core.IntLiteral = struct_access %.loc48_18.1, element1 [concrete = constants.%int_2.ecc] @@ -306,7 +307,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc53: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc53_12: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc53_12: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc53_12.1: = bound_method %int_1.loc53, %impl.elem0.loc53_12 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc53_12: = specific_function %impl.elem0.loc53_12, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc53_12.2: = bound_method %int_1.loc53, %specific_fn.loc53_12 [concrete = constants.%bound_method.38b] @@ -317,7 +318,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc53: // CHECK:STDOUT: %int_2.loc53: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc53_19: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc53_19: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc53_19.1: = bound_method %int_2.loc53, %impl.elem0.loc53_19 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc53_19: = specific_function %impl.elem0.loc53_19, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc53_19.2: = bound_method %int_2.loc53, %specific_fn.loc53_19 [concrete = constants.%bound_method.646] @@ -329,7 +330,7 @@ fn Main() { // CHECK:STDOUT: !if.expr.result.loc53: // CHECK:STDOUT: %.loc53_4: %i32 = block_arg !if.expr.result.loc53 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %int_3.loc53: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc53_27: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc53_27: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc53_27.1: = bound_method %int_3.loc53, %impl.elem0.loc53_27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc53_27: = specific_function %impl.elem0.loc53_27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc53_27.2: = bound_method %int_3.loc53, %specific_fn.loc53_27 [concrete = constants.%bound_method.fa7] @@ -362,7 +363,7 @@ fn Main() { // CHECK:STDOUT: !if.expr.result.loc61: // CHECK:STDOUT: %.loc61_4: %i32 = block_arg !if.expr.result.loc61 // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [concrete = constants.%int_10.64f] -// CHECK:STDOUT: %impl.elem0.loc61: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc61: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc61_27.1: = bound_method %int_10, %impl.elem0.loc61 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.2bf] // CHECK:STDOUT: %specific_fn.loc61: = specific_function %impl.elem0.loc61, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc61_27.2: = bound_method %int_10, %specific_fn.loc61 [concrete = constants.%bound_method.409] diff --git a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon index f096fb9c0ddd..cd13af08c331 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -45,7 +45,6 @@ fn Main() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -53,7 +52,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -65,14 +65,14 @@ fn Main() { // CHECK:STDOUT: %bound_method.fa7: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -121,7 +121,7 @@ fn Main() { // CHECK:STDOUT: fn @F() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_25.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // 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_25.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.d2e] @@ -138,7 +138,7 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %i32 = var %a.var_patt // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc18: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_3.1: = bound_method %int_3, %impl.elem0.loc18 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_3.2: = bound_method %int_3, %specific_fn.loc18 [concrete = constants.%bound_method.fa7] @@ -154,7 +154,7 @@ fn Main() { // CHECK:STDOUT: %a.ref.loc23_7: ref %i32 = name_ref a, %a // CHECK:STDOUT: %a.ref.loc23_10: ref %i32 = name_ref a, %a // CHECK:STDOUT: %.loc23: %i32 = acquire_value %a.ref.loc23_10 -// CHECK:STDOUT: %impl.elem0.loc23: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc23: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc23_10.1: = bound_method %.loc23, %impl.elem0.loc23 // CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc23_10.2: = bound_method %.loc23, %specific_fn.loc23 diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon index 23e6736a8a4d..6971c72e814e 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -39,7 +39,6 @@ fn Main() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -47,7 +46,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -90,7 +90,7 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref %i32 = var %a.var_patt // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %int_3, %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.loc16_3.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/operators/builtin/or.carbon b/toolchain/check/testdata/operators/builtin/or.carbon index 45f8b7e05288..50e6a10827a5 100644 --- a/toolchain/check/testdata/operators/builtin/or.carbon +++ b/toolchain/check/testdata/operators/builtin/or.carbon @@ -42,10 +42,10 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %true: bool = bool_literal true [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.348: = impl_witness imports.%Copy.impl_witness_table.3cc [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value bool, (%Copy.impl_witness.348) [concrete] -// CHECK:STDOUT: %.56b: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.6dd: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.86d: type = fn_type_with_self_type %Copy.WithSelf.Op.type.6dd, %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: = bound_method %true, %bool.as.Copy.impl.Op [concrete] @@ -143,7 +143,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: fn @F() -> out %return.param: bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %true, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%true) [concrete = constants.%true] // CHECK:STDOUT: return %bool.as.Copy.impl.Op.call @@ -152,7 +152,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: fn @G() -> out %return.param: bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %true, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%true) [concrete = constants.%true] // CHECK:STDOUT: return %bool.as.Copy.impl.Op.call @@ -177,7 +177,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: !or.result: // CHECK:STDOUT: %.loc19_14.6: bool = block_arg !or.result -// CHECK:STDOUT: %impl.elem0: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc19_14.6, %impl.elem0 // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%.loc19_14.6) // CHECK:STDOUT: return %bool.as.Copy.impl.Op.call @@ -191,7 +191,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref bool = var %a.var_patt // CHECK:STDOUT: %true.loc23_46: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc23: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc23: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc23: = bound_method %true.loc23_46, %impl.elem0.loc23 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc23: init bool = call %bound_method.loc23(%true.loc23_46) [concrete = constants.%true] // CHECK:STDOUT: assign %a.var, %bool.as.Copy.impl.Op.call.loc23 @@ -234,7 +234,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref bool = var %b.var_patt // CHECK:STDOUT: %true.loc24_47: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc24: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc24: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc24: = bound_method %true.loc24_47, %impl.elem0.loc24 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc24: init bool = call %bound_method.loc24(%true.loc24_47) [concrete = constants.%true] // CHECK:STDOUT: assign %b.var, %bool.as.Copy.impl.Op.call.loc24 @@ -277,7 +277,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: } // CHECK:STDOUT: %c.var: ref bool = var %c.var_patt // CHECK:STDOUT: %true.loc25_47: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc25: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc25: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method.loc25: = bound_method %true.loc25_47, %impl.elem0.loc25 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call.loc25: init bool = call %bound_method.loc25(%true.loc25_47) [concrete = constants.%true] // CHECK:STDOUT: assign %c.var, %bool.as.Copy.impl.Op.call.loc25 @@ -379,7 +379,7 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: } // CHECK:STDOUT: %a.var: ref bool = var %a.var_patt // CHECK:STDOUT: %true.loc30_43: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %true.loc30_43, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%true.loc30_43) [concrete = constants.%true] // CHECK:STDOUT: assign %a.var, %bool.as.Copy.impl.Op.call diff --git a/toolchain/check/testdata/operators/builtin/unary_op.carbon b/toolchain/check/testdata/operators/builtin/unary_op.carbon index 001506885629..49fc41463cc5 100644 --- a/toolchain/check/testdata/operators/builtin/unary_op.carbon +++ b/toolchain/check/testdata/operators/builtin/unary_op.carbon @@ -35,10 +35,10 @@ fn Constant() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Not: %Not.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.348: = impl_witness imports.%Copy.impl_witness_table.3cc [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value bool, (%Copy.impl_witness.348) [concrete] -// CHECK:STDOUT: %.56b: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.6dd: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.86d: type = fn_type_with_self_type %Copy.WithSelf.Op.type.6dd, %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: %true: bool = bool_literal true [concrete] @@ -124,7 +124,7 @@ fn Constant() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %b.ref: bool = name_ref b, %b // CHECK:STDOUT: %.loc16: bool = not %b.ref -// CHECK:STDOUT: %impl.elem0: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc16, %impl.elem0 // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%.loc16) // CHECK:STDOUT: return %bool.as.Copy.impl.Op.call @@ -171,7 +171,7 @@ fn Constant() { // CHECK:STDOUT: } // CHECK:STDOUT: %b.var: ref bool = var %b.var_patt // CHECK:STDOUT: %true.loc24: bool = bool_literal true [concrete = constants.%true] -// CHECK:STDOUT: %impl.elem0: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %true.loc24, %impl.elem0 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%true.loc24) [concrete = constants.%true] // CHECK:STDOUT: assign %b.var, %bool.as.Copy.impl.Op.call diff --git a/toolchain/check/testdata/operators/overloaded/add.carbon b/toolchain/check/testdata/operators/overloaded/add.carbon index 444774143087..d429887fa699 100644 --- a/toolchain/check/testdata/operators/overloaded/add.carbon +++ b/toolchain/check/testdata/operators/overloaded/add.carbon @@ -45,20 +45,20 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %AddWith.type.e2b: type = facet_type <@AddWith, @AddWith(%C)> [concrete] -// CHECK:STDOUT: %AddWith.Op.type.4ab: type = fn_type @AddWith.Op, @AddWith(%C) [concrete] // CHECK:STDOUT: %AddWith.impl_witness: = impl_witness @C.as.AddWith.impl.%AddWith.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.AddWith.impl.Op.type: type = fn_type @C.as.AddWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.AddWith.impl.Op: %C.as.AddWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %AddWith.facet: %AddWith.type.e2b = facet_value %C, (%AddWith.impl_witness) [concrete] +// CHECK:STDOUT: %AddWith.WithSelf.Op.type.853: type = fn_type @AddWith.WithSelf.Op, @AddWith(%C, %AddWith.facet) [concrete] // CHECK:STDOUT: %AddAssignWith.type.16b: type = facet_type <@AddAssignWith, @AddAssignWith(%C)> [concrete] // CHECK:STDOUT: %AddAssignWith.impl_witness: = impl_witness @C.as.AddAssignWith.impl.%AddAssignWith.impl_witness_table [concrete] -// CHECK:STDOUT: %AddAssignWith.Op.type.98e: type = fn_type @AddAssignWith.Op, @AddAssignWith(%C) [concrete] // CHECK:STDOUT: %C.as.AddAssignWith.impl.Op.type: type = fn_type @C.as.AddAssignWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.AddAssignWith.impl.Op: %C.as.AddAssignWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.16b = facet_value %C, (%AddAssignWith.impl_witness) [concrete] -// CHECK:STDOUT: %.042: type = fn_type_with_self_type %AddWith.Op.type.4ab, %AddWith.facet [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.2b1: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith(%C, %AddAssignWith.facet) [concrete] +// CHECK:STDOUT: %.492: type = fn_type_with_self_type %AddWith.WithSelf.Op.type.853, %AddWith.facet [concrete] // CHECK:STDOUT: %ptr.872: type = ptr_type %C [concrete] -// CHECK:STDOUT: %.a9d: type = fn_type_with_self_type %AddAssignWith.Op.type.98e, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %.168: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.2b1, %AddAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,7 +68,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.042 = impl_witness_access constants.%AddWith.impl_witness, element1 [concrete = constants.%C.as.AddWith.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.492 = impl_witness_access constants.%AddWith.impl_witness, element1 [concrete = constants.%C.as.AddWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: // CHECK:STDOUT: %C.as.AddWith.impl.Op.call: init %C to %.loc30_26.1 = call %bound_method(%a.ref, %b.ref) @@ -80,7 +80,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.872 = name_ref a, %a // CHECK:STDOUT: %.loc38: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.a9d = impl_witness_access constants.%AddAssignWith.impl_witness, element0 [concrete = constants.%C.as.AddAssignWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.168 = impl_witness_access constants.%AddAssignWith.impl_witness, element0 [concrete = constants.%C.as.AddAssignWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc38, %impl.elem0 // CHECK:STDOUT: %C.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method(%.loc38, %b.ref) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_and.carbon b/toolchain/check/testdata/operators/overloaded/bit_and.carbon index 70e2faee503d..b6563f477edb 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_and.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_and.carbon @@ -45,20 +45,20 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %BitAndWith.type.802: type = facet_type <@BitAndWith, @BitAndWith(%C)> [concrete] -// CHECK:STDOUT: %BitAndWith.Op.type.76e: type = fn_type @BitAndWith.Op, @BitAndWith(%C) [concrete] // CHECK:STDOUT: %BitAndWith.impl_witness: = impl_witness @C.as.BitAndWith.impl.%BitAndWith.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.BitAndWith.impl.Op.type: type = fn_type @C.as.BitAndWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.BitAndWith.impl.Op: %C.as.BitAndWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.802 = facet_value %C, (%BitAndWith.impl_witness) [concrete] +// CHECK:STDOUT: %BitAndWith.WithSelf.Op.type.4a1: type = fn_type @BitAndWith.WithSelf.Op, @BitAndWith(%C, %BitAndWith.facet) [concrete] // CHECK:STDOUT: %BitAndAssignWith.type.50e: type = facet_type <@BitAndAssignWith, @BitAndAssignWith(%C)> [concrete] // CHECK:STDOUT: %BitAndAssignWith.impl_witness: = impl_witness @C.as.BitAndAssignWith.impl.%BitAndAssignWith.impl_witness_table [concrete] -// CHECK:STDOUT: %BitAndAssignWith.Op.type.72c: type = fn_type @BitAndAssignWith.Op, @BitAndAssignWith(%C) [concrete] // CHECK:STDOUT: %C.as.BitAndAssignWith.impl.Op.type: type = fn_type @C.as.BitAndAssignWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.BitAndAssignWith.impl.Op: %C.as.BitAndAssignWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %BitAndAssignWith.facet: %BitAndAssignWith.type.50e = facet_value %C, (%BitAndAssignWith.impl_witness) [concrete] -// CHECK:STDOUT: %.952: type = fn_type_with_self_type %BitAndWith.Op.type.76e, %BitAndWith.facet [concrete] +// CHECK:STDOUT: %BitAndAssignWith.WithSelf.Op.type.f01: type = fn_type @BitAndAssignWith.WithSelf.Op, @BitAndAssignWith(%C, %BitAndAssignWith.facet) [concrete] +// CHECK:STDOUT: %.414: type = fn_type_with_self_type %BitAndWith.WithSelf.Op.type.4a1, %BitAndWith.facet [concrete] // CHECK:STDOUT: %ptr.872: type = ptr_type %C [concrete] -// CHECK:STDOUT: %.92d: type = fn_type_with_self_type %BitAndAssignWith.Op.type.72c, %BitAndAssignWith.facet [concrete] +// CHECK:STDOUT: %.927: type = fn_type_with_self_type %BitAndAssignWith.WithSelf.Op.type.f01, %BitAndAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,7 +68,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.952 = impl_witness_access constants.%BitAndWith.impl_witness, element1 [concrete = constants.%C.as.BitAndWith.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.414 = impl_witness_access constants.%BitAndWith.impl_witness, element1 [concrete = constants.%C.as.BitAndWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: // CHECK:STDOUT: %C.as.BitAndWith.impl.Op.call: init %C to %.loc30_26.1 = call %bound_method(%a.ref, %b.ref) @@ -80,7 +80,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.872 = name_ref a, %a // CHECK:STDOUT: %.loc38: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.92d = impl_witness_access constants.%BitAndAssignWith.impl_witness, element0 [concrete = constants.%C.as.BitAndAssignWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.927 = impl_witness_access constants.%BitAndAssignWith.impl_witness, element0 [concrete = constants.%C.as.BitAndAssignWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc38, %impl.elem0 // CHECK:STDOUT: %C.as.BitAndAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method(%.loc38, %b.ref) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon index 4f5dcc28865a..dfea7e5f4bea 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon @@ -35,12 +35,12 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %BitComplement.type: type = facet_type <@BitComplement> [concrete] -// CHECK:STDOUT: %BitComplement.Op.type: type = fn_type @BitComplement.Op [concrete] // CHECK:STDOUT: %BitComplement.impl_witness: = impl_witness @C.as.BitComplement.impl.%BitComplement.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.BitComplement.impl.Op.type: type = fn_type @C.as.BitComplement.impl.Op [concrete] // CHECK:STDOUT: %C.as.BitComplement.impl.Op: %C.as.BitComplement.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %BitComplement.facet: %BitComplement.type = facet_value %C, (%BitComplement.impl_witness) [concrete] -// CHECK:STDOUT: %.b59: type = fn_type_with_self_type %BitComplement.Op.type, %BitComplement.facet [concrete] +// CHECK:STDOUT: %BitComplement.WithSelf.Op.type.568: type = fn_type @BitComplement.WithSelf.Op, @BitComplement(%BitComplement.facet) [concrete] +// CHECK:STDOUT: %.0d9: type = fn_type_with_self_type %BitComplement.WithSelf.Op.type.568, %BitComplement.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,7 +49,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a.param: %C) -> out %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %impl.elem1: %.b59 = impl_witness_access constants.%BitComplement.impl_witness, element1 [concrete = constants.%C.as.BitComplement.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.0d9 = impl_witness_access constants.%BitComplement.impl_witness, element1 [concrete = constants.%C.as.BitComplement.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: // CHECK:STDOUT: %C.as.BitComplement.impl.Op.call: init %C to %.loc27_20.1 = call %bound_method(%a.ref) diff --git a/toolchain/check/testdata/operators/overloaded/bit_or.carbon b/toolchain/check/testdata/operators/overloaded/bit_or.carbon index bee203f096c4..760b6f245878 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_or.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_or.carbon @@ -45,20 +45,20 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %BitOrWith.type.955: type = facet_type <@BitOrWith, @BitOrWith(%C)> [concrete] -// CHECK:STDOUT: %BitOrWith.Op.type.3c8: type = fn_type @BitOrWith.Op, @BitOrWith(%C) [concrete] // CHECK:STDOUT: %BitOrWith.impl_witness: = impl_witness @C.as.BitOrWith.impl.%BitOrWith.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.BitOrWith.impl.Op.type: type = fn_type @C.as.BitOrWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.BitOrWith.impl.Op: %C.as.BitOrWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %BitOrWith.facet: %BitOrWith.type.955 = facet_value %C, (%BitOrWith.impl_witness) [concrete] +// CHECK:STDOUT: %BitOrWith.WithSelf.Op.type.59b: type = fn_type @BitOrWith.WithSelf.Op, @BitOrWith(%C, %BitOrWith.facet) [concrete] // CHECK:STDOUT: %BitOrAssignWith.type.dcc: type = facet_type <@BitOrAssignWith, @BitOrAssignWith(%C)> [concrete] // CHECK:STDOUT: %BitOrAssignWith.impl_witness: = impl_witness @C.as.BitOrAssignWith.impl.%BitOrAssignWith.impl_witness_table [concrete] -// CHECK:STDOUT: %BitOrAssignWith.Op.type.9b9: type = fn_type @BitOrAssignWith.Op, @BitOrAssignWith(%C) [concrete] // CHECK:STDOUT: %C.as.BitOrAssignWith.impl.Op.type: type = fn_type @C.as.BitOrAssignWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.BitOrAssignWith.impl.Op: %C.as.BitOrAssignWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %BitOrAssignWith.facet: %BitOrAssignWith.type.dcc = facet_value %C, (%BitOrAssignWith.impl_witness) [concrete] -// CHECK:STDOUT: %.288: type = fn_type_with_self_type %BitOrWith.Op.type.3c8, %BitOrWith.facet [concrete] +// CHECK:STDOUT: %BitOrAssignWith.WithSelf.Op.type.723: type = fn_type @BitOrAssignWith.WithSelf.Op, @BitOrAssignWith(%C, %BitOrAssignWith.facet) [concrete] +// CHECK:STDOUT: %.6ce: type = fn_type_with_self_type %BitOrWith.WithSelf.Op.type.59b, %BitOrWith.facet [concrete] // CHECK:STDOUT: %ptr.872: type = ptr_type %C [concrete] -// CHECK:STDOUT: %.3fe: type = fn_type_with_self_type %BitOrAssignWith.Op.type.9b9, %BitOrAssignWith.facet [concrete] +// CHECK:STDOUT: %.e2c: type = fn_type_with_self_type %BitOrAssignWith.WithSelf.Op.type.723, %BitOrAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,7 +68,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.288 = impl_witness_access constants.%BitOrWith.impl_witness, element1 [concrete = constants.%C.as.BitOrWith.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.6ce = impl_witness_access constants.%BitOrWith.impl_witness, element1 [concrete = constants.%C.as.BitOrWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: // CHECK:STDOUT: %C.as.BitOrWith.impl.Op.call: init %C to %.loc30_26.1 = call %bound_method(%a.ref, %b.ref) @@ -80,7 +80,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.872 = name_ref a, %a // CHECK:STDOUT: %.loc38: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.3fe = impl_witness_access constants.%BitOrAssignWith.impl_witness, element0 [concrete = constants.%C.as.BitOrAssignWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.e2c = impl_witness_access constants.%BitOrAssignWith.impl_witness, element0 [concrete = constants.%C.as.BitOrAssignWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc38, %impl.elem0 // CHECK:STDOUT: %C.as.BitOrAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method(%.loc38, %b.ref) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon index e25d04e2594c..5f9c521f0f32 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon @@ -45,20 +45,20 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %BitXorWith.type.daf: type = facet_type <@BitXorWith, @BitXorWith(%C)> [concrete] -// CHECK:STDOUT: %BitXorWith.Op.type.c3b: type = fn_type @BitXorWith.Op, @BitXorWith(%C) [concrete] // CHECK:STDOUT: %BitXorWith.impl_witness: = impl_witness @C.as.BitXorWith.impl.%BitXorWith.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.BitXorWith.impl.Op.type: type = fn_type @C.as.BitXorWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.BitXorWith.impl.Op: %C.as.BitXorWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %BitXorWith.facet: %BitXorWith.type.daf = facet_value %C, (%BitXorWith.impl_witness) [concrete] +// CHECK:STDOUT: %BitXorWith.WithSelf.Op.type.5aa: type = fn_type @BitXorWith.WithSelf.Op, @BitXorWith(%C, %BitXorWith.facet) [concrete] // CHECK:STDOUT: %BitXorAssignWith.type.6c4: type = facet_type <@BitXorAssignWith, @BitXorAssignWith(%C)> [concrete] // CHECK:STDOUT: %BitXorAssignWith.impl_witness: = impl_witness @C.as.BitXorAssignWith.impl.%BitXorAssignWith.impl_witness_table [concrete] -// CHECK:STDOUT: %BitXorAssignWith.Op.type.803: type = fn_type @BitXorAssignWith.Op, @BitXorAssignWith(%C) [concrete] // CHECK:STDOUT: %C.as.BitXorAssignWith.impl.Op.type: type = fn_type @C.as.BitXorAssignWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.BitXorAssignWith.impl.Op: %C.as.BitXorAssignWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %BitXorAssignWith.facet: %BitXorAssignWith.type.6c4 = facet_value %C, (%BitXorAssignWith.impl_witness) [concrete] -// CHECK:STDOUT: %.864: type = fn_type_with_self_type %BitXorWith.Op.type.c3b, %BitXorWith.facet [concrete] +// CHECK:STDOUT: %BitXorAssignWith.WithSelf.Op.type.5c3: type = fn_type @BitXorAssignWith.WithSelf.Op, @BitXorAssignWith(%C, %BitXorAssignWith.facet) [concrete] +// CHECK:STDOUT: %.482: type = fn_type_with_self_type %BitXorWith.WithSelf.Op.type.5aa, %BitXorWith.facet [concrete] // CHECK:STDOUT: %ptr.872: type = ptr_type %C [concrete] -// CHECK:STDOUT: %.800: type = fn_type_with_self_type %BitXorAssignWith.Op.type.803, %BitXorAssignWith.facet [concrete] +// CHECK:STDOUT: %.d46: type = fn_type_with_self_type %BitXorAssignWith.WithSelf.Op.type.5c3, %BitXorAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,7 +68,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.864 = impl_witness_access constants.%BitXorWith.impl_witness, element1 [concrete = constants.%C.as.BitXorWith.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.482 = impl_witness_access constants.%BitXorWith.impl_witness, element1 [concrete = constants.%C.as.BitXorWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: // CHECK:STDOUT: %C.as.BitXorWith.impl.Op.call: init %C to %.loc30_26.1 = call %bound_method(%a.ref, %b.ref) @@ -80,7 +80,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.872 = name_ref a, %a // CHECK:STDOUT: %.loc38: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.800 = impl_witness_access constants.%BitXorAssignWith.impl_witness, element0 [concrete = constants.%C.as.BitXorAssignWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.d46 = impl_witness_access constants.%BitXorAssignWith.impl_witness, element0 [concrete = constants.%C.as.BitXorAssignWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc38, %impl.elem0 // CHECK:STDOUT: %C.as.BitXorAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method(%.loc38, %b.ref) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/dec.carbon b/toolchain/check/testdata/operators/overloaded/dec.carbon index 1ccc85c2a665..41ea094ad7c6 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -36,11 +36,11 @@ fn TestOp() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Dec.type: type = facet_type <@Dec> [concrete] // CHECK:STDOUT: %Dec.impl_witness: = impl_witness @C.as.Dec.impl.%Dec.impl_witness_table [concrete] -// CHECK:STDOUT: %Dec.Op.type: type = fn_type @Dec.Op [concrete] // CHECK:STDOUT: %C.as.Dec.impl.Op.type: type = fn_type @C.as.Dec.impl.Op [concrete] // CHECK:STDOUT: %C.as.Dec.impl.Op: %C.as.Dec.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Dec.facet: %Dec.type = facet_value %C, (%Dec.impl_witness) [concrete] -// CHECK:STDOUT: %.b0c: type = fn_type_with_self_type %Dec.Op.type, %Dec.facet [concrete] +// CHECK:STDOUT: %Dec.WithSelf.Op.type.874: type = fn_type @Dec.WithSelf.Op, @Dec(%Dec.facet) [concrete] +// CHECK:STDOUT: %.4d8: type = fn_type_with_self_type %Dec.WithSelf.Op.type.874, %Dec.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,7 +50,7 @@ fn TestOp() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %impl.elem0: %.b0c = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%C.as.Dec.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.4d8 = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%C.as.Dec.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %C.as.Dec.impl.Op.call: init %empty_tuple.type = call %bound_method(%c.ref) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/div.carbon b/toolchain/check/testdata/operators/overloaded/div.carbon index cec7a0961b19..faa8bc664600 100644 --- a/toolchain/check/testdata/operators/overloaded/div.carbon +++ b/toolchain/check/testdata/operators/overloaded/div.carbon @@ -45,20 +45,20 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %DivWith.type.023: type = facet_type <@DivWith, @DivWith(%C)> [concrete] -// CHECK:STDOUT: %DivWith.Op.type.11b: type = fn_type @DivWith.Op, @DivWith(%C) [concrete] // CHECK:STDOUT: %DivWith.impl_witness: = impl_witness @C.as.DivWith.impl.%DivWith.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.DivWith.impl.Op.type: type = fn_type @C.as.DivWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.DivWith.impl.Op: %C.as.DivWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %DivWith.facet: %DivWith.type.023 = facet_value %C, (%DivWith.impl_witness) [concrete] +// CHECK:STDOUT: %DivWith.WithSelf.Op.type.d41: type = fn_type @DivWith.WithSelf.Op, @DivWith(%C, %DivWith.facet) [concrete] // CHECK:STDOUT: %DivAssignWith.type.6fb: type = facet_type <@DivAssignWith, @DivAssignWith(%C)> [concrete] // CHECK:STDOUT: %DivAssignWith.impl_witness: = impl_witness @C.as.DivAssignWith.impl.%DivAssignWith.impl_witness_table [concrete] -// CHECK:STDOUT: %DivAssignWith.Op.type.c42: type = fn_type @DivAssignWith.Op, @DivAssignWith(%C) [concrete] // CHECK:STDOUT: %C.as.DivAssignWith.impl.Op.type: type = fn_type @C.as.DivAssignWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.DivAssignWith.impl.Op: %C.as.DivAssignWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %DivAssignWith.facet: %DivAssignWith.type.6fb = facet_value %C, (%DivAssignWith.impl_witness) [concrete] -// CHECK:STDOUT: %.96d: type = fn_type_with_self_type %DivWith.Op.type.11b, %DivWith.facet [concrete] +// CHECK:STDOUT: %DivAssignWith.WithSelf.Op.type.989: type = fn_type @DivAssignWith.WithSelf.Op, @DivAssignWith(%C, %DivAssignWith.facet) [concrete] +// CHECK:STDOUT: %.068: type = fn_type_with_self_type %DivWith.WithSelf.Op.type.d41, %DivWith.facet [concrete] // CHECK:STDOUT: %ptr.872: type = ptr_type %C [concrete] -// CHECK:STDOUT: %.630: type = fn_type_with_self_type %DivAssignWith.Op.type.c42, %DivAssignWith.facet [concrete] +// CHECK:STDOUT: %.34f: type = fn_type_with_self_type %DivAssignWith.WithSelf.Op.type.989, %DivAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,7 +68,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.96d = impl_witness_access constants.%DivWith.impl_witness, element1 [concrete = constants.%C.as.DivWith.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.068 = impl_witness_access constants.%DivWith.impl_witness, element1 [concrete = constants.%C.as.DivWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: // CHECK:STDOUT: %C.as.DivWith.impl.Op.call: init %C to %.loc30_26.1 = call %bound_method(%a.ref, %b.ref) @@ -80,7 +80,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.872 = name_ref a, %a // CHECK:STDOUT: %.loc38: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.630 = impl_witness_access constants.%DivAssignWith.impl_witness, element0 [concrete = constants.%C.as.DivAssignWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.34f = impl_witness_access constants.%DivAssignWith.impl_witness, element0 [concrete = constants.%C.as.DivAssignWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc38, %impl.elem0 // CHECK:STDOUT: %C.as.DivAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method(%.loc38, %b.ref) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index 72c96f408e1b..936ce29fb6d3 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -93,8 +93,6 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %.d29: Core.Form = init_form bool, call_param2 [concrete] // CHECK:STDOUT: %EqWith.type.ae7: type = facet_type <@EqWith, @EqWith(%C)> [concrete] // CHECK:STDOUT: %EqWith.impl_witness: = impl_witness @C.as.EqWith.impl.%EqWith.impl_witness_table [concrete] -// CHECK:STDOUT: %EqWith.Equal.type.ab8: type = fn_type @EqWith.Equal, @EqWith(%C) [concrete] -// CHECK:STDOUT: %EqWith.NotEqual.type.d5e: type = fn_type @EqWith.NotEqual, @EqWith(%C) [concrete] // CHECK:STDOUT: %pattern_type.476: type = pattern_type %C [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] @@ -103,12 +101,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %C.as.EqWith.impl.NotEqual.type: type = fn_type @C.as.EqWith.impl.NotEqual [concrete] // CHECK:STDOUT: %C.as.EqWith.impl.NotEqual: %C.as.EqWith.impl.NotEqual.type = struct_value () [concrete] // CHECK:STDOUT: %EqWith.facet: %EqWith.type.ae7 = facet_value %C, (%EqWith.impl_witness) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.Equal.type.fc2: type = fn_type @EqWith.WithSelf.Equal, @EqWith(%C, %EqWith.facet) [concrete] +// CHECK:STDOUT: %EqWith.WithSelf.NotEqual.type.eb7: type = fn_type @EqWith.WithSelf.NotEqual, @EqWith(%C, %EqWith.facet) [concrete] // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [concrete] // CHECK:STDOUT: %TestEqual: %TestEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %.5c2: type = fn_type_with_self_type %EqWith.Equal.type.ab8, %EqWith.facet [concrete] +// CHECK:STDOUT: %.ea4: type = fn_type_with_self_type %EqWith.WithSelf.Equal.type.fc2, %EqWith.facet [concrete] // CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [concrete] // CHECK:STDOUT: %TestNotEqual: %TestNotEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %.371: type = fn_type_with_self_type %EqWith.NotEqual.type.d5e, %EqWith.facet [concrete] +// CHECK:STDOUT: %.e2b: type = fn_type_with_self_type %EqWith.WithSelf.NotEqual.type.eb7, %EqWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -251,7 +251,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.5c2 = impl_witness_access constants.%EqWith.impl_witness, element0 [concrete = constants.%C.as.EqWith.impl.Equal] +// CHECK:STDOUT: %impl.elem0: %.ea4 = impl_witness_access constants.%EqWith.impl_witness, element0 [concrete = constants.%C.as.EqWith.impl.Equal] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %C.as.EqWith.impl.Equal.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: return %C.as.EqWith.impl.Equal.call @@ -261,7 +261,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.371 = impl_witness_access constants.%EqWith.impl_witness, element1 [concrete = constants.%C.as.EqWith.impl.NotEqual] +// CHECK:STDOUT: %impl.elem1: %.e2b = impl_witness_access constants.%EqWith.impl_witness, element1 [concrete = constants.%C.as.EqWith.impl.NotEqual] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: %C.as.EqWith.impl.NotEqual.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: return %C.as.EqWith.impl.NotEqual.call 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 02074fbe70a8..17947d937660 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -54,25 +54,25 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] // CHECK:STDOUT: %Inc.impl_witness: = impl_witness @C.as.Inc.impl.%Inc.impl_witness_table [concrete] -// CHECK:STDOUT: %Inc.Op.type: type = fn_type @Inc.Op [concrete] // CHECK:STDOUT: %pattern_type.476: type = pattern_type %C [concrete] // CHECK:STDOUT: %C.as.Inc.impl.Op.type: type = fn_type @C.as.Inc.impl.Op [concrete] // CHECK:STDOUT: %C.as.Inc.impl.Op: %C.as.Inc.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %C, (%Inc.impl_witness) [concrete] +// CHECK:STDOUT: %Inc.WithSelf.Op.type.700: type = fn_type @Inc.WithSelf.Op, @Inc(%Inc.facet) [concrete] // CHECK:STDOUT: %AddAssignWith.type.fc6: type = generic_interface_type @AddAssignWith [concrete] // CHECK:STDOUT: %AddAssignWith.generic: %AddAssignWith.type.fc6 = struct_value () [concrete] // CHECK:STDOUT: %AddAssignWith.type.16b: type = facet_type <@AddAssignWith, @AddAssignWith(%C)> [concrete] // CHECK:STDOUT: %AddAssignWith.impl_witness: = impl_witness @C.as.AddAssignWith.impl.%AddAssignWith.impl_witness_table [concrete] -// CHECK:STDOUT: %AddAssignWith.Op.type.98e: type = fn_type @AddAssignWith.Op, @AddAssignWith(%C) [concrete] // CHECK:STDOUT: %C.as.AddAssignWith.impl.Op.type: type = fn_type @C.as.AddAssignWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.AddAssignWith.impl.Op: %C.as.AddAssignWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.16b = facet_value %C, (%AddAssignWith.impl_witness) [concrete] +// CHECK:STDOUT: %AddAssignWith.WithSelf.Op.type.2b1: type = fn_type @AddAssignWith.WithSelf.Op, @AddAssignWith(%C, %AddAssignWith.facet) [concrete] // CHECK:STDOUT: %TestIncNonRef.type: type = fn_type @TestIncNonRef [concrete] // CHECK:STDOUT: %TestIncNonRef: %TestIncNonRef.type = struct_value () [concrete] -// CHECK:STDOUT: %.176: type = fn_type_with_self_type %Inc.Op.type, %Inc.facet [concrete] +// CHECK:STDOUT: %.38a: type = fn_type_with_self_type %Inc.WithSelf.Op.type.700, %Inc.facet [concrete] // CHECK:STDOUT: %TestAddAssignNonRef.type: type = fn_type @TestAddAssignNonRef [concrete] // CHECK:STDOUT: %TestAddAssignNonRef: %TestAddAssignNonRef.type = struct_value () [concrete] -// CHECK:STDOUT: %.a9d: type = fn_type_with_self_type %AddAssignWith.Op.type.98e, %AddAssignWith.facet [concrete] +// CHECK:STDOUT: %.168: type = fn_type_with_self_type %AddAssignWith.WithSelf.Op.type.2b1, %AddAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -186,7 +186,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: fn @TestIncNonRef(%a.param: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %impl.elem0: %.176 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%C.as.Inc.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.38a = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%C.as.Inc.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %C.as.Inc.impl.Op.call: init %empty_tuple.type = call %bound_method() // CHECK:STDOUT: return @@ -196,7 +196,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.a9d = impl_witness_access constants.%AddAssignWith.impl_witness, element0 [concrete = constants.%C.as.AddAssignWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.168 = impl_witness_access constants.%AddAssignWith.impl_witness, element0 [concrete = constants.%C.as.AddAssignWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %C.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method(, %b.ref) // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index 49fca1b223e0..0b6bec82c9df 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -55,15 +55,14 @@ fn Test() { // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete] // CHECK:STDOUT: %ImplicitAs.type.062: type = facet_type <@ImplicitAs, @ImplicitAs(%X)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.f5e: = impl_witness @i32.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.9f8: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%X) [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %.728: Core.Form = init_form %X, call_param1 [concrete] // CHECK:STDOUT: %pattern_type.05f: type = pattern_type %X [concrete] // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert.type: type = fn_type @i32.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %i32.as.ImplicitAs.impl.Convert: %i32.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.be6: %ImplicitAs.type.062 = facet_value %i32, (%ImplicitAs.impl_witness.f5e) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.d7d: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%X, %ImplicitAs.facet.be6) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] @@ -71,15 +70,16 @@ fn Test() { // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %.e54: Core.Form = init_form %i32, call_param1 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.d6a: = impl_witness @X.as.ImplicitAs.impl.%ImplicitAs.impl_witness_table [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %X.as.ImplicitAs.impl.Convert.type: type = fn_type @X.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %X.as.ImplicitAs.impl.Convert: %X.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.5c6: %ImplicitAs.type.e8c = facet_value %X, (%ImplicitAs.impl_witness.d6a) [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.c95: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.5c6) [concrete] // CHECK:STDOUT: %Sink_i32.type: type = fn_type @Sink_i32 [concrete] // CHECK:STDOUT: %Sink_i32: %Sink_i32.type = struct_value () [concrete] // CHECK:STDOUT: %Sink_X.type: type = fn_type @Sink_X [concrete] @@ -96,10 +96,10 @@ fn Test() { // CHECK:STDOUT: %Test: %Test.type = struct_value () [concrete] // CHECK:STDOUT: %.22a: Core.Form = init_form %X, call_param0 [concrete] // CHECK:STDOUT: %Source.specific_fn.b43: = specific_function %Source, @Source(%X) [concrete] -// CHECK:STDOUT: %.3af: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.5c6 [concrete] +// CHECK:STDOUT: %.c2d: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.c95, %ImplicitAs.facet.5c6 [concrete] // CHECK:STDOUT: %.437: Core.Form = init_form %i32, call_param0 [concrete] // CHECK:STDOUT: %Source.specific_fn.217: = specific_function %Source, @Source(%i32) [concrete] -// CHECK:STDOUT: %.3d8: type = fn_type_with_self_type %ImplicitAs.Convert.type.9f8, %ImplicitAs.facet.be6 [concrete] +// CHECK:STDOUT: %.eba: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.d7d, %ImplicitAs.facet.be6 [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] @@ -251,7 +251,7 @@ fn Test() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %i32 = name_ref self, %self // CHECK:STDOUT: %.loc20_51.1: %struct_type.n = struct_literal (%self.ref) -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc20_47.1: = bound_method %self.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc20_47.2: = bound_method %self.ref, %specific_fn @@ -269,7 +269,7 @@ fn Test() { // CHECK:STDOUT: %n.ref: %X.elem = name_ref n, @X.%.loc16 [concrete = @X.%.loc16] // CHECK:STDOUT: %.loc24_45.1: ref %i32 = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc24_45.2: %i32 = acquire_value %.loc24_45.1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc24_45.1: = bound_method %.loc24_45.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc24_45.2: = bound_method %.loc24_45.2, %specific_fn @@ -309,7 +309,7 @@ fn Test() { // CHECK:STDOUT: %Source.specific_fn.loc34: = specific_function %Source.ref.loc34, @Source(constants.%X) [concrete = constants.%Source.specific_fn.b43] // CHECK:STDOUT: %.loc34_20.1: ref %X = temporary_storage // CHECK:STDOUT: %Source.call.loc34: init %X to %.loc34_20.1 = call %Source.specific_fn.loc34() -// CHECK:STDOUT: %impl.elem0.loc34: %.3af = impl_witness_access constants.%ImplicitAs.impl_witness.d6a, element0 [concrete = constants.%X.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc34: %.c2d = impl_witness_access constants.%ImplicitAs.impl_witness.d6a, element0 [concrete = constants.%X.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc34: = bound_method %Source.call.loc34, %impl.elem0.loc34 // CHECK:STDOUT: %.loc34_20.2: ref %X = temporary %.loc34_20.1, %Source.call.loc34 // CHECK:STDOUT: %.loc34_20.3: %X = acquire_value %.loc34_20.2 @@ -323,7 +323,7 @@ fn Test() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %Source.specific_fn.loc35: = specific_function %Source.ref.loc35, @Source(constants.%i32) [concrete = constants.%Source.specific_fn.217] // CHECK:STDOUT: %Source.call.loc35: init %i32 = call %Source.specific_fn.loc35() -// CHECK:STDOUT: %impl.elem0.loc35: %.3d8 = impl_witness_access constants.%ImplicitAs.impl_witness.f5e, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0.loc35: %.eba = impl_witness_access constants.%ImplicitAs.impl_witness.f5e, element0 [concrete = constants.%i32.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method.loc35: = bound_method %Source.call.loc35, %impl.elem0.loc35 // CHECK:STDOUT: %.loc35_20.1: ref %X = temporary_storage // CHECK:STDOUT: %.loc35_20.2: %i32 = value_of_initializer %Source.call.loc35 diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index 9f0a57ae426e..a8590d355e50 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -36,11 +36,11 @@ fn TestOp() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete] // CHECK:STDOUT: %Inc.impl_witness: = impl_witness @C.as.Inc.impl.%Inc.impl_witness_table [concrete] -// CHECK:STDOUT: %Inc.Op.type: type = fn_type @Inc.Op [concrete] // CHECK:STDOUT: %C.as.Inc.impl.Op.type: type = fn_type @C.as.Inc.impl.Op [concrete] // CHECK:STDOUT: %C.as.Inc.impl.Op: %C.as.Inc.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %C, (%Inc.impl_witness) [concrete] -// CHECK:STDOUT: %.176: type = fn_type_with_self_type %Inc.Op.type, %Inc.facet [concrete] +// CHECK:STDOUT: %Inc.WithSelf.Op.type.700: type = fn_type @Inc.WithSelf.Op, @Inc(%Inc.facet) [concrete] +// CHECK:STDOUT: %.38a: type = fn_type_with_self_type %Inc.WithSelf.Op.type.700, %Inc.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,7 +50,7 @@ fn TestOp() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %impl.elem0: %.176 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%C.as.Inc.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.38a = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%C.as.Inc.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem0 // CHECK:STDOUT: %C.as.Inc.impl.Op.call: init %empty_tuple.type = call %bound_method(%c.ref) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index e444df26bd43..4b018eb7032a 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -195,10 +195,10 @@ fn F() { // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %SubscriptType [symbolic] // CHECK:STDOUT: %.615: Core.Form = init_form %ElementType, call_param2 [symbolic] // CHECK:STDOUT: %pattern_type.946: type = pattern_type %ElementType [symbolic] -// CHECK:STDOUT: %IndexWith.At.type: type = fn_type @IndexWith.At, @IndexWith(%SubscriptType, %ElementType) [symbolic] -// CHECK:STDOUT: %IndexWith.At: %IndexWith.At.type = struct_value () [symbolic] +// CHECK:STDOUT: %IndexWith.WithSelf.At.type: type = fn_type @IndexWith.WithSelf.At, @IndexWith(%SubscriptType, %ElementType, %Self) [symbolic] +// CHECK:STDOUT: %IndexWith.WithSelf.At: %IndexWith.WithSelf.At.type = struct_value () [symbolic] // CHECK:STDOUT: %IndexWith.assoc_type: type = assoc_entity_type @IndexWith, @IndexWith(%SubscriptType, %ElementType) [symbolic] -// CHECK:STDOUT: %assoc0: %IndexWith.assoc_type = assoc_entity element0, @IndexWith.%IndexWith.At.decl [symbolic] +// CHECK:STDOUT: %assoc0: %IndexWith.assoc_type = assoc_entity element0, @IndexWith.%IndexWith.WithSelf.At.decl [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -221,64 +221,65 @@ fn F() { // CHECK:STDOUT: %ElementType.loc4_43.1: type = symbolic_binding ElementType, 1 [symbolic = %ElementType.loc4_43.1 (constants.%ElementType)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.loc4_21.1, %ElementType.loc4_43.1)> [symbolic = %IndexWith.type (constants.%IndexWith.type.2c3)] -// CHECK:STDOUT: %Self.loc4_63.2: @IndexWith.%IndexWith.type (%IndexWith.type.2c3) = symbolic_binding Self, 2 [symbolic = %Self.loc4_63.2 (constants.%Self)] -// CHECK:STDOUT: %IndexWith.At.type: type = fn_type @IndexWith.At, @IndexWith(%SubscriptType.loc4_21.1, %ElementType.loc4_43.1) [symbolic = %IndexWith.At.type (constants.%IndexWith.At.type)] -// CHECK:STDOUT: %IndexWith.At: @IndexWith.%IndexWith.At.type (%IndexWith.At.type) = struct_value () [symbolic = %IndexWith.At (constants.%IndexWith.At)] -// CHECK:STDOUT: %IndexWith.assoc_type: type = assoc_entity_type @IndexWith, @IndexWith(%SubscriptType.loc4_21.1, %ElementType.loc4_43.1) [symbolic = %IndexWith.assoc_type (constants.%IndexWith.assoc_type)] -// CHECK:STDOUT: %assoc0.loc5_61.2: @IndexWith.%IndexWith.assoc_type (%IndexWith.assoc_type) = assoc_entity element0, %IndexWith.At.decl [symbolic = %assoc0.loc5_61.2 (constants.%assoc0)] +// CHECK:STDOUT: %IndexWith.type.loc4: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.loc4_21.1, %ElementType.loc4_43.1)> [symbolic = %IndexWith.type.loc4 (constants.%IndexWith.type.2c3)] +// CHECK:STDOUT: %Self.loc4_63.2: @IndexWith.%IndexWith.type.loc4 (%IndexWith.type.2c3) = symbolic_binding Self, 2 [symbolic = %Self.loc4_63.2 (constants.%Self)] // CHECK:STDOUT: // CHECK:STDOUT: interface { -// CHECK:STDOUT: %Self.loc4_63.1: @IndexWith.%IndexWith.type (%IndexWith.type.2c3) = symbolic_binding Self, 2 [symbolic = %Self.loc4_63.2 (constants.%Self)] -// CHECK:STDOUT: %IndexWith.At.decl: @IndexWith.%IndexWith.At.type (%IndexWith.At.type) = fn_decl @IndexWith.At [symbolic = @IndexWith.%IndexWith.At (constants.%IndexWith.At)] { -// CHECK:STDOUT: %self.patt: @IndexWith.At.%pattern_type.loc5_9 (%pattern_type.5ae) = value_binding_pattern self [concrete] -// CHECK:STDOUT: %self.param_patt: @IndexWith.At.%pattern_type.loc5_9 (%pattern_type.5ae) = value_param_pattern %self.patt, call_param0 [concrete] -// CHECK:STDOUT: %subscript.patt: @IndexWith.At.%pattern_type.loc5_21 (%pattern_type.51d) = value_binding_pattern subscript [concrete] -// CHECK:STDOUT: %subscript.param_patt: @IndexWith.At.%pattern_type.loc5_21 (%pattern_type.51d) = value_param_pattern %subscript.patt, call_param1 [concrete] -// CHECK:STDOUT: %return.patt: @IndexWith.At.%pattern_type.loc5_47 (%pattern_type.946) = return_slot_pattern [concrete] -// CHECK:STDOUT: %return.param_patt: @IndexWith.At.%pattern_type.loc5_47 (%pattern_type.946) = out_param_pattern %return.patt, call_param2 [concrete] +// CHECK:STDOUT: %Self.loc4_63.1: @IndexWith.%IndexWith.type.loc4 (%IndexWith.type.2c3) = symbolic_binding Self, 2 [symbolic = %Self.loc4_63.2 (constants.%Self)] +// CHECK:STDOUT: interface_with_self_decl @IndexWith [concrete] +// CHECK:STDOUT: +// CHECK:STDOUT: !with Self: +// CHECK:STDOUT: %IndexWith.WithSelf.At.decl: @IndexWith.%IndexWith.WithSelf.At.type (%IndexWith.WithSelf.At.type) = fn_decl @IndexWith.WithSelf.At [symbolic = @IndexWith.%IndexWith.WithSelf.At (constants.%IndexWith.WithSelf.At)] { +// CHECK:STDOUT: %self.patt: @IndexWith.WithSelf.At.%pattern_type.loc5_9 (%pattern_type.5ae) = value_binding_pattern self [concrete] +// CHECK:STDOUT: %self.param_patt: @IndexWith.WithSelf.At.%pattern_type.loc5_9 (%pattern_type.5ae) = value_param_pattern %self.patt, call_param0 [concrete] +// CHECK:STDOUT: %subscript.patt: @IndexWith.WithSelf.At.%pattern_type.loc5_21 (%pattern_type.51d) = value_binding_pattern subscript [concrete] +// CHECK:STDOUT: %subscript.param_patt: @IndexWith.WithSelf.At.%pattern_type.loc5_21 (%pattern_type.51d) = value_param_pattern %subscript.patt, call_param1 [concrete] +// CHECK:STDOUT: %return.patt: @IndexWith.WithSelf.At.%pattern_type.loc5_47 (%pattern_type.946) = return_slot_pattern [concrete] +// CHECK:STDOUT: %return.param_patt: @IndexWith.WithSelf.At.%pattern_type.loc5_47 (%pattern_type.946) = out_param_pattern %return.patt, call_param2 [concrete] // CHECK:STDOUT: } { // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, @IndexWith.%ElementType.loc4_43.2 [symbolic = %ElementType (constants.%ElementType)] // CHECK:STDOUT: %.loc5_50.2: Core.Form = init_form %ElementType.ref, call_param2 [symbolic = %.loc5_50.1 (constants.%.615)] -// CHECK:STDOUT: %self.param: @IndexWith.At.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 +// CHECK:STDOUT: %self.param: @IndexWith.WithSelf.At.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0 // CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] { -// CHECK:STDOUT: %.loc5_15.2: @IndexWith.At.%IndexWith.type (%IndexWith.type.2c3) = specific_constant @IndexWith.%Self.loc4_63.1, @IndexWith(constants.%SubscriptType, constants.%ElementType) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @IndexWith.At.%IndexWith.type (%IndexWith.type.2c3) = name_ref Self, %.loc5_15.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc5_15.2: @IndexWith.WithSelf.At.%IndexWith.type (%IndexWith.type.2c3) = specific_constant @IndexWith.%Self.loc4_63.1, @IndexWith(constants.%SubscriptType, constants.%ElementType) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @IndexWith.WithSelf.At.%IndexWith.type (%IndexWith.type.2c3) = name_ref Self, %.loc5_15.2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %.loc5_15.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: } -// CHECK:STDOUT: %self: @IndexWith.At.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param -// CHECK:STDOUT: %subscript.param: @IndexWith.At.%SubscriptType (%SubscriptType) = value_param call_param1 +// CHECK:STDOUT: %self: @IndexWith.WithSelf.At.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param +// CHECK:STDOUT: %subscript.param: @IndexWith.WithSelf.At.%SubscriptType (%SubscriptType) = value_param call_param1 // CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, @IndexWith.%SubscriptType.loc4_21.2 [symbolic = %SubscriptType (constants.%SubscriptType)] -// CHECK:STDOUT: %subscript: @IndexWith.At.%SubscriptType (%SubscriptType) = value_binding subscript, %subscript.param -// CHECK:STDOUT: %return.param: ref @IndexWith.At.%ElementType (%ElementType) = out_param call_param2 -// CHECK:STDOUT: %return: ref @IndexWith.At.%ElementType (%ElementType) = return_slot %return.param +// CHECK:STDOUT: %subscript: @IndexWith.WithSelf.At.%SubscriptType (%SubscriptType) = value_binding subscript, %subscript.param +// CHECK:STDOUT: %return.param: ref @IndexWith.WithSelf.At.%ElementType (%ElementType) = out_param call_param2 +// CHECK:STDOUT: %return: ref @IndexWith.WithSelf.At.%ElementType (%ElementType) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %assoc0.loc5_61.1: @IndexWith.%IndexWith.assoc_type (%IndexWith.assoc_type) = assoc_entity element0, %IndexWith.At.decl [symbolic = %assoc0.loc5_61.2 (constants.%assoc0)] +// CHECK:STDOUT: %assoc0.loc5_61.1: @IndexWith.%IndexWith.assoc_type (%IndexWith.assoc_type) = assoc_entity element0, %IndexWith.WithSelf.At.decl [symbolic = %assoc0.loc5_61.2 (constants.%assoc0)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.loc4_63.1 // CHECK:STDOUT: .SubscriptType = // CHECK:STDOUT: .ElementType = +// CHECK:STDOUT: .SubscriptType = +// CHECK:STDOUT: .ElementType = // CHECK:STDOUT: .At = %assoc0.loc5_61.1 -// CHECK:STDOUT: witness = (%IndexWith.At.decl) +// CHECK:STDOUT: witness = (%IndexWith.WithSelf.At.decl) // CHECK:STDOUT: // CHECK:STDOUT: !requires: // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @IndexWith.At(@IndexWith.%SubscriptType.loc4_21.2: type, @IndexWith.%ElementType.loc4_43.2: type, @IndexWith.%Self.loc4_63.1: @IndexWith.%IndexWith.type (%IndexWith.type.2c3)) { +// CHECK:STDOUT: generic fn @IndexWith.WithSelf.At(@IndexWith.%SubscriptType.loc4_21.2: type, @IndexWith.%ElementType.loc4_43.2: type, @IndexWith.%Self.loc4_63.1: @IndexWith.%IndexWith.type.loc4 (%IndexWith.type.2c3)) { // CHECK:STDOUT: %SubscriptType: type = symbolic_binding SubscriptType, 0 [symbolic = %SubscriptType (constants.%SubscriptType)] // CHECK:STDOUT: %ElementType: type = symbolic_binding ElementType, 1 [symbolic = %ElementType (constants.%ElementType)] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(%SubscriptType, %ElementType)> [symbolic = %IndexWith.type (constants.%IndexWith.type.2c3)] -// CHECK:STDOUT: %Self: @IndexWith.At.%IndexWith.type (%IndexWith.type.2c3) = symbolic_binding Self, 2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self: @IndexWith.WithSelf.At.%IndexWith.type (%IndexWith.type.2c3) = symbolic_binding Self, 2 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 2, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] // CHECK:STDOUT: %pattern_type.loc5_9: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.loc5_9 (constants.%pattern_type.5ae)] // CHECK:STDOUT: %pattern_type.loc5_21: type = pattern_type %SubscriptType [symbolic = %pattern_type.loc5_21 (constants.%pattern_type.51d)] // CHECK:STDOUT: %.loc5_50.1: Core.Form = init_form %ElementType, call_param2 [symbolic = %.loc5_50.1 (constants.%.615)] // CHECK:STDOUT: %pattern_type.loc5_47: type = pattern_type %ElementType [symbolic = %pattern_type.loc5_47 (constants.%pattern_type.946)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%self.param: @IndexWith.At.%Self.binding.as_type (%Self.binding.as_type), %subscript.param: @IndexWith.At.%SubscriptType (%SubscriptType)) -> out %return.param: @IndexWith.At.%ElementType (%ElementType); +// CHECK:STDOUT: fn(%self.param: @IndexWith.WithSelf.At.%Self.binding.as_type (%Self.binding.as_type), %subscript.param: @IndexWith.WithSelf.At.%SubscriptType (%SubscriptType)) -> out %return.param: @IndexWith.WithSelf.At.%ElementType (%ElementType); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @IndexWith(constants.%SubscriptType, constants.%ElementType) { @@ -286,7 +287,9 @@ fn F() { // CHECK:STDOUT: %ElementType.loc4_43.1 => constants.%ElementType // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @IndexWith.At(constants.%SubscriptType, constants.%ElementType, constants.%Self) { +// CHECK:STDOUT: specific @IndexWith(constants.%SubscriptType, constants.%ElementType, constants.%Self) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @IndexWith.WithSelf.At(constants.%SubscriptType, constants.%ElementType, constants.%Self) { // CHECK:STDOUT: %SubscriptType => constants.%SubscriptType // CHECK:STDOUT: %ElementType => constants.%ElementType // CHECK:STDOUT: %IndexWith.type => constants.%IndexWith.type.2c3 @@ -311,10 +314,8 @@ fn F() { // CHECK:STDOUT: %SubscriptType: type = symbolic_binding SubscriptType, 0 [symbolic] // CHECK:STDOUT: %IndexWith.type.1e9: type = facet_type <@IndexWith, @IndexWith(%SubscriptType, %ElementType)> [symbolic] // CHECK:STDOUT: %Self.b10: %IndexWith.type.1e9 = symbolic_binding Self, 2 [symbolic] -// CHECK:STDOUT: %IndexWith.assoc_type.cae: type = assoc_entity_type @IndexWith, @IndexWith(%SubscriptType, %ElementType) [symbolic] -// CHECK:STDOUT: %assoc0.e9b: %IndexWith.assoc_type.cae = assoc_entity element0, imports.%Core.import_ref.336 [symbolic] -// CHECK:STDOUT: %IndexWith.At.type.7b0: type = fn_type @IndexWith.At, @IndexWith(%SubscriptType, %ElementType) [symbolic] -// CHECK:STDOUT: %IndexWith.At.62b: %IndexWith.At.type.7b0 = struct_value () [symbolic] +// CHECK:STDOUT: %IndexWith.WithSelf.At.type.a9f: type = fn_type @IndexWith.WithSelf.At, @IndexWith(%SubscriptType, %ElementType, %Self.b10) [symbolic] +// CHECK:STDOUT: %IndexWith.WithSelf.At.a38: %IndexWith.WithSelf.At.type.a9f = struct_value () [symbolic] // CHECK:STDOUT: %pattern_type.946: type = pattern_type %ElementType [symbolic] // CHECK:STDOUT: %Self.binding.as_type.79f: type = symbolic_binding_type Self, 2, %Self.b10 [symbolic] // CHECK:STDOUT: %pattern_type.994: type = pattern_type %Self.binding.as_type.79f [symbolic] @@ -324,16 +325,18 @@ fn F() { // CHECK:STDOUT: %IndexWith.type.483: type = facet_type <@IndexWith, @IndexWith(%empty_tuple.type, %empty_tuple.type)> [concrete] // CHECK:STDOUT: %IndexWith.impl_witness: = impl_witness @C.as.IndexWith.impl.%IndexWith.impl_witness_table [concrete] // CHECK:STDOUT: %Self.f44: %IndexWith.type.483 = symbolic_binding Self, 2 [symbolic] -// CHECK:STDOUT: %IndexWith.At.type.1a9: type = fn_type @IndexWith.At, @IndexWith(%empty_tuple.type, %empty_tuple.type) [concrete] -// CHECK:STDOUT: %IndexWith.At.721: %IndexWith.At.type.1a9 = struct_value () [concrete] +// CHECK:STDOUT: %IndexWith.WithSelf.At.type.9fb: type = fn_type @IndexWith.WithSelf.At, @IndexWith(%empty_tuple.type, %empty_tuple.type, %Self.b10) [symbolic] +// CHECK:STDOUT: %IndexWith.WithSelf.At.0b7: %IndexWith.WithSelf.At.type.9fb = struct_value () [symbolic] // CHECK:STDOUT: %IndexWith.assoc_type.d10: type = assoc_entity_type @IndexWith, @IndexWith(%empty_tuple.type, %empty_tuple.type) [concrete] -// CHECK:STDOUT: %assoc0.e4f: %IndexWith.assoc_type.d10 = assoc_entity element0, imports.%Core.import_ref.336 [concrete] +// CHECK:STDOUT: %assoc0.6a8: %IndexWith.assoc_type.d10 = assoc_entity element0, imports.%Core.import_ref.d74 [concrete] // CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %.067: Core.Form = init_form %empty_tuple.type, call_param2 [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.483 = facet_value %C, (%IndexWith.impl_witness) [concrete] +// CHECK:STDOUT: %IndexWith.WithSelf.At.type.10d: type = fn_type @IndexWith.WithSelf.At, @IndexWith(%empty_tuple.type, %empty_tuple.type, %IndexWith.facet) [concrete] +// CHECK:STDOUT: %IndexWith.WithSelf.At.6ef: %IndexWith.WithSelf.At.type.10d = struct_value () [concrete] // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete] @@ -352,15 +355,15 @@ fn F() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IndexWith: %IndexWith.type.504 = import_ref Core//core_wrong_arg_count, IndexWith, loaded [concrete = constants.%IndexWith.generic] +// CHECK:STDOUT: %Core.import_ref.1c4 = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.At: @IndexWith.%IndexWith.WithSelf.At.type (%IndexWith.WithSelf.At.type.a9f) = import_ref Core//core_wrong_arg_count, At, loaded [symbolic = @IndexWith.%IndexWith.WithSelf.At (constants.%IndexWith.WithSelf.At.a38)] +// CHECK:STDOUT: %Core.import_ref.d74 = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.b3bc94.2: type = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%SubscriptType.1 (constants.%SubscriptType)] +// CHECK:STDOUT: %Core.import_ref.8e8b42.2: type = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%ElementType.1 (constants.%ElementType)] +// CHECK:STDOUT: %Core.import_ref.83171e.2: @IndexWith.%IndexWith.type.1 (%IndexWith.type.1e9) = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%Self.1 (constants.%Self.b10)] // CHECK:STDOUT: %Core.import_ref.60d = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.import_ref.91e = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.At: @IndexWith.%IndexWith.At.type (%IndexWith.At.type.7b0) = import_ref Core//core_wrong_arg_count, At, loaded [symbolic = @IndexWith.%IndexWith.At (constants.%IndexWith.At.62b)] -// CHECK:STDOUT: %Core.import_ref.b3bc94.1: type = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%SubscriptType (constants.%SubscriptType)] -// CHECK:STDOUT: %Core.import_ref.8e8b42.1: type = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%ElementType (constants.%ElementType)] -// CHECK:STDOUT: %Core.import_ref.336 = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, unloaded -// CHECK:STDOUT: %Core.import_ref.b3bc94.2: type = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%SubscriptType (constants.%SubscriptType)] -// CHECK:STDOUT: %Core.import_ref.8e8b42.2: type = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%ElementType (constants.%ElementType)] -// CHECK:STDOUT: %Core.import_ref.831: @IndexWith.%IndexWith.type (%IndexWith.type.1e9) = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%Self (constants.%Self.b10)] +// CHECK:STDOUT: %Core.import_ref.b3bc94.3: type = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%SubscriptType.1 (constants.%SubscriptType)] +// CHECK:STDOUT: %Core.import_ref.8e8b42.3: type = import_ref Core//core_wrong_arg_count, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%ElementType.1 (constants.%ElementType)] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -385,22 +388,18 @@ fn F() { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic interface @IndexWith(imports.%Core.import_ref.b3bc94.1: type, imports.%Core.import_ref.8e8b42.1: type) [from "core_wrong_arg_count.carbon"] { -// CHECK:STDOUT: %SubscriptType: type = symbolic_binding SubscriptType, 0 [symbolic = %SubscriptType (constants.%SubscriptType)] -// CHECK:STDOUT: %ElementType: type = symbolic_binding ElementType, 1 [symbolic = %ElementType (constants.%ElementType)] +// CHECK:STDOUT: generic interface @IndexWith(imports.%Core.import_ref.b3bc94.3: type, imports.%Core.import_ref.8e8b42.3: type) [from "core_wrong_arg_count.carbon"] { +// CHECK:STDOUT: %SubscriptType.1: type = symbolic_binding SubscriptType, 0 [symbolic = %SubscriptType.1 (constants.%SubscriptType)] +// CHECK:STDOUT: %ElementType.1: type = symbolic_binding ElementType, 1 [symbolic = %ElementType.1 (constants.%ElementType)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(%SubscriptType, %ElementType)> [symbolic = %IndexWith.type (constants.%IndexWith.type.1e9)] -// CHECK:STDOUT: %Self: @IndexWith.%IndexWith.type (%IndexWith.type.1e9) = symbolic_binding Self, 2 [symbolic = %Self (constants.%Self.b10)] -// CHECK:STDOUT: %IndexWith.At.type: type = fn_type @IndexWith.At, @IndexWith(%SubscriptType, %ElementType) [symbolic = %IndexWith.At.type (constants.%IndexWith.At.type.7b0)] -// CHECK:STDOUT: %IndexWith.At: @IndexWith.%IndexWith.At.type (%IndexWith.At.type.7b0) = struct_value () [symbolic = %IndexWith.At (constants.%IndexWith.At.62b)] -// CHECK:STDOUT: %IndexWith.assoc_type: type = assoc_entity_type @IndexWith, @IndexWith(%SubscriptType, %ElementType) [symbolic = %IndexWith.assoc_type (constants.%IndexWith.assoc_type.cae)] -// CHECK:STDOUT: %assoc0: @IndexWith.%IndexWith.assoc_type (%IndexWith.assoc_type.cae) = assoc_entity element0, imports.%Core.import_ref.336 [symbolic = %assoc0 (constants.%assoc0.e9b)] +// CHECK:STDOUT: %IndexWith.type.1: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.1, %ElementType.1)> [symbolic = %IndexWith.type.1 (constants.%IndexWith.type.1e9)] +// CHECK:STDOUT: %Self.1: @IndexWith.%IndexWith.type.1 (%IndexWith.type.1e9) = symbolic_binding Self, 2 [symbolic = %Self.1 (constants.%Self.b10)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = imports.%Core.import_ref.60d -// CHECK:STDOUT: .At = imports.%Core.import_ref.91e +// CHECK:STDOUT: .At = imports.%Core.import_ref.1c4 // CHECK:STDOUT: witness = (imports.%Core.At) // CHECK:STDOUT: // CHECK:STDOUT: !requires: @@ -447,11 +446,11 @@ fn F() { // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @IndexWith.At(imports.%Core.import_ref.b3bc94.2: type, imports.%Core.import_ref.8e8b42.2: type, imports.%Core.import_ref.831: @IndexWith.%IndexWith.type (%IndexWith.type.1e9)) [from "core_wrong_arg_count.carbon"] { +// CHECK:STDOUT: generic fn @IndexWith.WithSelf.At(imports.%Core.import_ref.b3bc94.2: type, imports.%Core.import_ref.8e8b42.2: type, imports.%Core.import_ref.83171e.2: @IndexWith.%IndexWith.type.1 (%IndexWith.type.1e9)) [from "core_wrong_arg_count.carbon"] { // CHECK:STDOUT: %SubscriptType: type = symbolic_binding SubscriptType, 0 [symbolic = %SubscriptType (constants.%SubscriptType)] // CHECK:STDOUT: %ElementType: type = symbolic_binding ElementType, 1 [symbolic = %ElementType (constants.%ElementType)] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(%SubscriptType, %ElementType)> [symbolic = %IndexWith.type (constants.%IndexWith.type.1e9)] -// CHECK:STDOUT: %Self: @IndexWith.At.%IndexWith.type (%IndexWith.type.1e9) = symbolic_binding Self, 2 [symbolic = %Self (constants.%Self.b10)] +// CHECK:STDOUT: %Self: @IndexWith.WithSelf.At.%IndexWith.type (%IndexWith.type.1e9) = symbolic_binding Self, 2 [symbolic = %Self (constants.%Self.b10)] // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 2, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.79f)] // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.994)] // CHECK:STDOUT: %pattern_type.2: type = pattern_type %SubscriptType [symbolic = %pattern_type.2 (constants.%pattern_type.51d)] @@ -492,11 +491,13 @@ fn F() { // CHECK:STDOUT: fn @DestroyOp(%self.param: ref %C) = "no_op"; // CHECK:STDOUT: // CHECK:STDOUT: specific @IndexWith(constants.%SubscriptType, constants.%ElementType) { -// CHECK:STDOUT: %SubscriptType => constants.%SubscriptType -// CHECK:STDOUT: %ElementType => constants.%ElementType +// CHECK:STDOUT: %SubscriptType.1 => constants.%SubscriptType +// CHECK:STDOUT: %ElementType.1 => constants.%ElementType // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @IndexWith.At(constants.%SubscriptType, constants.%ElementType, constants.%Self.b10) { +// CHECK:STDOUT: specific @IndexWith(constants.%SubscriptType, constants.%ElementType, constants.%Self.b10) {} +// CHECK:STDOUT: +// CHECK:STDOUT: specific @IndexWith.WithSelf.At(constants.%SubscriptType, constants.%ElementType, constants.%Self.b10) { // CHECK:STDOUT: %SubscriptType => constants.%SubscriptType // CHECK:STDOUT: %ElementType => constants.%ElementType // CHECK:STDOUT: %IndexWith.type => constants.%IndexWith.type.1e9 @@ -509,19 +510,39 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @IndexWith(constants.%empty_tuple.type, constants.%empty_tuple.type) { -// CHECK:STDOUT: %SubscriptType => constants.%empty_tuple.type -// CHECK:STDOUT: %ElementType => constants.%empty_tuple.type +// CHECK:STDOUT: %SubscriptType.1 => constants.%empty_tuple.type +// CHECK:STDOUT: %ElementType.1 => constants.%empty_tuple.type // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %IndexWith.type => constants.%IndexWith.type.483 -// CHECK:STDOUT: %Self => constants.%Self.f44 -// CHECK:STDOUT: %IndexWith.At.type => constants.%IndexWith.At.type.1a9 -// CHECK:STDOUT: %IndexWith.At => constants.%IndexWith.At.721 -// CHECK:STDOUT: %IndexWith.assoc_type => constants.%IndexWith.assoc_type.d10 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.e4f +// CHECK:STDOUT: %IndexWith.type.1 => constants.%IndexWith.type.483 +// CHECK:STDOUT: %Self.1 => constants.%Self.f44 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @IndexWith.At(constants.%empty_tuple.type, constants.%empty_tuple.type, constants.%IndexWith.facet) { +// CHECK:STDOUT: specific @IndexWith(constants.%empty_tuple.type, constants.%empty_tuple.type, constants.%Self.b10) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %SubscriptType.2 => constants.%empty_tuple.type +// CHECK:STDOUT: %ElementType.2 => constants.%empty_tuple.type +// CHECK:STDOUT: %IndexWith.type.2 => constants.%IndexWith.type.483 +// CHECK:STDOUT: %Self.2 => constants.%Self.b10 +// CHECK:STDOUT: %IndexWith.WithSelf.At.type => constants.%IndexWith.WithSelf.At.type.9fb +// CHECK:STDOUT: %IndexWith.WithSelf.At => constants.%IndexWith.WithSelf.At.0b7 +// CHECK:STDOUT: %IndexWith.assoc_type => constants.%IndexWith.assoc_type.d10 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.6a8 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @IndexWith(constants.%empty_tuple.type, constants.%empty_tuple.type, constants.%IndexWith.facet) { +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %SubscriptType.2 => constants.%empty_tuple.type +// CHECK:STDOUT: %ElementType.2 => constants.%empty_tuple.type +// CHECK:STDOUT: %IndexWith.type.2 => constants.%IndexWith.type.483 +// CHECK:STDOUT: %Self.2 => constants.%IndexWith.facet +// CHECK:STDOUT: %IndexWith.WithSelf.At.type => constants.%IndexWith.WithSelf.At.type.10d +// CHECK:STDOUT: %IndexWith.WithSelf.At => constants.%IndexWith.WithSelf.At.6ef +// CHECK:STDOUT: %IndexWith.assoc_type => constants.%IndexWith.assoc_type.d10 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.6a8 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @IndexWith.WithSelf.At(constants.%empty_tuple.type, constants.%empty_tuple.type, constants.%IndexWith.facet) { // CHECK:STDOUT: %SubscriptType => constants.%empty_tuple.type // CHECK:STDOUT: %ElementType => constants.%empty_tuple.type // CHECK:STDOUT: %IndexWith.type => constants.%IndexWith.type.483 diff --git a/toolchain/check/testdata/operators/overloaded/index_with_prelude.carbon b/toolchain/check/testdata/operators/overloaded/index_with_prelude.carbon index eeb1f434a35f..6c340617561b 100644 --- a/toolchain/check/testdata/operators/overloaded/index_with_prelude.carbon +++ b/toolchain/check/testdata/operators/overloaded/index_with_prelude.carbon @@ -97,10 +97,9 @@ let x: i32 = c[0]; // CHECK:STDOUT: %IndexWith.type.bbe: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.9ec)> [concrete] // CHECK:STDOUT: %.Self: %IndexWith.type.bbe = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %IndexWith.assoc_type.b14: type = assoc_entity_type @IndexWith, @IndexWith(%SubscriptType.9ec) [concrete] -// CHECK:STDOUT: %assoc0.d1e: %IndexWith.assoc_type.b14 = assoc_entity element0, imports.%Core.import_ref.f1c [concrete] -// CHECK:STDOUT: %IndexWith.At.type.60a: type = fn_type @IndexWith.At, @IndexWith(%SubscriptType.9ec) [concrete] +// CHECK:STDOUT: %assoc0.ab8: %IndexWith.assoc_type.b14 = assoc_entity element0, imports.%Core.import_ref.434 [concrete] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] -// CHECK:STDOUT: %assoc0.8e5: %IndexWith.assoc_type.a96 = assoc_entity element0, imports.%Core.import_ref.853 [symbolic] +// CHECK:STDOUT: %assoc0.f5a: %IndexWith.assoc_type.a96 = assoc_entity element0, imports.%Core.import_ref.d9b [symbolic] // CHECK:STDOUT: %IndexWith.lookup_impl_witness.407: = lookup_impl_witness %.Self, @IndexWith, @IndexWith(%SubscriptType.9ec) [symbolic_self] // CHECK:STDOUT: %impl.elem0.9d3: type = impl_witness_access %IndexWith.lookup_impl_witness.407, element0 [symbolic_self] // CHECK:STDOUT: %IndexWith_where.type: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.9ec) where %impl.elem0.9d3 = %ElementType> [concrete] @@ -112,11 +111,12 @@ let x: i32 = c[0]; // 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(%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] // CHECK:STDOUT: %C.val: %C = struct_value () [concrete] -// CHECK:STDOUT: %.068: type = fn_type_with_self_type %IndexWith.At.type.60a, %IndexWith.facet [concrete] +// CHECK:STDOUT: %.8f0: type = fn_type_with_self_type %IndexWith.WithSelf.At.type.cc5, %IndexWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -126,9 +126,9 @@ let x: i32 = c[0]; // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IndexWith: %IndexWith.type.504 = import_ref Core//prelude/operators/index, IndexWith, loaded [concrete = constants.%IndexWith.generic] -// CHECK:STDOUT: %Core.import_ref.581: @IndexWith.%IndexWith.assoc_type (%IndexWith.assoc_type.a96) = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%assoc0 (constants.%assoc0.8e5)] -// CHECK:STDOUT: %Core.import_ref.f1c: type = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, loaded [concrete = %ElementType] -// CHECK:STDOUT: %Core.import_ref.853 = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.c44: @IndexWith.%IndexWith.assoc_type (%IndexWith.assoc_type.a96) = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%assoc0 (constants.%assoc0.f5a)] +// CHECK:STDOUT: %Core.import_ref.434: type = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, loaded [concrete = %ElementType] +// CHECK:STDOUT: %Core.import_ref.d9b = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %ElementType: type = assoc_const_decl @ElementType.1 [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -156,8 +156,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %.Self.ref: %IndexWith.type.bbe = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc8_47.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %.loc8_47.2: %IndexWith.assoc_type.b14 = specific_constant imports.%Core.import_ref.581, @IndexWith(constants.%SubscriptType.9ec) [concrete = constants.%assoc0.d1e] -// CHECK:STDOUT: %ElementType.ref.loc8_47: %IndexWith.assoc_type.b14 = name_ref ElementType, %.loc8_47.2 [concrete = constants.%assoc0.d1e] +// CHECK:STDOUT: %.loc8_47.2: %IndexWith.assoc_type.b14 = specific_constant imports.%Core.import_ref.c44, @IndexWith(constants.%SubscriptType.9ec, constants.%.Self) [concrete = constants.%assoc0.ab8] +// CHECK:STDOUT: %ElementType.ref.loc8_47: %IndexWith.assoc_type.b14 = name_ref ElementType, %.loc8_47.2 [concrete = constants.%assoc0.ab8] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%IndexWith.lookup_impl_witness.407, element0 [symbolic_self = constants.%impl.elem0.9d3] // CHECK:STDOUT: %ElementType.ref.loc8_62: type = name_ref ElementType, file.%ElementType.decl [concrete = constants.%ElementType] // CHECK:STDOUT: %.loc8_41: type = where_expr %.Self [concrete = constants.%IndexWith_where.type] { @@ -263,7 +263,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %.loc15: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct] // CHECK:STDOUT: %c.ref: %C = name_ref c, file.%c // CHECK:STDOUT: %s.ref: %SubscriptType.9ec = name_ref s, file.%s -// CHECK:STDOUT: %impl.elem1: %.068 = impl_witness_access constants.%IndexWith.impl_witness, element1 [concrete = constants.%C.as.IndexWith.impl.At] +// CHECK:STDOUT: %impl.elem1: %.8f0 = impl_witness_access constants.%IndexWith.impl_witness, element1 [concrete = constants.%C.as.IndexWith.impl.At] // CHECK:STDOUT: %bound_method: = bound_method %c.ref, %impl.elem1 // CHECK:STDOUT: %.loc16: ref %ElementType = temporary_storage // CHECK:STDOUT: %C.as.IndexWith.impl.At.call: init %ElementType to %.loc16 = call %bound_method(%c.ref, %s.ref) @@ -289,10 +289,9 @@ let x: i32 = c[0]; // CHECK:STDOUT: %IndexWith.type.d54: type = facet_type <@IndexWith, @IndexWith(Core.IntLiteral)> [concrete] // CHECK:STDOUT: %.Self: %IndexWith.type.d54 = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %IndexWith.assoc_type.972: type = assoc_entity_type @IndexWith, @IndexWith(Core.IntLiteral) [concrete] -// CHECK:STDOUT: %assoc0.168: %IndexWith.assoc_type.972 = assoc_entity element0, imports.%Core.import_ref.f1c [concrete] -// CHECK:STDOUT: %IndexWith.At.type.1ab: type = fn_type @IndexWith.At, @IndexWith(Core.IntLiteral) [concrete] +// CHECK:STDOUT: %assoc0.b00: %IndexWith.assoc_type.972 = assoc_entity element0, imports.%Core.import_ref.434 [concrete] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] -// CHECK:STDOUT: %assoc0.8e5: %IndexWith.assoc_type.a96 = assoc_entity element0, imports.%Core.import_ref.853 [symbolic] +// CHECK:STDOUT: %assoc0.f5a: %IndexWith.assoc_type.a96 = assoc_entity element0, imports.%Core.import_ref.d9b [symbolic] // CHECK:STDOUT: %IndexWith.lookup_impl_witness.6f5: = lookup_impl_witness %.Self, @IndexWith, @IndexWith(Core.IntLiteral) [symbolic_self] // CHECK:STDOUT: %impl.elem0.d7c: type = impl_witness_access %IndexWith.lookup_impl_witness.6f5, element0 [symbolic_self] // CHECK:STDOUT: %IndexWith_where.type: type = facet_type <@IndexWith, @IndexWith(Core.IntLiteral) where %impl.elem0.d7c = %C> [concrete] @@ -304,10 +303,11 @@ let x: i32 = c[0]; // CHECK:STDOUT: %tuple.type.as.IndexWith.impl.At.type: type = fn_type @tuple.type.as.IndexWith.impl.At [concrete] // CHECK:STDOUT: %tuple.type.as.IndexWith.impl.At: %tuple.type.as.IndexWith.impl.At.type = struct_value () [concrete] // CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.d54 = facet_value %tuple.type.d23, (%IndexWith.impl_witness) [concrete] +// CHECK:STDOUT: %IndexWith.WithSelf.At.type.4d2: type = fn_type @IndexWith.WithSelf.At, @IndexWith(Core.IntLiteral, %IndexWith.facet) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %empty_tuple.bfb: %C = tuple_value () [concrete] // CHECK:STDOUT: %tuple.d21: %tuple.type.d23 = tuple_value (%empty_tuple.bfb, %empty_tuple.bfb) [concrete] -// CHECK:STDOUT: %.20e: type = fn_type_with_self_type %IndexWith.At.type.1ab, %IndexWith.facet [concrete] +// CHECK:STDOUT: %.0a8: type = fn_type_with_self_type %IndexWith.WithSelf.At.type.4d2, %IndexWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -318,10 +318,10 @@ let x: i32 = c[0]; // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IndexWith: %IndexWith.type.504 = import_ref Core//prelude/operators/index, IndexWith, loaded [concrete = constants.%IndexWith.generic] -// CHECK:STDOUT: %Core.import_ref.581: @IndexWith.%IndexWith.assoc_type (%IndexWith.assoc_type.a96) = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%assoc0 (constants.%assoc0.8e5)] -// CHECK:STDOUT: %Core.import_ref.f1c: type = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, loaded [concrete = %ElementType] +// CHECK:STDOUT: %Core.import_ref.c44: @IndexWith.%IndexWith.assoc_type (%IndexWith.assoc_type.a96) = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%assoc0 (constants.%assoc0.f5a)] +// CHECK:STDOUT: %Core.import_ref.434: type = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, loaded [concrete = %ElementType] // CHECK:STDOUT: %Core.IntLiteral: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [concrete = constants.%IntLiteral] -// CHECK:STDOUT: %Core.import_ref.853 = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.d9b = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %ElementType: type = assoc_const_decl @ElementType [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -351,8 +351,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %.Self.ref: %IndexWith.type.d54 = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc8_56.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %.loc8_56.2: %IndexWith.assoc_type.972 = specific_constant imports.%Core.import_ref.581, @IndexWith(Core.IntLiteral) [concrete = constants.%assoc0.168] -// CHECK:STDOUT: %ElementType.ref: %IndexWith.assoc_type.972 = name_ref ElementType, %.loc8_56.2 [concrete = constants.%assoc0.168] +// CHECK:STDOUT: %.loc8_56.2: %IndexWith.assoc_type.972 = specific_constant imports.%Core.import_ref.c44, @IndexWith(Core.IntLiteral, constants.%.Self) [concrete = constants.%assoc0.b00] +// CHECK:STDOUT: %ElementType.ref: %IndexWith.assoc_type.972 = name_ref ElementType, %.loc8_56.2 [concrete = constants.%assoc0.b00] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%IndexWith.lookup_impl_witness.6f5, element0 [symbolic_self = constants.%impl.elem0.d7c] // CHECK:STDOUT: %C.ref.loc8_71: type = name_ref C, file.%C.decl [concrete = constants.%C] // CHECK:STDOUT: %.loc8_50: type = where_expr %.Self [concrete = constants.%IndexWith_where.type] { @@ -459,7 +459,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %.loc14_34: %tuple.type.d23 = tuple_literal (%.loc14_21.2, %.loc14_30.2) [concrete = constants.%tuple.d21] // CHECK:STDOUT: %s.ref: %tuple.type.d23 = name_ref s, file.%s // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %impl.elem1: %.20e = impl_witness_access constants.%IndexWith.impl_witness, element1 [concrete = constants.%tuple.type.as.IndexWith.impl.At] +// CHECK:STDOUT: %impl.elem1: %.0a8 = impl_witness_access constants.%IndexWith.impl_witness, element1 [concrete = constants.%tuple.type.as.IndexWith.impl.At] // CHECK:STDOUT: %bound_method: = bound_method %s.ref, %impl.elem1 // CHECK:STDOUT: %tuple.type.as.IndexWith.impl.At.call: init %C = call %bound_method(%s.ref, %int_0) // CHECK:STDOUT: return @@ -480,9 +480,9 @@ let x: i32 = c[0]; // CHECK:STDOUT: %IndexWith.type.bbe: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.9ec)> [concrete] // CHECK:STDOUT: %.Self: %IndexWith.type.bbe = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %IndexWith.assoc_type.b14: type = assoc_entity_type @IndexWith, @IndexWith(%SubscriptType.9ec) [concrete] -// CHECK:STDOUT: %assoc0.d1e: %IndexWith.assoc_type.b14 = assoc_entity element0, imports.%Core.import_ref.f1c [concrete] +// CHECK:STDOUT: %assoc0.ab8: %IndexWith.assoc_type.b14 = assoc_entity element0, imports.%Core.import_ref.434 [concrete] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self [symbolic_self] -// CHECK:STDOUT: %assoc0.8e5: %IndexWith.assoc_type.a96 = assoc_entity element0, imports.%Core.import_ref.853 [symbolic] +// CHECK:STDOUT: %assoc0.f5a: %IndexWith.assoc_type.a96 = assoc_entity element0, imports.%Core.import_ref.d9b [symbolic] // CHECK:STDOUT: %IndexWith.lookup_impl_witness.407: = lookup_impl_witness %.Self, @IndexWith, @IndexWith(%SubscriptType.9ec) [symbolic_self] // CHECK:STDOUT: %impl.elem0.9d3: type = impl_witness_access %IndexWith.lookup_impl_witness.407, element0 [symbolic_self] // CHECK:STDOUT: %IndexWith_where.type: type = facet_type <@IndexWith, @IndexWith(%SubscriptType.9ec) where %impl.elem0.9d3 = %ElementType> [concrete] @@ -506,9 +506,9 @@ let x: i32 = c[0]; // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %Core.IndexWith: %IndexWith.type.504 = import_ref Core//prelude/operators/index, IndexWith, loaded [concrete = constants.%IndexWith.generic] -// CHECK:STDOUT: %Core.import_ref.581: @IndexWith.%IndexWith.assoc_type (%IndexWith.assoc_type.a96) = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%assoc0 (constants.%assoc0.8e5)] -// CHECK:STDOUT: %Core.import_ref.f1c: type = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, loaded [concrete = %ElementType] -// CHECK:STDOUT: %Core.import_ref.853 = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, unloaded +// CHECK:STDOUT: %Core.import_ref.c44: @IndexWith.%IndexWith.assoc_type (%IndexWith.assoc_type.a96) = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, loaded [symbolic = @IndexWith.%assoc0 (constants.%assoc0.f5a)] +// CHECK:STDOUT: %Core.import_ref.434: type = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, loaded [concrete = %ElementType] +// CHECK:STDOUT: %Core.import_ref.d9b = import_ref Core//prelude/operators/index, loc{{\d+_\d+}}, unloaded // CHECK:STDOUT: %ElementType: type = assoc_const_decl @ElementType.1 [concrete] {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -535,8 +535,8 @@ let x: i32 = c[0]; // CHECK:STDOUT: %.Self.ref: %IndexWith.type.bbe = name_ref .Self, %.Self [symbolic_self = constants.%.Self] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.binding.as_type] // CHECK:STDOUT: %.loc8_47.1: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.binding.as_type] -// CHECK:STDOUT: %.loc8_47.2: %IndexWith.assoc_type.b14 = specific_constant imports.%Core.import_ref.581, @IndexWith(constants.%SubscriptType.9ec) [concrete = constants.%assoc0.d1e] -// CHECK:STDOUT: %ElementType.ref.loc8_47: %IndexWith.assoc_type.b14 = name_ref ElementType, %.loc8_47.2 [concrete = constants.%assoc0.d1e] +// CHECK:STDOUT: %.loc8_47.2: %IndexWith.assoc_type.b14 = specific_constant imports.%Core.import_ref.c44, @IndexWith(constants.%SubscriptType.9ec, constants.%.Self) [concrete = constants.%assoc0.ab8] +// CHECK:STDOUT: %ElementType.ref.loc8_47: %IndexWith.assoc_type.b14 = name_ref ElementType, %.loc8_47.2 [concrete = constants.%assoc0.ab8] // CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%IndexWith.lookup_impl_witness.407, element0 [symbolic_self = constants.%impl.elem0.9d3] // CHECK:STDOUT: %ElementType.ref.loc8_62: type = name_ref ElementType, file.%ElementType.decl [concrete = constants.%ElementType] // CHECK:STDOUT: %.loc8_41: type = where_expr %.Self [concrete = constants.%IndexWith_where.type] { diff --git a/toolchain/check/testdata/operators/overloaded/left_shift.carbon b/toolchain/check/testdata/operators/overloaded/left_shift.carbon index 19780ce5c9f2..8d5db47d63b4 100644 --- a/toolchain/check/testdata/operators/overloaded/left_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/left_shift.carbon @@ -45,20 +45,20 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %LeftShiftWith.type.ae7: type = facet_type <@LeftShiftWith, @LeftShiftWith(%C)> [concrete] -// CHECK:STDOUT: %LeftShiftWith.Op.type.2b8: type = fn_type @LeftShiftWith.Op, @LeftShiftWith(%C) [concrete] // CHECK:STDOUT: %LeftShiftWith.impl_witness: = impl_witness @C.as.LeftShiftWith.impl.%LeftShiftWith.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.LeftShiftWith.impl.Op.type: type = fn_type @C.as.LeftShiftWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.LeftShiftWith.impl.Op: %C.as.LeftShiftWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %LeftShiftWith.facet: %LeftShiftWith.type.ae7 = facet_value %C, (%LeftShiftWith.impl_witness) [concrete] +// CHECK:STDOUT: %LeftShiftWith.WithSelf.Op.type.5ee: type = fn_type @LeftShiftWith.WithSelf.Op, @LeftShiftWith(%C, %LeftShiftWith.facet) [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.type.58e: type = facet_type <@LeftShiftAssignWith, @LeftShiftAssignWith(%C)> [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.impl_witness: = impl_witness @C.as.LeftShiftAssignWith.impl.%LeftShiftAssignWith.impl_witness_table [concrete] -// CHECK:STDOUT: %LeftShiftAssignWith.Op.type.057: type = fn_type @LeftShiftAssignWith.Op, @LeftShiftAssignWith(%C) [concrete] // CHECK:STDOUT: %C.as.LeftShiftAssignWith.impl.Op.type: type = fn_type @C.as.LeftShiftAssignWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.LeftShiftAssignWith.impl.Op: %C.as.LeftShiftAssignWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %LeftShiftAssignWith.facet: %LeftShiftAssignWith.type.58e = facet_value %C, (%LeftShiftAssignWith.impl_witness) [concrete] -// CHECK:STDOUT: %.ad2: type = fn_type_with_self_type %LeftShiftWith.Op.type.2b8, %LeftShiftWith.facet [concrete] +// CHECK:STDOUT: %LeftShiftAssignWith.WithSelf.Op.type.8b5: type = fn_type @LeftShiftAssignWith.WithSelf.Op, @LeftShiftAssignWith(%C, %LeftShiftAssignWith.facet) [concrete] +// CHECK:STDOUT: %.2b5: type = fn_type_with_self_type %LeftShiftWith.WithSelf.Op.type.5ee, %LeftShiftWith.facet [concrete] // CHECK:STDOUT: %ptr.872: type = ptr_type %C [concrete] -// CHECK:STDOUT: %.08d: type = fn_type_with_self_type %LeftShiftAssignWith.Op.type.057, %LeftShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %.8b2: type = fn_type_with_self_type %LeftShiftAssignWith.WithSelf.Op.type.8b5, %LeftShiftAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,7 +68,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.ad2 = impl_witness_access constants.%LeftShiftWith.impl_witness, element1 [concrete = constants.%C.as.LeftShiftWith.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.2b5 = impl_witness_access constants.%LeftShiftWith.impl_witness, element1 [concrete = constants.%C.as.LeftShiftWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: // CHECK:STDOUT: %C.as.LeftShiftWith.impl.Op.call: init %C to %.loc30_26.1 = call %bound_method(%a.ref, %b.ref) @@ -80,7 +80,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.872 = name_ref a, %a // CHECK:STDOUT: %.loc38: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.08d = impl_witness_access constants.%LeftShiftAssignWith.impl_witness, element0 [concrete = constants.%C.as.LeftShiftAssignWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.8b2 = impl_witness_access constants.%LeftShiftAssignWith.impl_witness, element0 [concrete = constants.%C.as.LeftShiftAssignWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc38, %impl.elem0 // CHECK:STDOUT: %C.as.LeftShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method(%.loc38, %b.ref) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/mod.carbon b/toolchain/check/testdata/operators/overloaded/mod.carbon index 7e68935d7e9b..4a3ca451f479 100644 --- a/toolchain/check/testdata/operators/overloaded/mod.carbon +++ b/toolchain/check/testdata/operators/overloaded/mod.carbon @@ -45,20 +45,20 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %ModWith.type.8f8: type = facet_type <@ModWith, @ModWith(%C)> [concrete] -// CHECK:STDOUT: %ModWith.Op.type.ac7: type = fn_type @ModWith.Op, @ModWith(%C) [concrete] // CHECK:STDOUT: %ModWith.impl_witness: = impl_witness @C.as.ModWith.impl.%ModWith.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.ModWith.impl.Op.type: type = fn_type @C.as.ModWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.ModWith.impl.Op: %C.as.ModWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ModWith.facet: %ModWith.type.8f8 = facet_value %C, (%ModWith.impl_witness) [concrete] +// CHECK:STDOUT: %ModWith.WithSelf.Op.type.9b1: type = fn_type @ModWith.WithSelf.Op, @ModWith(%C, %ModWith.facet) [concrete] // CHECK:STDOUT: %ModAssignWith.type.0a7: type = facet_type <@ModAssignWith, @ModAssignWith(%C)> [concrete] // CHECK:STDOUT: %ModAssignWith.impl_witness: = impl_witness @C.as.ModAssignWith.impl.%ModAssignWith.impl_witness_table [concrete] -// CHECK:STDOUT: %ModAssignWith.Op.type.b51: type = fn_type @ModAssignWith.Op, @ModAssignWith(%C) [concrete] // CHECK:STDOUT: %C.as.ModAssignWith.impl.Op.type: type = fn_type @C.as.ModAssignWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.ModAssignWith.impl.Op: %C.as.ModAssignWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %ModAssignWith.facet: %ModAssignWith.type.0a7 = facet_value %C, (%ModAssignWith.impl_witness) [concrete] -// CHECK:STDOUT: %.523: type = fn_type_with_self_type %ModWith.Op.type.ac7, %ModWith.facet [concrete] +// CHECK:STDOUT: %ModAssignWith.WithSelf.Op.type.12e: type = fn_type @ModAssignWith.WithSelf.Op, @ModAssignWith(%C, %ModAssignWith.facet) [concrete] +// CHECK:STDOUT: %.e8e: type = fn_type_with_self_type %ModWith.WithSelf.Op.type.9b1, %ModWith.facet [concrete] // CHECK:STDOUT: %ptr.872: type = ptr_type %C [concrete] -// CHECK:STDOUT: %.012: type = fn_type_with_self_type %ModAssignWith.Op.type.b51, %ModAssignWith.facet [concrete] +// CHECK:STDOUT: %.5a7: type = fn_type_with_self_type %ModAssignWith.WithSelf.Op.type.12e, %ModAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,7 +68,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.523 = impl_witness_access constants.%ModWith.impl_witness, element1 [concrete = constants.%C.as.ModWith.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.e8e = impl_witness_access constants.%ModWith.impl_witness, element1 [concrete = constants.%C.as.ModWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: // CHECK:STDOUT: %C.as.ModWith.impl.Op.call: init %C to %.loc30_26.1 = call %bound_method(%a.ref, %b.ref) @@ -80,7 +80,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.872 = name_ref a, %a // CHECK:STDOUT: %.loc38: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.012 = impl_witness_access constants.%ModAssignWith.impl_witness, element0 [concrete = constants.%C.as.ModAssignWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.5a7 = impl_witness_access constants.%ModAssignWith.impl_witness, element0 [concrete = constants.%C.as.ModAssignWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc38, %impl.elem0 // CHECK:STDOUT: %C.as.ModAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method(%.loc38, %b.ref) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/mul.carbon b/toolchain/check/testdata/operators/overloaded/mul.carbon index 5c46c2d2a9fa..1d5084bbdff1 100644 --- a/toolchain/check/testdata/operators/overloaded/mul.carbon +++ b/toolchain/check/testdata/operators/overloaded/mul.carbon @@ -45,20 +45,20 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %MulWith.type.447: type = facet_type <@MulWith, @MulWith(%C)> [concrete] -// CHECK:STDOUT: %MulWith.Op.type.0fb: type = fn_type @MulWith.Op, @MulWith(%C) [concrete] // CHECK:STDOUT: %MulWith.impl_witness: = impl_witness @C.as.MulWith.impl.%MulWith.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.MulWith.impl.Op.type: type = fn_type @C.as.MulWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.MulWith.impl.Op: %C.as.MulWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %MulWith.facet: %MulWith.type.447 = facet_value %C, (%MulWith.impl_witness) [concrete] +// CHECK:STDOUT: %MulWith.WithSelf.Op.type.e6a: type = fn_type @MulWith.WithSelf.Op, @MulWith(%C, %MulWith.facet) [concrete] // CHECK:STDOUT: %MulAssignWith.type.ddd: type = facet_type <@MulAssignWith, @MulAssignWith(%C)> [concrete] // CHECK:STDOUT: %MulAssignWith.impl_witness: = impl_witness @C.as.MulAssignWith.impl.%MulAssignWith.impl_witness_table [concrete] -// CHECK:STDOUT: %MulAssignWith.Op.type.680: type = fn_type @MulAssignWith.Op, @MulAssignWith(%C) [concrete] // CHECK:STDOUT: %C.as.MulAssignWith.impl.Op.type: type = fn_type @C.as.MulAssignWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.MulAssignWith.impl.Op: %C.as.MulAssignWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %MulAssignWith.facet: %MulAssignWith.type.ddd = facet_value %C, (%MulAssignWith.impl_witness) [concrete] -// CHECK:STDOUT: %.92e: type = fn_type_with_self_type %MulWith.Op.type.0fb, %MulWith.facet [concrete] +// CHECK:STDOUT: %MulAssignWith.WithSelf.Op.type.213: type = fn_type @MulAssignWith.WithSelf.Op, @MulAssignWith(%C, %MulAssignWith.facet) [concrete] +// CHECK:STDOUT: %.13e: type = fn_type_with_self_type %MulWith.WithSelf.Op.type.e6a, %MulWith.facet [concrete] // CHECK:STDOUT: %ptr.872: type = ptr_type %C [concrete] -// CHECK:STDOUT: %.25c: type = fn_type_with_self_type %MulAssignWith.Op.type.680, %MulAssignWith.facet [concrete] +// CHECK:STDOUT: %.8b4: type = fn_type_with_self_type %MulAssignWith.WithSelf.Op.type.213, %MulAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,7 +68,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.92e = impl_witness_access constants.%MulWith.impl_witness, element1 [concrete = constants.%C.as.MulWith.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.13e = impl_witness_access constants.%MulWith.impl_witness, element1 [concrete = constants.%C.as.MulWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: // CHECK:STDOUT: %C.as.MulWith.impl.Op.call: init %C to %.loc30_26.1 = call %bound_method(%a.ref, %b.ref) @@ -80,7 +80,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.872 = name_ref a, %a // CHECK:STDOUT: %.loc38: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.25c = impl_witness_access constants.%MulAssignWith.impl_witness, element0 [concrete = constants.%C.as.MulAssignWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.8b4 = impl_witness_access constants.%MulAssignWith.impl_witness, element0 [concrete = constants.%C.as.MulAssignWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc38, %impl.elem0 // CHECK:STDOUT: %C.as.MulAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method(%.loc38, %b.ref) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/negate.carbon b/toolchain/check/testdata/operators/overloaded/negate.carbon index e6f62d80028b..d7db29b97079 100644 --- a/toolchain/check/testdata/operators/overloaded/negate.carbon +++ b/toolchain/check/testdata/operators/overloaded/negate.carbon @@ -35,12 +35,12 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: constants { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete] -// CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete] // CHECK:STDOUT: %Negate.impl_witness: = impl_witness @C.as.Negate.impl.%Negate.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.Negate.impl.Op.type: type = fn_type @C.as.Negate.impl.Op [concrete] // CHECK:STDOUT: %C.as.Negate.impl.Op: %C.as.Negate.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %C, (%Negate.impl_witness) [concrete] -// CHECK:STDOUT: %.e21: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete] +// CHECK:STDOUT: %Negate.WithSelf.Op.type.900: type = fn_type @Negate.WithSelf.Op, @Negate(%Negate.facet) [concrete] +// CHECK:STDOUT: %.483: type = fn_type_with_self_type %Negate.WithSelf.Op.type.900, %Negate.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -49,7 +49,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a.param: %C) -> out %return.param: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %impl.elem1: %.e21 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%C.as.Negate.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.483 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%C.as.Negate.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: // CHECK:STDOUT: %C.as.Negate.impl.Op.call: init %C to %.loc27_20.1 = call %bound_method(%a.ref) diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index 22a8def5e5da..d3fea81003ca 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -91,10 +91,6 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %.d29: Core.Form = init_form bool, call_param2 [concrete] // CHECK:STDOUT: %OrderedWith.type.c3d: type = facet_type <@OrderedWith, @OrderedWith(%C)> [concrete] // CHECK:STDOUT: %OrderedWith.impl_witness: = impl_witness @C.as.OrderedWith.impl.%OrderedWith.impl_witness_table [concrete] -// CHECK:STDOUT: %OrderedWith.Less.type.65f: type = fn_type @OrderedWith.Less, @OrderedWith(%C) [concrete] -// CHECK:STDOUT: %OrderedWith.LessOrEquivalent.type.554: type = fn_type @OrderedWith.LessOrEquivalent, @OrderedWith(%C) [concrete] -// CHECK:STDOUT: %OrderedWith.Greater.type.58c: type = fn_type @OrderedWith.Greater, @OrderedWith(%C) [concrete] -// CHECK:STDOUT: %OrderedWith.GreaterOrEquivalent.type.a20: type = fn_type @OrderedWith.GreaterOrEquivalent, @OrderedWith(%C) [concrete] // CHECK:STDOUT: %pattern_type.476: type = pattern_type %C [concrete] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete] @@ -107,18 +103,22 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %C.as.OrderedWith.impl.GreaterOrEquivalent.type: type = fn_type @C.as.OrderedWith.impl.GreaterOrEquivalent [concrete] // CHECK:STDOUT: %C.as.OrderedWith.impl.GreaterOrEquivalent: %C.as.OrderedWith.impl.GreaterOrEquivalent.type = struct_value () [concrete] // CHECK:STDOUT: %OrderedWith.facet: %OrderedWith.type.c3d = facet_value %C, (%OrderedWith.impl_witness) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Less.type.26e: type = fn_type @OrderedWith.WithSelf.Less, @OrderedWith(%C, %OrderedWith.facet) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.LessOrEquivalent.type.753: type = fn_type @OrderedWith.WithSelf.LessOrEquivalent, @OrderedWith(%C, %OrderedWith.facet) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.Greater.type.96e: type = fn_type @OrderedWith.WithSelf.Greater, @OrderedWith(%C, %OrderedWith.facet) [concrete] +// CHECK:STDOUT: %OrderedWith.WithSelf.GreaterOrEquivalent.type.cc3: type = fn_type @OrderedWith.WithSelf.GreaterOrEquivalent, @OrderedWith(%C, %OrderedWith.facet) [concrete] // CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [concrete] // CHECK:STDOUT: %TestLess: %TestLess.type = struct_value () [concrete] -// CHECK:STDOUT: %.cde: type = fn_type_with_self_type %OrderedWith.Less.type.65f, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.bd0: type = fn_type_with_self_type %OrderedWith.WithSelf.Less.type.26e, %OrderedWith.facet [concrete] // CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [concrete] // CHECK:STDOUT: %TestLessEqual: %TestLessEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %.481: type = fn_type_with_self_type %OrderedWith.LessOrEquivalent.type.554, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.c55: type = fn_type_with_self_type %OrderedWith.WithSelf.LessOrEquivalent.type.753, %OrderedWith.facet [concrete] // CHECK:STDOUT: %TestGreater.type: type = fn_type @TestGreater [concrete] // CHECK:STDOUT: %TestGreater: %TestGreater.type = struct_value () [concrete] -// CHECK:STDOUT: %.80a: type = fn_type_with_self_type %OrderedWith.Greater.type.58c, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.8c3: type = fn_type_with_self_type %OrderedWith.WithSelf.Greater.type.96e, %OrderedWith.facet [concrete] // CHECK:STDOUT: %TestGreaterEqual.type: type = fn_type @TestGreaterEqual [concrete] // CHECK:STDOUT: %TestGreaterEqual: %TestGreaterEqual.type = struct_value () [concrete] -// CHECK:STDOUT: %.972: type = fn_type_with_self_type %OrderedWith.GreaterOrEquivalent.type.a20, %OrderedWith.facet [concrete] +// CHECK:STDOUT: %.c6a: type = fn_type_with_self_type %OrderedWith.WithSelf.GreaterOrEquivalent.type.cc3, %OrderedWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -353,7 +353,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.cde = impl_witness_access constants.%OrderedWith.impl_witness, element0 [concrete = constants.%C.as.OrderedWith.impl.Less] +// CHECK:STDOUT: %impl.elem0: %.bd0 = impl_witness_access constants.%OrderedWith.impl_witness, element0 [concrete = constants.%C.as.OrderedWith.impl.Less] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem0 // CHECK:STDOUT: %C.as.OrderedWith.impl.Less.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: return %C.as.OrderedWith.impl.Less.call @@ -363,7 +363,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.481 = impl_witness_access constants.%OrderedWith.impl_witness, element1 [concrete = constants.%C.as.OrderedWith.impl.LessOrEquivalent] +// CHECK:STDOUT: %impl.elem1: %.c55 = impl_witness_access constants.%OrderedWith.impl_witness, element1 [concrete = constants.%C.as.OrderedWith.impl.LessOrEquivalent] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: %C.as.OrderedWith.impl.LessOrEquivalent.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: return %C.as.OrderedWith.impl.LessOrEquivalent.call @@ -373,7 +373,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem2: %.80a = impl_witness_access constants.%OrderedWith.impl_witness, element2 [concrete = constants.%C.as.OrderedWith.impl.Greater] +// CHECK:STDOUT: %impl.elem2: %.8c3 = impl_witness_access constants.%OrderedWith.impl_witness, element2 [concrete = constants.%C.as.OrderedWith.impl.Greater] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem2 // CHECK:STDOUT: %C.as.OrderedWith.impl.Greater.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: return %C.as.OrderedWith.impl.Greater.call @@ -383,7 +383,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem3: %.972 = impl_witness_access constants.%OrderedWith.impl_witness, element3 [concrete = constants.%C.as.OrderedWith.impl.GreaterOrEquivalent] +// CHECK:STDOUT: %impl.elem3: %.c6a = impl_witness_access constants.%OrderedWith.impl_witness, element3 [concrete = constants.%C.as.OrderedWith.impl.GreaterOrEquivalent] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem3 // CHECK:STDOUT: %C.as.OrderedWith.impl.GreaterOrEquivalent.call: init bool = call %bound_method(%a.ref, %b.ref) // CHECK:STDOUT: return %C.as.OrderedWith.impl.GreaterOrEquivalent.call diff --git a/toolchain/check/testdata/operators/overloaded/right_shift.carbon b/toolchain/check/testdata/operators/overloaded/right_shift.carbon index ba6a180fb3c2..a8e1b92323d8 100644 --- a/toolchain/check/testdata/operators/overloaded/right_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/right_shift.carbon @@ -45,20 +45,20 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %RightShiftWith.type.95a: type = facet_type <@RightShiftWith, @RightShiftWith(%C)> [concrete] -// CHECK:STDOUT: %RightShiftWith.Op.type.5d5: type = fn_type @RightShiftWith.Op, @RightShiftWith(%C) [concrete] // CHECK:STDOUT: %RightShiftWith.impl_witness: = impl_witness @C.as.RightShiftWith.impl.%RightShiftWith.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.RightShiftWith.impl.Op.type: type = fn_type @C.as.RightShiftWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.RightShiftWith.impl.Op: %C.as.RightShiftWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %RightShiftWith.facet: %RightShiftWith.type.95a = facet_value %C, (%RightShiftWith.impl_witness) [concrete] +// CHECK:STDOUT: %RightShiftWith.WithSelf.Op.type.ca6: type = fn_type @RightShiftWith.WithSelf.Op, @RightShiftWith(%C, %RightShiftWith.facet) [concrete] // CHECK:STDOUT: %RightShiftAssignWith.type.f9a: type = facet_type <@RightShiftAssignWith, @RightShiftAssignWith(%C)> [concrete] // CHECK:STDOUT: %RightShiftAssignWith.impl_witness: = impl_witness @C.as.RightShiftAssignWith.impl.%RightShiftAssignWith.impl_witness_table [concrete] -// CHECK:STDOUT: %RightShiftAssignWith.Op.type.3f3: type = fn_type @RightShiftAssignWith.Op, @RightShiftAssignWith(%C) [concrete] // CHECK:STDOUT: %C.as.RightShiftAssignWith.impl.Op.type: type = fn_type @C.as.RightShiftAssignWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.RightShiftAssignWith.impl.Op: %C.as.RightShiftAssignWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %RightShiftAssignWith.facet: %RightShiftAssignWith.type.f9a = facet_value %C, (%RightShiftAssignWith.impl_witness) [concrete] -// CHECK:STDOUT: %.6b7: type = fn_type_with_self_type %RightShiftWith.Op.type.5d5, %RightShiftWith.facet [concrete] +// CHECK:STDOUT: %RightShiftAssignWith.WithSelf.Op.type.809: type = fn_type @RightShiftAssignWith.WithSelf.Op, @RightShiftAssignWith(%C, %RightShiftAssignWith.facet) [concrete] +// CHECK:STDOUT: %.815: type = fn_type_with_self_type %RightShiftWith.WithSelf.Op.type.ca6, %RightShiftWith.facet [concrete] // CHECK:STDOUT: %ptr.872: type = ptr_type %C [concrete] -// CHECK:STDOUT: %.b7b: type = fn_type_with_self_type %RightShiftAssignWith.Op.type.3f3, %RightShiftAssignWith.facet [concrete] +// CHECK:STDOUT: %.155: type = fn_type_with_self_type %RightShiftAssignWith.WithSelf.Op.type.809, %RightShiftAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,7 +68,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.6b7 = impl_witness_access constants.%RightShiftWith.impl_witness, element1 [concrete = constants.%C.as.RightShiftWith.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.815 = impl_witness_access constants.%RightShiftWith.impl_witness, element1 [concrete = constants.%C.as.RightShiftWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: // CHECK:STDOUT: %C.as.RightShiftWith.impl.Op.call: init %C to %.loc30_26.1 = call %bound_method(%a.ref, %b.ref) @@ -80,7 +80,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.872 = name_ref a, %a // CHECK:STDOUT: %.loc38: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.b7b = impl_witness_access constants.%RightShiftAssignWith.impl_witness, element0 [concrete = constants.%C.as.RightShiftAssignWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.155 = impl_witness_access constants.%RightShiftAssignWith.impl_witness, element0 [concrete = constants.%C.as.RightShiftAssignWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc38, %impl.elem0 // CHECK:STDOUT: %C.as.RightShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method(%.loc38, %b.ref) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/string_indexing.carbon b/toolchain/check/testdata/operators/overloaded/string_indexing.carbon index ebda6e45e8e8..f260c7aaad23 100644 --- a/toolchain/check/testdata/operators/overloaded/string_indexing.carbon +++ b/toolchain/check/testdata/operators/overloaded/string_indexing.carbon @@ -118,7 +118,6 @@ fn TestStringIndexing() { // CHECK:STDOUT: %String.val: %str.ee0 = struct_value (%str.0a6, %int_4) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %IndexWith.type.d54: type = facet_type <@IndexWith, @IndexWith(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %IndexWith.At.type.1ab: type = fn_type @IndexWith.At, @IndexWith(Core.IntLiteral) [concrete] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete] // CHECK:STDOUT: %ImplicitAs.type.2ad: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete] // CHECK:STDOUT: %T.1a9: %ImplicitAs.type.2ad = symbolic_binding T, 0 [symbolic] @@ -130,7 +129,8 @@ fn TestStringIndexing() { // CHECK:STDOUT: %str.as.IndexWith.impl.At.type.595: type = fn_type @str.as.IndexWith.impl.At, @str.as.IndexWith.impl(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %str.as.IndexWith.impl.At.a70: %str.as.IndexWith.impl.At.type.595 = struct_value () [concrete] // CHECK:STDOUT: %IndexWith.facet: %IndexWith.type.d54 = facet_value %str.ee0, (%IndexWith.impl_witness.8d4) [concrete] -// CHECK:STDOUT: %.e1f: type = fn_type_with_self_type %IndexWith.At.type.1ab, %IndexWith.facet [concrete] +// CHECK:STDOUT: %IndexWith.WithSelf.At.type.0ac: type = fn_type @IndexWith.WithSelf.At, @IndexWith(Core.IntLiteral, %IndexWith.facet) [concrete] +// CHECK:STDOUT: %.b7b: type = fn_type_with_self_type %IndexWith.WithSelf.At.type.0ac, %IndexWith.facet [concrete] // CHECK:STDOUT: %str.as.IndexWith.impl.At.bound: = bound_method %String.val, %str.as.IndexWith.impl.At.a70 [concrete] // CHECK:STDOUT: %str.as.IndexWith.impl.At.specific_fn: = specific_function %str.as.IndexWith.impl.At.a70, @str.as.IndexWith.impl.At(%ImplicitAs.facet) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %String.val, %str.as.IndexWith.impl.At.specific_fn [concrete] @@ -156,7 +156,7 @@ fn TestStringIndexing() { // CHECK:STDOUT: %int_4.loc5: %u64 = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %String.val.loc5: %str.ee0 = struct_value (%str.loc5, %int_4.loc5) [concrete = constants.%String.val] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] -// CHECK:STDOUT: %impl.elem1.loc5: %.e1f = impl_witness_access constants.%IndexWith.impl_witness.8d4, element1 [concrete = constants.%str.as.IndexWith.impl.At.a70] +// CHECK:STDOUT: %impl.elem1.loc5: %.b7b = impl_witness_access constants.%IndexWith.impl_witness.8d4, element1 [concrete = constants.%str.as.IndexWith.impl.At.a70] // CHECK:STDOUT: %bound_method.loc5_25.1: = bound_method %String.val.loc5, %impl.elem1.loc5 [concrete = constants.%str.as.IndexWith.impl.At.bound] // CHECK:STDOUT: %ImplicitAs.facet.loc5_25.1: %ImplicitAs.type.2ad = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.4e6) [concrete = constants.%ImplicitAs.facet] // CHECK:STDOUT: %.loc5_25.1: %ImplicitAs.type.2ad = converted Core.IntLiteral, %ImplicitAs.facet.loc5_25.1 [concrete = constants.%ImplicitAs.facet] @@ -175,7 +175,7 @@ fn TestStringIndexing() { // CHECK:STDOUT: %int_4.loc6: %u64 = int_value 4 [concrete = constants.%int_4] // CHECK:STDOUT: %String.val.loc6: %str.ee0 = struct_value (%str.loc6, %int_4.loc6) [concrete = constants.%String.val] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3] -// CHECK:STDOUT: %impl.elem1.loc6: %.e1f = impl_witness_access constants.%IndexWith.impl_witness.8d4, element1 [concrete = constants.%str.as.IndexWith.impl.At.a70] +// CHECK:STDOUT: %impl.elem1.loc6: %.b7b = impl_witness_access constants.%IndexWith.impl_witness.8d4, element1 [concrete = constants.%str.as.IndexWith.impl.At.a70] // CHECK:STDOUT: %bound_method.loc6_25.1: = bound_method %String.val.loc6, %impl.elem1.loc6 [concrete = constants.%str.as.IndexWith.impl.At.bound] // CHECK:STDOUT: %ImplicitAs.facet.loc6_25.1: %ImplicitAs.type.2ad = facet_value Core.IntLiteral, (constants.%ImplicitAs.impl_witness.4e6) [concrete = constants.%ImplicitAs.facet] // CHECK:STDOUT: %.loc6_25.1: %ImplicitAs.type.2ad = converted Core.IntLiteral, %ImplicitAs.facet.loc6_25.1 [concrete = constants.%ImplicitAs.facet] diff --git a/toolchain/check/testdata/operators/overloaded/sub.carbon b/toolchain/check/testdata/operators/overloaded/sub.carbon index 8b0691140767..0cc7edf54a8c 100644 --- a/toolchain/check/testdata/operators/overloaded/sub.carbon +++ b/toolchain/check/testdata/operators/overloaded/sub.carbon @@ -45,20 +45,20 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C: type = class_type @C [concrete] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete] // CHECK:STDOUT: %SubWith.type.7d5: type = facet_type <@SubWith, @SubWith(%C)> [concrete] -// CHECK:STDOUT: %SubWith.Op.type.0e0: type = fn_type @SubWith.Op, @SubWith(%C) [concrete] // CHECK:STDOUT: %SubWith.impl_witness: = impl_witness @C.as.SubWith.impl.%SubWith.impl_witness_table [concrete] // CHECK:STDOUT: %C.as.SubWith.impl.Op.type: type = fn_type @C.as.SubWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.SubWith.impl.Op: %C.as.SubWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %SubWith.facet: %SubWith.type.7d5 = facet_value %C, (%SubWith.impl_witness) [concrete] +// CHECK:STDOUT: %SubWith.WithSelf.Op.type.7be: type = fn_type @SubWith.WithSelf.Op, @SubWith(%C, %SubWith.facet) [concrete] // CHECK:STDOUT: %SubAssignWith.type.1fc: type = facet_type <@SubAssignWith, @SubAssignWith(%C)> [concrete] // CHECK:STDOUT: %SubAssignWith.impl_witness: = impl_witness @C.as.SubAssignWith.impl.%SubAssignWith.impl_witness_table [concrete] -// CHECK:STDOUT: %SubAssignWith.Op.type.235: type = fn_type @SubAssignWith.Op, @SubAssignWith(%C) [concrete] // CHECK:STDOUT: %C.as.SubAssignWith.impl.Op.type: type = fn_type @C.as.SubAssignWith.impl.Op [concrete] // CHECK:STDOUT: %C.as.SubAssignWith.impl.Op: %C.as.SubAssignWith.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %SubAssignWith.facet: %SubAssignWith.type.1fc = facet_value %C, (%SubAssignWith.impl_witness) [concrete] -// CHECK:STDOUT: %.d15: type = fn_type_with_self_type %SubWith.Op.type.0e0, %SubWith.facet [concrete] +// CHECK:STDOUT: %SubAssignWith.WithSelf.Op.type.d77: type = fn_type @SubAssignWith.WithSelf.Op, @SubAssignWith(%C, %SubAssignWith.facet) [concrete] +// CHECK:STDOUT: %.2c4: type = fn_type_with_self_type %SubWith.WithSelf.Op.type.7be, %SubWith.facet [concrete] // CHECK:STDOUT: %ptr.872: type = ptr_type %C [concrete] -// CHECK:STDOUT: %.252: type = fn_type_with_self_type %SubAssignWith.Op.type.235, %SubAssignWith.facet [concrete] +// CHECK:STDOUT: %.49d: type = fn_type_with_self_type %SubAssignWith.WithSelf.Op.type.d77, %SubAssignWith.facet [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -68,7 +68,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem1: %.d15 = impl_witness_access constants.%SubWith.impl_witness, element1 [concrete = constants.%C.as.SubWith.impl.Op] +// CHECK:STDOUT: %impl.elem1: %.2c4 = impl_witness_access constants.%SubWith.impl_witness, element1 [concrete = constants.%C.as.SubWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %a.ref, %impl.elem1 // CHECK:STDOUT: // CHECK:STDOUT: %C.as.SubWith.impl.Op.call: init %C to %.loc30_26.1 = call %bound_method(%a.ref, %b.ref) @@ -80,7 +80,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %ptr.872 = name_ref a, %a // CHECK:STDOUT: %.loc38: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %impl.elem0: %.252 = impl_witness_access constants.%SubAssignWith.impl_witness, element0 [concrete = constants.%C.as.SubAssignWith.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.49d = impl_witness_access constants.%SubAssignWith.impl_witness, element0 [concrete = constants.%C.as.SubAssignWith.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %.loc38, %impl.elem0 // CHECK:STDOUT: %C.as.SubAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method(%.loc38, %b.ref) // CHECK:STDOUT: diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index 778943bd7ad6..d636cea6cd93 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -58,7 +58,6 @@ fn Main() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -66,20 +65,21 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -132,7 +132,7 @@ fn Main() { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc4: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc4: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc4_1.1: = bound_method %int_0, %impl.elem0.loc4 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc4: = specific_function %impl.elem0.loc4, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_1.2: = bound_method %int_0, %specific_fn.loc4 [concrete = constants.%bound_method] @@ -142,7 +142,7 @@ fn Main() { // CHECK:STDOUT: %package.ref: = name_ref package, package [concrete = package] // CHECK:STDOUT: %x.ref: ref %i32 = name_ref x, file.%x [concrete = file.%x.var] // CHECK:STDOUT: %.loc5: %i32 = acquire_value %x.ref -// CHECK:STDOUT: %impl.elem0.loc5: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc5: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc5_21.1: = bound_method %.loc5, %impl.elem0.loc5 // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc5_21.2: = bound_method %.loc5, %specific_fn.loc5 @@ -165,7 +165,6 @@ fn Main() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -173,7 +172,8 @@ fn Main() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -185,14 +185,14 @@ fn Main() { // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -246,7 +246,7 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: %x.var: ref %i32 = var %x.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc7: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc7: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc7_3.1: = bound_method %int_1, %impl.elem0.loc7 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_3.2: = bound_method %int_1, %specific_fn.loc7 [concrete = constants.%bound_method.38b] @@ -266,7 +266,7 @@ fn Main() { // CHECK:STDOUT: %package.ref: = name_ref package, package [concrete = package] // CHECK:STDOUT: %x.ref: ref %i32 = name_ref x, file.%x [concrete = file.%x.var] // CHECK:STDOUT: %.loc9_23: %i32 = acquire_value %x.ref -// CHECK:STDOUT: %impl.elem0.loc9: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc9: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc9_23.1: = bound_method %.loc9_23, %impl.elem0.loc9 // CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc9_23.2: = bound_method %.loc9_23, %specific_fn.loc9 @@ -289,7 +289,7 @@ fn Main() { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc4_1.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // 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.loc4_1.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.d2e] diff --git a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon index 1336215712ba..59cbca844cc3 100644 --- a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon +++ b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon @@ -38,7 +38,6 @@ var b: i32 = a; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -46,7 +45,8 @@ var b: i32 = a; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -87,7 +87,7 @@ var b: i32 = a; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc4_1.1: = bound_method %int_0, %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.loc4_1.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] @@ -107,14 +107,14 @@ var b: i32 = a; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.501: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.08e: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.014: %Int.as.Copy.impl.Op.type.08e = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.a2f: = impl_witness imports.%Copy.impl_witness_table.d6d, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.837: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.2b1: %Int.as.Copy.impl.Op.type.837 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.a2f) [concrete] -// CHECK:STDOUT: %.70e: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.67d: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.d31: type = fn_type_with_self_type %Copy.WithSelf.Op.type.67d, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.2b1, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -160,7 +160,7 @@ var b: i32 = a; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: ref %i32 = name_ref a, imports.%Main.a [concrete = imports.%a.var] // CHECK:STDOUT: %.loc4: %i32 = acquire_value %a.ref -// CHECK:STDOUT: %impl.elem0: %.70e = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] +// CHECK:STDOUT: %impl.elem0: %.d31 = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] // CHECK:STDOUT: %bound_method.loc4_14.1: = bound_method %.loc4, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc4_14.2: = bound_method %.loc4, %specific_fn diff --git a/toolchain/check/testdata/packages/raw_core.carbon b/toolchain/check/testdata/packages/raw_core.carbon index 5d270db2547e..fa3fd497a412 100644 --- a/toolchain/check/testdata/packages/raw_core.carbon +++ b/toolchain/check/testdata/packages/raw_core.carbon @@ -208,7 +208,6 @@ var c: r#Core = {.n = 0 as Core.Int(32)}; // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete] // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] @@ -216,7 +215,8 @@ var c: r#Core = {.n = 0 as Core.Int(32)}; // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.628: = bound_method %int_0.5c6, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -224,14 +224,14 @@ var c: r#Core = {.n = 0 as Core.Int(32)}; // CHECK:STDOUT: %struct: %struct_type.n = struct_value (%int_0.6a9) [concrete] // CHECK:STDOUT: %.cb0: ref %i32 = class_element_access file.%c.var, element0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_0.6a9, %Int.as.Copy.impl.Op.664 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %bound_method.5f6: = bound_method %int_0.6a9, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -293,7 +293,7 @@ var c: r#Core = {.n = 0 as Core.Int(32)}; // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc6_25.1: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0.loc6_25.1: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc6_25.1: = bound_method %int_0, %impl.elem0.loc6_25.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc6_25.1: = specific_function %impl.elem0.loc6_25.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_25.2: = bound_method %int_0, %specific_fn.loc6_25.1 [concrete = constants.%bound_method.628] @@ -301,7 +301,7 @@ var c: r#Core = {.n = 0 as Core.Int(32)}; // CHECK:STDOUT: %.loc6_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_25.2: %i32 = converted %int_0, %.loc6_25.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_40.1: %struct_type.n = struct_literal (%.loc6_25.2) [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0.loc6_25.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc6_25.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_25.3: = bound_method %.loc6_25.2, %impl.elem0.loc6_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc6_25.2: = specific_function %impl.elem0.loc6_25.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_25.4: = bound_method %.loc6_25.2, %specific_fn.loc6_25.2 [concrete = constants.%bound_method.5f6] diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index 52e43fb2abda..efaa7dc71146 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -34,7 +34,6 @@ fn F() -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -42,21 +41,22 @@ fn F() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -108,7 +108,7 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var %n.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %int_0, %impl.elem0.loc16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_0, %specific_fn.loc16 [concrete = constants.%bound_method] @@ -126,7 +126,7 @@ fn F() -> i32 { // CHECK:STDOUT: %addr.loc17_11: %ptr.235 = addr_of %.loc17_12 // CHECK:STDOUT: %.loc17_10.1: ref %i32 = deref %addr.loc17_11 // CHECK:STDOUT: %.loc17_10.2: %i32 = acquire_value %.loc17_10.1 -// CHECK:STDOUT: %impl.elem0.loc17: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc17: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc17_10.1: = bound_method %.loc17_10.2, %impl.elem0.loc17 // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_10.2: = bound_method %.loc17_10.2, %specific_fn.loc17 diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index 1cbc38b9faca..570769667f1e 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -44,7 +44,6 @@ fn F() { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -52,7 +51,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -63,7 +63,6 @@ fn F() { // CHECK:STDOUT: %struct.ed5: %struct_type.a.b.501 = struct_value (%int_1.5d2, %int_2.ef8) [concrete] // CHECK:STDOUT: %pattern_type.8dd: type = pattern_type %ptr.3ee [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -71,7 +70,8 @@ fn F() { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.704: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%struct_type.a.b.501) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.6e1: %ptr.as.Copy.impl.Op.type.704 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.693: %Copy.type = facet_value %ptr.3ee, (%Copy.impl_witness.00b) [concrete] -// CHECK:STDOUT: %.b4b: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.693 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e3a: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.693) [concrete] +// CHECK:STDOUT: %.4da: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e3a, %Copy.facet.693 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn.8f3: = specific_function %ptr.as.Copy.impl.Op.6e1, @ptr.as.Copy.impl.Op(%struct_type.a.b.501) [concrete] // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %ptr.235 [concrete] @@ -79,7 +79,8 @@ fn F() { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.c3c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.a7b: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.a7b [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.a7b) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet.a7b [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn.101: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete] // CHECK:STDOUT: %tuple.95a: %tuple.type.24b = tuple_value (%i32, %i32) [concrete] @@ -138,7 +139,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc16: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc16: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc16_46.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc16, %int_2.loc16) [concrete = constants.%struct.4aa] -// CHECK:STDOUT: %impl.elem0.loc16_46.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16_46.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_46.1: = bound_method %int_1.loc16, %impl.elem0.loc16_46.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc16_46.1: = specific_function %impl.elem0.loc16_46.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_46.2: = bound_method %int_1.loc16, %specific_fn.loc16_46.1 [concrete = constants.%bound_method.38b] @@ -146,7 +147,7 @@ fn F() { // CHECK:STDOUT: %.loc16_46.2: init %i32 = converted %int_1.loc16, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16_46.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc16_46.3: ref %i32 = struct_access %s.var, element0 // CHECK:STDOUT: %.loc16_46.4: init %i32 to %.loc16_46.3 = in_place_init %.loc16_46.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc16_46.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16_46.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_46.3: = bound_method %int_2.loc16, %impl.elem0.loc16_46.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc16_46.2: = specific_function %impl.elem0.loc16_46.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_46.4: = bound_method %int_2.loc16, %specific_fn.loc16_46.2 [concrete = constants.%bound_method.646] @@ -172,7 +173,7 @@ fn F() { // CHECK:STDOUT: %p.var: ref %ptr.3ee = var %p.var_patt // CHECK:STDOUT: %s.ref.loc18: ref %struct_type.a.b.501 = name_ref s, %s // CHECK:STDOUT: %addr.loc18: %ptr.3ee = addr_of %s.ref.loc18 -// CHECK:STDOUT: %impl.elem0.loc18: %.b4b = impl_witness_access constants.%Copy.impl_witness.00b, element0 [concrete = constants.%ptr.as.Copy.impl.Op.6e1] +// CHECK:STDOUT: %impl.elem0.loc18: %.4da = impl_witness_access constants.%Copy.impl_witness.00b, element0 [concrete = constants.%ptr.as.Copy.impl.Op.6e1] // CHECK:STDOUT: %bound_method.loc18_32.1: = bound_method %addr.loc18, %impl.elem0.loc18 // CHECK:STDOUT: %specific_fn.loc18: = specific_function %impl.elem0.loc18, @ptr.as.Copy.impl.Op(constants.%struct_type.a.b.501) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.8f3] // CHECK:STDOUT: %bound_method.loc18_32.2: = bound_method %addr.loc18, %specific_fn.loc18 @@ -195,7 +196,7 @@ fn F() { // CHECK:STDOUT: %s.ref.loc19: ref %struct_type.a.b.501 = name_ref s, %s // CHECK:STDOUT: %.loc19_19: ref %i32 = struct_access %s.ref.loc19, element0 // CHECK:STDOUT: %addr.loc19: %ptr.235 = addr_of %.loc19_19 -// CHECK:STDOUT: %impl.elem0.loc19: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc19: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc19_17.1: = bound_method %addr.loc19, %impl.elem0.loc19 // CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.101] // CHECK:STDOUT: %bound_method.loc19_17.2: = bound_method %addr.loc19, %specific_fn.loc19 @@ -215,7 +216,7 @@ fn F() { // CHECK:STDOUT: %s.ref.loc20: ref %struct_type.a.b.501 = name_ref s, %s // CHECK:STDOUT: %.loc20_19: ref %i32 = struct_access %s.ref.loc20, element1 // CHECK:STDOUT: %addr.loc20: %ptr.235 = addr_of %.loc20_19 -// CHECK:STDOUT: %impl.elem0.loc20: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc20: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc20_17.1: = bound_method %addr.loc20, %impl.elem0.loc20 // CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.101] // CHECK:STDOUT: %bound_method.loc20_17.2: = bound_method %addr.loc20, %specific_fn.loc20 @@ -235,7 +236,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc22: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc22: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc22_28.1: %tuple.type.f94 = tuple_literal (%int_1.loc22, %int_2.loc22) [concrete = constants.%tuple.ad8] -// CHECK:STDOUT: %impl.elem0.loc22_28.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc22_28.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc22_28.1: = bound_method %int_1.loc22, %impl.elem0.loc22_28.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc22_28.1: = specific_function %impl.elem0.loc22_28.1, @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_1.loc22, %specific_fn.loc22_28.1 [concrete = constants.%bound_method.38b] @@ -243,7 +244,7 @@ fn F() { // CHECK:STDOUT: %.loc22_28.2: init %i32 = converted %int_1.loc22, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22_28.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %tuple.elem0.loc22: ref %i32 = tuple_access %t.var, element0 // CHECK:STDOUT: %.loc22_28.3: init %i32 to %tuple.elem0.loc22 = in_place_init %.loc22_28.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc22_28.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc22_28.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc22_28.3: = bound_method %int_2.loc22, %impl.elem0.loc22_28.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc22_28.2: = specific_function %impl.elem0.loc22_28.2, @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.4: = bound_method %int_2.loc22, %specific_fn.loc22_28.2 [concrete = constants.%bound_method.646] @@ -272,7 +273,7 @@ fn F() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0.loc23: ref %i32 = tuple_access %t.ref.loc23, element0 // CHECK:STDOUT: %addr.loc23: %ptr.235 = addr_of %tuple.elem0.loc23 -// CHECK:STDOUT: %impl.elem0.loc23: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc23: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc23_18.1: = bound_method %addr.loc23, %impl.elem0.loc23 // CHECK:STDOUT: %specific_fn.loc23: = specific_function %impl.elem0.loc23, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.101] // CHECK:STDOUT: %bound_method.loc23_18.2: = bound_method %addr.loc23, %specific_fn.loc23 @@ -293,7 +294,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1.loc24: ref %i32 = tuple_access %t.ref.loc24, element1 // CHECK:STDOUT: %addr.loc24: %ptr.235 = addr_of %tuple.elem1.loc24 -// CHECK:STDOUT: %impl.elem0.loc24: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc24: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc24_18.1: = bound_method %addr.loc24, %impl.elem0.loc24 // CHECK:STDOUT: %specific_fn.loc24: = specific_function %impl.elem0.loc24, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.101] // CHECK:STDOUT: %bound_method.loc24_18.2: = bound_method %addr.loc24, %specific_fn.loc24 diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index c1d82349ea6d..45a4ea2644b3 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -36,7 +36,6 @@ fn F() -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -44,7 +43,8 @@ fn F() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -52,7 +52,6 @@ fn F() -> i32 { // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete] // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %ptr.235 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] @@ -62,13 +61,15 @@ fn F() -> i32 { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.c3c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.a7b: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.a7b [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.a7b) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet.a7b [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.de4: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc17 [concrete] @@ -124,7 +125,7 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %n.var: ref %i32 = var %n.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc16: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_3.1: = bound_method %int_0, %impl.elem0.loc16 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_3.2: = bound_method %int_0, %specific_fn.loc16 [concrete = constants.%bound_method] @@ -143,7 +144,7 @@ fn F() -> i32 { // CHECK:STDOUT: %p.var: ref %ptr.235 = var %p.var_patt // CHECK:STDOUT: %n.ref: ref %i32 = name_ref n, %n // CHECK:STDOUT: %addr: %ptr.235 = addr_of %n.ref -// CHECK:STDOUT: %impl.elem0.loc17: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc17: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc17_17.1: = bound_method %addr, %impl.elem0.loc17 // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_17.2: = bound_method %addr, %specific_fn.loc17 @@ -159,7 +160,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc19_11: %ptr.235 = acquire_value %p.ref // CHECK:STDOUT: %.loc19_10.1: ref %i32 = deref %.loc19_11 // CHECK:STDOUT: %.loc19_10.2: %i32 = acquire_value %.loc19_10.1 -// CHECK:STDOUT: %impl.elem0.loc19: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc19: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc19_10.1: = bound_method %.loc19_10.2, %impl.elem0.loc19 // CHECK:STDOUT: %specific_fn.loc19: = specific_function %impl.elem0.loc19, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc19_10.2: = bound_method %.loc19_10.2, %specific_fn.loc19 diff --git a/toolchain/check/testdata/pointer/import.carbon b/toolchain/check/testdata/pointer/import.carbon index 47e8c1ab5d83..7576ef92678b 100644 --- a/toolchain/check/testdata/pointer/import.carbon +++ b/toolchain/check/testdata/pointer/import.carbon @@ -37,7 +37,6 @@ var a: i32* = a_ref; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -45,7 +44,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -54,7 +54,6 @@ var a: i32* = a_ref; // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %ptr.235 [concrete] // CHECK:STDOUT: %addr: %ptr.235 = addr_of file.%a_orig.var [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -62,7 +61,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.c3c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.bound: = bound_method %addr, %ptr.as.Copy.impl.Op.011 [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %bound_method.743: = bound_method %addr, %ptr.as.Copy.impl.Op.specific_fn [concrete] @@ -118,7 +118,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc4: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc4: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc4_1.1: = bound_method %int_0, %impl.elem0.loc4 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc4: = specific_function %impl.elem0.loc4, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc4_1.2: = bound_method %int_0, %specific_fn.loc4 [concrete = constants.%bound_method.d2e] @@ -127,7 +127,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: assign file.%a_orig.var, %.loc4 // CHECK:STDOUT: %a_orig.ref: ref %i32 = name_ref a_orig, file.%a_orig [concrete = file.%a_orig.var] // CHECK:STDOUT: %addr: %ptr.235 = addr_of %a_orig.ref [concrete = constants.%addr] -// CHECK:STDOUT: %impl.elem0.loc5: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0.loc5: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc5_19.1: = bound_method %addr, %impl.elem0.loc5 [concrete = constants.%ptr.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc5_19.2: = bound_method %addr, %specific_fn.loc5 [concrete = constants.%bound_method.743] @@ -142,7 +142,6 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete] // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.48f: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.970: %ptr.as.Copy.impl.Op.type.48f = struct_value () [symbolic] @@ -154,7 +153,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.039: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.dae: %ptr.as.Copy.impl.Op.type.039 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.9e1, (%Copy.impl_witness.a02) [concrete] -// CHECK:STDOUT: %.6e8: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.163: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.2f1: type = fn_type_with_self_type %Copy.WithSelf.Op.type.163, %Copy.facet [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: = specific_function %ptr.as.Copy.impl.Op.dae, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -203,7 +203,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a_ref.ref: ref %ptr.9e1 = name_ref a_ref, imports.%Implicit.a_ref [concrete = imports.%a_ref.var] // CHECK:STDOUT: %.loc4: %ptr.9e1 = acquire_value %a_ref.ref -// CHECK:STDOUT: %impl.elem0: %.6e8 = impl_witness_access constants.%Copy.impl_witness.a02, element0 [concrete = constants.%ptr.as.Copy.impl.Op.dae] +// CHECK:STDOUT: %impl.elem0: %.2f1 = impl_witness_access constants.%Copy.impl_witness.a02, element0 [concrete = constants.%ptr.as.Copy.impl.Op.dae] // CHECK:STDOUT: %bound_method.loc4_15.1: = bound_method %.loc4, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc4_15.2: = bound_method %.loc4, %specific_fn diff --git a/toolchain/check/testdata/pointer/nested_const.carbon b/toolchain/check/testdata/pointer/nested_const.carbon index cc32c843cdab..d30dfe050df4 100644 --- a/toolchain/check/testdata/pointer/nested_const.carbon +++ b/toolchain/check/testdata/pointer/nested_const.carbon @@ -36,7 +36,6 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: %F.type: type = fn_type @F [concrete] // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %T.035: %Copy.type = symbolic_binding T, 0 [symbolic] @@ -48,7 +47,8 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: %const.as.Copy.impl.Op.type.ed9: type = fn_type @const.as.Copy.impl.Op, @const.as.Copy.impl(%Copy.facet.de4) [concrete] // CHECK:STDOUT: %const.as.Copy.impl.Op.686: %const.as.Copy.impl.Op.type.ed9 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.7d9: %Copy.type = facet_value %const.20a, (%Copy.impl_witness.286) [concrete] -// CHECK:STDOUT: %.0cd: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.7d9 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.ba7: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.7d9) [concrete] +// CHECK:STDOUT: %.2d3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.ba7, %Copy.facet.7d9 [concrete] // CHECK:STDOUT: %const.as.Copy.impl.Op.specific_fn: = specific_function %const.as.Copy.impl.Op.686, @const.as.Copy.impl.Op(%Copy.facet.de4) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -106,7 +106,7 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: %.loc17_11.2: %const.58f = acquire_value %.loc17_11.1 // CHECK:STDOUT: %.loc17_10.1: ref %const.20a = deref %.loc17_11.2 // CHECK:STDOUT: %.loc17_10.2: %const.20a = acquire_value %.loc17_10.1 -// CHECK:STDOUT: %impl.elem0: %.0cd = impl_witness_access constants.%Copy.impl_witness.286, element0 [concrete = constants.%const.as.Copy.impl.Op.686] +// CHECK:STDOUT: %impl.elem0: %.2d3 = impl_witness_access constants.%Copy.impl_witness.286, element0 [concrete = constants.%const.as.Copy.impl.Op.686] // CHECK:STDOUT: %bound_method.loc17_10.1: = bound_method %.loc17_10.2, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @const.as.Copy.impl.Op(constants.%Copy.facet.de4) [concrete = constants.%const.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_10.2: = bound_method %.loc17_10.2, %specific_fn diff --git a/toolchain/check/testdata/pointer/types.carbon b/toolchain/check/testdata/pointer/types.carbon index f2bb3c25b2e2..08f7b1dc7d04 100644 --- a/toolchain/check/testdata/pointer/types.carbon +++ b/toolchain/check/testdata/pointer/types.carbon @@ -33,7 +33,6 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: %Ptr.type: type = fn_type @Ptr [concrete] // CHECK:STDOUT: %Ptr: %Ptr.type = struct_value () [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic] @@ -41,7 +40,8 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.c3c: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%i32) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.011: %ptr.as.Copy.impl.Op.type.c3c = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.a7b: %Copy.type = facet_value %ptr.235, (%Copy.impl_witness.843) [concrete] -// CHECK:STDOUT: %.e6f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.a7b [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.e01: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.a7b) [concrete] +// CHECK:STDOUT: %.a62: type = fn_type_with_self_type %Copy.WithSelf.Op.type.e01, %Copy.facet.a7b [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn.101: = specific_function %ptr.as.Copy.impl.Op.011, @ptr.as.Copy.impl.Op(%i32) [concrete] // CHECK:STDOUT: %const.20a: type = const_type %i32 [concrete] // CHECK:STDOUT: %ptr.36b: type = ptr_type %const.20a [concrete] @@ -53,7 +53,8 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.25e: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%const.20a) [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.efa: %ptr.as.Copy.impl.Op.type.25e = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.bca: %Copy.type = facet_value %ptr.36b, (%Copy.impl_witness.ce1) [concrete] -// CHECK:STDOUT: %.dbc: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.bca [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.f98: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.bca) [concrete] +// CHECK:STDOUT: %.767: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f98, %Copy.facet.bca [concrete] // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn.bcd: = specific_function %ptr.as.Copy.impl.Op.efa, @ptr.as.Copy.impl.Op(%const.20a) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -124,7 +125,7 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: fn @Ptr(%p.param: %ptr.235) -> out %return.param: %ptr.235 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.235 = name_ref p, %p -// CHECK:STDOUT: %impl.elem0: %.e6f = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] +// CHECK:STDOUT: %impl.elem0: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011] // CHECK:STDOUT: %bound_method.loc16_10.1: = bound_method %p.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.101] // CHECK:STDOUT: %bound_method.loc16_10.2: = bound_method %p.ref, %specific_fn @@ -135,7 +136,7 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: fn @ConstPtr(%p.param: %ptr.36b) -> out %return.param: %ptr.36b { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.36b = name_ref p, %p -// CHECK:STDOUT: %impl.elem0: %.dbc = impl_witness_access constants.%Copy.impl_witness.ce1, element0 [concrete = constants.%ptr.as.Copy.impl.Op.efa] +// CHECK:STDOUT: %impl.elem0: %.767 = impl_witness_access constants.%Copy.impl_witness.ce1, element0 [concrete = constants.%ptr.as.Copy.impl.Op.efa] // CHECK:STDOUT: %bound_method.loc20_10.1: = bound_method %p.ref, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @ptr.as.Copy.impl.Op(constants.%const.20a) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn.bcd] // CHECK:STDOUT: %bound_method.loc20_10.2: = bound_method %p.ref, %specific_fn diff --git a/toolchain/check/testdata/primitives/import_symbolic.carbon b/toolchain/check/testdata/primitives/import_symbolic.carbon index ca6de4b7ccce..1a9b9902165b 100644 --- a/toolchain/check/testdata/primitives/import_symbolic.carbon +++ b/toolchain/check/testdata/primitives/import_symbolic.carbon @@ -203,12 +203,12 @@ fn F() -> u32 { // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.af3: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.4da [concrete] +// CHECK:STDOUT: %assoc0.133: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.fb8 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.348: = impl_witness imports.%Copy.impl_witness_table.3cc [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value bool, (%Copy.impl_witness.348) [concrete] -// CHECK:STDOUT: %.56b: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.6dd: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.86d: type = fn_type_with_self_type %Copy.WithSelf.Op.type.6dd, %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: = bound_method %false, %bool.as.Copy.impl.Op [concrete] @@ -217,10 +217,10 @@ fn F() -> u32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//bool, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.C: type = import_ref Main//bool, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.1c8: %I.assoc_type = import_ref Main//bool, loc5_12, loaded [concrete = constants.%assoc0.af3] +// CHECK:STDOUT: %Main.import_ref.c63: %I.assoc_type = import_ref Main//bool, loc5_12, loaded [concrete = constants.%assoc0.133] // CHECK:STDOUT: %Main.import_ref.d18: bool = import_ref Main//bool, loc9_34, loaded [concrete = constants.%false] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.d18), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.4da: bool = import_ref Main//bool, loc5_12, loaded [concrete = %value] +// CHECK:STDOUT: %Main.import_ref.fb8: bool = import_ref Main//bool, loc5_12, loaded [concrete = %value] // CHECK:STDOUT: %value: bool = assoc_const_decl @value [concrete] {} // CHECK:STDOUT: %Core.import_ref.595: %bool.as.Copy.impl.Op.type = import_ref Core//prelude/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.3cc = impl_witness_table (%Core.import_ref.595), @bool.as.Copy.impl [concrete] @@ -234,9 +234,9 @@ fn F() -> u32 { // CHECK:STDOUT: %.loc7_13: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc7_13 [concrete = constants.%C] // CHECK:STDOUT: %.loc7_18: type = converted %.loc7_13, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.1c8 [concrete = constants.%assoc0.af3] +// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.c63 [concrete = constants.%assoc0.133] // CHECK:STDOUT: %impl.elem0.loc7_18.1: bool = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%false] -// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.56b = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %impl.elem0.loc7_18.1, %impl.elem0.loc7_18.2 [concrete = constants.%bool.as.Copy.impl.Op.bound] // CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method(%impl.elem0.loc7_18.1) [concrete = constants.%false] // CHECK:STDOUT: return %bool.as.Copy.impl.Op.call @@ -252,12 +252,12 @@ fn F() -> u32 { // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.840: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.90f [concrete] +// CHECK:STDOUT: %assoc0.be4: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.e19 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.bd9: = impl_witness imports.%Copy.impl_witness_table.5ef [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %char, (%Copy.impl_witness.bd9) [concrete] -// CHECK:STDOUT: %.11f: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.cf0: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.bf3: type = fn_type_with_self_type %Copy.WithSelf.Op.type.cf0, %Copy.facet [concrete] // CHECK:STDOUT: %char.as.Copy.impl.Op.type: type = fn_type @char.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %char.as.Copy.impl.Op: %char.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %char.as.Copy.impl.Op.bound: = bound_method %int_97, %char.as.Copy.impl.Op [concrete] @@ -266,10 +266,10 @@ fn F() -> u32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//char, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.C: type = import_ref Main//char, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.d69: %I.assoc_type = import_ref Main//char, loc5_12, loaded [concrete = constants.%assoc0.840] +// CHECK:STDOUT: %Main.import_ref.903: %I.assoc_type = import_ref Main//char, loc5_12, loaded [concrete = constants.%assoc0.be4] // CHECK:STDOUT: %Main.import_ref.d0c: %char = import_ref Main//char, loc10_32, loaded [concrete = constants.%int_97] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.d0c), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.90f: %char = import_ref Main//char, loc5_12, loaded [concrete = %value] +// CHECK:STDOUT: %Main.import_ref.e19: %char = import_ref Main//char, loc5_12, loaded [concrete = %value] // CHECK:STDOUT: %value: %char = assoc_const_decl @value [concrete] {} // CHECK:STDOUT: %Core.import_ref.35d: %char.as.Copy.impl.Op.type = import_ref Core//prelude/types/char, loc{{\d+_\d+}}, loaded [concrete = constants.%char.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.5ef = impl_witness_table (%Core.import_ref.35d), @char.as.Copy.impl [concrete] @@ -283,9 +283,9 @@ fn F() -> u32 { // CHECK:STDOUT: %.loc7_13: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc7_13 [concrete = constants.%C] // CHECK:STDOUT: %.loc7_18: type = converted %.loc7_13, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.d69 [concrete = constants.%assoc0.840] +// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.903 [concrete = constants.%assoc0.be4] // CHECK:STDOUT: %impl.elem0.loc7_18.1: %char = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%int_97] -// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.11f = impl_witness_access constants.%Copy.impl_witness.bd9, element0 [concrete = constants.%char.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.bf3 = impl_witness_access constants.%Copy.impl_witness.bd9, element0 [concrete = constants.%char.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %impl.elem0.loc7_18.1, %impl.elem0.loc7_18.2 [concrete = constants.%char.as.Copy.impl.Op.bound] // CHECK:STDOUT: %char.as.Copy.impl.Op.call: init %char = call %bound_method(%impl.elem0.loc7_18.1) [concrete = constants.%int_97] // CHECK:STDOUT: return %char.as.Copy.impl.Op.call @@ -300,12 +300,12 @@ fn F() -> u32 { // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.c6f: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.8d8 [concrete] +// CHECK:STDOUT: %assoc0.a08: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.35a [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.100: = impl_witness imports.%Copy.impl_witness_table.853 [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value Core.CharLiteral, (%Copy.impl_witness.100) [concrete] -// CHECK:STDOUT: %.0d7: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.831: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.e1b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.831, %Copy.facet [concrete] // CHECK:STDOUT: %Core.CharLiteral.as.Copy.impl.Op.type: type = fn_type @Core.CharLiteral.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Core.CharLiteral.as.Copy.impl.Op: %Core.CharLiteral.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.CharLiteral.as.Copy.impl.Op.bound: = bound_method %.54f, %Core.CharLiteral.as.Copy.impl.Op [concrete] @@ -314,10 +314,10 @@ fn F() -> u32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//char_literal, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.C: type = import_ref Main//char_literal, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.6f9: %I.assoc_type = import_ref Main//char_literal, loc5_12, loaded [concrete = constants.%assoc0.c6f] +// CHECK:STDOUT: %Main.import_ref.f2f: %I.assoc_type = import_ref Main//char_literal, loc5_12, loaded [concrete = constants.%assoc0.a08] // CHECK:STDOUT: %Main.import_ref.43e: Core.CharLiteral = import_ref Main//char_literal, loc10_32, loaded [concrete = constants.%.54f] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.43e), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.8d8: Core.CharLiteral = import_ref Main//char_literal, loc5_12, loaded [concrete = %value] +// CHECK:STDOUT: %Main.import_ref.35a: Core.CharLiteral = import_ref Main//char_literal, loc5_12, loaded [concrete = %value] // CHECK:STDOUT: %value: Core.CharLiteral = assoc_const_decl @value [concrete] {} // CHECK:STDOUT: %Core.import_ref.d09: %Core.CharLiteral.as.Copy.impl.Op.type = import_ref Core//prelude/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.CharLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.853 = impl_witness_table (%Core.import_ref.d09), @Core.CharLiteral.as.Copy.impl [concrete] @@ -331,9 +331,9 @@ fn F() -> u32 { // CHECK:STDOUT: %.loc7_13: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc7_13 [concrete = constants.%C] // CHECK:STDOUT: %.loc7_18: type = converted %.loc7_13, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.6f9 [concrete = constants.%assoc0.c6f] +// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.f2f [concrete = constants.%assoc0.a08] // CHECK:STDOUT: %impl.elem0.loc7_18.1: Core.CharLiteral = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%.54f] -// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.0d7 = impl_witness_access constants.%Copy.impl_witness.100, element0 [concrete = constants.%Core.CharLiteral.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.e1b = impl_witness_access constants.%Copy.impl_witness.100, element0 [concrete = constants.%Core.CharLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %impl.elem0.loc7_18.1, %impl.elem0.loc7_18.2 [concrete = constants.%Core.CharLiteral.as.Copy.impl.Op.bound] // CHECK:STDOUT: %Core.CharLiteral.as.Copy.impl.Op.call: init Core.CharLiteral = call %bound_method(%impl.elem0.loc7_18.1) [concrete = constants.%.54f] // CHECK:STDOUT: return %Core.CharLiteral.as.Copy.impl.Op.call @@ -351,16 +351,16 @@ fn F() -> u32 { // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.f67: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.893 [concrete] +// CHECK:STDOUT: %assoc0.269: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.c0d [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.2fe: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Float.as.Copy.impl.Op.240: %Float.as.Copy.impl.Op.type.2fe = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.1e3: = impl_witness imports.%Copy.impl_witness_table.119, @Float.as.Copy.impl(%int_64) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.07e: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%int_64) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.f05: %Float.as.Copy.impl.Op.type.07e = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %f64.d77, (%Copy.impl_witness.1e3) [concrete] -// CHECK:STDOUT: %.c41: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.fb6: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.59b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.fb6, %Copy.facet [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.bound: = bound_method %float, %Float.as.Copy.impl.Op.f05 [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.specific_fn: = specific_function %Float.as.Copy.impl.Op.f05, @Float.as.Copy.impl.Op(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float, %Float.as.Copy.impl.Op.specific_fn [concrete] @@ -369,10 +369,10 @@ fn F() -> u32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//float, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.C: type = import_ref Main//float, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.e98: %I.assoc_type = import_ref Main//float, loc5_12, loaded [concrete = constants.%assoc0.f67] +// CHECK:STDOUT: %Main.import_ref.8ff: %I.assoc_type = import_ref Main//float, loc5_12, loaded [concrete = constants.%assoc0.269] // CHECK:STDOUT: %Main.import_ref.0d9: %f64.d77 = import_ref Main//float, loc10_32, loaded [concrete = constants.%float] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.0d9), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.893: %f64.d77 = import_ref Main//float, loc5_12, loaded [concrete = %value] +// CHECK:STDOUT: %Main.import_ref.c0d: %f64.d77 = import_ref Main//float, loc5_12, loaded [concrete = %value] // CHECK:STDOUT: %value: %f64.d77 = assoc_const_decl @value [concrete] {} // CHECK:STDOUT: %Core.import_ref.47c: @Float.as.Copy.impl.%Float.as.Copy.impl.Op.type (%Float.as.Copy.impl.Op.type.2fe) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Float.as.Copy.impl.%Float.as.Copy.impl.Op (constants.%Float.as.Copy.impl.Op.240)] // CHECK:STDOUT: %Copy.impl_witness_table.119 = impl_witness_table (%Core.import_ref.47c), @Float.as.Copy.impl [concrete] @@ -386,9 +386,9 @@ fn F() -> u32 { // CHECK:STDOUT: %.loc7_13: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc7_13 [concrete = constants.%C] // CHECK:STDOUT: %.loc7_18: type = converted %.loc7_13, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.e98 [concrete = constants.%assoc0.f67] +// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.8ff [concrete = constants.%assoc0.269] // CHECK:STDOUT: %impl.elem0.loc7_18.1: %f64.d77 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%float] -// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.c41 = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05] +// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.59b = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05] // CHECK:STDOUT: %bound_method.loc7_18.1: = bound_method %impl.elem0.loc7_18.1, %impl.elem0.loc7_18.2 [concrete = constants.%Float.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc7_18.2, @Float.as.Copy.impl.Op(constants.%int_64) [concrete = constants.%Float.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_18.2: = bound_method %impl.elem0.loc7_18.1, %specific_fn [concrete = constants.%bound_method] @@ -404,13 +404,13 @@ fn F() -> u32 { // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.8a0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.2e3 [concrete] +// CHECK:STDOUT: %assoc0.8b1: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.fec [concrete] // CHECK:STDOUT: %float.3fedf4.2: Core.FloatLiteral = float_literal_value 1e-1 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.ba9: = impl_witness imports.%Copy.impl_witness_table.65a [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value Core.FloatLiteral, (%Copy.impl_witness.ba9) [concrete] -// CHECK:STDOUT: %.f37: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.582: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.91c: type = fn_type_with_self_type %Copy.WithSelf.Op.type.582, %Copy.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.Copy.impl.Op.type: type = fn_type @Core.FloatLiteral.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.Copy.impl.Op: %Core.FloatLiteral.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.Copy.impl.Op.bound: = bound_method %float.3fedf4.2, %Core.FloatLiteral.as.Copy.impl.Op [concrete] @@ -419,10 +419,10 @@ fn F() -> u32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//float_literal, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.C: type = import_ref Main//float_literal, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.10a: %I.assoc_type = import_ref Main//float_literal, loc5_12, loaded [concrete = constants.%assoc0.8a0] +// CHECK:STDOUT: %Main.import_ref.c2c: %I.assoc_type = import_ref Main//float_literal, loc5_12, loaded [concrete = constants.%assoc0.8b1] // CHECK:STDOUT: %Main.import_ref.dec: Core.FloatLiteral = import_ref Main//float_literal, loc10_32, loaded [concrete = constants.%float.3fedf4.2] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.dec), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.2e3: Core.FloatLiteral = import_ref Main//float_literal, loc5_12, loaded [concrete = %value] +// CHECK:STDOUT: %Main.import_ref.fec: Core.FloatLiteral = import_ref Main//float_literal, loc5_12, loaded [concrete = %value] // CHECK:STDOUT: %value: Core.FloatLiteral = assoc_const_decl @value [concrete] {} // CHECK:STDOUT: %Core.import_ref.3f0: %Core.FloatLiteral.as.Copy.impl.Op.type = import_ref Core//prelude/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.FloatLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.65a = impl_witness_table (%Core.import_ref.3f0), @Core.FloatLiteral.as.Copy.impl [concrete] @@ -436,9 +436,9 @@ fn F() -> u32 { // CHECK:STDOUT: %.loc7_13: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc7_13 [concrete = constants.%C] // CHECK:STDOUT: %.loc7_18: type = converted %.loc7_13, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.10a [concrete = constants.%assoc0.8a0] +// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.c2c [concrete = constants.%assoc0.8b1] // CHECK:STDOUT: %impl.elem0.loc7_18.1: Core.FloatLiteral = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%float.3fedf4.2] -// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.f37 = impl_witness_access constants.%Copy.impl_witness.ba9, element0 [concrete = constants.%Core.FloatLiteral.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.91c = impl_witness_access constants.%Copy.impl_witness.ba9, element0 [concrete = constants.%Core.FloatLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %impl.elem0.loc7_18.1, %impl.elem0.loc7_18.2 [concrete = constants.%Core.FloatLiteral.as.Copy.impl.Op.bound] // CHECK:STDOUT: %Core.FloatLiteral.as.Copy.impl.Op.call: init Core.FloatLiteral = call %bound_method(%impl.elem0.loc7_18.1) [concrete = constants.%float.3fedf4.2] // CHECK:STDOUT: return %Core.FloatLiteral.as.Copy.impl.Op.call @@ -456,16 +456,16 @@ fn F() -> u32 { // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.2ce: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.e84 [concrete] +// CHECK:STDOUT: %assoc0.5be: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.0bd [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_8, %Int.as.Copy.impl.Op.664 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_8, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -474,10 +474,10 @@ fn F() -> u32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//int, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.C: type = import_ref Main//int, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.76f: %I.assoc_type = import_ref Main//int, loc5_12, loaded [concrete = constants.%assoc0.2ce] +// CHECK:STDOUT: %Main.import_ref.cd5: %I.assoc_type = import_ref Main//int, loc5_12, loaded [concrete = constants.%assoc0.5be] // CHECK:STDOUT: %Main.import_ref.330: %i32 = import_ref Main//int, loc10_30, loaded [concrete = constants.%int_8] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.330), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.e84: %i32 = import_ref Main//int, loc5_12, loaded [concrete = %value] +// CHECK:STDOUT: %Main.import_ref.0bd: %i32 = import_ref Main//int, loc5_12, loaded [concrete = %value] // CHECK:STDOUT: %value: %i32 = assoc_const_decl @value [concrete] {} // CHECK:STDOUT: %Core.import_ref.18d: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.824) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.9b9)] // CHECK:STDOUT: %Copy.impl_witness_table.e76 = impl_witness_table (%Core.import_ref.18d), @Int.as.Copy.impl [concrete] @@ -491,9 +491,9 @@ fn F() -> u32 { // CHECK:STDOUT: %.loc7_13: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc7_13 [concrete = constants.%C] // CHECK:STDOUT: %.loc7_18: type = converted %.loc7_13, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.76f [concrete = constants.%assoc0.2ce] +// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.cd5 [concrete = constants.%assoc0.5be] // CHECK:STDOUT: %impl.elem0.loc7_18.1: %i32 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%int_8] -// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc7_18.1: = bound_method %impl.elem0.loc7_18.1, %impl.elem0.loc7_18.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc7_18.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_18.2: = bound_method %impl.elem0.loc7_18.1, %specific_fn [concrete = constants.%bound_method] @@ -510,12 +510,12 @@ fn F() -> u32 { // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.415: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.334 [concrete] +// CHECK:STDOUT: %assoc0.cc9: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.78b [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.98e: = impl_witness imports.%Copy.impl_witness_table.d8f [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value Core.IntLiteral, (%Copy.impl_witness.98e) [concrete] -// CHECK:STDOUT: %.6b5: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.42e: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.5e6: type = fn_type_with_self_type %Copy.WithSelf.Op.type.42e, %Copy.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.type: type = fn_type @Core.IntLiteral.as.Copy.impl.Op [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op: %Core.IntLiteral.as.Copy.impl.Op.type = struct_value () [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.bound: = bound_method %int_7, %Core.IntLiteral.as.Copy.impl.Op [concrete] @@ -524,10 +524,10 @@ fn F() -> u32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//int_literal, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.C: type = import_ref Main//int_literal, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.398: %I.assoc_type = import_ref Main//int_literal, loc5_12, loaded [concrete = constants.%assoc0.415] +// CHECK:STDOUT: %Main.import_ref.8e2: %I.assoc_type = import_ref Main//int_literal, loc5_12, loaded [concrete = constants.%assoc0.cc9] // CHECK:STDOUT: %Main.import_ref.bc3: Core.IntLiteral = import_ref Main//int_literal, loc10_30, loaded [concrete = constants.%int_7] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.bc3), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.334: Core.IntLiteral = import_ref Main//int_literal, loc5_12, loaded [concrete = %value] +// CHECK:STDOUT: %Main.import_ref.78b: Core.IntLiteral = import_ref Main//int_literal, loc5_12, loaded [concrete = %value] // CHECK:STDOUT: %value: Core.IntLiteral = assoc_const_decl @value [concrete] {} // CHECK:STDOUT: %Core.import_ref.66a: %Core.IntLiteral.as.Copy.impl.Op.type = import_ref Core//prelude/copy, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %Copy.impl_witness_table.d8f = impl_witness_table (%Core.import_ref.66a), @Core.IntLiteral.as.Copy.impl [concrete] @@ -541,9 +541,9 @@ fn F() -> u32 { // CHECK:STDOUT: %.loc7_13: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc7_13 [concrete = constants.%C] // CHECK:STDOUT: %.loc7_18: type = converted %.loc7_13, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.398 [concrete = constants.%assoc0.415] +// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.8e2 [concrete = constants.%assoc0.cc9] // CHECK:STDOUT: %impl.elem0.loc7_18.1: Core.IntLiteral = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%int_7] -// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.6b5 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.5e6 = impl_witness_access constants.%Copy.impl_witness.98e, element0 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %impl.elem0.loc7_18.1, %impl.elem0.loc7_18.2 [concrete = constants.%Core.IntLiteral.as.Copy.impl.Op.bound] // CHECK:STDOUT: %Core.IntLiteral.as.Copy.impl.Op.call: init Core.IntLiteral = call %bound_method(%impl.elem0.loc7_18.1) [concrete = constants.%int_7] // CHECK:STDOUT: return %Core.IntLiteral.as.Copy.impl.Op.call @@ -561,16 +561,16 @@ fn F() -> u32 { // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.aa0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.ee9 [concrete] +// CHECK:STDOUT: %assoc0.845: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.c06 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.type.68f: type = fn_type @UInt.as.Copy.impl.Op, @UInt.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.576: %UInt.as.Copy.impl.Op.type.68f = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.514: = impl_witness imports.%Copy.impl_witness_table.bd0, @UInt.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.type.2fc: type = fn_type @UInt.as.Copy.impl.Op, @UInt.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.c10: %UInt.as.Copy.impl.Op.type.2fc = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %u32, (%Copy.impl_witness.514) [concrete] -// CHECK:STDOUT: %.fcc: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.ad7: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.38c: type = fn_type_with_self_type %Copy.WithSelf.Op.type.ad7, %Copy.facet [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.bound: = bound_method %int_8, %UInt.as.Copy.impl.Op.c10 [concrete] // CHECK:STDOUT: %UInt.as.Copy.impl.Op.specific_fn: = specific_function %UInt.as.Copy.impl.Op.c10, @UInt.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_8, %UInt.as.Copy.impl.Op.specific_fn [concrete] @@ -579,10 +579,10 @@ fn F() -> u32 { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//uint, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.C: type = import_ref Main//uint, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.4d2: %I.assoc_type = import_ref Main//uint, loc5_12, loaded [concrete = constants.%assoc0.aa0] +// CHECK:STDOUT: %Main.import_ref.3fa: %I.assoc_type = import_ref Main//uint, loc5_12, loaded [concrete = constants.%assoc0.845] // CHECK:STDOUT: %Main.import_ref.647: %u32 = import_ref Main//uint, loc10_30, loaded [concrete = constants.%int_8] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.647), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.ee9: %u32 = import_ref Main//uint, loc5_12, loaded [concrete = %value] +// CHECK:STDOUT: %Main.import_ref.c06: %u32 = import_ref Main//uint, loc5_12, loaded [concrete = %value] // CHECK:STDOUT: %value: %u32 = assoc_const_decl @value [concrete] {} // CHECK:STDOUT: %Core.import_ref.c3c: @UInt.as.Copy.impl.%UInt.as.Copy.impl.Op.type (%UInt.as.Copy.impl.Op.type.68f) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @UInt.as.Copy.impl.%UInt.as.Copy.impl.Op (constants.%UInt.as.Copy.impl.Op.576)] // CHECK:STDOUT: %Copy.impl_witness_table.bd0 = impl_witness_table (%Core.import_ref.c3c), @UInt.as.Copy.impl [concrete] @@ -596,9 +596,9 @@ fn F() -> u32 { // CHECK:STDOUT: %.loc7_13: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc7_13 [concrete = constants.%C] // CHECK:STDOUT: %.loc7_18: type = converted %.loc7_13, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.4d2 [concrete = constants.%assoc0.aa0] +// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.3fa [concrete = constants.%assoc0.845] // CHECK:STDOUT: %impl.elem0.loc7_18.1: %u32 = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%int_8] -// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.fcc = impl_witness_access constants.%Copy.impl_witness.514, element0 [concrete = constants.%UInt.as.Copy.impl.Op.c10] +// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.38c = impl_witness_access constants.%Copy.impl_witness.514, element0 [concrete = constants.%UInt.as.Copy.impl.Op.c10] // CHECK:STDOUT: %bound_method.loc7_18.1: = bound_method %impl.elem0.loc7_18.1, %impl.elem0.loc7_18.2 [concrete = constants.%UInt.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc7_18.2, @UInt.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%UInt.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_18.2: = bound_method %impl.elem0.loc7_18.1, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/primitives/type_literals.carbon b/toolchain/check/testdata/primitives/type_literals.carbon index 2a2e629a85b8..daf63ee93685 100644 --- a/toolchain/check/testdata/primitives/type_literals.carbon +++ b/toolchain/check/testdata/primitives/type_literals.carbon @@ -465,10 +465,10 @@ var test_str: str = (); // CHECK:STDOUT: %pattern_type.b09: type = pattern_type %char [concrete] // CHECK:STDOUT: %.b9b: Core.CharLiteral = char_value U+0063 [concrete] // CHECK:STDOUT: %ImplicitAs.type.d99: type = facet_type <@ImplicitAs, @ImplicitAs(%char)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.f57: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%char) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness: = impl_witness imports.%ImplicitAs.impl_witness_table [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d99 = facet_value Core.CharLiteral, (%ImplicitAs.impl_witness) [concrete] -// CHECK:STDOUT: %.93b: type = fn_type_with_self_type %ImplicitAs.Convert.type.f57, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.95b: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%char, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.734: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.95b, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.CharLiteral.as.ImplicitAs.impl.Convert [concrete] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert: %Core.CharLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %.b9b, %Core.CharLiteral.as.ImplicitAs.impl.Convert [concrete] @@ -484,7 +484,7 @@ var test_str: str = (); // CHECK:STDOUT: name_binding_decl { // CHECK:STDOUT: %test_char.patt: %pattern_type.b09 = value_binding_pattern test_char [concrete] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0: %.93b = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert] +// CHECK:STDOUT: %impl.elem0: %.734 = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert] // CHECK:STDOUT: %bound_method: = bound_method @__global_init.%.loc5, %impl.elem0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.call: init %char = call %bound_method(@__global_init.%.loc5) [concrete = constants.%int_99] // CHECK:STDOUT: %.loc5_23.1: %char = value_of_initializer %Core.CharLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_99] @@ -538,10 +538,10 @@ var test_str: str = (); // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.b47: = impl_witness imports.%Copy.impl_witness_table.b1c [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value type, (%Copy.impl_witness.b47) [concrete] -// CHECK:STDOUT: %.436: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.a4f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.070: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a4f, %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: = bound_method %i32, %type.as.Copy.impl.Op [concrete] @@ -565,7 +565,7 @@ var test_str: str = (); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.436 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.070 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %i32, %impl.elem0 [concrete = constants.%type.as.Copy.impl.Op.bound] // CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method(%i32) [concrete = constants.%i32] // CHECK:STDOUT: assign file.%test_type.var, %type.as.Copy.impl.Op.call diff --git a/toolchain/check/testdata/return/code_after_return_value.carbon b/toolchain/check/testdata/return/code_after_return_value.carbon index 941b93a79280..b3daee4dc8a9 100644 --- a/toolchain/check/testdata/return/code_after_return_value.carbon +++ b/toolchain/check/testdata/return/code_after_return_value.carbon @@ -42,7 +42,6 @@ fn F(b: bool) -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -50,7 +49,8 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -105,7 +105,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @F(%b.param: bool) -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_11.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // 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.loc16_11.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.d2e] diff --git a/toolchain/check/testdata/return/fail_call_in_type.carbon b/toolchain/check/testdata/return/fail_call_in_type.carbon index 0f9f99632f45..20b0665516d6 100644 --- a/toolchain/check/testdata/return/fail_call_in_type.carbon +++ b/toolchain/check/testdata/return/fail_call_in_type.carbon @@ -33,10 +33,10 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.b47: = impl_witness imports.%Copy.impl_witness_table.b1c [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value type, (%Copy.impl_witness.b47) [concrete] -// CHECK:STDOUT: %.436: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.a4f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.070: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a4f, %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: = bound_method %i32, %type.as.Copy.impl.Op [concrete] @@ -85,7 +85,7 @@ fn Six() -> ReturnType() { return 6; } // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.436 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.070 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %i32, %impl.elem0 [concrete = constants.%type.as.Copy.impl.Op.bound] // CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method(%i32) [concrete = constants.%i32] // CHECK:STDOUT: return %type.as.Copy.impl.Op.call diff --git a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon index b38bd309db2e..964d80671378 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -53,7 +53,6 @@ fn G() -> C { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -61,7 +60,8 @@ fn G() -> C { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -159,7 +159,7 @@ fn G() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_12.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // 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.loc16_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.d2e] @@ -188,7 +188,7 @@ fn G() -> C { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc29_38.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0.loc29_38.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc29_38.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc29_38.1: = bound_method %int_1, %impl.elem0.loc29_38.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc29_38.1: = specific_function %impl.elem0.loc29_38.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_38.2: = bound_method %int_1, %specific_fn.loc29_38.1 [concrete = constants.%bound_method.38b] @@ -196,7 +196,7 @@ fn G() -> C { // CHECK:STDOUT: %.loc29_38.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc29_38.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc29_38.3: ref %i32 = class_element_access %return.param, element0 // CHECK:STDOUT: %.loc29_38.4: init %i32 to %.loc29_38.3 = in_place_init %.loc29_38.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc29_38.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc29_38.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc29_38.3: = bound_method %int_2, %impl.elem0.loc29_38.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc29_38.2: = specific_function %impl.elem0.loc29_38.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc29_38.4: = bound_method %int_2, %specific_fn.loc29_38.2 [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index c9b2bcd725ea..3c2e09ae5399 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -61,7 +61,6 @@ fn DifferentScopes() -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -69,7 +68,8 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -141,7 +141,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_0.loc17: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc17: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc17: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc17_14.1: = bound_method %int_0.loc17, %impl.elem0.loc17 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_14.2: = bound_method %int_0.loc17, %specific_fn.loc17 [concrete = constants.%bound_method.d2e] @@ -159,7 +159,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var %w.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc25: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc25: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc25_14.1: = bound_method %int_1, %impl.elem0.loc25 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // 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_14.2: = bound_method %int_1, %specific_fn.loc25 [concrete = constants.%bound_method.38b] @@ -175,7 +175,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_0.loc27: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc27: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc27: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc27_11.1: = bound_method %int_0.loc27, %impl.elem0.loc27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_11.2: = bound_method %int_0.loc27, %specific_fn.loc27 [concrete = constants.%bound_method.d2e] @@ -202,7 +202,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_0.loc32: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc32: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc32: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc32_14.1: = bound_method %int_0.loc32, %impl.elem0.loc32 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc32: = specific_function %impl.elem0.loc32, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc32_14.2: = bound_method %int_0.loc32, %specific_fn.loc32 [concrete = constants.%bound_method.d2e] @@ -224,7 +224,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var %w.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc41: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc41: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc41_16.1: = bound_method %int_1, %impl.elem0.loc41 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc41: = specific_function %impl.elem0.loc41, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc41_16.2: = bound_method %int_1, %specific_fn.loc41 [concrete = constants.%bound_method.38b] @@ -243,7 +243,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc31: // CHECK:STDOUT: %int_0.loc44: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc44: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc44: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc44_11.1: = bound_method %int_0.loc44, %impl.elem0.loc44 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc44: = specific_function %impl.elem0.loc44, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc44_11.2: = bound_method %int_0.loc44, %specific_fn.loc44 [concrete = constants.%bound_method.d2e] diff --git a/toolchain/check/testdata/return/fail_returned_var_type.carbon b/toolchain/check/testdata/return/fail_returned_var_type.carbon index 01794e7eff1d..ccaddaa29f34 100644 --- a/toolchain/check/testdata/return/fail_returned_var_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_type.carbon @@ -45,7 +45,6 @@ fn Mismatch() -> i32 { // 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.4a8: type = facet_type <@ImplicitAs, @ImplicitAs(%f64.d77)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.726: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f64.d77) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] @@ -53,7 +52,8 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.4a8 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.cb2) [concrete] -// CHECK:STDOUT: %.b13: type = fn_type_with_self_type %ImplicitAs.Convert.type.726, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a33: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f64.d77, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.6c5: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a33, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.1f7, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.1f7, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -106,7 +106,7 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %f64.d77 = var %v.var_patt // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 0e-1 [concrete = constants.%float.1f7] -// CHECK:STDOUT: %impl.elem0: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] +// CHECK:STDOUT: %impl.elem0: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] // CHECK:STDOUT: %bound_method.loc23_12.1: = bound_method %float, %impl.elem0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc23_12.2: = bound_method %float, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/return/fail_var_in_type.carbon b/toolchain/check/testdata/return/fail_var_in_type.carbon index e2edb2fcf800..5d26e60efcd9 100644 --- a/toolchain/check/testdata/return/fail_var_in_type.carbon +++ b/toolchain/check/testdata/return/fail_var_in_type.carbon @@ -28,10 +28,10 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Copy.impl_witness.b47: = impl_witness imports.%Copy.impl_witness_table.b1c [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value type, (%Copy.impl_witness.b47) [concrete] -// CHECK:STDOUT: %.436: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.a4f: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.070: type = fn_type_with_self_type %Copy.WithSelf.Op.type.a4f, %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: = bound_method %i32, %type.as.Copy.impl.Op [concrete] @@ -82,7 +82,7 @@ fn Six() -> x { return 6; } // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %.436 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] +// CHECK:STDOUT: %impl.elem0: %.070 = impl_witness_access constants.%Copy.impl_witness.b47, element0 [concrete = constants.%type.as.Copy.impl.Op] // CHECK:STDOUT: %bound_method: = bound_method %i32, %impl.elem0 [concrete = constants.%type.as.Copy.impl.Op.bound] // CHECK:STDOUT: %type.as.Copy.impl.Op.call: init type = call %bound_method(%i32) [concrete = constants.%i32] // CHECK:STDOUT: assign file.%x.var, %type.as.Copy.impl.Op.call diff --git a/toolchain/check/testdata/return/import_convert_function.carbon b/toolchain/check/testdata/return/import_convert_function.carbon index 216d72f2975f..d06fcbffa0a7 100644 --- a/toolchain/check/testdata/return/import_convert_function.carbon +++ b/toolchain/check/testdata/return/import_convert_function.carbon @@ -77,7 +77,6 @@ fn F0(n: i32) -> P.D { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -85,7 +84,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -207,7 +207,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @C.as.ImplicitAs.impl.c43 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_9.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // 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.loc8_9.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.d2e] @@ -223,7 +223,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @C.as.ImplicitAs.impl.7c3 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_9.1: = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // 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.loc9_9.2: = bound_method %int_1, %specific_fn [concrete = constants.%bound_method.38b] @@ -239,7 +239,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @C.as.ImplicitAs.impl.fa3 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_9.1: = bound_method %int_2, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // 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.loc10_9.2: = bound_method %int_2, %specific_fn [concrete = constants.%bound_method.646] @@ -255,7 +255,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @C.as.ImplicitAs.impl.158 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc11_9.1: = bound_method %int_3, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // 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.loc11_9.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method.fa7] @@ -271,7 +271,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @C.as.ImplicitAs.impl.f64 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_9.1: = bound_method %int_4, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // 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.loc12_9.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method.6d7] @@ -287,7 +287,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @C.as.ImplicitAs.impl.d86 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_9.1: = bound_method %int_5, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005] // 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_9.2: = bound_method %int_5, %specific_fn [concrete = constants.%bound_method.e9d] @@ -303,7 +303,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @C.as.ImplicitAs.impl.f13 [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc14_9.1: = bound_method %int_6, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.502] // 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.loc14_9.2: = bound_method %int_6, %specific_fn [concrete = constants.%bound_method.bc2] @@ -319,7 +319,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @C.as.ImplicitAs.impl.83b [concrete] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic] // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7.29f] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_9.1: = bound_method %int_7, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.1e0] // 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_9.2: = bound_method %int_7, %specific_fn [concrete = constants.%bound_method.bf2] @@ -569,7 +569,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %int_0.loc6_31: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_0.loc6_39: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc6_40.1: %struct_type.n.m.819 = struct_literal (%int_0.loc6_31, %int_0.loc6_39) [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0.loc6_40.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6_40.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_40.1: = bound_method %int_0.loc6_31, %impl.elem0.loc6_40.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc6_40.1: = specific_function %impl.elem0.loc6_40.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_40.2: = bound_method %int_0.loc6_31, %specific_fn.loc6_40.1 [concrete = constants.%bound_method.d2e] @@ -577,7 +577,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc6_40.2: init %i32 = converted %int_0.loc6_31, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_40.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_40.3: ref %i32 = class_element_access %return.param, element0 // CHECK:STDOUT: %.loc6_40.4: init %i32 to %.loc6_40.3 = in_place_init %.loc6_40.2 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %impl.elem0.loc6_40.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc6_40.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc6_40.3: = bound_method %int_0.loc6_39, %impl.elem0.loc6_40.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc6_40.2: = specific_function %impl.elem0.loc6_40.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_40.4: = bound_method %int_0.loc6_39, %specific_fn.loc6_40.2 [concrete = constants.%bound_method.d2e] @@ -733,7 +733,6 @@ fn F0(n: i32) -> P.D { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -741,7 +740,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.d2e: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -749,7 +749,6 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %C.b00: type = class_type @C, @C(%int_0.6a9) [concrete] // CHECK:STDOUT: %C.val.452: %C.b00 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.type.899: type = facet_type <@ImplicitAs, @ImplicitAs(%D)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.334: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%D) [concrete] // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %C.674: type = class_type @C, @C(%int_1.5d2) [concrete] // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete] @@ -766,7 +765,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %C.304: type = class_type @C, @C(%int_7.0b1) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.01b: = impl_witness imports.%ImplicitAs.impl_witness_table.1e8 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.774: %ImplicitAs.type.899 = facet_value %C.b00, (%ImplicitAs.impl_witness.01b) [concrete] -// CHECK:STDOUT: %.094: type = fn_type_with_self_type %ImplicitAs.Convert.type.334, %ImplicitAs.facet.774 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a31: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%D, %ImplicitAs.facet.774) [concrete] +// CHECK:STDOUT: %.866: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a31, %ImplicitAs.facet.774 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.994: type = fn_type @C.as.ImplicitAs.impl.Convert.1 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.78d: %C.as.ImplicitAs.impl.Convert.type.994 = struct_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] @@ -778,7 +778,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %C.val.678: %C.674 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.638: = impl_witness imports.%ImplicitAs.impl_witness_table.c5c [concrete] // CHECK:STDOUT: %ImplicitAs.facet.0f6: %ImplicitAs.type.899 = facet_value %C.674, (%ImplicitAs.impl_witness.638) [concrete] -// CHECK:STDOUT: %.deb: type = fn_type_with_self_type %ImplicitAs.Convert.type.334, %ImplicitAs.facet.0f6 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.cbc: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%D, %ImplicitAs.facet.0f6) [concrete] +// CHECK:STDOUT: %.86b: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.cbc, %ImplicitAs.facet.0f6 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.900: type = fn_type @C.as.ImplicitAs.impl.Convert.2 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.b44: %C.as.ImplicitAs.impl.Convert.type.900 = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.2: type = fn_type @DestroyOp.loc8 [concrete] @@ -789,7 +790,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %C.val.fb5: %C.681 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.a8d: = impl_witness imports.%ImplicitAs.impl_witness_table.5db [concrete] // CHECK:STDOUT: %ImplicitAs.facet.53b: %ImplicitAs.type.899 = facet_value %C.681, (%ImplicitAs.impl_witness.a8d) [concrete] -// CHECK:STDOUT: %.8f9: type = fn_type_with_self_type %ImplicitAs.Convert.type.334, %ImplicitAs.facet.53b [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.308: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%D, %ImplicitAs.facet.53b) [concrete] +// CHECK:STDOUT: %.bfa: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.308, %ImplicitAs.facet.53b [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.ae1: type = fn_type @C.as.ImplicitAs.impl.Convert.3 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.dd6: %C.as.ImplicitAs.impl.Convert.type.ae1 = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.3: type = fn_type @DestroyOp.loc9 [concrete] @@ -800,7 +802,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %C.val.fe7: %C.7ac = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.56b: = impl_witness imports.%ImplicitAs.impl_witness_table.126 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.fe0: %ImplicitAs.type.899 = facet_value %C.7ac, (%ImplicitAs.impl_witness.56b) [concrete] -// CHECK:STDOUT: %.286: type = fn_type_with_self_type %ImplicitAs.Convert.type.334, %ImplicitAs.facet.fe0 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.4d0: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%D, %ImplicitAs.facet.fe0) [concrete] +// CHECK:STDOUT: %.a2c: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.4d0, %ImplicitAs.facet.fe0 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.cbe: type = fn_type @C.as.ImplicitAs.impl.Convert.4 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.d1c: %C.as.ImplicitAs.impl.Convert.type.cbe = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.4: type = fn_type @DestroyOp.loc10 [concrete] @@ -811,7 +814,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %C.val.1dd: %C.89d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.e05: = impl_witness imports.%ImplicitAs.impl_witness_table.92c [concrete] // CHECK:STDOUT: %ImplicitAs.facet.fd8: %ImplicitAs.type.899 = facet_value %C.89d, (%ImplicitAs.impl_witness.e05) [concrete] -// CHECK:STDOUT: %.3c4: type = fn_type_with_self_type %ImplicitAs.Convert.type.334, %ImplicitAs.facet.fd8 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.46a: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%D, %ImplicitAs.facet.fd8) [concrete] +// CHECK:STDOUT: %.c32: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.46a, %ImplicitAs.facet.fd8 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.876: type = fn_type @C.as.ImplicitAs.impl.Convert.5 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.db5: %C.as.ImplicitAs.impl.Convert.type.876 = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.5: type = fn_type @DestroyOp.loc11 [concrete] @@ -822,7 +826,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %C.val.a4a: %C.f0a = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.262: = impl_witness imports.%ImplicitAs.impl_witness_table.d8f [concrete] // CHECK:STDOUT: %ImplicitAs.facet.357: %ImplicitAs.type.899 = facet_value %C.f0a, (%ImplicitAs.impl_witness.262) [concrete] -// CHECK:STDOUT: %.4d7: type = fn_type_with_self_type %ImplicitAs.Convert.type.334, %ImplicitAs.facet.357 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.3d2: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%D, %ImplicitAs.facet.357) [concrete] +// CHECK:STDOUT: %.df3: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.3d2, %ImplicitAs.facet.357 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.043: type = fn_type @C.as.ImplicitAs.impl.Convert.6 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.a63: %C.as.ImplicitAs.impl.Convert.type.043 = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.6: type = fn_type @DestroyOp.loc12 [concrete] @@ -833,7 +838,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %C.val.a4b: %C.c60 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.7d1: = impl_witness imports.%ImplicitAs.impl_witness_table.70a [concrete] // CHECK:STDOUT: %ImplicitAs.facet.510: %ImplicitAs.type.899 = facet_value %C.c60, (%ImplicitAs.impl_witness.7d1) [concrete] -// CHECK:STDOUT: %.3aa: type = fn_type_with_self_type %ImplicitAs.Convert.type.334, %ImplicitAs.facet.510 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a01: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%D, %ImplicitAs.facet.510) [concrete] +// CHECK:STDOUT: %.4a2: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a01, %ImplicitAs.facet.510 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.7be: type = fn_type @C.as.ImplicitAs.impl.Convert.7 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.e2f: %C.as.ImplicitAs.impl.Convert.type.7be = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.7: type = fn_type @DestroyOp.loc13 [concrete] @@ -844,7 +850,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %C.val.f9f: %C.304 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.356: = impl_witness imports.%ImplicitAs.impl_witness_table.575 [concrete] // CHECK:STDOUT: %ImplicitAs.facet.965: %ImplicitAs.type.899 = facet_value %C.304, (%ImplicitAs.impl_witness.356) [concrete] -// CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.334, %ImplicitAs.facet.965 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.063: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%D, %ImplicitAs.facet.965) [concrete] +// CHECK:STDOUT: %.ad8: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.063, %ImplicitAs.facet.965 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.type.c30: type = fn_type @C.as.ImplicitAs.impl.Convert.8 [concrete] // CHECK:STDOUT: %C.as.ImplicitAs.impl.Convert.5ea: %C.as.ImplicitAs.impl.Convert.type.c30 = struct_value () [concrete] // CHECK:STDOUT: %DestroyOp.type.3e79c2.8: type = fn_type @DestroyOp.loc14 [concrete] @@ -1024,7 +1031,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc7: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc7: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc7_34: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc7_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc7_34.1: = bound_method %int_0, %impl.elem0.loc7_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc7: = specific_function %impl.elem0.loc7_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_34.2: = bound_method %int_0, %specific_fn.loc7 [concrete = constants.%bound_method.d2e] @@ -1036,7 +1043,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc7_24.3: init %C.b00 to %.loc7_24.2 = class_init () [concrete = constants.%C.val.452] // CHECK:STDOUT: %.loc7_24.4: ref %C.b00 = temporary %.loc7_24.2, %.loc7_24.3 // CHECK:STDOUT: %.loc7_26.1: ref %C.b00 = converted %.loc7_24.1, %.loc7_24.4 -// CHECK:STDOUT: %impl.elem0.loc7_35: %.094 = impl_witness_access constants.%ImplicitAs.impl_witness.01b, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.78d] +// CHECK:STDOUT: %impl.elem0.loc7_35: %.866 = impl_witness_access constants.%ImplicitAs.impl_witness.01b, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.78d] // CHECK:STDOUT: %bound_method.loc7_35: = bound_method %.loc7_26.1, %impl.elem0.loc7_35 // CHECK:STDOUT: %.loc6_19.1: ref %D = splice_block %return.param {} // CHECK:STDOUT: %.loc7_26.2: %C.b00 = acquire_value %.loc7_26.1 @@ -1055,7 +1062,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc8: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc8: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc8_34: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc8_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc8_34.1: = bound_method %int_1, %impl.elem0.loc8_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc8: = specific_function %impl.elem0.loc8_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc8_34.2: = bound_method %int_1, %specific_fn.loc8 [concrete = constants.%bound_method.38b] @@ -1067,7 +1074,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc8_24.3: init %C.674 to %.loc8_24.2 = class_init () [concrete = constants.%C.val.678] // CHECK:STDOUT: %.loc8_24.4: ref %C.674 = temporary %.loc8_24.2, %.loc8_24.3 // CHECK:STDOUT: %.loc8_26.1: ref %C.674 = converted %.loc8_24.1, %.loc8_24.4 -// CHECK:STDOUT: %impl.elem0.loc8_35: %.deb = impl_witness_access constants.%ImplicitAs.impl_witness.638, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.b44] +// CHECK:STDOUT: %impl.elem0.loc8_35: %.86b = impl_witness_access constants.%ImplicitAs.impl_witness.638, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.b44] // CHECK:STDOUT: %bound_method.loc8_35: = bound_method %.loc8_26.1, %impl.elem0.loc8_35 // CHECK:STDOUT: %.loc6_19.2: ref %D = splice_block %return.param {} // CHECK:STDOUT: %.loc8_26.2: %C.674 = acquire_value %.loc8_26.1 @@ -1088,7 +1095,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc9: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc9: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] -// CHECK:STDOUT: %impl.elem0.loc9_34: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc9_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc9_34.1: = bound_method %int_2, %impl.elem0.loc9_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc9: = specific_function %impl.elem0.loc9_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc9_34.2: = bound_method %int_2, %specific_fn.loc9 [concrete = constants.%bound_method.646] @@ -1100,7 +1107,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc9_24.3: init %C.681 to %.loc9_24.2 = class_init () [concrete = constants.%C.val.fb5] // CHECK:STDOUT: %.loc9_24.4: ref %C.681 = temporary %.loc9_24.2, %.loc9_24.3 // CHECK:STDOUT: %.loc9_26.1: ref %C.681 = converted %.loc9_24.1, %.loc9_24.4 -// CHECK:STDOUT: %impl.elem0.loc9_35: %.8f9 = impl_witness_access constants.%ImplicitAs.impl_witness.a8d, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.dd6] +// CHECK:STDOUT: %impl.elem0.loc9_35: %.bfa = impl_witness_access constants.%ImplicitAs.impl_witness.a8d, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.dd6] // CHECK:STDOUT: %bound_method.loc9_35: = bound_method %.loc9_26.1, %impl.elem0.loc9_35 // CHECK:STDOUT: %.loc6_19.3: ref %D = splice_block %return.param {} // CHECK:STDOUT: %.loc9_26.2: %C.681 = acquire_value %.loc9_26.1 @@ -1123,7 +1130,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc10: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] -// CHECK:STDOUT: %impl.elem0.loc10_34: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc10_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc10_34.1: = bound_method %int_3, %impl.elem0.loc10_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061] // CHECK:STDOUT: %specific_fn.loc10: = specific_function %impl.elem0.loc10_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc10_34.2: = bound_method %int_3, %specific_fn.loc10 [concrete = constants.%bound_method.fa7] @@ -1135,7 +1142,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc10_24.3: init %C.7ac to %.loc10_24.2 = class_init () [concrete = constants.%C.val.fe7] // CHECK:STDOUT: %.loc10_24.4: ref %C.7ac = temporary %.loc10_24.2, %.loc10_24.3 // CHECK:STDOUT: %.loc10_26.1: ref %C.7ac = converted %.loc10_24.1, %.loc10_24.4 -// CHECK:STDOUT: %impl.elem0.loc10_35: %.286 = impl_witness_access constants.%ImplicitAs.impl_witness.56b, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.d1c] +// CHECK:STDOUT: %impl.elem0.loc10_35: %.a2c = impl_witness_access constants.%ImplicitAs.impl_witness.56b, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.d1c] // CHECK:STDOUT: %bound_method.loc10_35: = bound_method %.loc10_26.1, %impl.elem0.loc10_35 // CHECK:STDOUT: %.loc6_19.4: ref %D = splice_block %return.param {} // CHECK:STDOUT: %.loc10_26.2: %C.7ac = acquire_value %.loc10_26.1 @@ -1160,7 +1167,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc11: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] -// CHECK:STDOUT: %impl.elem0.loc11_34: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc11_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc11_34.1: = bound_method %int_4, %impl.elem0.loc11_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c] // CHECK:STDOUT: %specific_fn.loc11: = specific_function %impl.elem0.loc11_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc11_34.2: = bound_method %int_4, %specific_fn.loc11 [concrete = constants.%bound_method.6d7] @@ -1172,7 +1179,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc11_24.3: init %C.89d to %.loc11_24.2 = class_init () [concrete = constants.%C.val.1dd] // CHECK:STDOUT: %.loc11_24.4: ref %C.89d = temporary %.loc11_24.2, %.loc11_24.3 // CHECK:STDOUT: %.loc11_26.1: ref %C.89d = converted %.loc11_24.1, %.loc11_24.4 -// CHECK:STDOUT: %impl.elem0.loc11_35: %.3c4 = impl_witness_access constants.%ImplicitAs.impl_witness.e05, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.db5] +// CHECK:STDOUT: %impl.elem0.loc11_35: %.c32 = impl_witness_access constants.%ImplicitAs.impl_witness.e05, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.db5] // CHECK:STDOUT: %bound_method.loc11_35: = bound_method %.loc11_26.1, %impl.elem0.loc11_35 // CHECK:STDOUT: %.loc6_19.5: ref %D = splice_block %return.param {} // CHECK:STDOUT: %.loc11_26.2: %C.89d = acquire_value %.loc11_26.1 @@ -1199,7 +1206,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc12: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b] -// CHECK:STDOUT: %impl.elem0.loc12_34: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc12_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc12_34.1: = bound_method %int_5, %impl.elem0.loc12_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.005] // CHECK:STDOUT: %specific_fn.loc12: = specific_function %impl.elem0.loc12_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc12_34.2: = bound_method %int_5, %specific_fn.loc12 [concrete = constants.%bound_method.e9d] @@ -1211,7 +1218,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc12_24.3: init %C.f0a to %.loc12_24.2 = class_init () [concrete = constants.%C.val.a4a] // CHECK:STDOUT: %.loc12_24.4: ref %C.f0a = temporary %.loc12_24.2, %.loc12_24.3 // CHECK:STDOUT: %.loc12_26.1: ref %C.f0a = converted %.loc12_24.1, %.loc12_24.4 -// CHECK:STDOUT: %impl.elem0.loc12_35: %.4d7 = impl_witness_access constants.%ImplicitAs.impl_witness.262, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.a63] +// CHECK:STDOUT: %impl.elem0.loc12_35: %.df3 = impl_witness_access constants.%ImplicitAs.impl_witness.262, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.a63] // CHECK:STDOUT: %bound_method.loc12_35: = bound_method %.loc12_26.1, %impl.elem0.loc12_35 // CHECK:STDOUT: %.loc6_19.6: ref %D = splice_block %return.param {} // CHECK:STDOUT: %.loc12_26.2: %C.f0a = acquire_value %.loc12_26.1 @@ -1240,7 +1247,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc13: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc13: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6.462] -// CHECK:STDOUT: %impl.elem0.loc13_34: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc13_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_34.1: = bound_method %int_6, %impl.elem0.loc13_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.502] // CHECK:STDOUT: %specific_fn.loc13: = specific_function %impl.elem0.loc13_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_34.2: = bound_method %int_6, %specific_fn.loc13 [concrete = constants.%bound_method.bc2] @@ -1252,7 +1259,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc13_24.3: init %C.c60 to %.loc13_24.2 = class_init () [concrete = constants.%C.val.a4b] // CHECK:STDOUT: %.loc13_24.4: ref %C.c60 = temporary %.loc13_24.2, %.loc13_24.3 // CHECK:STDOUT: %.loc13_26.1: ref %C.c60 = converted %.loc13_24.1, %.loc13_24.4 -// CHECK:STDOUT: %impl.elem0.loc13_35: %.3aa = impl_witness_access constants.%ImplicitAs.impl_witness.7d1, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.e2f] +// CHECK:STDOUT: %impl.elem0.loc13_35: %.4a2 = impl_witness_access constants.%ImplicitAs.impl_witness.7d1, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.e2f] // CHECK:STDOUT: %bound_method.loc13_35: = bound_method %.loc13_26.1, %impl.elem0.loc13_35 // CHECK:STDOUT: %.loc6_19.7: ref %D = splice_block %return.param {} // CHECK:STDOUT: %.loc13_26.2: %C.c60 = acquire_value %.loc13_26.1 @@ -1283,7 +1290,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc14: = name_ref P, imports.%P [concrete = imports.%P] // CHECK:STDOUT: %C.ref.loc14: %C.type = name_ref C, imports.%P.C [concrete = constants.%C.generic] // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7.29f] -// CHECK:STDOUT: %impl.elem0.loc14_34: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc14_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc14_34.1: = bound_method %int_7, %impl.elem0.loc14_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.1e0] // CHECK:STDOUT: %specific_fn.loc14: = specific_function %impl.elem0.loc14_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc14_34.2: = bound_method %int_7, %specific_fn.loc14 [concrete = constants.%bound_method.bf2] @@ -1295,7 +1302,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc14_24.3: init %C.304 to %.loc14_24.2 = class_init () [concrete = constants.%C.val.f9f] // CHECK:STDOUT: %.loc14_24.4: ref %C.304 = temporary %.loc14_24.2, %.loc14_24.3 // CHECK:STDOUT: %.loc14_26.1: ref %C.304 = converted %.loc14_24.1, %.loc14_24.4 -// CHECK:STDOUT: %impl.elem0.loc14_35: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.356, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.5ea] +// CHECK:STDOUT: %impl.elem0.loc14_35: %.ad8 = impl_witness_access constants.%ImplicitAs.impl_witness.356, element0 [concrete = constants.%C.as.ImplicitAs.impl.Convert.5ea] // CHECK:STDOUT: %bound_method.loc14_35: = bound_method %.loc14_26.1, %impl.elem0.loc14_35 // CHECK:STDOUT: %.loc6_19.8: ref %D = splice_block %return.param {} // CHECK:STDOUT: %.loc14_26.2: %C.304 = acquire_value %.loc14_26.1 diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index 654b79128654..c03eac59b35d 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -50,7 +50,6 @@ fn G() -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -58,7 +57,8 @@ fn G() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -150,7 +150,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc21_43.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct] -// CHECK:STDOUT: %impl.elem0.loc21_43.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc21_43.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc21_43.1: = bound_method %int_1, %impl.elem0.loc21_43.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc21_43.1: = specific_function %impl.elem0.loc21_43.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_43.2: = bound_method %int_1, %specific_fn.loc21_43.1 [concrete = constants.%bound_method.38b] @@ -158,7 +158,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc21_43.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc21_43.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc21_43.3: ref %i32 = class_element_access %return.param, element0 // CHECK:STDOUT: %.loc21_43.4: init %i32 to %.loc21_43.3 = in_place_init %.loc21_43.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc21_43.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc21_43.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc21_43.3: = bound_method %int_2, %impl.elem0.loc21_43.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc21_43.2: = specific_function %impl.elem0.loc21_43.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc21_43.4: = bound_method %int_2, %specific_fn.loc21_43.2 [concrete = constants.%bound_method.646] @@ -182,7 +182,7 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %result.var: ref %i32 = var %result.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc26_12.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // 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.loc26_12.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method.d2e] diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index 509bebc868b3..3535f104f3d0 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -48,7 +48,6 @@ fn EnclosingButAfter(b: bool) -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -56,7 +55,8 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %.e54: Core.Form = init_form %i32, call_param1 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -143,7 +143,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_0.loc17: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc17: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc17: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc17_14.1: = bound_method %int_0.loc17, %impl.elem0.loc17 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_14.2: = bound_method %int_0.loc17, %specific_fn.loc17 [concrete = constants.%bound_method.d2e] @@ -168,7 +168,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var %w.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc20: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc20: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc20_14.1: = bound_method %int_1, %impl.elem0.loc20 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc20: = specific_function %impl.elem0.loc20, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc20_14.2: = bound_method %int_1, %specific_fn.loc20 [concrete = constants.%bound_method.38b] @@ -184,7 +184,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc19: // CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc22: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc22: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc22_11.1: = bound_method %int_0.loc22, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // 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_11.2: = bound_method %int_0.loc22, %specific_fn.loc22 [concrete = constants.%bound_method.d2e] @@ -211,7 +211,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref %i32 = var %v.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0.loc27: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc27: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc27_14.1: = bound_method %int_0, %impl.elem0.loc27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.897] // CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc27_14.2: = bound_method %int_0, %specific_fn.loc27 [concrete = constants.%bound_method.d2e] @@ -235,7 +235,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %w.var: ref %i32 = var %w.var_patt // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] -// CHECK:STDOUT: %impl.elem0.loc30: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc30: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc30_12.1: = bound_method %int_1, %impl.elem0.loc30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc30_12.2: = bound_method %int_1, %specific_fn.loc30 [concrete = constants.%bound_method.38b] diff --git a/toolchain/check/testdata/return/struct.carbon b/toolchain/check/testdata/return/struct.carbon index 67905872854d..2ab350fd72bd 100644 --- a/toolchain/check/testdata/return/struct.carbon +++ b/toolchain/check/testdata/return/struct.carbon @@ -34,7 +34,6 @@ fn Main() -> {.a: i32} { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -42,7 +41,8 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -86,7 +86,7 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba] // CHECK:STDOUT: %.loc16_17.1: %struct_type.a.a6c = struct_literal (%int_3) [concrete = constants.%struct.001] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_17.1: = bound_method %int_3, %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.loc16_17.2: = bound_method %int_3, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/return/tuple.carbon b/toolchain/check/testdata/return/tuple.carbon index c052808d27b7..ded5c8072ae6 100644 --- a/toolchain/check/testdata/return/tuple.carbon +++ b/toolchain/check/testdata/return/tuple.carbon @@ -38,7 +38,6 @@ fn Main() -> (i32, i32) { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -46,7 +45,8 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f6f: = bound_method %int_15.447, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.9f9: = bound_method %int_15.447, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -97,7 +97,7 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %int_15: Core.IntLiteral = int_value 15 [concrete = constants.%int_15.447] // CHECK:STDOUT: %int_35: Core.IntLiteral = int_value 35 [concrete = constants.%int_35.c79] // CHECK:STDOUT: %.loc17_17.1: %tuple.type.f94 = tuple_literal (%int_15, %int_35) [concrete = constants.%tuple.1b5] -// CHECK:STDOUT: %impl.elem0.loc17_17.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc17_17.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc17_17.1: = bound_method %int_15, %impl.elem0.loc17_17.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f6f] // CHECK:STDOUT: %specific_fn.loc17_17.1: = specific_function %impl.elem0.loc17_17.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_17.2: = bound_method %int_15, %specific_fn.loc17_17.1 [concrete = constants.%bound_method.9f9] @@ -105,7 +105,7 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %.loc17_17.2: init %i32 = converted %int_15, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc17_17.1 [concrete = constants.%int_15.7f7] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return.param, element0 // CHECK:STDOUT: %.loc17_17.3: init %i32 to %tuple.elem0 = in_place_init %.loc17_17.2 [concrete = constants.%int_15.7f7] -// CHECK:STDOUT: %impl.elem0.loc17_17.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc17_17.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc17_17.3: = bound_method %int_35, %impl.elem0.loc17_17.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4c2] // CHECK:STDOUT: %specific_fn.loc17_17.2: = specific_function %impl.elem0.loc17_17.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc17_17.4: = bound_method %int_35, %specific_fn.loc17_17.2 [concrete = constants.%bound_method.d89] diff --git a/toolchain/check/testdata/return/value.carbon b/toolchain/check/testdata/return/value.carbon index 2e6e0b42c9b0..3344387e682c 100644 --- a/toolchain/check/testdata/return/value.carbon +++ b/toolchain/check/testdata/return/value.carbon @@ -31,7 +31,6 @@ fn Main() -> i32 { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -39,7 +38,8 @@ fn Main() -> i32 { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -80,7 +80,7 @@ fn Main() -> i32 { // CHECK:STDOUT: fn @Main() -> out %return.param: %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_11.1: = bound_method %int_0, %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.loc16_11.2: = bound_method %int_0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/struct/fail_member_access_type.carbon b/toolchain/check/testdata/struct/fail_member_access_type.carbon index 6d88143fb04b..0b8ea048ff50 100644 --- a/toolchain/check/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/check/testdata/struct/fail_member_access_type.carbon @@ -34,7 +34,6 @@ var y: i32 = x.b; // 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.4a8: type = facet_type <@ImplicitAs, @ImplicitAs(%f64.d77)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.726: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f64.d77) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] @@ -42,7 +41,8 @@ var y: i32 = x.b; // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.4a8 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.cb2) [concrete] -// CHECK:STDOUT: %.b13: type = fn_type_with_self_type %ImplicitAs.Convert.type.726, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a33: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f64.d77, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.6c5: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a33, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.126, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %float.126, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -104,7 +104,7 @@ var y: i32 = x.b; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 40e-1 [concrete = constants.%float.126] // CHECK:STDOUT: %.loc15_29.1: %struct_type.a.b4b = struct_literal (%float) [concrete = constants.%struct.ea2] -// CHECK:STDOUT: %impl.elem0: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] +// CHECK:STDOUT: %impl.elem0: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] // CHECK:STDOUT: %bound_method.loc15_29.1: = bound_method %float, %impl.elem0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_29.2: = bound_method %float, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/struct/fail_non_member_access.carbon b/toolchain/check/testdata/struct/fail_non_member_access.carbon index a602ac56f661..d5f692b140b0 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -34,7 +34,6 @@ var y: i32 = x.b; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -42,7 +41,8 @@ var y: i32 = x.b; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -98,7 +98,7 @@ var y: i32 = x.b; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc15_27.1: %struct_type.a.a6c = struct_literal (%int_4) [concrete = constants.%struct.2cb] -// CHECK:STDOUT: %impl.elem0: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_27.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_27.2: = bound_method %int_4, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index 073cbe56ff22..a809084b575d 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -92,14 +92,14 @@ fn F() -> {.x: i32} { // CHECK:STDOUT: %pattern_type.b54: type = pattern_type %struct_type.a [concrete] // CHECK:STDOUT: %.450: ref %i32 = struct_access imports.%a_ref.var, element0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.08e: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.014: %Int.as.Copy.impl.Op.type.08e = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.a2f: = impl_witness imports.%Copy.impl_witness_table.d6d, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.837: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.2b1: %Int.as.Copy.impl.Op.type.837 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.a2f) [concrete] -// CHECK:STDOUT: %.70e: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.67d: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.d31: type = fn_type_with_self_type %Copy.WithSelf.Op.type.67d, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.2b1, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %tuple.type.85c: type = tuple_type (type) [concrete] // CHECK:STDOUT: %tuple.38e: %tuple.type.85c = tuple_value (%i32) [concrete] @@ -124,12 +124,12 @@ fn F() -> {.x: i32} { // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete] // CHECK:STDOUT: %struct.4aa: %struct_type.a.b.cfd = struct_value (%int_1.5b8, %int_2.ecc) [concrete] // CHECK:STDOUT: %ImplicitAs.type.ea1: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.ea0: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.574: = impl_witness imports.%ImplicitAs.impl_witness_table.4e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.dbb: 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.022: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.dbb = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.ea1 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.574) [concrete] -// CHECK:STDOUT: %.2f1: type = fn_type_with_self_type %ImplicitAs.Convert.type.ea0, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.7cd6: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.d94: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.7cd6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a5: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.022 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.022, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.a7f: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -201,14 +201,14 @@ fn F() -> {.x: i32} { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc7_25.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct.4aa] -// CHECK:STDOUT: %impl.elem0.loc7_25.1: %.2f1 = impl_witness_access constants.%ImplicitAs.impl_witness.574, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.022] +// CHECK:STDOUT: %impl.elem0.loc7_25.1: %.d94 = impl_witness_access constants.%ImplicitAs.impl_witness.574, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.022] // CHECK:STDOUT: %bound_method.loc7_25.1: = bound_method %int_1, %impl.elem0.loc7_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a5] // CHECK:STDOUT: %specific_fn.loc7_25.1: = specific_function %impl.elem0.loc7_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_25.2: = bound_method %int_1, %specific_fn.loc7_25.1 [concrete = constants.%bound_method.a7f] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_25.1: init %i32 = call %bound_method.loc7_25.2(%int_1) [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc7_25.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_25.1 [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc7_25.3: %i32 = converted %int_1, %.loc7_25.2 [concrete = constants.%int_1.47b] -// CHECK:STDOUT: %impl.elem0.loc7_25.2: %.2f1 = impl_witness_access constants.%ImplicitAs.impl_witness.574, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.022] +// CHECK:STDOUT: %impl.elem0.loc7_25.2: %.d94 = impl_witness_access constants.%ImplicitAs.impl_witness.574, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.022] // CHECK:STDOUT: %bound_method.loc7_25.3: = bound_method %int_2, %impl.elem0.loc7_25.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.274] // CHECK:STDOUT: %specific_fn.loc7_25.2: = specific_function %impl.elem0.loc7_25.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_25.4: = bound_method %int_2, %specific_fn.loc7_25.2 [concrete = constants.%bound_method.622] @@ -227,7 +227,7 @@ fn F() -> {.x: i32} { // CHECK:STDOUT: %a_ref.ref: ref %struct_type.a = name_ref a_ref, imports.%Implicit.a_ref [concrete = imports.%a_ref.var] // CHECK:STDOUT: %.loc5_20.1: ref %i32 = struct_access %a_ref.ref, element0 [concrete = constants.%.450] // CHECK:STDOUT: %.loc5_20.2: %i32 = acquire_value %.loc5_20.1 -// CHECK:STDOUT: %impl.elem0.loc5: %.70e = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] +// CHECK:STDOUT: %impl.elem0.loc5: %.d31 = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] // CHECK:STDOUT: %bound_method.loc5_20.1: = bound_method %.loc5_20.2, %impl.elem0.loc5 // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc5_20.2: = bound_method %.loc5_20.2, %specific_fn.loc5 @@ -239,7 +239,7 @@ fn F() -> {.x: i32} { // CHECK:STDOUT: %.loc6_47.1: ref %struct_type.b.c = struct_access %b_ref.ref, element0 [concrete = constants.%.b7c] // CHECK:STDOUT: %.loc6_47.2: ref %i32 = struct_access %.loc6_47.1, element0 [concrete = constants.%.3d5] // CHECK:STDOUT: %.loc6_47.3: %i32 = acquire_value %.loc6_47.2 -// CHECK:STDOUT: %impl.elem0.loc6_47.1: %.70e = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] +// CHECK:STDOUT: %impl.elem0.loc6_47.1: %.d31 = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] // CHECK:STDOUT: %bound_method.loc6_47.1: = bound_method %.loc6_47.3, %impl.elem0.loc6_47.1 // CHECK:STDOUT: %specific_fn.loc6_47.1: = specific_function %impl.elem0.loc6_47.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_47.2: = bound_method %.loc6_47.3, %specific_fn.loc6_47.1 @@ -250,7 +250,7 @@ fn F() -> {.x: i32} { // CHECK:STDOUT: %.loc6_47.7: ref %tuple.type.dd4 = struct_access %.loc6_47.1, element1 [concrete = constants.%.d35] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %.loc6_47.7, element0 [concrete = constants.%tuple.elem0.4a3] // CHECK:STDOUT: %.loc6_47.8: %i32 = acquire_value %tuple.elem0 -// CHECK:STDOUT: %impl.elem0.loc6_47.2: %.70e = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] +// CHECK:STDOUT: %impl.elem0.loc6_47.2: %.d31 = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] // CHECK:STDOUT: %bound_method.loc6_47.3: = bound_method %.loc6_47.8, %impl.elem0.loc6_47.2 // CHECK:STDOUT: %specific_fn.loc6_47.2: = specific_function %impl.elem0.loc6_47.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_47.4: = bound_method %.loc6_47.8, %specific_fn.loc6_47.2 @@ -263,7 +263,7 @@ fn F() -> {.x: i32} { // CHECK:STDOUT: %.loc6_47.14: init %struct_type.b.c = converted %.loc6_47.1, %.loc6_47.13 // CHECK:STDOUT: %.loc6_47.15: ref %i32 = struct_access %b_ref.ref, element1 [concrete = constants.%.7f4] // CHECK:STDOUT: %.loc6_47.16: %i32 = acquire_value %.loc6_47.15 -// CHECK:STDOUT: %impl.elem0.loc6_47.3: %.70e = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] +// CHECK:STDOUT: %impl.elem0.loc6_47.3: %.d31 = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] // CHECK:STDOUT: %bound_method.loc6_47.5: = bound_method %.loc6_47.16, %impl.elem0.loc6_47.3 // CHECK:STDOUT: %specific_fn.loc6_47.3: = specific_function %impl.elem0.loc6_47.3, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_47.6: = bound_method %.loc6_47.16, %specific_fn.loc6_47.3 @@ -294,16 +294,16 @@ fn F() -> {.x: i32} { // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.7f5: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.8d8 [concrete] +// CHECK:STDOUT: %assoc0.70f: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.83e [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_1, %Int.as.Copy.impl.Op.664 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -312,10 +312,10 @@ fn F() -> {.x: i32} { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//symbolic_decl, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.C: type = import_ref Main//symbolic_decl, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.dfb: %I.assoc_type = import_ref Main//symbolic_decl, loc5_12, loaded [concrete = constants.%assoc0.7f5] +// CHECK:STDOUT: %Main.import_ref.a19: %I.assoc_type = import_ref Main//symbolic_decl, loc5_12, loaded [concrete = constants.%assoc0.70f] // CHECK:STDOUT: %Main.import_ref.1ec: %struct_type.x = import_ref Main//symbolic_decl, loc10_37, loaded [concrete = constants.%struct] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.1ec), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.8d8: %struct_type.x = import_ref Main//symbolic_decl, loc5_12, loaded [concrete = %value] +// CHECK:STDOUT: %Main.import_ref.83e: %struct_type.x = import_ref Main//symbolic_decl, loc5_12, loaded [concrete = %value] // CHECK:STDOUT: %value: %struct_type.x = assoc_const_decl @value [concrete] {} // CHECK:STDOUT: %Core.import_ref.18d: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.824) = 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.9b9)] // CHECK:STDOUT: %Copy.impl_witness_table.e76 = impl_witness_table (%Core.import_ref.18d), @Int.as.Copy.impl [concrete] @@ -329,10 +329,10 @@ fn F() -> {.x: i32} { // CHECK:STDOUT: %.loc7_13: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc7_13 [concrete = constants.%C] // CHECK:STDOUT: %.loc7_18.1: type = converted %.loc7_13, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.dfb [concrete = constants.%assoc0.7f5] +// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.a19 [concrete = constants.%assoc0.70f] // CHECK:STDOUT: %impl.elem0.loc7_18.1: %struct_type.x = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%struct] // CHECK:STDOUT: %.loc7_18.2: %i32 = struct_access %impl.elem0.loc7_18.1, element0 [concrete = constants.%int_1] -// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc7_18.1: = bound_method %.loc7_18.2, %impl.elem0.loc7_18.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc7_18.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_18.2: = bound_method %.loc7_18.2, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/struct/literal_member_access.carbon b/toolchain/check/testdata/struct/literal_member_access.carbon index 09a7c0867b72..49baa4472a56 100644 --- a/toolchain/check/testdata/struct/literal_member_access.carbon +++ b/toolchain/check/testdata/struct/literal_member_access.carbon @@ -40,14 +40,14 @@ fn F() -> i32 { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete] // CHECK:STDOUT: %struct_type.a.b.c.4ca: type = struct_type {.a: Core.IntLiteral, .b: %struct_type.x.y.z, .c: Core.IntLiteral} [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] @@ -126,7 +126,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc18_35.3: %struct_type.a.b.c.4ca = converted %.loc18_35.1, %struct.loc18_35 // CHECK:STDOUT: %.loc18_36: %struct_type.x.y.z = struct_access %.loc18_35.3, element1 // CHECK:STDOUT: %.loc18_38: %i32 = struct_access %.loc18_36, element1 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc18_38.1: = bound_method %.loc18_38, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc18_38.2: = bound_method %.loc18_38, %specific_fn diff --git a/toolchain/check/testdata/struct/member_access.carbon b/toolchain/check/testdata/struct/member_access.carbon index 3ad25f6aa76c..234e5e194a56 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -38,7 +38,6 @@ var z: i32 = y; // 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.4a8: type = facet_type <@ImplicitAs, @ImplicitAs(%f64.d77)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.726: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f64.d77) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic] @@ -46,21 +45,22 @@ var z: i32 = y; // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_64) [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.2c7 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.184: %ImplicitAs.type.4a8 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.cb2) [concrete] -// CHECK:STDOUT: %.b13: type = fn_type_with_self_type %ImplicitAs.Convert.type.726, %ImplicitAs.facet.184 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.a33: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%f64.d77, %ImplicitAs.facet.184) [concrete] +// CHECK:STDOUT: %.6c5: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.a33, %ImplicitAs.facet.184 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %float.1f7, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239 [concrete] // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.239, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete] // CHECK:STDOUT: %bound_method.f2b: = bound_method %float.1f7, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %float.0a8: %f64.d77 = float_value 0 [concrete] // CHECK:STDOUT: %.b93: ref %i32 = struct_access file.%x.var, element1 [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] // CHECK:STDOUT: %ImplicitAs.impl_witness.6bc: = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.b94: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.b94 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet.b94) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet.b94 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] @@ -68,14 +68,14 @@ var z: i32 = y; // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete] // CHECK:STDOUT: %struct.454: %struct_type.a.b.d2f = struct_value (%float.0a8, %int_1.5d2) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -148,7 +148,7 @@ var z: i32 = y; // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 0e-1 [concrete = constants.%float.1f7] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %.loc15_46.1: %struct_type.a.b.0cc = struct_literal (%float, %int_1) [concrete = constants.%struct.877] -// CHECK:STDOUT: %impl.elem0.loc15_46.1: %.b13 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] +// CHECK:STDOUT: %impl.elem0.loc15_46.1: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239] // CHECK:STDOUT: %bound_method.loc15_46.1: = bound_method %float, %impl.elem0.loc15_46.1 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc15_46.1: = specific_function %impl.elem0.loc15_46.1, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_46.2: = bound_method %float, %specific_fn.loc15_46.1 [concrete = constants.%bound_method.f2b] @@ -156,7 +156,7 @@ var z: i32 = y; // CHECK:STDOUT: %.loc15_46.2: init %f64.d77 = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.0a8] // CHECK:STDOUT: %.loc15_46.3: ref %f64.d77 = struct_access file.%x.var, element0 [concrete = constants.%.82d] // CHECK:STDOUT: %.loc15_46.4: init %f64.d77 to %.loc15_46.3 = in_place_init %.loc15_46.2 [concrete = constants.%float.0a8] -// CHECK:STDOUT: %impl.elem0.loc15_46.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15_46.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_46.3: = bound_method %int_1, %impl.elem0.loc15_46.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc15_46.2: = specific_function %impl.elem0.loc15_46.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_46.4: = bound_method %int_1, %specific_fn.loc15_46.2 [concrete = constants.%bound_method.38b] @@ -170,7 +170,7 @@ var z: i32 = y; // CHECK:STDOUT: %x.ref: ref %struct_type.a.b.d2f = name_ref x, file.%x [concrete = file.%x.var] // CHECK:STDOUT: %.loc16_15.1: ref %i32 = struct_access %x.ref, element1 [concrete = constants.%.b93] // CHECK:STDOUT: %.loc16_15.2: %i32 = acquire_value %.loc16_15.1 -// CHECK:STDOUT: %impl.elem0.loc16: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc16: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc16_15.1: = bound_method %.loc16_15.2, %impl.elem0.loc16 // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_15.2: = bound_method %.loc16_15.2, %specific_fn.loc16 @@ -178,7 +178,7 @@ var z: i32 = y; // CHECK:STDOUT: assign file.%y.var, %Int.as.Copy.impl.Op.call.loc16 // CHECK:STDOUT: %y.ref: ref %i32 = name_ref y, file.%y [concrete = file.%y.var] // CHECK:STDOUT: %.loc17: %i32 = acquire_value %y.ref -// CHECK:STDOUT: %impl.elem0.loc17: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc17: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc17_14.1: = bound_method %.loc17, %impl.elem0.loc17 // CHECK:STDOUT: %specific_fn.loc17: = specific_function %impl.elem0.loc17, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc17_14.2: = bound_method %.loc17, %specific_fn.loc17 diff --git a/toolchain/check/testdata/struct/one_entry.carbon b/toolchain/check/testdata/struct/one_entry.carbon index 00fb8861f60c..2d6fba5e4d7c 100644 --- a/toolchain/check/testdata/struct/one_entry.carbon +++ b/toolchain/check/testdata/struct/one_entry.carbon @@ -32,7 +32,6 @@ var y: {.a: i32} = x; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -40,21 +39,22 @@ var y: {.a: i32} = x; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_4.0c1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @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: %struct.a51: %struct_type.a.ba9 = struct_value (%int_4.940) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -110,7 +110,7 @@ var y: {.a: i32} = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1] // CHECK:STDOUT: %.loc15_27.1: %struct_type.a.a6c = struct_literal (%int_4) [concrete = constants.%struct.2cb] -// CHECK:STDOUT: %impl.elem0.loc15: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_27.1: = bound_method %int_4, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc15: = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_27.2: = bound_method %int_4, %specific_fn.loc15 [concrete = constants.%bound_method] @@ -122,7 +122,7 @@ var y: {.a: i32} = x; // CHECK:STDOUT: %x.ref: ref %struct_type.a.ba9 = name_ref x, file.%x [concrete = file.%x.var] // CHECK:STDOUT: %.loc16_20.1: ref %i32 = struct_access %x.ref, element0 [concrete = constants.%.3cb] // CHECK:STDOUT: %.loc16_20.2: %i32 = acquire_value %.loc16_20.1 -// CHECK:STDOUT: %impl.elem0.loc16: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc16: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc16_20.1: = bound_method %.loc16_20.2, %impl.elem0.loc16 // CHECK:STDOUT: %specific_fn.loc16: = specific_function %impl.elem0.loc16, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_20.2: = bound_method %.loc16_20.2, %specific_fn.loc16 diff --git a/toolchain/check/testdata/struct/partially_const.carbon b/toolchain/check/testdata/struct/partially_const.carbon index d19738c24884..ed7179ba1416 100644 --- a/toolchain/check/testdata/struct/partially_const.carbon +++ b/toolchain/check/testdata/struct/partially_const.carbon @@ -35,7 +35,6 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -43,20 +42,21 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -114,7 +114,7 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %int_0.loc16_32: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %.loc16_33.1: %struct_type.a.b.c.1ee = struct_literal (%int_0.loc16_16, %n.ref, %int_0.loc16_32) -// CHECK:STDOUT: %impl.elem0.loc16_33.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16_33.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_33.1: = bound_method %int_0.loc16_16, %impl.elem0.loc16_33.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc16_33.1: = specific_function %impl.elem0.loc16_33.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_33.2: = bound_method %int_0.loc16_16, %specific_fn.loc16_33.1 [concrete = constants.%bound_method] @@ -122,14 +122,14 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %.loc16_33.2: init %i32 = converted %int_0.loc16_16, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16_33.1 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc16_33.3: ref %i32 = struct_access %return.param, element0 // CHECK:STDOUT: %.loc16_33.4: init %i32 to %.loc16_33.3 = in_place_init %.loc16_33.2 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %impl.elem0.loc16_24: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc16_24: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc16_24.1: = bound_method %n.ref, %impl.elem0.loc16_24 // CHECK:STDOUT: %specific_fn.loc16_24: = specific_function %impl.elem0.loc16_24, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_24.2: = bound_method %n.ref, %specific_fn.loc16_24 // CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc16_24.2(%n.ref) // CHECK:STDOUT: %.loc16_33.5: ref %i32 = struct_access %return.param, element1 // CHECK:STDOUT: %.loc16_33.6: init %i32 to %.loc16_33.5 = in_place_init %Int.as.Copy.impl.Op.call -// CHECK:STDOUT: %impl.elem0.loc16_33.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc16_33.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc16_33.3: = bound_method %int_0.loc16_32, %impl.elem0.loc16_33.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound] // CHECK:STDOUT: %specific_fn.loc16_33.2: = specific_function %impl.elem0.loc16_33.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc16_33.4: = bound_method %int_0.loc16_32, %specific_fn.loc16_33.2 [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/struct/reorder_fields.carbon b/toolchain/check/testdata/struct/reorder_fields.carbon index 953dc4c481a0..306831052f66 100644 --- a/toolchain/check/testdata/struct/reorder_fields.carbon +++ b/toolchain/check/testdata/struct/reorder_fields.carbon @@ -49,14 +49,14 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %struct_type.b.a: type = struct_type {.b: %f64.d77, .a: %i32} [concrete] // CHECK:STDOUT: %pattern_type.b43: type = pattern_type %struct_type.b.a [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.de4: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.de4 [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.de4) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet.de4 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.2fe: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Float.as.Copy.impl.Op.240: %Float.as.Copy.impl.Op.type.2fe = struct_value () [symbolic] @@ -64,7 +64,8 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %Float.as.Copy.impl.Op.type.07e: type = fn_type @Float.as.Copy.impl.Op, @Float.as.Copy.impl(%int_64) [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.f05: %Float.as.Copy.impl.Op.type.07e = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet.cba: %Copy.type = facet_value %f64.d77, (%Copy.impl_witness.1e3) [concrete] -// CHECK:STDOUT: %.c41: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.cba [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.fb6: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet.cba) [concrete] +// CHECK:STDOUT: %.59b: type = fn_type_with_self_type %Copy.WithSelf.Op.type.fb6, %Copy.facet.cba [concrete] // CHECK:STDOUT: %Float.as.Copy.impl.Op.specific_fn: = specific_function %Float.as.Copy.impl.Op.f05, @Float.as.Copy.impl.Op(%int_64) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -174,7 +175,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %y: %struct_type.b.a = value_binding y, %.loc20_31.3 // CHECK:STDOUT: %y.ref: %struct_type.b.a = name_ref y, %y // CHECK:STDOUT: %.loc21_10.1: %i32 = struct_access %y.ref, element1 -// CHECK:STDOUT: %impl.elem0.loc21_10.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc21_10.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc21_10.1: = bound_method %.loc21_10.1, %impl.elem0.loc21_10.1 // CHECK:STDOUT: %specific_fn.loc21_10.1: = specific_function %impl.elem0.loc21_10.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc21_10.2: = bound_method %.loc21_10.1, %specific_fn.loc21_10.1 @@ -182,7 +183,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %.loc21_10.2: ref %i32 = struct_access %return.param, element1 // CHECK:STDOUT: %.loc21_10.3: init %i32 to %.loc21_10.2 = in_place_init %Int.as.Copy.impl.Op.call // CHECK:STDOUT: %.loc21_10.4: %f64.d77 = struct_access %y.ref, element0 -// CHECK:STDOUT: %impl.elem0.loc21_10.2: %.c41 = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05] +// CHECK:STDOUT: %impl.elem0.loc21_10.2: %.59b = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05] // CHECK:STDOUT: %bound_method.loc21_10.3: = bound_method %.loc21_10.4, %impl.elem0.loc21_10.2 // CHECK:STDOUT: %specific_fn.loc21_10.2: = specific_function %impl.elem0.loc21_10.2, @Float.as.Copy.impl.Op(constants.%int_64) [concrete = constants.%Float.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc21_10.4: = bound_method %.loc21_10.4, %specific_fn.loc21_10.2 diff --git a/toolchain/check/testdata/struct/tuple_as_element.carbon b/toolchain/check/testdata/struct/tuple_as_element.carbon index 1bf3bbb63751..48ab89e52c97 100644 --- a/toolchain/check/testdata/struct/tuple_as_element.carbon +++ b/toolchain/check/testdata/struct/tuple_as_element.carbon @@ -38,7 +38,6 @@ var y: {.a: i32, .b: (i32,)} = x; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -46,7 +45,8 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -60,14 +60,14 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %struct.646: %struct_type.a.b.3d5 = struct_value (%int_1.5d2, %tuple.092) [concrete] // CHECK:STDOUT: %.a20: ref %i32 = struct_access file.%y.var, element0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %.07f: ref %tuple.type.a1c = struct_access file.%y.var, element1 [concrete] // CHECK:STDOUT: } @@ -134,7 +134,7 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc15_49.1: %tuple.type.985 = tuple_literal (%int_2) [concrete = constants.%tuple.e7e] // CHECK:STDOUT: %.loc15_50.1: %struct_type.a.b.057 = struct_literal (%int_1, %.loc15_49.1) [concrete = constants.%struct.60a] -// CHECK:STDOUT: %impl.elem0.loc15_50: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15_50: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_50.1: = bound_method %int_1, %impl.elem0.loc15_50 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc15_50: = specific_function %impl.elem0.loc15_50, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_50.2: = bound_method %int_1, %specific_fn.loc15_50 [concrete = constants.%bound_method.38b] @@ -142,7 +142,7 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %.loc15_50.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_50 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc15_50.3: ref %i32 = struct_access file.%x.var, element0 [concrete = constants.%.ae3] // CHECK:STDOUT: %.loc15_50.4: init %i32 to %.loc15_50.3 = in_place_init %.loc15_50.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc15_49: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15_49: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_49.1: = bound_method %int_2, %impl.elem0.loc15_49 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc15_49: = specific_function %impl.elem0.loc15_49, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_49.2: = bound_method %int_2, %specific_fn.loc15_49 [concrete = constants.%bound_method.646] @@ -158,7 +158,7 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %x.ref: ref %struct_type.a.b.3d5 = name_ref x, file.%x [concrete = file.%x.var] // CHECK:STDOUT: %.loc16_32.1: ref %i32 = struct_access %x.ref, element0 [concrete = constants.%.ae3] // CHECK:STDOUT: %.loc16_32.2: %i32 = acquire_value %.loc16_32.1 -// CHECK:STDOUT: %impl.elem0.loc16_32.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc16_32.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc16_32.1: = bound_method %.loc16_32.2, %impl.elem0.loc16_32.1 // CHECK:STDOUT: %specific_fn.loc16_32.1: = specific_function %impl.elem0.loc16_32.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_32.2: = bound_method %.loc16_32.2, %specific_fn.loc16_32.1 @@ -168,7 +168,7 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %.loc16_32.5: ref %tuple.type.a1c = struct_access %x.ref, element1 [concrete = constants.%.03e] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %.loc16_32.5, element0 [concrete = constants.%tuple.elem0.83d] // CHECK:STDOUT: %.loc16_32.6: %i32 = acquire_value %tuple.elem0 -// CHECK:STDOUT: %impl.elem0.loc16_32.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc16_32.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc16_32.3: = bound_method %.loc16_32.6, %impl.elem0.loc16_32.2 // CHECK:STDOUT: %specific_fn.loc16_32.2: = specific_function %impl.elem0.loc16_32.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc16_32.4: = bound_method %.loc16_32.6, %specific_fn.loc16_32.2 diff --git a/toolchain/check/testdata/struct/two_entries.carbon b/toolchain/check/testdata/struct/two_entries.carbon index d76253fed285..43a359566b02 100644 --- a/toolchain/check/testdata/struct/two_entries.carbon +++ b/toolchain/check/testdata/struct/two_entries.carbon @@ -35,7 +35,6 @@ var y: {.a: i32, .b: i32} = x; // 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: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -43,7 +42,8 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -56,14 +56,14 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %.fe1: ref %i32 = struct_access file.%x.var, element1 [concrete] // CHECK:STDOUT: %.101: ref %i32 = struct_access file.%y.var, element0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %.960: ref %i32 = struct_access file.%y.var, element1 [concrete] // CHECK:STDOUT: } @@ -104,14 +104,14 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %i32.loc15_22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] // CHECK:STDOUT: %struct_type.a.b.loc15: type = struct_type {.a: %i32, .b: %i32} [concrete = constants.%struct_type.a.b.501] // CHECK:STDOUT: } -// CHECK:STDOUT: %impl.elem0.loc15_44.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15_44.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_44.1: = bound_method @__global_init.%int_1.loc15, %impl.elem0.loc15_44.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc15_44.1: = specific_function %impl.elem0.loc15_44.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_44.2: = bound_method @__global_init.%int_1.loc15, %specific_fn.loc15_44.1 [concrete = constants.%bound_method.38b] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_44.1: init %i32 = call %bound_method.loc15_44.2(@__global_init.%int_1.loc15) [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc15_44.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_44.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc15_44.2: %i32 = converted @__global_init.%int_1.loc15, %.loc15_44.1 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc15_44.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc15_44.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc15_44.3: = bound_method @__global_init.%int_2.loc15, %impl.elem0.loc15_44.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc15_44.2: = specific_function %impl.elem0.loc15_44.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc15_44.4: = bound_method @__global_init.%int_2.loc15, %specific_fn.loc15_44.2 [concrete = constants.%bound_method.646] @@ -169,7 +169,7 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2.loc18: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc18_44.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc18, %int_2.loc18) [concrete = constants.%struct.4aa] -// CHECK:STDOUT: %impl.elem0.loc18_44.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_44.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_44.1: = bound_method %int_1.loc18, %impl.elem0.loc18_44.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc18_44.1: = specific_function %impl.elem0.loc18_44.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_44.2: = bound_method %int_1.loc18, %specific_fn.loc18_44.1 [concrete = constants.%bound_method.38b] @@ -177,7 +177,7 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %.loc18_44.2: init %i32 = converted %int_1.loc18, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18_44.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %.loc18_44.3: ref %i32 = struct_access file.%x.var, element0 [concrete = constants.%.61d] // CHECK:STDOUT: %.loc18_44.4: init %i32 to %.loc18_44.3 = in_place_init %.loc18_44.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc18_44.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc18_44.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc18_44.3: = bound_method %int_2.loc18, %impl.elem0.loc18_44.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc18_44.2: = specific_function %impl.elem0.loc18_44.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc18_44.4: = bound_method %int_2.loc18, %specific_fn.loc18_44.2 [concrete = constants.%bound_method.646] @@ -191,7 +191,7 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %x.ref: ref %struct_type.a.b.501 = name_ref x, file.%x [concrete = file.%x.var] // CHECK:STDOUT: %.loc19_29.1: ref %i32 = struct_access %x.ref, element0 [concrete = constants.%.61d] // CHECK:STDOUT: %.loc19_29.2: %i32 = acquire_value %.loc19_29.1 -// CHECK:STDOUT: %impl.elem0.loc19_29.1: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc19_29.1: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc19_29.1: = bound_method %.loc19_29.2, %impl.elem0.loc19_29.1 // CHECK:STDOUT: %specific_fn.loc19_29.1: = specific_function %impl.elem0.loc19_29.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc19_29.2: = bound_method %.loc19_29.2, %specific_fn.loc19_29.1 @@ -200,7 +200,7 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %.loc19_29.4: init %i32 to %.loc19_29.3 = in_place_init %Int.as.Copy.impl.Op.call.loc19_29.1 // CHECK:STDOUT: %.loc19_29.5: ref %i32 = struct_access %x.ref, element1 [concrete = constants.%.fe1] // CHECK:STDOUT: %.loc19_29.6: %i32 = acquire_value %.loc19_29.5 -// CHECK:STDOUT: %impl.elem0.loc19_29.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc19_29.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc19_29.3: = bound_method %.loc19_29.6, %impl.elem0.loc19_29.2 // CHECK:STDOUT: %specific_fn.loc19_29.2: = specific_function %impl.elem0.loc19_29.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc19_29.4: = bound_method %.loc19_29.6, %specific_fn.loc19_29.2 diff --git a/toolchain/check/testdata/tuple/element_access.carbon b/toolchain/check/testdata/tuple/element_access.carbon index 58b722cc7a50..36b0587d1605 100644 --- a/toolchain/check/testdata/tuple/element_access.carbon +++ b/toolchain/check/testdata/tuple/element_access.carbon @@ -211,14 +211,14 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete] // CHECK:STDOUT: %tuple.elem0.aa1: ref %i32 = tuple_access file.%b.var, element0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: } @@ -248,7 +248,7 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %tuple.elem0.loc6: ref %i32 = tuple_access %b.ref, element0 [concrete = constants.%tuple.elem0.aa1] // CHECK:STDOUT: %.loc6: %i32 = acquire_value %tuple.elem0.loc6 -// CHECK:STDOUT: %impl.elem0.loc6: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc6: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc6_15.1: = bound_method %.loc6, %impl.elem0.loc6 // CHECK:STDOUT: %specific_fn.loc6: = specific_function %impl.elem0.loc6, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_15.2: = bound_method %.loc6, %specific_fn.loc6 @@ -270,7 +270,6 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access file.%a.var, element1 [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete] // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic] @@ -279,26 +278,26 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %struct_type.index.b1b: type = struct_type {.index: Core.IntLiteral} [concrete] // CHECK:STDOUT: %struct.972: %struct_type.index.b1b = struct_value (%int_1.5b8) [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete] -// CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic] // CHECK:STDOUT: %As.impl_witness.ab6: = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete] // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete] -// CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete] +// CHECK:STDOUT: %As.WithSelf.Convert.type.e5b: type = fn_type @As.WithSelf.Convert, @As(%i32, %As.facet) [concrete] +// CHECK:STDOUT: %.9ed: type = fn_type_with_self_type %As.WithSelf.Convert.type.e5b, %As.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound.5ad: = bound_method %int_0.5c6, %Core.IntLiteral.as.As.impl.Convert.29b [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.628: = bound_method %int_0.5c6, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete] @@ -307,7 +306,8 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.240: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.dd4: %Int.as.ImplicitAs.impl.Convert.type.240 = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet.290: %ImplicitAs.type.139 = facet_value %i32, (%ImplicitAs.impl_witness.640) [concrete] -// CHECK:STDOUT: %.71e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.290 [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.462: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(Core.IntLiteral, %ImplicitAs.facet.290) [concrete] +// CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.462, %ImplicitAs.facet.290 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound.564: = bound_method %int_0.6a9, %Int.as.ImplicitAs.impl.Convert.dd4 [concrete] // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Int.as.ImplicitAs.impl.Convert.dd4, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.77d: = bound_method %int_0.6a9, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -373,7 +373,7 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %.loc5_29: Core.IntLiteral = struct_access %.loc5_28.2, element0 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1.loc5: ref %i32 = tuple_access %a.ref.loc5, element1 [concrete = constants.%tuple.elem1] // CHECK:STDOUT: %.loc5_15: %i32 = acquire_value %tuple.elem1.loc5 -// CHECK:STDOUT: %impl.elem0.loc5: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc5: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc5_15.1: = bound_method %.loc5_15, %impl.elem0.loc5 // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc5_15.2: = bound_method %.loc5_15, %specific_fn.loc5 @@ -383,14 +383,14 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc6_18.1: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0.loc6_18.1: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc6_18.1: = bound_method %int_0, %impl.elem0.loc6_18.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.5ad] // CHECK:STDOUT: %specific_fn.loc6_18.1: = specific_function %impl.elem0.loc6_18.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_18.2: = bound_method %int_0, %specific_fn.loc6_18.1 [concrete = constants.%bound_method.628] // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc6: init %i32 = call %bound_method.loc6_18.2(%int_0) [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_18.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc6 [concrete = constants.%int_0.6a9] // CHECK:STDOUT: %.loc6_18.2: %i32 = converted %int_0, %.loc6_18.1 [concrete = constants.%int_0.6a9] -// CHECK:STDOUT: %impl.elem0.loc6_18.2: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %impl.elem0.loc6_18.2: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] // CHECK:STDOUT: %bound_method.loc6_18.3: = bound_method %.loc6_18.2, %impl.elem0.loc6_18.2 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound.564] // CHECK:STDOUT: %specific_fn.loc6_18.2: = specific_function %impl.elem0.loc6_18.2, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc6_18.4: = bound_method %.loc6_18.2, %specific_fn.loc6_18.2 [concrete = constants.%bound_method.77d] @@ -405,7 +405,7 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [concrete = constants.%int_32] // CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc7_29: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] +// CHECK:STDOUT: %impl.elem0.loc7_29: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b] // CHECK:STDOUT: %bound_method.loc7_29.1: = bound_method %int_1.loc7, %impl.elem0.loc7_29 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound.bd3] // CHECK:STDOUT: %specific_fn.loc7_29: = specific_function %impl.elem0.loc7_29, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_29.2: = bound_method %int_1.loc7, %specific_fn.loc7_29 [concrete = constants.%bound_method.290] @@ -416,7 +416,7 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %struct.loc7: %struct_type.index.6ea = struct_value (%.loc7_29.2) [concrete = constants.%struct.63a] // CHECK:STDOUT: %.loc7_35.2: %struct_type.index.6ea = converted %.loc7_35.1, %struct.loc7 [concrete = constants.%struct.63a] // CHECK:STDOUT: %.loc7_36.1: %i32 = struct_access %.loc7_35.2, element0 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc7_36: %.71e = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] +// CHECK:STDOUT: %impl.elem0.loc7_36: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4] // CHECK:STDOUT: %bound_method.loc7_36.1: = bound_method %.loc7_36.1, %impl.elem0.loc7_36 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound.f7c] // CHECK:STDOUT: %specific_fn.loc7_36: = specific_function %impl.elem0.loc7_36, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_36.2: = bound_method %.loc7_36.1, %specific_fn.loc7_36 [concrete = constants.%bound_method.04c] @@ -425,7 +425,7 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %.loc7_36.3: Core.IntLiteral = converted %.loc7_36.1, %.loc7_36.2 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %tuple.elem1.loc7: ref %i32 = tuple_access %a.ref.loc7, element1 [concrete = constants.%tuple.elem1] // CHECK:STDOUT: %.loc7_15: %i32 = acquire_value %tuple.elem1.loc7 -// CHECK:STDOUT: %impl.elem0.loc7_15: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc7_15: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc7_15.1: = bound_method %.loc7_15, %impl.elem0.loc7_15 // CHECK:STDOUT: %specific_fn.loc7_15: = specific_function %impl.elem0.loc7_15, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_15.2: = bound_method %.loc7_15, %specific_fn.loc7_15 @@ -445,14 +445,14 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -469,7 +469,7 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %.loc7_12.1: %tuple.type.a1c = value_of_initializer %F.call // CHECK:STDOUT: %.loc7_12.2: %tuple.type.a1c = converted %F.call, %.loc7_12.1 // CHECK:STDOUT: %tuple.elem0: %i32 = tuple_access %.loc7_12.2, element0 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc7_13.1: = bound_method %tuple.elem0, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_13.2: = bound_method %tuple.elem0, %specific_fn diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index 40008c6c300d..881a91a48255 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -96,14 +96,14 @@ fn F() -> (i32,) { // CHECK:STDOUT: %pattern_type.2e8: type = pattern_type %tuple.type.dd4 [concrete] // CHECK:STDOUT: %tuple.elem0.98b: ref %i32 = tuple_access imports.%a_ref.var, element0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.08e: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.014: %Int.as.Copy.impl.Op.type.08e = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.a2f: = impl_witness imports.%Copy.impl_witness_table.d6d, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.837: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.2b1: %Int.as.Copy.impl.Op.type.837 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.a2f) [concrete] -// CHECK:STDOUT: %.70e: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.67d: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.d31: type = fn_type_with_self_type %Copy.WithSelf.Op.type.67d, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.2b1, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %tuple.type.8c7: type = tuple_type (%tuple.type.85c, type) [concrete] // CHECK:STDOUT: %tuple.896: %tuple.type.8c7 = tuple_value (%tuple.38e, %i32) [concrete] @@ -135,12 +135,12 @@ fn F() -> (i32,) { // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete] // CHECK:STDOUT: %tuple.ad8: %tuple.type.f94 = tuple_value (%int_1.5b8, %int_2.ecc) [concrete] // CHECK:STDOUT: %ImplicitAs.type.ea1: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.ea0: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %ImplicitAs.impl_witness.574: = impl_witness imports.%ImplicitAs.impl_witness_table.4e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.dbb: 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.022: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.dbb = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.ea1 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.574) [concrete] -// CHECK:STDOUT: %.2f1: type = fn_type_with_self_type %ImplicitAs.Convert.type.ea0, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.7cd6: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.d94: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.7cd6, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a5: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.022 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.022, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.a7f: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -219,14 +219,14 @@ fn F() -> (i32,) { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc7_15.1: %tuple.type.f94 = tuple_literal (%int_1, %int_2) [concrete = constants.%tuple.ad8] -// CHECK:STDOUT: %impl.elem0.loc7_15.1: %.2f1 = impl_witness_access constants.%ImplicitAs.impl_witness.574, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.022] +// CHECK:STDOUT: %impl.elem0.loc7_15.1: %.d94 = impl_witness_access constants.%ImplicitAs.impl_witness.574, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.022] // CHECK:STDOUT: %bound_method.loc7_15.1: = bound_method %int_1, %impl.elem0.loc7_15.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a5] // CHECK:STDOUT: %specific_fn.loc7_15.1: = specific_function %impl.elem0.loc7_15.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_15.2: = bound_method %int_1, %specific_fn.loc7_15.1 [concrete = constants.%bound_method.a7f] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_15.1: init %i32 = call %bound_method.loc7_15.2(%int_1) [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc7_15.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7_15.1 [concrete = constants.%int_1.47b] // CHECK:STDOUT: %.loc7_15.3: %i32 = converted %int_1, %.loc7_15.2 [concrete = constants.%int_1.47b] -// CHECK:STDOUT: %impl.elem0.loc7_15.2: %.2f1 = impl_witness_access constants.%ImplicitAs.impl_witness.574, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.022] +// CHECK:STDOUT: %impl.elem0.loc7_15.2: %.d94 = impl_witness_access constants.%ImplicitAs.impl_witness.574, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.022] // CHECK:STDOUT: %bound_method.loc7_15.3: = bound_method %int_2, %impl.elem0.loc7_15.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.274] // CHECK:STDOUT: %specific_fn.loc7_15.2: = specific_function %impl.elem0.loc7_15.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc7_15.4: = bound_method %int_2, %specific_fn.loc7_15.2 [concrete = constants.%bound_method.622] @@ -245,7 +245,7 @@ fn F() -> (i32,) { // CHECK:STDOUT: %a_ref.ref: ref %tuple.type.dd4 = name_ref a_ref, imports.%Implicit.a_ref [concrete = imports.%a_ref.var] // CHECK:STDOUT: %tuple.elem0.loc5: ref %i32 = tuple_access %a_ref.ref, element0 [concrete = constants.%tuple.elem0.98b] // CHECK:STDOUT: %.loc5_17.1: %i32 = acquire_value %tuple.elem0.loc5 -// CHECK:STDOUT: %impl.elem0.loc5: %.70e = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] +// CHECK:STDOUT: %impl.elem0.loc5: %.d31 = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] // CHECK:STDOUT: %bound_method.loc5_17.1: = bound_method %.loc5_17.1, %impl.elem0.loc5 // CHECK:STDOUT: %specific_fn.loc5: = specific_function %impl.elem0.loc5, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc5_17.2: = bound_method %.loc5_17.1, %specific_fn.loc5 @@ -258,7 +258,7 @@ fn F() -> (i32,) { // CHECK:STDOUT: %tuple.elem0.loc6_38.2: ref %tuple.type.dd4 = tuple_access %tuple.elem0.loc6_38.1, element0 [concrete = constants.%tuple.elem0.934] // CHECK:STDOUT: %tuple.elem0.loc6_38.3: ref %i32 = tuple_access %tuple.elem0.loc6_38.2, element0 [concrete = constants.%tuple.elem0.32e] // CHECK:STDOUT: %.loc6_38.1: %i32 = acquire_value %tuple.elem0.loc6_38.3 -// CHECK:STDOUT: %impl.elem0.loc6_38.1: %.70e = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] +// CHECK:STDOUT: %impl.elem0.loc6_38.1: %.d31 = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] // CHECK:STDOUT: %bound_method.loc6_38.1: = bound_method %.loc6_38.1, %impl.elem0.loc6_38.1 // CHECK:STDOUT: %specific_fn.loc6_38.1: = specific_function %impl.elem0.loc6_38.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_38.2: = bound_method %.loc6_38.1, %specific_fn.loc6_38.1 @@ -270,7 +270,7 @@ fn F() -> (i32,) { // CHECK:STDOUT: %.loc6_38.4: init %tuple.type.dd4 to %tuple.elem0.loc6_38.5 = in_place_init %.loc6_38.3 // CHECK:STDOUT: %tuple.elem1.loc6_38.1: ref %i32 = tuple_access %tuple.elem0.loc6_38.1, element1 [concrete = constants.%tuple.elem1.1c3] // CHECK:STDOUT: %.loc6_38.5: %i32 = acquire_value %tuple.elem1.loc6_38.1 -// CHECK:STDOUT: %impl.elem0.loc6_38.2: %.70e = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] +// CHECK:STDOUT: %impl.elem0.loc6_38.2: %.d31 = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] // CHECK:STDOUT: %bound_method.loc6_38.3: = bound_method %.loc6_38.5, %impl.elem0.loc6_38.2 // CHECK:STDOUT: %specific_fn.loc6_38.2: = specific_function %impl.elem0.loc6_38.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_38.4: = bound_method %.loc6_38.5, %specific_fn.loc6_38.2 @@ -282,7 +282,7 @@ fn F() -> (i32,) { // CHECK:STDOUT: %tuple.elem1.loc6_38.3: ref %tuple.type.c2c = tuple_access %b_ref.ref, element1 [concrete = constants.%tuple.elem1.565] // CHECK:STDOUT: %tuple.elem0.loc6_38.6: ref %i32 = tuple_access %tuple.elem1.loc6_38.3, element0 [concrete = constants.%tuple.elem0.787] // CHECK:STDOUT: %.loc6_38.9: %i32 = acquire_value %tuple.elem0.loc6_38.6 -// CHECK:STDOUT: %impl.elem0.loc6_38.3: %.70e = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] +// CHECK:STDOUT: %impl.elem0.loc6_38.3: %.d31 = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] // CHECK:STDOUT: %bound_method.loc6_38.5: = bound_method %.loc6_38.9, %impl.elem0.loc6_38.3 // CHECK:STDOUT: %specific_fn.loc6_38.3: = specific_function %impl.elem0.loc6_38.3, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_38.6: = bound_method %.loc6_38.9, %specific_fn.loc6_38.3 @@ -292,7 +292,7 @@ fn F() -> (i32,) { // CHECK:STDOUT: %.loc6_38.10: init %i32 to %tuple.elem0.loc6_38.7 = in_place_init %Int.as.Copy.impl.Op.call.loc6_38.3 // CHECK:STDOUT: %tuple.elem1.loc6_38.5: ref %i32 = tuple_access %tuple.elem1.loc6_38.3, element1 [concrete = constants.%tuple.elem1.7b5] // CHECK:STDOUT: %.loc6_38.11: %i32 = acquire_value %tuple.elem1.loc6_38.5 -// CHECK:STDOUT: %impl.elem0.loc6_38.4: %.70e = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] +// CHECK:STDOUT: %impl.elem0.loc6_38.4: %.d31 = impl_witness_access constants.%Copy.impl_witness.a2f, element0 [concrete = constants.%Int.as.Copy.impl.Op.2b1] // CHECK:STDOUT: %bound_method.loc6_38.7: = bound_method %.loc6_38.11, %impl.elem0.loc6_38.4 // CHECK:STDOUT: %specific_fn.loc6_38.4: = specific_function %impl.elem0.loc6_38.4, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc6_38.8: = bound_method %.loc6_38.11, %specific_fn.loc6_38.4 @@ -325,16 +325,16 @@ fn F() -> (i32,) { // CHECK:STDOUT: %I.impl_witness: = impl_witness imports.%I.impl_witness_table [concrete] // CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%I.impl_witness) [concrete] // CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type @I [concrete] -// CHECK:STDOUT: %assoc0.5ae: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.ca6 [concrete] +// CHECK:STDOUT: %assoc0.d44: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.e4a [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound: = bound_method %int_1, %Int.as.Copy.impl.Op.664 [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: %bound_method: = bound_method %int_1, %Int.as.Copy.impl.Op.specific_fn [concrete] @@ -343,10 +343,10 @@ fn F() -> (i32,) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %Main.I: type = import_ref Main//symbolic_decl, I, loaded [concrete = constants.%I.type] // CHECK:STDOUT: %Main.C: type = import_ref Main//symbolic_decl, C, loaded [concrete = constants.%C] -// CHECK:STDOUT: %Main.import_ref.a8c: %I.assoc_type = import_ref Main//symbolic_decl, loc5_12, loaded [concrete = constants.%assoc0.5ae] +// CHECK:STDOUT: %Main.import_ref.f2d: %I.assoc_type = import_ref Main//symbolic_decl, loc5_12, loaded [concrete = constants.%assoc0.d44] // CHECK:STDOUT: %Main.import_ref.fd7: %tuple.type.a1c = import_ref Main//symbolic_decl, loc10_33, loaded [concrete = constants.%tuple.246] // CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (%Main.import_ref.fd7), @C.as.I.impl [concrete] -// CHECK:STDOUT: %Main.import_ref.ca6: %tuple.type.a1c = import_ref Main//symbolic_decl, loc5_12, loaded [concrete = %value] +// CHECK:STDOUT: %Main.import_ref.e4a: %tuple.type.a1c = import_ref Main//symbolic_decl, loc5_12, loaded [concrete = %value] // CHECK:STDOUT: %value: %tuple.type.a1c = assoc_const_decl @value [concrete] {} // CHECK:STDOUT: %Core.import_ref.18d: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.824) = 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.9b9)] // CHECK:STDOUT: %Copy.impl_witness_table.e76 = impl_witness_table (%Core.import_ref.18d), @Int.as.Copy.impl [concrete] @@ -360,10 +360,10 @@ fn F() -> (i32,) { // CHECK:STDOUT: %.loc7_13: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet] // CHECK:STDOUT: %as_type: type = facet_access_type %.loc7_13 [concrete = constants.%C] // CHECK:STDOUT: %.loc7_18.1: type = converted %.loc7_13, %as_type [concrete = constants.%C] -// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.a8c [concrete = constants.%assoc0.5ae] +// CHECK:STDOUT: %value.ref: %I.assoc_type = name_ref value, imports.%Main.import_ref.f2d [concrete = constants.%assoc0.d44] // CHECK:STDOUT: %impl.elem0.loc7_18.1: %tuple.type.a1c = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%tuple.246] // CHECK:STDOUT: %tuple.elem0: %i32 = tuple_access %impl.elem0.loc7_18.1, element0 [concrete = constants.%int_1] -// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0.loc7_18.2: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc7_18.1: = bound_method %tuple.elem0, %impl.elem0.loc7_18.2 [concrete = constants.%Int.as.Copy.impl.Op.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc7_18.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc7_18.2: = bound_method %tuple.elem0, %specific_fn [concrete = constants.%bound_method] diff --git a/toolchain/check/testdata/tuple/in_place_tuple_init.carbon b/toolchain/check/testdata/tuple/in_place_tuple_init.carbon index 9df9633e9797..381711418196 100644 --- a/toolchain/check/testdata/tuple/in_place_tuple_init.carbon +++ b/toolchain/check/testdata/tuple/in_place_tuple_init.carbon @@ -65,14 +65,14 @@ fn H() { // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete] // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete] -// CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.824: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic] // CHECK:STDOUT: %Int.as.Copy.impl.Op.9b9: %Int.as.Copy.impl.Op.type.824 = struct_value () [symbolic] // CHECK:STDOUT: %Copy.impl_witness.f17: = impl_witness imports.%Copy.impl_witness_table.e76, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.546: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.664: %Int.as.Copy.impl.Op.type.546 = struct_value () [concrete] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.f17) [concrete] -// CHECK:STDOUT: %.f79: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete] +// CHECK:STDOUT: %Copy.WithSelf.Op.type.081: type = fn_type @Copy.WithSelf.Op, @Copy(%Copy.facet) [concrete] +// CHECK:STDOUT: %.8e2: type = fn_type_with_self_type %Copy.WithSelf.Op.type.081, %Copy.facet [concrete] // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: = specific_function %Int.as.Copy.impl.Op.664, @Int.as.Copy.impl.Op(%int_32) [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -125,7 +125,7 @@ fn H() { // CHECK:STDOUT: %.loc15_12.2: ref %tuple.type.d07 = temporary %.loc15_12.1, %G.call // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %.loc15_12.2, element0 // CHECK:STDOUT: %.loc15_13: %i32 = acquire_value %tuple.elem0 -// CHECK:STDOUT: %impl.elem0: %.f79 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] +// CHECK:STDOUT: %impl.elem0: %.8e2 = impl_witness_access constants.%Copy.impl_witness.f17, element0 [concrete = constants.%Int.as.Copy.impl.Op.664] // CHECK:STDOUT: %bound_method.loc15_13.1: = bound_method %.loc15_13, %impl.elem0 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc15_13.2: = bound_method %.loc15_13, %specific_fn @@ -160,7 +160,6 @@ fn H() { // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete] // CHECK:STDOUT: %tuple.type.667: type = tuple_type (Core.IntLiteral, %tuple.type.189, Core.IntLiteral) [concrete] // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete] -// CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete] // CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic] @@ -168,7 +167,8 @@ fn H() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d: 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.0b5: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.e0d = struct_value () [concrete] // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.e8c = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.6bc) [concrete] -// CHECK:STDOUT: %.863: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete] +// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.b37: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs(%i32, %ImplicitAs.facet) [concrete] +// CHECK:STDOUT: %.545: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.b37, %ImplicitAs.facet [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5 [concrete] // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete] // CHECK:STDOUT: %bound_method.38b: = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete] @@ -243,7 +243,7 @@ fn H() { // CHECK:STDOUT: %F.call: init %tuple.type.189 to %tuple.elem1 = call %F.ref() // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc] // CHECK:STDOUT: %.loc13_50.1: %tuple.type.667 = tuple_literal (%int_1, %F.call, %int_2) -// CHECK:STDOUT: %impl.elem0.loc13_50.1: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc13_50.1: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_50.1: = bound_method %int_1, %impl.elem0.loc13_50.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215] // CHECK:STDOUT: %specific_fn.loc13_50.1: = specific_function %impl.elem0.loc13_50.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_50.2: = bound_method %int_1, %specific_fn.loc13_50.1 [concrete = constants.%bound_method.38b] @@ -251,7 +251,7 @@ fn H() { // CHECK:STDOUT: %.loc13_50.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_50.1 [concrete = constants.%int_1.5d2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %v.var, element0 // CHECK:STDOUT: %.loc13_50.3: init %i32 to %tuple.elem0 = in_place_init %.loc13_50.2 [concrete = constants.%int_1.5d2] -// CHECK:STDOUT: %impl.elem0.loc13_50.2: %.863 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] +// CHECK:STDOUT: %impl.elem0.loc13_50.2: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5] // CHECK:STDOUT: %bound_method.loc13_50.3: = bound_method %int_2, %impl.elem0.loc13_50.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5] // CHECK:STDOUT: %specific_fn.loc13_50.2: = specific_function %impl.elem0.loc13_50.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn] // CHECK:STDOUT: %bound_method.loc13_50.4: = bound_method %int_2, %specific_fn.loc13_50.2 [concrete = constants.%bound_method.646] diff --git a/toolchain/check/testdata/var/var_pattern.carbon b/toolchain/check/testdata/var/var_pattern.carbon index 0e3c063e3f38..3eed5cd4e83c 100644 --- a/toolchain/check/testdata/var/var_pattern.carbon +++ b/toolchain/check/testdata/var/var_pattern.carbon @@ -615,15 +615,17 @@ fn G() { // CHECK:STDOUT: %F: %F.type = struct_value () [concrete] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete] // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete] +// CHECK:STDOUT: %Self: %Destroy.type = symbolic_binding Self, 0 [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.cb2: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Self) [symbolic] +// CHECK:STDOUT: %Destroy.WithSelf.Op.9f1: %Destroy.WithSelf.Op.type.cb2 = struct_value () [symbolic] // CHECK:STDOUT: %Destroy.assoc_type: type = assoc_entity_type @Destroy [concrete] -// CHECK:STDOUT: %assoc0: %Destroy.assoc_type = assoc_entity element0, imports.%Core.import_ref.971 [concrete] -// CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete] -// CHECK:STDOUT: %Destroy.Op: %Destroy.Op.type = struct_value () [concrete] +// CHECK:STDOUT: %assoc0: %Destroy.assoc_type = assoc_entity element0, imports.%Core.import_ref.8bb [concrete] // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete] // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete] // CHECK:STDOUT: %custom_witness.809: = custom_witness (%DestroyOp), @Destroy [concrete] // CHECK:STDOUT: %Destroy.facet.f34: %Destroy.type = facet_value %empty_tuple.type, (%custom_witness.809) [concrete] -// CHECK:STDOUT: %.5dd: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.f34 [concrete] +// CHECK:STDOUT: %Destroy.WithSelf.Op.type.b8c: type = fn_type @Destroy.WithSelf.Op, @Destroy(%Destroy.facet.f34) [concrete] +// CHECK:STDOUT: %.fef: type = fn_type_with_self_type %Destroy.WithSelf.Op.type.b8c, %Destroy.facet.f34 [concrete] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -638,8 +640,8 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: %P.F: %F.type = import_ref P//default, F, loaded [concrete = constants.%F] // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/parts/destroy, Destroy, loaded [concrete = constants.%Destroy.type] -// CHECK:STDOUT: %Core.import_ref.446: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc0] -// CHECK:STDOUT: %Core.import_ref.971: %Destroy.Op.type = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [concrete = constants.%Destroy.Op] +// CHECK:STDOUT: %Core.import_ref.06b: %Destroy.assoc_type = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [concrete = constants.%assoc0] +// CHECK:STDOUT: %Core.import_ref.8bb: @Destroy.%Destroy.WithSelf.Op.type (%Destroy.WithSelf.Op.type.cb2) = import_ref Core//prelude/parts/destroy, loc{{\d+_\d+}}, loaded [symbolic = @Destroy.%Destroy.WithSelf.Op (constants.%Destroy.WithSelf.Op.9f1)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -666,8 +668,8 @@ fn G() { // CHECK:STDOUT: %.2: init %empty_tuple.type = converted %.loc7_12.1, %.loc7_12.2 [concrete = constants.%empty_tuple] // CHECK:STDOUT: %.3: ref %empty_tuple.type = temporary %.1, %.2 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref(%.loc7_8.2, %.3) -// CHECK:STDOUT: %Op.ref: %Destroy.assoc_type = name_ref Op, imports.%Core.import_ref.446 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0: %.5dd = impl_witness_access constants.%custom_witness.809, element0 [concrete = constants.%DestroyOp] +// CHECK:STDOUT: %Op.ref: %Destroy.assoc_type = name_ref Op, imports.%Core.import_ref.06b [concrete = constants.%assoc0] +// CHECK:STDOUT: %impl.elem0: %.fef = impl_witness_access constants.%custom_witness.809, element0 [concrete = constants.%DestroyOp] // CHECK:STDOUT: %bound_method: = bound_method %.3, %impl.elem0 // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %bound_method(%.3) // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/where_expr/designator.carbon b/toolchain/check/testdata/where_expr/designator.carbon index 57b108015d14..bb24e303a49e 100644 --- a/toolchain/check/testdata/where_expr/designator.carbon +++ b/toolchain/check/testdata/where_expr/designator.carbon @@ -34,7 +34,7 @@ interface J { let Member:! type; } -// CHECK:STDERR: fail_wrong_member.carbon:[[@LINE+4]]:31: error: member name `Mismatch` not found in `J` [MemberNameNotFoundInInstScope] +// CHECK:STDERR: fail_wrong_member.carbon:[[@LINE+4]]:31: error: member name `Mismatch` not found in `J` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: fn PeriodMismatch(W:! J where .Mismatch = {}); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: diff --git a/toolchain/check/testdata/where_expr/dot_self_impls.carbon b/toolchain/check/testdata/where_expr/dot_self_impls.carbon index 0dfa1bcca5ba..d177f5a09748 100644 --- a/toolchain/check/testdata/where_expr/dot_self_impls.carbon +++ b/toolchain/check/testdata/where_expr/dot_self_impls.carbon @@ -72,7 +72,7 @@ interface J { } fn INotJ(T:! I where .Self impls J) { - // CHECK:STDERR: fail_name_lookup_through_where_self_impls.carbon:[[@LINE+4]]:3: error: member name `G` not found in `I` [MemberNameNotFoundInInstScope] + // CHECK:STDERR: fail_name_lookup_through_where_self_impls.carbon:[[@LINE+4]]:3: error: member name `G` not found in `I` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: T.G(); // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -101,13 +101,13 @@ interface A {} interface B { fn Bfn(); } fn F(T:! A & B) { - // CHECK:STDERR: fail_facet_type_simple_member_access.carbon:[[@LINE+4]]:6: error: member name `Bfn` not found in `A` [MemberNameNotFoundInInstScope] + // CHECK:STDERR: fail_facet_type_simple_member_access.carbon:[[@LINE+4]]:6: error: member name `Bfn` not found in `A` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: T.((A where .Self impls B).Bfn)(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: T.((A where .Self impls B).Bfn)(); - // CHECK:STDERR: fail_facet_type_simple_member_access.carbon:[[@LINE+4]]:3: error: member name `Bfn` not found in `A` [MemberNameNotFoundInInstScope] + // CHECK:STDERR: fail_facet_type_simple_member_access.carbon:[[@LINE+4]]:3: error: member name `Bfn` not found in `A` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: (A where .Self impls B).Bfn; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -128,13 +128,13 @@ interface J { } fn INotJ[T:! I where .Self impls J](x: T) { - // CHECK:STDERR: fail_name_lookup_instance.carbon:[[@LINE+4]]:3: error: member name `GNonInstance` not found in `I` [MemberNameNotFoundInInstScope] + // CHECK:STDERR: fail_name_lookup_instance.carbon:[[@LINE+4]]:3: error: member name `GNonInstance` not found in `I` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: x.GNonInstance(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: x.GNonInstance(); - // CHECK:STDERR: fail_name_lookup_instance.carbon:[[@LINE+4]]:3: error: member name `GSelf` not found in `I` [MemberNameNotFoundInInstScope] + // CHECK:STDERR: fail_name_lookup_instance.carbon:[[@LINE+4]]:3: error: member name `GSelf` not found in `I` [MemberNameNotFoundInSpecificScope] // CHECK:STDERR: x.GSelf(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: diff --git a/toolchain/check/testdata/where_expr/dot_self_index.carbon b/toolchain/check/testdata/where_expr/dot_self_index.carbon index 0d819846b6b3..81eac161ed3d 100644 --- a/toolchain/check/testdata/where_expr/dot_self_index.carbon +++ b/toolchain/check/testdata/where_expr/dot_self_index.carbon @@ -35,7 +35,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %Empty.type.6f76f1.2: type = facet_type <@Empty, @Empty(%T)> [symbolic] // CHECK:STDOUT: %.Self.b4b: %Empty.type.6f76f1.2 = symbolic_binding .Self [symbolic] // CHECK:STDOUT: %Empty.assoc_type.ce4b5a.2: type = assoc_entity_type @Empty, @Empty(%T) [symbolic] -// CHECK:STDOUT: %assoc0.a20ab5.2: %Empty.assoc_type.ce4b5a.2 = assoc_entity element0, @Empty.%A [symbolic] +// CHECK:STDOUT: %assoc0.beb632.2: %Empty.assoc_type.ce4b5a.2 = assoc_entity element0, @Empty.%A [symbolic] // CHECK:STDOUT: %require_complete.8eb: = require_complete_type %Empty.type.6f76f1.2 [symbolic] // CHECK:STDOUT: %.Self.binding.as_type.b61: type = symbolic_binding_type .Self, %.Self.b4b [symbolic] // CHECK:STDOUT: %Empty.lookup_impl_witness.177: = lookup_impl_witness %.Self.b4b, @Empty, @Empty(%T) [symbolic] @@ -52,7 +52,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %Empty.type.4fb: type = facet_type <@Empty, @Empty(%i32)> [concrete] // CHECK:STDOUT: %.Self.ec6: %Empty.type.4fb = symbolic_binding .Self [symbolic_self] // CHECK:STDOUT: %Empty.assoc_type.623: type = assoc_entity_type @Empty, @Empty(%i32) [concrete] -// CHECK:STDOUT: %assoc0.333: %Empty.assoc_type.623 = assoc_entity element0, @Empty.%A [concrete] +// CHECK:STDOUT: %assoc0.edc: %Empty.assoc_type.623 = assoc_entity element0, @Empty.%A [concrete] // CHECK:STDOUT: %.Self.binding.as_type.63c: type = symbolic_binding_type .Self, %.Self.ec6 [symbolic_self] // CHECK:STDOUT: %Empty.lookup_impl_witness.924: = lookup_impl_witness %.Self.ec6, @Empty, @Empty(%i32) [symbolic_self] // CHECK:STDOUT: %impl.elem0.238: type = impl_witness_access %Empty.lookup_impl_witness.924, element0 [symbolic_self] @@ -84,8 +84,8 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %.Self.ref: @H.%Empty.type.loc21_26.1 (%Empty.type.6f76f1.2) = name_ref .Self, %.Self.4 [symbolic = %.Self.1 (constants.%.Self.b4b)] // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.b61)] // CHECK:STDOUT: %.loc21_34.1: type = converted %.Self.ref, %.Self.as_type [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.b61)] -// CHECK:STDOUT: %.loc21_34.2: @H.%Empty.assoc_type (%Empty.assoc_type.ce4b5a.2) = specific_constant @A.%assoc0, @Empty(constants.%T) [symbolic = %assoc0 (constants.%assoc0.a20ab5.2)] -// CHECK:STDOUT: %A.ref: @H.%Empty.assoc_type (%Empty.assoc_type.ce4b5a.2) = name_ref A, %.loc21_34.2 [symbolic = %assoc0 (constants.%assoc0.a20ab5.2)] +// CHECK:STDOUT: %.loc21_34.2: @H.%Empty.assoc_type (%Empty.assoc_type.ce4b5a.2) = specific_constant @A.%assoc0, @Empty(constants.%T, constants.%.Self.b4b) [symbolic = %assoc0 (constants.%assoc0.beb632.2)] +// CHECK:STDOUT: %A.ref: @H.%Empty.assoc_type (%Empty.assoc_type.ce4b5a.2) = name_ref A, %.loc21_34.2 [symbolic = %assoc0 (constants.%assoc0.beb632.2)] // CHECK:STDOUT: %impl.elem0.loc21_34.2: type = impl_witness_access constants.%Empty.lookup_impl_witness.177, element0 [symbolic = %impl.elem0.loc21_34.1 (constants.%impl.elem0.de5)] // CHECK:STDOUT: %T.ref.loc21_39: type = name_ref T, %T.loc21_6.2 [symbolic = %T.loc21_6.1 (constants.%T)] // CHECK:STDOUT: %ptr.loc21_40.2: type = ptr_type %T.ref.loc21_39 [symbolic = %ptr.loc21_40.1 (constants.%ptr.e8f)] @@ -107,7 +107,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %require_complete.loc21_34: = require_complete_type %Empty.type.loc21_26.1 [symbolic = %require_complete.loc21_34 (constants.%require_complete.8eb)] // CHECK:STDOUT: %.Self.binding.as_type: type = symbolic_binding_type .Self, %.Self.1 [symbolic = %.Self.binding.as_type (constants.%.Self.binding.as_type.b61)] // CHECK:STDOUT: %Empty.assoc_type: type = assoc_entity_type @Empty, @Empty(%T.loc21_6.1) [symbolic = %Empty.assoc_type (constants.%Empty.assoc_type.ce4b5a.2)] -// CHECK:STDOUT: %assoc0: @H.%Empty.assoc_type (%Empty.assoc_type.ce4b5a.2) = assoc_entity element0, @Empty.%A [symbolic = %assoc0 (constants.%assoc0.a20ab5.2)] +// CHECK:STDOUT: %assoc0: @H.%Empty.assoc_type (%Empty.assoc_type.ce4b5a.2) = assoc_entity element0, @Empty.%A [symbolic = %assoc0 (constants.%assoc0.beb632.2)] // CHECK:STDOUT: %Empty.lookup_impl_witness: = lookup_impl_witness %.Self.1, @Empty, @Empty(%T.loc21_6.1) [symbolic = %Empty.lookup_impl_witness (constants.%Empty.lookup_impl_witness.177)] // CHECK:STDOUT: %impl.elem0.loc21_34.1: type = impl_witness_access %Empty.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_34.1 (constants.%impl.elem0.de5)] // CHECK:STDOUT: %ptr.loc21_40.1: type = ptr_type %T.loc21_6.1 [symbolic = %ptr.loc21_40.1 (constants.%ptr.e8f)] @@ -131,7 +131,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %require_complete.loc21_34 => constants.%require_complete.8eb // CHECK:STDOUT: %.Self.binding.as_type => constants.%.Self.binding.as_type.b61 // CHECK:STDOUT: %Empty.assoc_type => constants.%Empty.assoc_type.ce4b5a.2 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.a20ab5.2 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.beb632.2 // CHECK:STDOUT: %Empty.lookup_impl_witness => constants.%Empty.lookup_impl_witness.177 // CHECK:STDOUT: %impl.elem0.loc21_34.1 => constants.%impl.elem0.de5 // CHECK:STDOUT: %ptr.loc21_40.1 => constants.%ptr.e8f @@ -147,7 +147,7 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %require_complete.loc21_34 => constants.%complete_type.ba8 // CHECK:STDOUT: %.Self.binding.as_type => constants.%.Self.binding.as_type.63c // CHECK:STDOUT: %Empty.assoc_type => constants.%Empty.assoc_type.623 -// CHECK:STDOUT: %assoc0 => constants.%assoc0.333 +// CHECK:STDOUT: %assoc0 => constants.%assoc0.edc // CHECK:STDOUT: %Empty.lookup_impl_witness => constants.%Empty.lookup_impl_witness.924 // CHECK:STDOUT: %impl.elem0.loc21_34.1 => constants.%impl.elem0.238 // CHECK:STDOUT: %ptr.loc21_40.1 => constants.%ptr.235 diff --git a/toolchain/check/type_completion.cpp b/toolchain/check/type_completion.cpp index 0e772dcbb368..e25cc7c28e65 100644 --- a/toolchain/check/type_completion.cpp +++ b/toolchain/check/type_completion.cpp @@ -12,7 +12,6 @@ #include "toolchain/check/generic.h" #include "toolchain/check/inst.h" #include "toolchain/check/literal.h" -#include "toolchain/check/require_impls.h" #include "toolchain/check/type.h" #include "toolchain/diagnostics/format_providers.h" #include "toolchain/sem_ir/constant.h" @@ -89,6 +88,31 @@ static auto NoteIncompleteNamedConstraint( } } +// TODO: Have the resolved specific know whether any instructions in the +// declaration or definition contain an ErrorInst, instead of having to do a +// linear scan here. +static auto SpecificContainsError(Context& context, + SemIR::SpecificId specific_id) -> bool { + if (!specific_id.has_value()) { + return false; + } + + const auto& specific = context.specifics().Get(specific_id); + auto block_ids = {specific.decl_block_id, specific.definition_block_id}; + + for (auto block_id : block_ids) { + if (block_id.has_value()) { + for (auto inst_id : context.inst_blocks().Get(block_id)) { + if (context.constant_values().Get(inst_id) == + SemIR::ErrorInst::ConstantId) { + return true; + } + } + } + } + return false; +} + static auto RequireCompleteFacetType(Context& context, SemIR::LocId loc_id, const SemIR::FacetType& facet_type, MakeDiagnosticBuilderFn diagnoser) @@ -96,6 +120,17 @@ static auto RequireCompleteFacetType(Context& context, SemIR::LocId loc_id, const auto& facet_type_info = context.facet_types().Get(facet_type.facet_type_id); + // TODO: Constructing specifics can produce monomorphization errors, which + // we want to connect back to here. Instead, we should be plumbing the + // `diagnoser` through the construction of the specifics. + auto note_completing_facet_type = [&](auto& builder) { + CARBON_DIAGNOSTIC(RequiringCompleteFacetTypeHere, Note, + "checking for complete facet type {0} here", + SemIR::FacetTypeId); + builder.Note(loc_id, RequiringCompleteFacetTypeHere, + facet_type.facet_type_id); + }; + for (auto extends : facet_type_info.extend_constraints) { auto interface_id = extends.interface_id; const auto& interface = context.interfaces().Get(interface_id); @@ -108,7 +143,25 @@ static auto RequireCompleteFacetType(Context& context, SemIR::LocId loc_id, return false; } if (interface.generic_id.has_value()) { + Diagnostics::AnnotationScope annotate_diagnostics( + &context.emitter(), note_completing_facet_type); ResolveSpecificDefinition(context, loc_id, extends.specific_id); + if (SpecificContainsError(context, extends.specific_id)) { + return false; + } + } + + auto interface_with_self_self_specific_args = context.inst_blocks().Get( + context.specifics().GetArgsOrEmpty(context.generics().GetSelfSpecific( + interface.generic_with_self_id))); + auto self_facet = interface_with_self_self_specific_args.back(); + Diagnostics::AnnotationScope annotate_diagnostics( + &context.emitter(), note_completing_facet_type); + auto interface_with_self_specific_id = MakeSpecificWithInnerSelf( + context, loc_id, interface.generic_id, interface.generic_with_self_id, + extends.specific_id, context.constant_values().Get(self_facet)); + if (SpecificContainsError(context, interface_with_self_specific_id)) { + return false; } } @@ -125,7 +178,25 @@ static auto RequireCompleteFacetType(Context& context, SemIR::LocId loc_id, return false; } if (constraint.generic_id.has_value()) { + Diagnostics::AnnotationScope annotate_diagnostics( + &context.emitter(), note_completing_facet_type); ResolveSpecificDefinition(context, loc_id, extends.specific_id); + if (SpecificContainsError(context, extends.specific_id)) { + return false; + } + } + + auto constraint_with_self_self_specific_args = context.inst_blocks().Get( + context.specifics().GetArgsOrEmpty(context.generics().GetSelfSpecific( + constraint.generic_with_self_id))); + auto self_facet = constraint_with_self_self_specific_args.back(); + Diagnostics::AnnotationScope annotate_diagnostics( + &context.emitter(), note_completing_facet_type); + auto constraint_with_self_specific_id = MakeSpecificWithInnerSelf( + context, loc_id, constraint.generic_id, constraint.generic_with_self_id, + extends.specific_id, context.constant_values().Get(self_facet)); + if (SpecificContainsError(context, constraint_with_self_specific_id)) { + return false; } } @@ -784,27 +855,13 @@ auto RequireConcreteType(Context& context, SemIR::TypeId type_id, // Require all named constraints in the facet type are identified. For a named // constraint, this means the constraint definition is complete. -static auto RequireIdentifiedNamedConstraints( - Context& context, const SemIR::FacetTypeInfo& facet_type_info, +static auto RequireCompleteNamedConstraint( + Context& context, SemIR::LocId loc_id, + SemIR::NamedConstraintId constraint_id, SemIR::SpecificId specific_id, MakeDiagnosticBuilderFn diagnoser) -> bool { - auto named_constraint_ids = llvm::map_range( - llvm::concat( - facet_type_info.extend_named_constraints, - facet_type_info.self_impls_named_constraints), - [](SemIR::SpecificNamedConstraint s) { return s.named_constraint_id; }); - for (auto named_constraint_id : named_constraint_ids) { - const auto& constraint = - context.named_constraints().Get(named_constraint_id); - if (!constraint.is_complete()) { - if (diagnoser) { - auto builder = diagnoser(); - NoteIncompleteNamedConstraint(context, named_constraint_id, builder); - builder.Emit(); - } - return false; - } - } - return true; + auto facet_type = + FacetTypeFromNamedConstraint(context, constraint_id, specific_id); + return RequireCompleteFacetType(context, loc_id, facet_type, diagnoser); } static auto GetSelfFacetValue(Context& context, SemIR::ConstantId self_const_id) @@ -874,11 +931,6 @@ auto RequireIdentifiedFacetType(Context& context, SemIR::LocId loc_id, const auto& facet_type_info = context.facet_types().Get(next_impls.facet_type); - if (!RequireIdentifiedNamedConstraints(context, facet_type_info, - diagnoser)) { - return SemIR::IdentifiedFacetTypeId::None; - } - auto self_and_interface = [&](SemIR::SpecificInterface interface) -> SemIR::IdentifiedFacetType::RequiredImpl { return {self_const_id, interface}; @@ -897,40 +949,61 @@ auto RequireIdentifiedFacetType(Context& context, SemIR::LocId loc_id, llvm::map_range(facet_type_info.self_impls_constraints, self_and_interface)); - // Constructing specifics for `require` decls can produce monomorphization - // errors, which we want to connect back to here. - Diagnostics::AnnotationScope annotate_diagnostics( - &context.emitter(), [&](auto& builder) { - CARBON_DIAGNOSTIC(IdentifyingFacetTypeHere, Note, - "identifying facet type {0} here", - SemIR::FacetTypeId); - builder.Note(loc_id, IdentifyingFacetTypeHere, - facet_type.facet_type_id); - }); - if (facet_type_info.extend_named_constraints.empty() && facet_type_info.self_impls_named_constraints.empty()) { continue; } + // TODO: Constructing specifics can produce monomorphization errors, which + // we want to connect back to here. Instead, we should be plumbing the + // `diagnoser` through the construction of the specifics. + auto note_identifying_facet_type = [&](auto& builder) { + CARBON_DIAGNOSTIC(IdentifyingFacetTypeHere, Note, + "identifying facet type {0} here", SemIR::FacetTypeId); + builder.Note(loc_id, IdentifyingFacetTypeHere, facet_type.facet_type_id); + }; + + // References to a named constraint require the constraint to be complete so + // that we can enumerate all the required interfaces within. + for (auto specific_constraint : + llvm::concat( + facet_type_info.extend_named_constraints, + facet_type_info.self_impls_named_constraints)) { + if (!RequireCompleteNamedConstraint( + context, loc_id, specific_constraint.named_constraint_id, + specific_constraint.specific_id, diagnoser)) { + return SemIR::IdentifiedFacetTypeId::None; + } + } + // The self may have type TypeType. But the `Self` in a generic require decl // has type FacetType, so we need something similar to replace it in the // specific. - auto self_facet_value = GetSelfFacetValue(context, self_const_id); + auto self_facet = GetSelfFacetValue(context, self_const_id); for (auto extends : facet_type_info.extend_named_constraints) { const auto& constraint = context.named_constraints().Get(extends.named_constraint_id); + auto constraint_with_self_specific_id = MakeSpecificWithInnerSelf( + context, loc_id, constraint.generic_id, + constraint.generic_with_self_id, extends.specific_id, self_facet); + for (auto require_impls_id : context.require_impls_blocks().Get( constraint.require_impls_block_id)) { const auto& require = context.require_impls().Get(require_impls_id); - auto require_specific = - GetRequireImplsSpecificFromEnclosingSpecificWithSelfFacetValue( - context, require, extends.specific_id, self_facet_value); - auto require_self = GetConstantValueInRequireImplsSpecific( - context, require_specific, require.self_id); - auto require_facet_type = GetConstantValueInRequireImplsSpecific( - context, require_specific, require.facet_type_inst_id); + + // Each require is in its own generic, with no additional bindings and + // no definition, so that they can have their specifics independently + // instantiated. + Diagnostics::AnnotationScope annotate_diagnostics( + &context.emitter(), note_identifying_facet_type); + auto require_specific_id = CopySpecificToGeneric( + context, SemIR::LocId(require.decl_id), + constraint_with_self_specific_id, require.generic_id); + auto require_self = GetConstantValueInSpecific( + context.sem_ir(), require_specific_id, require.self_id); + auto require_facet_type = GetConstantValueInSpecific( + context.sem_ir(), require_specific_id, require.facet_type_inst_id); if (require_self == SemIR::ErrorInst::ConstantId || require_facet_type == SemIR::ErrorInst::ConstantId) { return SemIR::IdentifiedFacetTypeId::None; @@ -953,16 +1026,26 @@ auto RequireIdentifiedFacetType(Context& context, SemIR::LocId loc_id, for (auto impls : facet_type_info.self_impls_named_constraints) { const auto& constraint = context.named_constraints().Get(impls.named_constraint_id); + auto constraint_with_self_specific_id = MakeSpecificWithInnerSelf( + context, loc_id, constraint.generic_id, + constraint.generic_with_self_id, impls.specific_id, self_facet); + for (auto require_impls_id : context.require_impls_blocks().Get( constraint.require_impls_block_id)) { const auto& require = context.require_impls().Get(require_impls_id); - auto require_specific = - GetRequireImplsSpecificFromEnclosingSpecificWithSelfFacetValue( - context, require, impls.specific_id, self_facet_value); - auto require_self = GetConstantValueInRequireImplsSpecific( - context, require_specific, require.self_id); - auto require_facet_type = GetConstantValueInRequireImplsSpecific( - context, require_specific, require.facet_type_inst_id); + + // Each require is in its own generic, with no additional bindings and + // no definition, so that they can have their specifics independently + // instantiated. + Diagnostics::AnnotationScope annotate_diagnostics( + &context.emitter(), note_identifying_facet_type); + auto require_specific_id = CopySpecificToGeneric( + context, SemIR::LocId(require.decl_id), + constraint_with_self_specific_id, require.generic_id); + auto require_self = GetConstantValueInSpecific( + context.sem_ir(), require_specific_id, require.self_id); + auto require_facet_type = GetConstantValueInSpecific( + context.sem_ir(), require_specific_id, require.facet_type_inst_id); if (require_self == SemIR::ErrorInst::ConstantId || require_facet_type == SemIR::ErrorInst::ConstantId) { return SemIR::IdentifiedFacetTypeId::None; diff --git a/toolchain/diagnostics/kind.def b/toolchain/diagnostics/kind.def index ba2a5afcbaff..e2f983c7ba3e 100644 --- a/toolchain/diagnostics/kind.def +++ b/toolchain/diagnostics/kind.def @@ -549,6 +549,7 @@ CARBON_DIAGNOSTIC_KIND(FacetTypeRequiredForTypeAndOperator) // Facet type completeness. CARBON_DIAGNOSTIC_KIND(IdentifyingFacetTypeHere) +CARBON_DIAGNOSTIC_KIND(RequiringCompleteFacetTypeHere) // Generics. CARBON_DIAGNOSTIC_KIND(GenericMissingExplicitParameters) diff --git a/toolchain/lower/mangler.cpp b/toolchain/lower/mangler.cpp index cd6716967bc8..5d2cb6f58350 100644 --- a/toolchain/lower/mangler.cpp +++ b/toolchain/lower/mangler.cpp @@ -81,9 +81,13 @@ auto Mangler::MangleInverseQualifiedNameScope(llvm::raw_ostream& os, auto impl_target = identified.impl_as_target_interface(); const auto& interface = sem_ir().interfaces().Get(impl_target.interface_id); - names_to_render.push_back({.name_scope_id = interface.scope_id, - .specific_id = impl_target.specific_id, - .prefix = ':'}); + names_to_render.push_back( + // We mangle names in an interface without `Self` in the specific + // since it would just add noise and `Self` is not part of how you + // name the entities syntactically. + {.name_scope_id = interface.scope_without_self_id, + .specific_id = impl_target.specific_id, + .prefix = ':'}); auto self_const_inst_id = constant_values().GetConstantInstId(impl.self_id); diff --git a/toolchain/lower/testdata/for/break_continue.carbon b/toolchain/lower/testdata/for/break_continue.carbon index 40b952b97da5..11444c60e57f 100644 --- a/toolchain/lower/testdata/for/break_continue.carbon +++ b/toolchain/lower/testdata/for/break_continue.carbon @@ -49,11 +49,11 @@ fn For() { // CHECK:STDOUT: for.next: ; preds = %if.else.loc22, %if.then.loc22, %entry // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_33.1.temp), !dbg !8 // CHECK:STDOUT: call void @"_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %.loc20_33.1.temp, ptr %.loc20_32.1.temp, ptr %var), !dbg !8 -// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.a88acd4c94838316(ptr %.loc20_33.1.temp), !dbg !8 +// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.b7e68ec37a94670c(ptr %.loc20_33.1.temp), !dbg !8 // CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !8 // CHECK:STDOUT: // CHECK:STDOUT: for.body: ; preds = %for.next -// CHECK:STDOUT: %Optional.Get.call = call i32 @_CGet.Optional.Core.a88acd4c94838316(ptr %.loc20_33.1.temp), !dbg !8 +// CHECK:STDOUT: %Optional.Get.call = call i32 @_CGet.Optional.Core.b7e68ec37a94670c(ptr %.loc20_33.1.temp), !dbg !8 // CHECK:STDOUT: %F.call = call i1 @_CF.Main(), !dbg !9 // CHECK:STDOUT: br i1 %F.call, label %if.then.loc21, label %if.else.loc21, !dbg !10 // CHECK:STDOUT: @@ -102,22 +102,22 @@ fn For() { // CHECK:STDOUT: 6: ; preds = %0 // CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !39 // CHECK:STDOUT: %7 = load i32, ptr %1, align 4, !dbg !40 -// CHECK:STDOUT: call void @_CSome.Optional.Core.a88acd4c94838316(ptr %return, i32 %7), !dbg !41 +// CHECK:STDOUT: call void @_CSome.Optional.Core.b7e68ec37a94670c(ptr %return, i32 %7), !dbg !41 // CHECK:STDOUT: ret void, !dbg !42 // CHECK:STDOUT: // CHECK:STDOUT: 8: ; preds = %0 -// CHECK:STDOUT: call void @_CNone.Optional.Core.a88acd4c94838316(ptr %return), !dbg !43 +// CHECK:STDOUT: call void @_CNone.Optional.Core.b7e68ec37a94670c(ptr %return), !dbg !43 // CHECK:STDOUT: ret void, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.a88acd4c94838316(ptr %self) #0 !dbg !45 { +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.b7e68ec37a94670c(ptr %self) #0 !dbg !45 { // CHECK:STDOUT: %1 = call i1 @"_CHas.3e8267224c5dc9c2:OptionalStorage.Core.32fa7206ac42c9b7"(ptr %self), !dbg !51 // CHECK:STDOUT: ret i1 %1, !dbg !52 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.a88acd4c94838316(ptr %self) #0 !dbg !53 { +// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.b7e68ec37a94670c(ptr %self) #0 !dbg !53 { // CHECK:STDOUT: %1 = call i32 @"_CGet.3e8267224c5dc9c2:OptionalStorage.Core.32fa7206ac42c9b7"(ptr %self), !dbg !56 // CHECK:STDOUT: ret i32 %1, !dbg !57 // CHECK:STDOUT: } @@ -131,13 +131,13 @@ fn For() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.a88acd4c94838316(ptr sret({ i32, i1 }) %return, i32 %value) #0 !dbg !66 { +// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.b7e68ec37a94670c(ptr sret({ i32, i1 }) %return, i32 %value) #0 !dbg !66 { // CHECK:STDOUT: call void @"_CSome.3e8267224c5dc9c2:OptionalStorage.Core.32fa7206ac42c9b7"(ptr %return, i32 %value), !dbg !71 // CHECK:STDOUT: ret void, !dbg !72 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.a88acd4c94838316(ptr sret({ i32, i1 }) %return) #0 !dbg !73 { +// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.b7e68ec37a94670c(ptr sret({ i32, i1 }) %return) #0 !dbg !73 { // CHECK:STDOUT: call void @"_CNone.3e8267224c5dc9c2:OptionalStorage.Core.32fa7206ac42c9b7"(ptr %return), !dbg !76 // CHECK:STDOUT: ret void, !dbg !77 // CHECK:STDOUT: } @@ -242,7 +242,7 @@ fn For() { // CHECK:STDOUT: !42 = !DILocation(line: 30, column: 9, scope: !28) // CHECK:STDOUT: !43 = !DILocation(line: 32, column: 16, scope: !28) // CHECK:STDOUT: !44 = !DILocation(line: 32, column: 9, scope: !28) -// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.a88acd4c94838316", scope: null, file: !46, line: 32, type: !47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !49) +// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.b7e68ec37a94670c", scope: null, file: !46, line: 32, type: !47, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !49) // CHECK:STDOUT: !46 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !47 = !DISubroutineType(types: !48) // CHECK:STDOUT: !48 = !{!23, !23} @@ -250,7 +250,7 @@ fn For() { // CHECK:STDOUT: !50 = !DILocalVariable(arg: 1, scope: !45, type: !23) // CHECK:STDOUT: !51 = !DILocation(line: 33, column: 12, scope: !45) // CHECK:STDOUT: !52 = !DILocation(line: 33, column: 5, scope: !45) -// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.a88acd4c94838316", scope: null, file: !46, line: 35, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !54) +// CHECK:STDOUT: !53 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.b7e68ec37a94670c", scope: null, file: !46, line: 35, type: !20, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !54) // CHECK:STDOUT: !54 = !{!55} // CHECK:STDOUT: !55 = !DILocalVariable(arg: 1, scope: !53, type: !23) // CHECK:STDOUT: !56 = !DILocation(line: 36, column: 12, scope: !53) @@ -263,14 +263,14 @@ fn For() { // CHECK:STDOUT: !63 = !DILocalVariable(arg: 1, scope: !58, type: !22) // CHECK:STDOUT: !64 = !DILocation(line: 343, column: 5, scope: !58) // CHECK:STDOUT: !65 = !DILocation(line: 341, column: 3, scope: !58) -// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.a88acd4c94838316", scope: null, file: !46, line: 29, type: !67, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !69) +// CHECK:STDOUT: !66 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.b7e68ec37a94670c", scope: null, file: !46, line: 29, type: !67, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !69) // CHECK:STDOUT: !67 = !DISubroutineType(types: !68) // CHECK:STDOUT: !68 = !{!23, !22} // CHECK:STDOUT: !69 = !{!70} // CHECK:STDOUT: !70 = !DILocalVariable(arg: 1, scope: !66, type: !22) // CHECK:STDOUT: !71 = !DILocation(line: 30, column: 12, scope: !66) // CHECK:STDOUT: !72 = !DILocation(line: 30, column: 5, scope: !66) -// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.a88acd4c94838316", scope: null, file: !46, line: 26, type: !74, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !73 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.b7e68ec37a94670c", scope: null, file: !46, line: 26, type: !74, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !74 = !DISubroutineType(types: !75) // CHECK:STDOUT: !75 = !{!23} // CHECK:STDOUT: !76 = !DILocation(line: 27, column: 12, scope: !73) diff --git a/toolchain/lower/testdata/for/for.carbon b/toolchain/lower/testdata/for/for.carbon index 83928916341f..7ecc3894710b 100644 --- a/toolchain/lower/testdata/for/for.carbon +++ b/toolchain/lower/testdata/for/for.carbon @@ -50,11 +50,11 @@ fn For() { // CHECK:STDOUT: for.next: ; preds = %for.body, %entry // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc21_33.1.temp), !dbg !8 // CHECK:STDOUT: call void @"_CNext.IntRange.9452f4c51951679b.Core:Iterate.Core.be1e879c1ad406d8"(ptr %.loc21_33.1.temp, ptr %.loc21_32.1.temp, ptr %var), !dbg !8 -// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.a88acd4c94838316(ptr %.loc21_33.1.temp), !dbg !8 +// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.b7e68ec37a94670c(ptr %.loc21_33.1.temp), !dbg !8 // CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !8 // CHECK:STDOUT: // CHECK:STDOUT: for.body: ; preds = %for.next -// CHECK:STDOUT: %Optional.Get.call = call i32 @_CGet.Optional.Core.a88acd4c94838316(ptr %.loc21_33.1.temp), !dbg !8 +// CHECK:STDOUT: %Optional.Get.call = call i32 @_CGet.Optional.Core.b7e68ec37a94670c(ptr %.loc21_33.1.temp), !dbg !8 // CHECK:STDOUT: call void @_CG.Main(), !dbg !10 // CHECK:STDOUT: br label %for.next, !dbg !11 // CHECK:STDOUT: @@ -90,22 +90,22 @@ fn For() { // CHECK:STDOUT: 6: ; preds = %0 // CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !35 // CHECK:STDOUT: %7 = load i32, ptr %1, align 4, !dbg !36 -// CHECK:STDOUT: call void @_CSome.Optional.Core.a88acd4c94838316(ptr %return, i32 %7), !dbg !37 +// CHECK:STDOUT: call void @_CSome.Optional.Core.b7e68ec37a94670c(ptr %return, i32 %7), !dbg !37 // CHECK:STDOUT: ret void, !dbg !38 // CHECK:STDOUT: // CHECK:STDOUT: 8: ; preds = %0 -// CHECK:STDOUT: call void @_CNone.Optional.Core.a88acd4c94838316(ptr %return), !dbg !39 +// CHECK:STDOUT: call void @_CNone.Optional.Core.b7e68ec37a94670c(ptr %return), !dbg !39 // CHECK:STDOUT: ret void, !dbg !40 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.a88acd4c94838316(ptr %self) #0 !dbg !41 { +// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.b7e68ec37a94670c(ptr %self) #0 !dbg !41 { // CHECK:STDOUT: %1 = call i1 @"_CHas.3e8267224c5dc9c2:OptionalStorage.Core.32fa7206ac42c9b7"(ptr %self), !dbg !47 // CHECK:STDOUT: ret i1 %1, !dbg !48 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.a88acd4c94838316(ptr %self) #0 !dbg !49 { +// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.b7e68ec37a94670c(ptr %self) #0 !dbg !49 { // CHECK:STDOUT: %1 = call i32 @"_CGet.3e8267224c5dc9c2:OptionalStorage.Core.32fa7206ac42c9b7"(ptr %self), !dbg !52 // CHECK:STDOUT: ret i32 %1, !dbg !53 // CHECK:STDOUT: } @@ -119,13 +119,13 @@ fn For() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.a88acd4c94838316(ptr sret({ i32, i1 }) %return, i32 %value) #0 !dbg !62 { +// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.b7e68ec37a94670c(ptr sret({ i32, i1 }) %return, i32 %value) #0 !dbg !62 { // CHECK:STDOUT: call void @"_CSome.3e8267224c5dc9c2:OptionalStorage.Core.32fa7206ac42c9b7"(ptr %return, i32 %value), !dbg !67 // CHECK:STDOUT: ret void, !dbg !68 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind -// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.a88acd4c94838316(ptr sret({ i32, i1 }) %return) #0 !dbg !69 { +// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.b7e68ec37a94670c(ptr sret({ i32, i1 }) %return) #0 !dbg !69 { // CHECK:STDOUT: call void @"_CNone.3e8267224c5dc9c2:OptionalStorage.Core.32fa7206ac42c9b7"(ptr %return), !dbg !72 // CHECK:STDOUT: ret void, !dbg !73 // CHECK:STDOUT: } @@ -226,7 +226,7 @@ fn For() { // CHECK:STDOUT: !38 = !DILocation(line: 30, column: 9, scope: !24) // CHECK:STDOUT: !39 = !DILocation(line: 32, column: 16, scope: !24) // CHECK:STDOUT: !40 = !DILocation(line: 32, column: 9, scope: !24) -// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.a88acd4c94838316", scope: null, file: !42, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !45) +// CHECK:STDOUT: !41 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.b7e68ec37a94670c", scope: null, file: !42, line: 32, type: !43, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !45) // CHECK:STDOUT: !42 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "") // CHECK:STDOUT: !43 = !DISubroutineType(types: !44) // CHECK:STDOUT: !44 = !{!19, !19} @@ -234,7 +234,7 @@ fn For() { // CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !41, type: !19) // CHECK:STDOUT: !47 = !DILocation(line: 33, column: 12, scope: !41) // CHECK:STDOUT: !48 = !DILocation(line: 33, column: 5, scope: !41) -// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.a88acd4c94838316", scope: null, file: !42, line: 35, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) +// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.b7e68ec37a94670c", scope: null, file: !42, line: 35, type: !16, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !50) // CHECK:STDOUT: !50 = !{!51} // CHECK:STDOUT: !51 = !DILocalVariable(arg: 1, scope: !49, type: !19) // CHECK:STDOUT: !52 = !DILocation(line: 36, column: 12, scope: !49) @@ -247,14 +247,14 @@ fn For() { // CHECK:STDOUT: !59 = !DILocalVariable(arg: 1, scope: !54, type: !18) // CHECK:STDOUT: !60 = !DILocation(line: 343, column: 5, scope: !54) // CHECK:STDOUT: !61 = !DILocation(line: 341, column: 3, scope: !54) -// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.a88acd4c94838316", scope: null, file: !42, line: 29, type: !63, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !65) +// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.b7e68ec37a94670c", scope: null, file: !42, line: 29, type: !63, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !65) // CHECK:STDOUT: !63 = !DISubroutineType(types: !64) // CHECK:STDOUT: !64 = !{!19, !18} // CHECK:STDOUT: !65 = !{!66} // CHECK:STDOUT: !66 = !DILocalVariable(arg: 1, scope: !62, type: !18) // CHECK:STDOUT: !67 = !DILocation(line: 30, column: 12, scope: !62) // CHECK:STDOUT: !68 = !DILocation(line: 30, column: 5, scope: !62) -// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.a88acd4c94838316", scope: null, file: !42, line: 26, type: !70, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.b7e68ec37a94670c", scope: null, file: !42, line: 26, type: !70, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !70 = !DISubroutineType(types: !71) // CHECK:STDOUT: !71 = !{!19} // CHECK:STDOUT: !72 = !DILocation(line: 27, column: 12, scope: !69) diff --git a/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon b/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon index b0dcf2ba1748..84986de9b3ce 100644 --- a/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon @@ -76,8 +76,8 @@ fn Run() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc37_20.1.temp = alloca i1, align 1, !dbg !23 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc37_20.1.temp), !dbg !23 -// CHECK:STDOUT: %I.F.call = call i1 @"_CF.X.Main:I.Main"(), !dbg !23 -// CHECK:STDOUT: %.loc37_20.2 = zext i1 %I.F.call to i8, !dbg !23 +// CHECK:STDOUT: %I.WithSelf.F.call = call i1 @"_CF.X.Main:I.Main"(), !dbg !23 +// CHECK:STDOUT: %.loc37_20.2 = zext i1 %I.WithSelf.F.call to i8, !dbg !23 // CHECK:STDOUT: store i8 %.loc37_20.2, ptr %.loc37_20.1.temp, align 1, !dbg !23 // CHECK:STDOUT: %.loc37_20.3 = load i8, ptr %.loc37_20.1.temp, align 1, !dbg !23 // CHECK:STDOUT: %.loc37_20.31 = trunc i8 %.loc37_20.3 to i1, !dbg !23 @@ -89,8 +89,8 @@ fn Run() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc37_20.1.temp = alloca i32, align 4, !dbg !26 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc37_20.1.temp), !dbg !26 -// CHECK:STDOUT: %I.F.call = call i32 @"_CF.Y.Main:I.Main"(), !dbg !26 -// CHECK:STDOUT: store i32 %I.F.call, ptr %.loc37_20.1.temp, align 4, !dbg !26 +// CHECK:STDOUT: %I.WithSelf.F.call = call i32 @"_CF.Y.Main:I.Main"(), !dbg !26 +// CHECK:STDOUT: store i32 %I.WithSelf.F.call, ptr %.loc37_20.1.temp, align 4, !dbg !26 // CHECK:STDOUT: %.loc37_20.3 = load i32, ptr %.loc37_20.1.temp, align 4, !dbg !26 // CHECK:STDOUT: ret void, !dbg !27 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/function/generic/call_impl_function.carbon b/toolchain/lower/testdata/function/generic/call_impl_function.carbon index afe29c2b3975..2fd92889fb87 100644 --- a/toolchain/lower/testdata/function/generic/call_impl_function.carbon +++ b/toolchain/lower/testdata/function/generic/call_impl_function.carbon @@ -63,8 +63,8 @@ fn G() { // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr i32 @_CCallGenericMethod.Main.416a86e385b6ba35(i32 %x) #0 !dbg !17 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %SomeInterface.F.call = call i32 @"_CF.ImplsSomeInterface.Main:SomeInterface.b88d1103f417c6d4.Main"(i32 %x), !dbg !20 -// CHECK:STDOUT: ret i32 %SomeInterface.F.call, !dbg !21 +// CHECK:STDOUT: %SomeInterface.WithSelf.F.call = call i32 @"_CF.ImplsSomeInterface.Main:SomeInterface.b88d1103f417c6d4.Main"(i32 %x), !dbg !20 +// CHECK:STDOUT: ret i32 %SomeInterface.WithSelf.F.call, !dbg !21 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } diff --git a/toolchain/lower/testdata/function/generic/type_representation.carbon b/toolchain/lower/testdata/function/generic/type_representation.carbon index 739d2cfa8985..18ca546b849b 100644 --- a/toolchain/lower/testdata/function/generic/type_representation.carbon +++ b/toolchain/lower/testdata/function/generic/type_representation.carbon @@ -171,10 +171,10 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %_.var = alloca i32, align 4, !dbg !63 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !63 -// CHECK:STDOUT: %Copy.Op.call.loc18 = call i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %a), !dbg !64 -// CHECK:STDOUT: store i32 %Copy.Op.call.loc18, ptr %_.var, align 4, !dbg !63 -// CHECK:STDOUT: %Copy.Op.call.loc19 = call i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %a), !dbg !65 -// CHECK:STDOUT: ret i32 %Copy.Op.call.loc19, !dbg !66 +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc18 = call i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %a), !dbg !64 +// CHECK:STDOUT: store i32 %Copy.WithSelf.Op.call.loc18, ptr %_.var, align 4, !dbg !63 +// CHECK:STDOUT: %Copy.WithSelf.Op.call.loc19 = call i32 @"_COp.Int.be1e879c1ad406d8.Core:Copy.Main"(i32 %a), !dbg !65 +// CHECK:STDOUT: ret i32 %Copy.WithSelf.Op.call.loc19, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind diff --git a/toolchain/sem_ir/associated_constant.h b/toolchain/sem_ir/associated_constant.h index ad5a4a33ed18..1421631e91a2 100644 --- a/toolchain/sem_ir/associated_constant.h +++ b/toolchain/sem_ir/associated_constant.h @@ -23,7 +23,7 @@ struct AssociatedConstant : public Printable { auto Print(llvm::raw_ostream& out) const -> void { out << "{" << "name: " << name_id << ", parent_scope: " << parent_scope_id - << ", decl_id: " << decl_id << ", generic_id: " << generic_id + << ", decl_id: " << decl_id << ", default_value_id: " << default_value_id << "}"; } @@ -39,12 +39,6 @@ struct AssociatedConstant : public Printable { // The declaration of this associated constant. InstId decl_id; - // The following fields are set at the `=` or `;`. - - // Information about the generic. An associated constant is always - // parameterized by `Self`, so this is always present. - GenericId generic_id; - // The following fields are set at the `;`. // The default value of the constant. diff --git a/toolchain/sem_ir/formatter.cpp b/toolchain/sem_ir/formatter.cpp index 7b175cb33028..a0b468068d8b 100644 --- a/toolchain/sem_ir/formatter.cpp +++ b/toolchain/sem_ir/formatter.cpp @@ -89,11 +89,6 @@ auto Formatter::Format() -> void { FormatRequireImpls(id, require); } - for (const auto& [id, assoc_const] : - sem_ir_->associated_constants().enumerate()) { - FormatAssociatedConstant(id, assoc_const); - } - for (const auto& [id, impl] : sem_ir_->impls().enumerate()) { FormatImpl(id, impl); } @@ -403,16 +398,28 @@ auto Formatter::FormatInterface(InterfaceId id, const Interface& interface_info) llvm::SaveAndRestore interface_scope(scope_, inst_namer_.GetScopeFor(id)); - if (interface_info.scope_id.has_value()) { + if (interface_info.is_complete()) { out_ << ' '; OpenBrace(); - FormatCodeBlock(interface_info.body_block_id); + FormatCodeBlock(interface_info.body_block_without_self_id); - // Always include the !members label because we always list the witness in - // this section. + bool body_block_empty = + sem_ir_->inst_blocks() + .GetOrEmpty(interface_info.body_block_with_self_id) + .empty(); + if (!body_block_empty) { + IndentLabel(); + out_ << "!with Self:\n"; + FormatCodeBlock(interface_info.body_block_with_self_id); + } + + // Always include the !members without self label because we always list the + // witness in this section. IndentLabel(); out_ << "!members:\n"; - FormatNameScope(interface_info.scope_id); + + FormatNameScope(interface_info.scope_without_self_id); + FormatNameScope(interface_info.scope_with_self_id); Indent(); out_ << "witness = "; @@ -442,16 +449,27 @@ auto Formatter::FormatNamedConstraint(NamedConstraintId id, llvm::SaveAndRestore constraint_scope(scope_, inst_namer_.GetScopeFor(id)); - if (constraint_info.scope_id.has_value()) { + if (constraint_info.is_complete()) { out_ << ' '; OpenBrace(); - FormatCodeBlock(constraint_info.body_block_id); + FormatCodeBlock(constraint_info.body_block_without_self_id); + + bool body_block_empty = + sem_ir_->inst_blocks() + .GetOrEmpty(constraint_info.body_block_with_self_id) + .empty(); + if (!body_block_empty) { + IndentLabel(); + out_ << "!with Self:\n"; + FormatCodeBlock(constraint_info.body_block_with_self_id); + } // Always include the !members label because we always list the witness in // this section. IndentLabel(); out_ << "!members:\n"; - FormatNameScope(constraint_info.scope_id); + FormatNameScope(constraint_info.scope_without_self_id); + FormatNameScope(constraint_info.scope_with_self_id); FormatRequireImplsBlock(constraint_info.require_impls_block_id); @@ -475,31 +493,6 @@ auto Formatter::FormatRequireImpls(RequireImplsId /*id*/, FormatGenericEnd(); } -auto Formatter::FormatAssociatedConstant(AssociatedConstantId id, - const AssociatedConstant& assoc_const) - -> void { - if (!ShouldFormatEntity(assoc_const.decl_id)) { - return; - } - - PrepareToFormatDecl(assoc_const.decl_id); - FormatEntityStart("assoc_const", assoc_const.generic_id, id); - - llvm::SaveAndRestore assoc_const_scope(scope_, inst_namer_.GetScopeFor(id)); - - out_ << " "; - FormatName(assoc_const.name_id); - out_ << ":! "; - FormatTypeOfInst(assoc_const.decl_id); - if (assoc_const.default_value_id.has_value()) { - out_ << " = "; - FormatArg(assoc_const.default_value_id); - } - out_ << ";\n"; - - FormatEntityEnd(assoc_const.generic_id); -} - auto Formatter::FormatImpl(ImplId id, const Impl& impl_info) -> void { if (!ShouldFormatEntity(impl_info)) { return; @@ -846,7 +839,7 @@ auto Formatter::FormatNameScope(NameScopeId id, llvm::StringRef label) -> void { out_ << "\n"; } - for (auto [extended_scope_id, _] : scope.extended_scopes()) { + for (auto extended_scope_id : scope.extended_scopes()) { Indent(); out_ << "extend "; FormatName(extended_scope_id); diff --git a/toolchain/sem_ir/formatter.h b/toolchain/sem_ir/formatter.h index 51b1b34fe08f..b41da02d25a8 100644 --- a/toolchain/sem_ir/formatter.h +++ b/toolchain/sem_ir/formatter.h @@ -166,10 +166,6 @@ class Formatter { auto FormatRequireImpls(RequireImplsId id, const RequireImpls& require) -> void; - // Formats an associated constant entity. - auto FormatAssociatedConstant(AssociatedConstantId id, - const AssociatedConstant& assoc_const) -> void; - // Formats a full impl. auto FormatImpl(ImplId id, const Impl& impl) -> void; diff --git a/toolchain/sem_ir/inst.h b/toolchain/sem_ir/inst.h index f09308e446ed..8f9ce37600e8 100644 --- a/toolchain/sem_ir/inst.h +++ b/toolchain/sem_ir/inst.h @@ -515,7 +515,7 @@ class InstStore { // Returns whether the requested instruction is one of the specified types. template auto IsOneOf(InstId inst_id) const -> bool { - return Get(inst_id).Is(); + return Get(inst_id).IsOneOf(); } // Returns the requested instruction, which is known to have the specified diff --git a/toolchain/sem_ir/inst_kind.def b/toolchain/sem_ir/inst_kind.def index 5fbcf0e0fa9c..90bea324ad92 100644 --- a/toolchain/sem_ir/inst_kind.def +++ b/toolchain/sem_ir/inst_kind.def @@ -94,11 +94,13 @@ CARBON_SEM_IR_INST_KIND(IntLiteralType) CARBON_SEM_IR_INST_KIND(IntType) CARBON_SEM_IR_INST_KIND(IntValue) CARBON_SEM_IR_INST_KIND(InterfaceDecl) +CARBON_SEM_IR_INST_KIND(InterfaceWithSelfDecl) CARBON_SEM_IR_INST_KIND(LookupImplWitness) CARBON_SEM_IR_INST_KIND(MarkInPlaceInit) CARBON_SEM_IR_INST_KIND(MaybeUnformedType) CARBON_SEM_IR_INST_KIND(NameBindingDecl) CARBON_SEM_IR_INST_KIND(NamedConstraintDecl) +CARBON_SEM_IR_INST_KIND(NamedConstraintWithSelfDecl) CARBON_SEM_IR_INST_KIND(NameRef) CARBON_SEM_IR_INST_KIND(Namespace) CARBON_SEM_IR_INST_KIND(NamespaceType) diff --git a/toolchain/sem_ir/inst_namer.cpp b/toolchain/sem_ir/inst_namer.cpp index c14b6bdcd87d..91c42e7fe7b5 100644 --- a/toolchain/sem_ir/inst_namer.cpp +++ b/toolchain/sem_ir/inst_namer.cpp @@ -109,7 +109,9 @@ InstNamer::InstNamer(const File* sem_ir, int total_ir_count) while (!inst_stack_.empty() || !inst_block_stack_.empty()) { if (inst_stack_.empty()) { auto [scope_id, block_id] = inst_block_stack_.pop_back_val(); - PushBlockInsts(scope_id, sem_ir_->inst_blocks().Get(block_id)); + if (block_id != SemIR::InstBlockId::Empty) { + PushBlockInsts(scope_id, sem_ir_->inst_blocks().Get(block_id)); + } } while (!inst_stack_.empty()) { auto [scope_id, inst_id] = inst_stack_.pop_back_val(); @@ -530,15 +532,16 @@ auto InstNamer::PushGeneric(ScopeId scope_id, GenericId generic_id) -> void { } auto InstNamer::PushEntity(AssociatedConstantId associated_constant_id, - ScopeId scope_id, Scope& scope) -> void { + [[maybe_unused]] ScopeId scope_id, Scope& scope) + -> void { const auto& assoc_const = sem_ir_->associated_constants().Get(associated_constant_id); scope.name = globals_.AllocateName( *this, LocId(assoc_const.decl_id), sem_ir_->names().GetIRBaseName(assoc_const.name_id).str()); - // Push blocks in reverse order. - PushGeneric(scope_id, assoc_const.generic_id); + // The `decl_block_id` is associated with this `scope_id` from the + // AssociatedConstantDecl instruction handler. } auto InstNamer::PushEntity(ClassId class_id, ScopeId scope_id, Scope& scope) @@ -574,9 +577,16 @@ auto InstNamer::GetNameForParentNameScope(NameScopeId name_scope_id) case CARBON_KIND(InterfaceDecl interface): { return MaybePushEntity(interface.interface_id); } + case CARBON_KIND(InterfaceWithSelfDecl interface): { + return MaybePushEntity(interface.interface_id, /*with_self=*/true); + } case CARBON_KIND(NamedConstraintDecl named_constraint): { return MaybePushEntity(named_constraint.named_constraint_id); } + case CARBON_KIND(NamedConstraintWithSelfDecl named_constraint): { + return MaybePushEntity(named_constraint.named_constraint_id, + /*with_self=*/true); + } case SemIR::Namespace::Kind: { // Only prefix type scopes. return ""; @@ -711,14 +721,20 @@ auto InstNamer::PushEntity(InterfaceId interface_id, ScopeId scope_id, Scope& scope) -> void { const auto& interface = sem_ir_->interfaces().Get(interface_id); LocId interface_loc(interface.latest_decl_id()); - scope.name = globals_.AllocateName( - *this, interface_loc, - sem_ir_->names().GetIRBaseName(interface.name_id).str()); - AddBlockLabel(scope_id, interface.body_block_id, "interface", interface_loc); + auto name = sem_ir_->names().GetIRBaseName(interface.name_id).str(); + scope.name = globals_.AllocateName(*this, interface_loc, name); + name += ".WithSelf"; + scope.name_with_self = globals_.AllocateName(*this, interface_loc, name); + AddBlockLabel(scope_id, interface.body_block_without_self_id, "interface", + interface_loc); + AddBlockLabel(scope_id, interface.body_block_with_self_id, + "interface_with_self", interface_loc); // Push blocks in reverse order. + PushGeneric(scope_id, interface.generic_with_self_id); PushGeneric(scope_id, interface.generic_id); - PushBlockId(scope_id, interface.body_block_id); + PushBlockId(scope_id, interface.body_block_without_self_id); + PushBlockId(scope_id, interface.body_block_with_self_id); PushBlockId(scope_id, interface.pattern_block_id); } @@ -727,15 +743,20 @@ auto InstNamer::PushEntity(NamedConstraintId named_constraint_id, const auto& constraint = sem_ir_->named_constraints().Get(named_constraint_id); LocId constraint_loc(constraint.latest_decl_id()); - scope.name = globals_.AllocateName( - *this, constraint_loc, - sem_ir_->names().GetIRBaseName(constraint.name_id).str()); - AddBlockLabel(scope_id, constraint.body_block_id, "constraint", + auto name = sem_ir_->names().GetIRBaseName(constraint.name_id).str(); + scope.name = globals_.AllocateName(*this, constraint_loc, name); + name += ".WithSelf"; + scope.name_with_self = globals_.AllocateName(*this, constraint_loc, name); + AddBlockLabel(scope_id, constraint.body_block_without_self_id, "constraint", constraint_loc); + AddBlockLabel(scope_id, constraint.body_block_with_self_id, + "constraint_with_self", constraint_loc); // Push blocks in reverse order. + PushGeneric(scope_id, constraint.generic_with_self_id); PushGeneric(scope_id, constraint.generic_id); - PushBlockId(scope_id, constraint.body_block_id); + PushBlockId(scope_id, constraint.body_block_without_self_id); + PushBlockId(scope_id, constraint.body_block_with_self_id); PushBlockId(scope_id, constraint.pattern_block_id); } diff --git a/toolchain/sem_ir/inst_namer.h b/toolchain/sem_ir/inst_namer.h index c99775372fd5..db852d1f462e 100644 --- a/toolchain/sem_ir/inst_namer.h +++ b/toolchain/sem_ir/inst_namer.h @@ -171,6 +171,8 @@ class InstNamer { // A named scope that contains named entities. struct Scope { Namespace::Name name; + // The name of the entity's inner entity-with-self, if it has one. + Namespace::Name name_with_self; Namespace insts; Namespace labels; }; @@ -232,13 +234,18 @@ class InstNamer { // Always returns the name of the entity. May push it if it has not yet been // pushed. template - auto MaybePushEntity(EntityIdT entity_id) -> llvm::StringRef { + auto MaybePushEntity(EntityIdT entity_id, bool with_self = false) + -> llvm::StringRef { auto scope_id = GetScopeFor(entity_id); auto& scope = GetScopeInfo(scope_id); if (!scope.name) { PushEntity(entity_id, scope_id, scope); } - return scope.name.GetBaseName(); + if (with_self) { + return scope.name_with_self.GetBaseName(); + } else { + return scope.name.GetBaseName(); + } } const File* sem_ir_; diff --git a/toolchain/sem_ir/interface.h b/toolchain/sem_ir/interface.h index 06891e55cf9d..7e6706f6fa90 100644 --- a/toolchain/sem_ir/interface.h +++ b/toolchain/sem_ir/interface.h @@ -12,14 +12,25 @@ namespace Carbon::SemIR { // Interface-specific fields. +// +// TODO: Factor out the shared fields between InterfaceFields and +// NamedConstraintFields. struct InterfaceFields { // The following members are set at the `{` of the interface definition. - // The interface scope. - NameScopeId scope_id = NameScopeId::None; - // The first block of the interface body. + // The interface scopes. + NameScopeId scope_without_self_id = NameScopeId::None; + NameScopeId scope_with_self_id = NameScopeId::None; + // The block of instructions outside the interface-with-self. This is where + // the `Self` instruction can be constructed. + InstBlockId body_block_without_self_id = InstBlockId::None; + // The interface-with-self generic, where the `Self` is a parameter to the + // generic. This generic contains all the associated entities of the + // interface. + GenericId generic_with_self_id = GenericId::None; + // The first block of the interface-with-self body. // TODO: Handle control flow in the interface body, such as if-expressions. - InstBlockId body_block_id = InstBlockId::None; + InstBlockId body_block_with_self_id = InstBlockId::None; // The implicit `Self` parameter. This is a SymbolicBinding instruction. InstId self_param_id = InstId::None; diff --git a/toolchain/sem_ir/name_scope.cpp b/toolchain/sem_ir/name_scope.cpp index 8590b73b6253..0dd8e17507aa 100644 --- a/toolchain/sem_ir/name_scope.cpp +++ b/toolchain/sem_ir/name_scope.cpp @@ -22,12 +22,8 @@ auto NameScope::Print(llvm::raw_ostream& out) const -> void { out << ", extended_scopes: ["; llvm::ListSeparator scope_sep; - for (auto [id, inner_self_id] : extended_scopes_) { - if (inner_self_id.has_value()) { - out << scope_sep << "(" << id << ", inner self: " << inner_self_id << ")"; - } else { - out << scope_sep << id; - } + for (auto id : extended_scopes_) { + out << scope_sep << id; } out << "]"; diff --git a/toolchain/sem_ir/name_scope.h b/toolchain/sem_ir/name_scope.h index 6ff9abfc1a0c..958ed0e22ebe 100644 --- a/toolchain/sem_ir/name_scope.h +++ b/toolchain/sem_ir/name_scope.h @@ -185,21 +185,11 @@ class NameScope : public Printable { // identifiers will not be poisoned. auto LookupOrPoison(LocId loc_id, NameId name_id) -> std::optional; - struct ExtendedScope { - SemIR::InstId extended_id; - // The inner `Self` of a scope which is part of generics inside the scope - // that it extends. These `Self` values need to be replaced with the self - // target of member lookup in order to find the right extended scope. - SemIR::InstId inner_self_id = SemIR::InstId::None; - - friend auto operator==(NameScope::ExtendedScope lhs, - NameScope::ExtendedScope rhs) -> bool = default; - }; - auto extended_scopes() const -> llvm::ArrayRef { + auto extended_scopes() const -> llvm::ArrayRef { return extended_scopes_; } - auto AddExtendedScope(ExtendedScope extended_scope) -> void { + auto AddExtendedScope(SemIR::InstId extended_scope) -> void { extended_scopes_.push_back(extended_scope); } @@ -285,7 +275,7 @@ class NameScope : public Printable { // than a single extended scope. // TODO: Revisit this once we have more kinds of extended scope and data. // TODO: Consider using something like `TinyPtrVector` for this. - llvm::SmallVector extended_scopes_; + llvm::SmallVector extended_scopes_; // The instruction which owns the scope. InstId inst_id_; diff --git a/toolchain/sem_ir/name_scope_test.cpp b/toolchain/sem_ir/name_scope_test.cpp index 29bb71aa5e4e..1455a48033c9 100644 --- a/toolchain/sem_ir/name_scope_test.cpp +++ b/toolchain/sem_ir/name_scope_test.cpp @@ -401,19 +401,13 @@ TEST(NameScope, ExtendedScopes) { EXPECT_THAT(name_scope.extended_scopes(), ElementsAre()); InstId extended_scope1(++id); - InstId innert_self1(++id); - name_scope.AddExtendedScope({extended_scope1, innert_self1}); - EXPECT_THAT( - name_scope.extended_scopes(), - ElementsAre(NameScope::ExtendedScope{extended_scope1, innert_self1})); + name_scope.AddExtendedScope(extended_scope1); + EXPECT_THAT(name_scope.extended_scopes(), ElementsAre(extended_scope1)); InstId extended_scope2(++id); - InstId innert_self2(++id); - name_scope.AddExtendedScope({extended_scope2, innert_self2}); - EXPECT_THAT( - name_scope.extended_scopes(), - ElementsAre(NameScope::ExtendedScope{extended_scope1, innert_self1}, - NameScope::ExtendedScope{extended_scope2, innert_self2})); + name_scope.AddExtendedScope(extended_scope2); + EXPECT_THAT(name_scope.extended_scopes(), + ElementsAre(extended_scope1, extended_scope2)); } TEST(NameScope, HasError) { diff --git a/toolchain/sem_ir/named_constraint.h b/toolchain/sem_ir/named_constraint.h index 4639e7df8f81..834bf18f596d 100644 --- a/toolchain/sem_ir/named_constraint.h +++ b/toolchain/sem_ir/named_constraint.h @@ -15,10 +15,20 @@ namespace Carbon::SemIR { struct NamedConstraintFields { // The following members are set at the `{` of the constraint definition. - // The constraint scope. - NameScopeId scope_id = NameScopeId::None; - // The first block of the constraint body. - InstBlockId body_block_id = InstBlockId::None; + // The constraint scopes. The scope-without-self contains the symbolic `Self` + // entity, which is then a generic binding of the generic-with-self. The + // scope-with-self contains the rest of the entities in the constraint. + NameScopeId scope_without_self_id = NameScopeId::None; + NameScopeId scope_with_self_id = NameScopeId::None; + // The block of instructions outside the constraint-with-self. This is where + // the `Self` instruction can be constructed. + InstBlockId body_block_without_self_id = InstBlockId::None; + // The constraint-with-self generic, where the `Self` is a parameter to the + // generic. This generic contains all the associated entities of the + // interface. + GenericId generic_with_self_id = GenericId::None; + // The first block of the constraint-with-self body. + InstBlockId body_block_with_self_id = InstBlockId::None; // The implicit `Self` parameter. This is a SymbolicBinding instruction. InstId self_param_id = InstId::None; diff --git a/toolchain/sem_ir/stringify.cpp b/toolchain/sem_ir/stringify.cpp index 6f950462add4..93b9c4594b97 100644 --- a/toolchain/sem_ir/stringify.cpp +++ b/toolchain/sem_ir/stringify.cpp @@ -214,8 +214,22 @@ class StepStack { return; } const auto& specific = sem_ir_->specifics().Get(specific_id); - auto args = - sem_ir_->inst_blocks().Get(specific.args_id).take_back(num_params); + + auto drop_back_count = 0; + const auto& generic = sem_ir_->generics().Get(specific.generic_id); + if (sem_ir_->insts() + .IsOneOf( + generic.decl_id)) { + // The with-self generic contains an additional `Self` parameter beyond + // the parameters of the entity, the argument for which we do not include + // in the display. + drop_back_count = 1; + } + + auto args = sem_ir_->inst_blocks() + .Get(specific.args_id) + .drop_back(drop_back_count) + .take_back(num_params); bool last = true; for (auto arg : llvm::reverse(args)) { PushString(last ? ")" : ", "); @@ -288,8 +302,7 @@ class Stringifier { auto StringifyInst(InstId /*inst_id*/, AssociatedEntityType inst) -> void { *out_ << "Push(">"); - step_stack_->PushSpecificInterface( - SpecificInterface{inst.interface_id, inst.interface_specific_id}); + step_stack_->PushSpecificInterface(inst.GetSpecificInterface()); } auto StringifyInst(InstId /*inst_id*/, BoolLiteral inst) -> void { @@ -823,12 +836,25 @@ auto StringifySpecific(const File& sem_ir, SpecificId specific_id) sem_ir.interfaces().Get(interface_decl.interface_id), specific_id); break; } + case CARBON_KIND(InterfaceWithSelfDecl interface_with_self_decl): { + step_stack.PushEntityName( + sem_ir.interfaces().Get(interface_with_self_decl.interface_id), + specific_id); + break; + } case CARBON_KIND(NamedConstraintDecl constraint_decl): { step_stack.PushEntityName( sem_ir.named_constraints().Get(constraint_decl.named_constraint_id), specific_id); break; } + case CARBON_KIND(NamedConstraintWithSelfDecl constraint_with_self_decl): { + step_stack.PushEntityName( + sem_ir.named_constraints().Get( + constraint_with_self_decl.named_constraint_id), + specific_id); + break; + } case CARBON_KIND(RequireImplsDecl _): { step_stack.Push("require"); break; diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index 694aacc1c37d..51344629434c 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -252,10 +252,11 @@ struct AssociatedEntityType { // The interface in which the entity was declared. InterfaceId interface_id; // The specific for the interface in which the entity was declared. - SpecificId interface_specific_id; + SpecificId interface_without_self_specific_id; auto GetSpecificInterface() -> SpecificInterface { - return {.interface_id = interface_id, .specific_id = interface_specific_id}; + return {.interface_id = interface_id, + .specific_id = interface_without_self_specific_id}; } }; @@ -1082,7 +1083,8 @@ struct InterfaceDecl { InstKind::InterfaceDecl.Define( {.ir_name = "interface_decl", .is_lowered = false}); - // Always `type`. + // If the interface is not generic, this is `type`, otherwise it's + // `GenericInterfaceType`. TypeId type_id; InterfaceId interface_id; // The declaration block, containing the interface name's qualifiers and the @@ -1090,6 +1092,16 @@ struct InterfaceDecl { DeclInstBlockId decl_block_id; }; +struct InterfaceWithSelfDecl { + static constexpr auto Kind = + InstKind::InterfaceWithSelfDecl.Define( + {.ir_name = "interface_with_self_decl", + .constant_kind = InstConstantKind::AlwaysUnique, + .is_lowered = false}); + // No type: an interface-with-self declaration is not a value. + InterfaceId interface_id; +}; + // An arbitrary-precision integer type, which is used as the type of integer // literals and as the parameter type of `Core.Int` and `Core.Float`. This type // only provides compile-time operations, and is represented as an empty type at @@ -1210,7 +1222,8 @@ struct NamedConstraintDecl { InstKind::NamedConstraintDecl.Define( {.ir_name = "constraint_decl", .is_lowered = false}); - // Always `type`. + // If the constraint is not generic, this is `type`, otherwise it's + // `GenericNamedConstraintType`. TypeId type_id; NamedConstraintId named_constraint_id; // The declaration block, containing the constraint name's qualifiers and the @@ -1218,6 +1231,17 @@ struct NamedConstraintDecl { DeclInstBlockId decl_block_id; }; +struct NamedConstraintWithSelfDecl { + static constexpr auto Kind = + InstKind::NamedConstraintWithSelfDecl + .Define( + {.ir_name = "constraint_with_self_decl", + .constant_kind = InstConstantKind::AlwaysUnique, + .is_lowered = false}); + // No type: an constraint-with-self declaration is not a value. + NamedConstraintId named_constraint_id; +}; + // A name reference, with the value of the name. This only handles name // resolution; the value may be used for reading or writing. struct NameRef {