Support unqualified lookup into extended interfaces from classes and impls (#7217)

When a class extends an interface, referring to a member name of the
interface as an unqualified name should refer to the class's
corresponding associated entity value, not to the associated entity
itself. Similarly, in an `impl`, unqualified names of associated
entities should refer to the `impl`'s corresponding value for that
entity.

To support this, we treat `impl`s as `extend`ing their implemented facet
type, and we make lookups into an extended facet type use the `Self`
type of the extending `impl` or `class` if lookup finds an associated
entity. We already did the latter if the extending entity was an
interface; this extends the existing support for these other cases.
This commit is contained in:
Richard Smith
2026-05-19 18:01:54 +00:00
committed by GitHub
parent 0d7c4a99eb
commit ce080b3549
112 changed files with 962 additions and 4125 deletions
+6 -2
View File
@@ -41,9 +41,13 @@ auto StartClassDefinition(Context& context, SemIR::Class& class_info,
definition_id, SemIR::NameId::None, class_info.parent_scope_id);
// Introduce `Self`.
auto self_type_inst_id =
context.types().GetTypeInstId(class_info.self_type_id);
context.name_scopes().AddRequiredName(
class_info.scope_id, SemIR::NameId::SelfType,
context.types().GetTypeInstId(class_info.self_type_id));
class_info.scope_id, SemIR::NameId::SelfType, self_type_inst_id);
context.name_scopes()
.Get(class_info.scope_id)
.set_self_type_id(self_type_inst_id);
}
// Checks that the specified finished adapter definition is valid and builds and
+1
View File
@@ -140,6 +140,7 @@ auto DeclNameStack::AddName(NameContext name_context, SemIR::InstId target_id,
return;
case NameContext::State::Unresolved:
case NameContext::State::Poisoned:
if (!name_context.parent_scope_id.has_value()) {
AddNameToLookup(*context_, name_context.name_id, target_id,
name_context.initial_scope_index);
+2 -1
View File
@@ -389,7 +389,8 @@ auto EvalConstantInst(Context& context, SemIR::InstId inst_id,
auto index = static_cast<size_t>(inst.index.index);
CARBON_CHECK(index < elements.size(), "Access out of bounds.");
auto element = elements[index];
if (element.has_value()) {
if (element.has_value() &&
element != SemIR::InstId::ImplWitnessTablePlaceholder) {
LoadImportRef(context, element);
return ConstantEvalResult::Existing(GetConstantValueInSpecific(
context.sem_ir(), witness.specific_id, element));
+14 -10
View File
@@ -184,9 +184,15 @@ static auto TryMergeRedecl(Context& context, Parse::AnyFunctionDeclId node_id,
SemIR::FunctionDecl& function_decl,
SemIR::Function& function_info, bool is_definition)
-> void {
// Diagnose if we are declaring a poisoned name. However, don't diagnose at
// impl scope: if the name was referenced before being declared, we will have
// produced an error already.
if (name_context.state == DeclNameStack::NameContext::State::Poisoned) {
DiagnosePoisonedName(context, name_context.name_id_for_new_inst(),
name_context.poisoning_loc_id, name_context.loc_id);
if (!context.name_scopes().InstIs<SemIR::ImplDecl>(
name_context.parent_scope_id)) {
DiagnosePoisonedName(context, name_context.name_id_for_new_inst(),
name_context.poisoning_loc_id, name_context.loc_id);
}
return;
}
@@ -200,8 +206,7 @@ static auto TryMergeRedecl(Context& context, Parse::AnyFunctionDeclId node_id,
auto prev_import_ir_id = SemIR::ImportIRId::None;
CARBON_KIND_SWITCH(context.insts().Get(prev_id)) {
case CARBON_KIND(SemIR::AssociatedEntity assoc_entity): {
// This is a function in an interface definition scope (see
// NameScope::is_interface_definition()).
// This is a function in an interface definition scope.
auto function_decl =
context.insts().GetAs<SemIR::FunctionDecl>(assoc_entity.decl_id);
prev_function_id = function_decl.function_id;
@@ -260,7 +265,7 @@ static auto MaybeAddToNameLookup(Context& context,
const KeywordModifierSet& modifier_set,
SemIR::NameScopeId parent_scope_id,
SemIR::InstId decl_id) -> void {
if (name_context.state == DeclNameStack::NameContext::State::Poisoned ||
if (name_context.state != DeclNameStack::NameContext::State::Poisoned &&
name_context.prev_inst_id().has_value()) {
return;
}
@@ -269,12 +274,11 @@ static auto MaybeAddToNameLookup(Context& context,
// function.
auto lookup_result_id = decl_id;
if (parent_scope_id.has_value() && !name_context.has_qualifiers) {
const auto& parent_scope = context.name_scopes().Get(parent_scope_id);
if (parent_scope.is_interface_definition()) {
auto interface_decl = context.insts().GetAs<SemIR::InterfaceWithSelfDecl>(
parent_scope.inst_id());
if (auto interface_decl =
context.name_scopes().TryGetInstAs<SemIR::InterfaceWithSelfDecl>(
parent_scope_id)) {
lookup_result_id =
BuildAssociatedEntity(context, interface_decl.interface_id, decl_id);
BuildAssociatedEntity(context, interface_decl->interface_id, decl_id);
}
}
+2
View File
@@ -370,6 +370,8 @@ auto HandleParseNode(Context& context, Parse::ImplDefinitionStartId node_id)
impl.scope_id =
context.name_scopes().Add(impl_decl_id, SemIR::NameId::None,
context.decl_name_stack().PeekParentScopeId());
context.name_scopes().Get(impl.scope_id).set_self_type_id(impl.self_id);
context.name_scopes().Get(impl.scope_id).AddExtendedScope(impl.constraint_id);
context.scope_stack().PushForEntity(
impl_decl_id, impl.scope_id,
+1 -1
View File
@@ -183,7 +183,7 @@ auto HandleParseNode(Context& context,
// Set on the name scope that `M` is replaced by `Self.M`.
context.name_scopes()
.Get(interface_info.scope_with_self_id)
.set_is_interface_definition();
.set_self_type_id(interface_info.self_param_id);
// Start the definition of interface-with-self.
StartGenericDefinition(context, interface_info.generic_with_self_id);
+2 -3
View File
@@ -144,9 +144,8 @@ auto HandleParseNode(Context& context, Parse::VariablePatternId node_id)
// start of the initializer, if any).
static auto EndFullPattern(Context& context) -> void {
EndSubpattern(context, context.node_stack());
auto scope_id = context.scope_stack().PeekNameScopeId();
if (scope_id.has_value() &&
context.name_scopes().Get(scope_id).is_interface_definition()) {
if (context.name_scopes().InstIs<SemIR::InterfaceWithSelfDecl>(
context.scope_stack().PeekNameScopeId())) {
// Don't emit NameBindingDecl for an associated constant, because it will
// always be empty.
context.pattern_block_stack().PopAndDiscard();
+2 -7
View File
@@ -29,12 +29,6 @@ auto HandleParseNode(Context& context, Parse::NamespaceStartId /*node_id*/)
return true;
}
static auto IsNamespaceScope(Context& context, SemIR::NameScopeId name_scope_id)
-> bool {
auto [_, inst] = context.name_scopes().GetInstIfValid(name_scope_id);
return inst && inst->Is<SemIR::Namespace>();
}
auto HandleParseNode(Context& context, Parse::NamespaceId node_id) -> bool {
auto name_context = context.decl_name_stack().FinishName(
PopNameComponentWithoutParams(context, Lex::TokenKind::Namespace));
@@ -100,7 +94,8 @@ auto HandleParseNode(Context& context, Parse::NamespaceId node_id) -> bool {
namespace_inst.name_scope_id = context.name_scopes().Add(
namespace_id, name_context.name_id_for_new_inst(),
name_context.parent_scope_id);
if (!IsNamespaceScope(context, name_context.parent_scope_id)) {
if (!context.name_scopes().InstIs<SemIR::Namespace>(
name_context.parent_scope_id)) {
CARBON_DIAGNOSTIC(NamespaceDeclNotAtTopLevel, Error,
"`namespace` declaration not at top level");
context.emitter().Emit(node_id, NamespaceDeclNotAtTopLevel);
+4 -1
View File
@@ -1925,6 +1925,8 @@ static auto ImportClassDefinition(ImportContext& context,
context, import_scope, new_scope, new_class.first_owning_decl_id,
SemIR::NameId::None, new_class.parent_scope_id);
new_class.body_block_id = context.local_context().inst_block_stack().Pop();
new_scope.set_self_type_id(
context.local_types().GetTypeInstId(new_class.self_type_id));
if (import_class.base_id.has_value()) {
new_class.base_id = base_id;
@@ -2643,6 +2645,7 @@ static auto ImportImplDefinition(ImportContext& context,
auto& new_scope = context.local_name_scopes().Get(new_impl.scope_id);
new_scope.Set(new_impl.first_owning_decl_id, SemIR::NameId::None,
new_impl.parent_scope_id);
new_scope.set_self_type_id(new_impl.self_id);
// Import the contents of the definition scope, if we might need it. Name
// lookup is never performed into this scope by a user of the impl, so
// this is only necessary in the same library that defined the impl, in
@@ -3090,7 +3093,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
InitializeNameScopeAndImportRefs(resolver, import_scope, new_scope, decl_id,
SemIR::NameId::None,
local_interface.scope_without_self_id);
new_scope.set_is_interface_definition();
new_scope.set_self_type_id(local_interface.self_param_id);
local_interface.associated_entities_id =
AddAssociatedEntities(resolver, local_interface.scope_with_self_id,
import_interface.associated_entities_id);
+2 -2
View File
@@ -227,8 +227,8 @@ auto RequireDefaultFinalOnlyInInterfaces(Context& context,
DeclIntroducerState& introducer,
SemIR::NameScopeId parent_scope_id)
-> void {
if (parent_scope_id.has_value() &&
context.name_scopes().Get(parent_scope_id).is_interface_definition()) {
if (context.name_scopes().InstIs<SemIR::InterfaceWithSelfDecl>(
parent_scope_id)) {
// Both `default` and `final` allowed in an interface definition.
return;
}
+4 -9
View File
@@ -119,10 +119,10 @@ auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id,
.self_const_id = SemIR::ConstantId::None},
/*required=*/false);
non_lexical_result.scope_result.is_found()) {
// In an interface definition, replace associated entity `M` with
// `Self.M` (where the `Self` is the `Self` of the interface).
// If the scope has a `Self` type, replace associated entity `M` with
// `Self.M`.
const auto& scope = context.name_scopes().Get(lookup_scope_id);
if (scope.is_interface_definition()) {
if (scope.self_type_id().has_value()) {
SemIR::InstId target_inst_id =
non_lexical_result.scope_result.target_inst_id();
if (auto assoc_type =
@@ -130,13 +130,8 @@ auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id,
SemIR::GetTypeOfInstInSpecific(
context.sem_ir(), non_lexical_result.specific_id,
target_inst_id))) {
auto interface_decl =
context.insts().GetAs<SemIR::InterfaceWithSelfDecl>(
scope.inst_id());
const auto& interface =
context.interfaces().Get(interface_decl.interface_id);
SemIR::InstId result_inst_id = GetAssociatedValue(
context, loc_id, interface.self_param_id,
context, loc_id, scope.self_type_id(),
SemIR::GetConstantValueInSpecific(context.sem_ir(),
non_lexical_result.specific_id,
target_inst_id),
@@ -587,6 +587,9 @@ fn Test() -> i32 {
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .F = @Inner.WithSelf.%assoc0.loc6_28.1
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .Inner = <poisoned>
// CHECK:STDOUT: .D = <poisoned>
// CHECK:STDOUT: witness = (@Inner.WithSelf.%Inner.WithSelf.F.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -630,6 +633,7 @@ fn Test() -> i32 {
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .F = %C.as.Inner.impl.F.decl
// CHECK:STDOUT: .Inner = <poisoned>
// CHECK:STDOUT: extend %Inner.ref
// CHECK:STDOUT: witness = %Inner.impl_witness.loc10_19.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -655,6 +659,7 @@ fn Test() -> i32 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .D = <poisoned>
// CHECK:STDOUT: .F = %D.as.Inner.impl.F.decl
// CHECK:STDOUT: extend %Inner.ref
// CHECK:STDOUT: witness = %Inner.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -261,6 +261,7 @@ fn F() {
// CHECK:STDOUT: %Empty.impl_witness: <witness> = impl_witness %Empty.impl_witness_table [concrete = constants.%Empty.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Empty.ref
// CHECK:STDOUT: witness = %Empty.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -271,6 +272,7 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .AA = %C.as.A.impl.AA.decl
// CHECK:STDOUT: extend %A.ref
// CHECK:STDOUT: witness = %A.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -281,6 +283,7 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .BB = %C.as.B.impl.BB.decl
// CHECK:STDOUT: extend %B.ref
// CHECK:STDOUT: witness = %B.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -95,6 +95,7 @@ fn F() {
// CHECK:STDOUT: %Animal.impl_witness: <witness> = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Animal.ref
// CHECK:STDOUT: witness = %Animal.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -223,6 +223,7 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %ImplsGeneric.as.Generic.impl.F.decl
// CHECK:STDOUT: extend %Generic.type
// CHECK:STDOUT: witness = %Generic.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -556,6 +557,7 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %ImplsGeneric.as.Generic.impl.F.decl
// CHECK:STDOUT: extend %Generic.type
// CHECK:STDOUT: witness = %Generic.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -117,6 +117,7 @@ fn F() {
// CHECK:STDOUT: %Animal.impl_witness: <witness> = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Animal.ref
// CHECK:STDOUT: witness = %Animal.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -272,6 +272,7 @@ fn B() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %ImplsGeneric.as.Generic.impl.F.decl
// CHECK:STDOUT: extend %Generic.type
// CHECK:STDOUT: witness = %Generic.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -633,6 +634,7 @@ fn B() {
// CHECK:STDOUT: %I.impl_witness.loc7_38.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T.67d) [symbolic = %I.impl_witness.loc7_38.2 (constants.%I.impl_witness.1cb)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.type.loc7_36.1
// CHECK:STDOUT: witness = %I.impl_witness.loc7_38.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -895,6 +897,7 @@ fn B() {
// CHECK:STDOUT: %I.impl_witness.loc7_38.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T.67d) [symbolic = %I.impl_witness.loc7_38.2 (constants.%I.impl_witness)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.type.loc7_36.1
// CHECK:STDOUT: witness = %I.impl_witness.loc7_38.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1107,6 +1110,7 @@ fn B() {
// CHECK:STDOUT: %I.impl_witness.loc7_38.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T.67d) [symbolic = %I.impl_witness.loc7_38.2 (constants.%I.impl_witness)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness.loc7_38.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -112,6 +112,7 @@ fn F() {
// CHECK:STDOUT: %Animal.impl_witness: <witness> = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Animal.ref
// CHECK:STDOUT: witness = %Animal.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -700,6 +700,7 @@ fn CallsWithTypeExplicit(U:! type) {
// CHECK:STDOUT: %Eats.impl_witness.loc7_36.1: <witness> = impl_witness %Eats.impl_witness_table, @A.as_type.as.Eats.impl(constants.%A) [symbolic = %Eats.impl_witness.loc7_36.2 (constants.%Eats.impl_witness.149)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Eats.ref
// CHECK:STDOUT: witness = %Eats.impl_witness.loc7_36.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -159,6 +159,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
// CHECK:STDOUT: %Eats.impl_witness.loc18_36.1: <witness> = impl_witness %Eats.impl_witness_table, @A.as_type.as.Eats.impl(constants.%A) [symbolic = %Eats.impl_witness.loc18_36.2 (constants.%Eats.impl_witness.149e03.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Eats.ref
// CHECK:STDOUT: witness = %Eats.impl_witness.loc18_36.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -313,6 +313,7 @@ fn F() {
// CHECK:STDOUT: %Edible.impl_witness: <witness> = impl_witness %Edible.impl_witness_table [concrete = constants.%Edible.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Edible.ref
// CHECK:STDOUT: witness = %Edible.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -332,6 +333,7 @@ fn F() {
// CHECK:STDOUT: %Eats.impl_witness.loc26_51.1: <witness> = impl_witness %Eats.impl_witness_table, @T.as_type.as.Eats.impl(constants.%T.998, constants.%U) [symbolic = %Eats.impl_witness.loc26_51.2 (constants.%Eats.impl_witness.e8df35.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Eats.type.loc26_49.1
// CHECK:STDOUT: witness = %Eats.impl_witness.loc26_51.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -341,6 +343,7 @@ fn F() {
// CHECK:STDOUT: %Animal.impl_witness: <witness> = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Animal.ref
// CHECK:STDOUT: witness = %Animal.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -142,6 +142,7 @@ fn F() {
// CHECK:STDOUT: %Animal.impl_witness: <witness> = impl_witness %Animal.impl_witness_table [concrete = constants.%Animal.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Animal.ref
// CHECK:STDOUT: witness = %Animal.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -99,6 +99,7 @@ fn G() { F(Animal); }
// CHECK:STDOUT: %Eats.impl_witness: <witness> = impl_witness %Eats.impl_witness_table [concrete = constants.%Eats.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Eats.ref
// CHECK:STDOUT: witness = %Eats.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -166,6 +166,7 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %ImplsGeneric.as.Generic.impl.F.decl
// CHECK:STDOUT: extend %Generic.type
// CHECK:STDOUT: witness = %Generic.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -57,6 +57,7 @@ fn F() {
// CHECK:STDOUT: <unexpected>.inst{{[0-9A-F]+}}.loc18_21: <witness> = impl_witness <unexpected>.inst{{[0-9A-F]+}}.loc18_21 [concrete = constants.%Animal.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <unexpected>.inst{{[0-9A-F]+}}.loc18_14
// CHECK:STDOUT: witness = <unexpected>.inst{{[0-9A-F]+}}.loc18_21
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -205,6 +205,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .RuntimeConvertTo = <poisoned>
// CHECK:STDOUT: .Convert = %RuntimeConvertFrom.as.ImplicitAs.impl.Convert.decl
// CHECK:STDOUT: extend %ImplicitAs.type
// CHECK:STDOUT: witness = %ImplicitAs.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+1
View File
@@ -377,6 +377,7 @@ fn Read(y:! Core.IntLiteral()) {
// CHECK:STDOUT: .N = <poisoned>
// CHECK:STDOUT: .NewCursor = %IntRange.as.Iterate.impl.NewCursor.decl
// CHECK:STDOUT: .Next = %IntRange.as.Iterate.impl.Next.decl
// CHECK:STDOUT: extend %.loc9_24
// CHECK:STDOUT: witness = %Iterate.impl_witness.loc9_87.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -389,6 +389,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .Convert = @ImplicitAs.WithSelf.%assoc0.loc16_32.1
// CHECK:STDOUT: .IntLiteral = <poisoned>
// CHECK:STDOUT: witness = (@ImplicitAs.WithSelf.%ImplicitAs.WithSelf.Convert.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -420,6 +421,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %i32.builtin.as.AddWith.impl.Op.decl
// CHECK:STDOUT: extend %AddWith.type
// CHECK:STDOUT: witness = %AddWith.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -443,6 +445,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Convert = %Core.IntLiteral.as.As.impl.Convert.decl
// CHECK:STDOUT: extend %As.type
// CHECK:STDOUT: witness = %As.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -466,6 +469,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Convert = %Core.IntLiteral.as.ImplicitAs.impl.Convert.decl
// CHECK:STDOUT: extend %ImplicitAs.type
// CHECK:STDOUT: witness = %ImplicitAs.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -493,6 +497,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .IntLiteral = <poisoned>
// CHECK:STDOUT: .Convert = %i32.builtin.as.ImplicitAs.impl.Convert.decl
// CHECK:STDOUT: extend %ImplicitAs.type
// CHECK:STDOUT: witness = %ImplicitAs.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -256,6 +256,7 @@ var arr: array(i32, (1 as i32).(I.F)(2));
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %i32.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -95,12 +95,7 @@ alias N.F2 = F1;
// CHECK:STDERR:
fn N.F1();
// Failure: `N.F1` used after declaration failed.
// TODO: #4622 - Allow defining a poisoned name so it would be found if used after it's declared.
// CHECK:STDERR: fail_use_declaration_after_poison.carbon:[[@LINE+4]]:14: error: member name `F1` not found in `N` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: alias N.F3 = N.F1;
// CHECK:STDERR: ^~~~
// CHECK:STDERR:
// Don't produce an additional diagnostic here.
alias N.F3 = N.F1;
// --- fail_poison_multiple_scopes.carbon
@@ -216,6 +216,7 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %ImplsGeneric.as.Generic.impl.F.decl
// CHECK:STDOUT: extend %Generic.type
// CHECK:STDOUT: witness = %Generic.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -226,6 +227,7 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .G = %ImplsGeneric.as.Other.impl.G.decl
// CHECK:STDOUT: extend %Other.ref
// CHECK:STDOUT: witness = %Other.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1785,6 +1785,7 @@ fn F() {
// CHECK:STDOUT: %Z.impl_witness: <witness> = impl_witness %Z.impl_witness_table [concrete = constants.%Z.impl_witness.c05]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Z.ref
// CHECK:STDOUT: witness = %Z.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1800,6 +1801,7 @@ fn F() {
// CHECK:STDOUT: %Z.impl_witness.loc9_35.1: <witness> = impl_witness %Z.impl_witness_table, @DD.as.Z.impl(constants.%E) [symbolic = %Z.impl_witness.loc9_35.2 (constants.%Z.impl_witness.437)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Z.ref
// CHECK:STDOUT: witness = %Z.impl_witness.loc9_35.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1820,6 +1822,7 @@ fn F() {
// CHECK:STDOUT: %Z.impl_witness.loc12_39.1: <witness> = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(constants.%E) [symbolic = %Z.impl_witness.loc12_39.2 (constants.%Z.impl_witness.40e)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Z.ref
// CHECK:STDOUT: witness = %Z.impl_witness.loc12_39.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -193,6 +193,7 @@ fn F() {
// CHECK:STDOUT: %Y.impl_witness: <witness> = impl_witness %Y.impl_witness_table [concrete = constants.%Y.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Y.ref
// CHECK:STDOUT: witness = %Y.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -201,6 +202,7 @@ fn F() {
// CHECK:STDOUT: %W.impl_witness: <witness> = impl_witness %W.impl_witness_table [concrete = constants.%W.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %W.ref
// CHECK:STDOUT: witness = %W.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -219,6 +221,7 @@ fn F() {
// CHECK:STDOUT: %Z.impl_witness.loc19_36.1: <witness> = impl_witness %Z.impl_witness_table, @CC.as.Z.impl(constants.%E) [symbolic = %Z.impl_witness.loc19_36.2 (constants.%Z.impl_witness.228)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Z.ref
// CHECK:STDOUT: witness = %Z.impl_witness.loc19_36.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -407,6 +407,7 @@ fn H(T:! type) {
// CHECK:STDOUT: %B.impl_witness.loc9_64.1: <witness> = impl_witness %B.impl_witness_table, @BB.as_type.as.B.impl(constants.%AA, constants.%BB.0b1) [symbolic = %B.impl_witness.loc9_64.2 (constants.%B.impl_witness.94a)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %B.type.loc9_62.1
// CHECK:STDOUT: witness = %B.impl_witness.loc9_64.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -226,6 +226,7 @@ fn Test(d: D) -> i32 {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Convert = %C.as.ImplicitAs.impl.Convert.decl
// CHECK:STDOUT: extend %ImplicitAs.type
// CHECK:STDOUT: witness = %ImplicitAs.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+6
View File
@@ -224,6 +224,7 @@ fn CallF() {
// CHECK:STDOUT: %impl_witness_assoc_constant: %empty_struct_type = impl_witness_assoc_constant constants.%empty_struct [concrete = constants.%empty_struct]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc8_14
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -240,6 +241,7 @@ fn CallF() {
// CHECK:STDOUT: %impl_witness_assoc_constant: %i32 = impl_witness_assoc_constant constants.%int_0.6a9 [concrete = constants.%int_0.6a9]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc10_15.1
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -361,6 +363,7 @@ fn CallF() {
// CHECK:STDOUT: %impl_witness_assoc_constant: <error> = impl_witness_assoc_constant <error> [concrete = <error>]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc15_14.1
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -513,6 +516,7 @@ fn CallF() {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .Convert = %empty_tuple.type.as.ImplicitAs.impl.Convert.decl
// CHECK:STDOUT: extend %ImplicitAs.type
// CHECK:STDOUT: witness = %ImplicitAs.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -529,6 +533,7 @@ fn CallF() {
// CHECK:STDOUT: %impl_witness_assoc_constant: <error> = impl_witness_assoc_constant <error> [concrete = <error>]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc18_13.1
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -697,6 +702,7 @@ fn CallF() {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @empty_struct_type.as.<error>.impl: %.loc15_7.2 as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
+1
View File
@@ -134,6 +134,7 @@ final impl C(invalid) as I {}
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.Simple.impl.F.decl
// CHECK:STDOUT: extend %Simple.ref
// CHECK:STDOUT: witness = %Simple.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+5
View File
@@ -289,6 +289,7 @@ fn InstanceCallFail() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F1 = %struct_type.a.as.NonInstance1.impl.F1.decl
// CHECK:STDOUT: extend %NonInstance1.ref
// CHECK:STDOUT: witness = %NonInstance1.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -459,6 +460,7 @@ fn InstanceCallFail() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F2 = %struct_type.b.as.NonInstance2.impl.F2.decl
// CHECK:STDOUT: extend %NonInstance2.ref
// CHECK:STDOUT: witness = %NonInstance2.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -673,6 +675,7 @@ fn InstanceCallFail() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F3 = %struct_type.c.as.NonInstance3.impl.F3.decl
// CHECK:STDOUT: extend %NonInstance3.ref
// CHECK:STDOUT: witness = %NonInstance3.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -872,6 +875,7 @@ fn InstanceCallFail() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .G1 = %struct_type.d.as.Instance1.impl.G1.decl
// CHECK:STDOUT: extend %Instance1.ref
// CHECK:STDOUT: witness = %Instance1.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1023,6 +1027,7 @@ fn InstanceCallFail() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .G2 = %struct_type.e.as.Instance2.impl.G2.decl
// CHECK:STDOUT: extend %Instance2.ref
// CHECK:STDOUT: witness = %Instance2.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+1
View File
@@ -73,6 +73,7 @@ impl i32 as I {}
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref.loc17
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+1
View File
@@ -69,6 +69,7 @@ impl i32 as Empty {
// CHECK:STDOUT: %Empty.impl_witness: <witness> = impl_witness %Empty.impl_witness_table [concrete = constants.%Empty.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Empty.ref
// CHECK:STDOUT: witness = %Empty.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+1
View File
@@ -154,6 +154,7 @@ impl C as I {
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+1
View File
@@ -130,6 +130,7 @@ extend impl nonexistent* as I {}
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl
// CHECK:STDOUT: extend %HasF.ref
// CHECK:STDOUT: witness = %HasF.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -241,6 +241,7 @@ class X(U:! type) {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Param = <poisoned>
// CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl
// CHECK:STDOUT: extend %HasF.type
// CHECK:STDOUT: witness = %HasF.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -577,6 +578,7 @@ class X(U:! type) {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .U = <poisoned>
// CHECK:STDOUT: .F = %X.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.type.loc9_21.2
// CHECK:STDOUT: witness = %I.impl_witness.loc9_23.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
+2
View File
@@ -80,11 +80,13 @@ impl AC as AI {}
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %AI.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.I.impl.e47215.2: %AC.ref as %AI.ref {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %AI.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -112,6 +112,7 @@ fn InstanceCall(n: i32) {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: .G = @Simple.WithSelf.%assoc0
// CHECK:STDOUT: .Undeclared = <poisoned>
// CHECK:STDOUT: witness = (@Simple.WithSelf.%Simple.WithSelf.G.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -139,6 +140,7 @@ fn InstanceCall(n: i32) {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Undeclared = <poisoned>
// CHECK:STDOUT: .G = %i32.as.Simple.impl.G.decl.loc24_27.1
// CHECK:STDOUT: extend %Simple.ref
// CHECK:STDOUT: witness = %Simple.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -125,6 +125,7 @@ class C {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .F = %C.as.GenericInterface.impl.F.decl
// CHECK:STDOUT: extend %GenericInterface.type.loc24_54.2
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -176,7 +177,16 @@ class C {
// CHECK:STDOUT: %T.loc15_29.1 => constants.%T
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @GenericInterface.WithSelf(constants.%T, constants.%Self) {}
// CHECK:STDOUT: specific @GenericInterface.WithSelf(constants.%T, constants.%Self) {
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %GenericInterface.type => constants.%GenericInterface.type.8bc
// CHECK:STDOUT: %Self => constants.%Self
// CHECK:STDOUT: %GenericInterface.WithSelf.F.type => constants.%GenericInterface.WithSelf.F.type
// CHECK:STDOUT: %GenericInterface.WithSelf.F => constants.%GenericInterface.WithSelf.F
// CHECK:STDOUT: %GenericInterface.assoc_type => constants.%GenericInterface.assoc_type
// CHECK:STDOUT: %assoc0.loc16_13.2 => constants.%assoc0
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @GenericInterface.WithSelf.F(constants.%T, constants.%Self) {
// CHECK:STDOUT: %T => constants.%T
@@ -111,6 +111,7 @@ fn F() {
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -162,6 +163,7 @@ fn F() {
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -268,6 +270,7 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Zero = %<error>.as.Z.impl.Zero.decl
// CHECK:STDOUT: extend %Z.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -279,6 +282,7 @@ fn F() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Zero = %Point.as.Z.impl.Zero.decl
// CHECK:STDOUT: extend %Z.ref
// CHECK:STDOUT: witness = %Z.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -103,6 +103,7 @@ class E {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @<error>.as.I.impl: <error> as %I.ref {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -113,6 +114,7 @@ class E {
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.1f6]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -147,6 +147,7 @@ class X {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @<error>.as.I.impl: <error> as %I.ref {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -209,6 +210,7 @@ class X {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @<error>.as.J.impl: <error> as %J.ref {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -360,6 +362,7 @@ class X {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Zero = %<error>.as.Z.impl.Zero.decl
// CHECK:STDOUT: .Method = %<error>.as.Z.impl.Method.decl
// CHECK:STDOUT: extend %Z.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -380,6 +383,7 @@ class X {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Zero = %Point.as.Z.impl.Zero.decl
// CHECK:STDOUT: .Method = %Point.as.Z.impl.Method.decl
// CHECK:STDOUT: extend %Z.ref
// CHECK:STDOUT: witness = %Z.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -582,6 +586,8 @@ class X {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: .B = @A.WithSelf.%assoc0
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .G = <poisoned>
// CHECK:STDOUT: witness = (@A.WithSelf.%A.WithSelf.B.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -610,11 +616,13 @@ class X {
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .B = %X.as.A.impl.B.decl
// CHECK:STDOUT: .G = <poisoned>
// CHECK:STDOUT: extend %A.ref
// CHECK:STDOUT: witness = %A.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @<error>.as.C.impl: <error> as %C.ref {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %C.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -70,6 +70,7 @@ impl () as I {}
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -494,6 +494,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: .F = @I.WithSelf.%assoc0
// CHECK:STDOUT: .PossiblyF = <poisoned>
// CHECK:STDOUT: witness = (@I.WithSelf.%I.WithSelf.F.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -573,6 +574,8 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: .F = @SelfNested.WithSelf.%assoc0
// CHECK:STDOUT: .SelfNestedBadParam = <poisoned>
// CHECK:STDOUT: .SelfNestedBadReturnType = <poisoned>
// CHECK:STDOUT: witness = (@SelfNested.WithSelf.%SelfNested.WithSelf.F.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -584,6 +587,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = <poisoned>
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -594,6 +598,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -606,6 +611,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .PossiblyF = <poisoned>
// CHECK:STDOUT: .F = %F
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -624,6 +630,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %FExtraParam.as.I.impl.F.decl.loc69_18.1
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -642,6 +649,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %FExtraImplicitParam.as.I.impl.F.decl.loc85_23.1
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -660,6 +668,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %FExtraReturnType.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -700,6 +709,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %FMissingParam.as.J.impl.F.decl.loc117_31.1
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = %J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -740,6 +750,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %FMissingImplicitParam.as.J.impl.F.decl.loc130_26.1
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = %J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -779,6 +790,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %FMissingReturnType.as.J.impl.F.decl.loc152_30.1
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = %J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -824,6 +836,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %FDifferentParamType.as.J.impl.F.decl.loc171_38.1
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = %J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -869,6 +882,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %FDifferentImplicitParamType.as.J.impl.F.decl.loc184_38.1
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = %J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -914,6 +928,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %FDifferentReturnType.as.J.impl.F.decl.loc200_38.1
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = %J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -961,6 +976,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .SelfNestedBadParam = <poisoned>
// CHECK:STDOUT: .F = %SelfNestedBadParam.as.SelfNested.impl.F.decl.loc223_87.1
// CHECK:STDOUT: extend %SelfNested.ref
// CHECK:STDOUT: witness = %SelfNested.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1009,6 +1025,7 @@ class SelfNestedBadReturnType {
// CHECK:STDOUT: .SelfNestedBadReturnType = <poisoned>
// CHECK:STDOUT: .SelfNestedBadParam = <poisoned>
// CHECK:STDOUT: .F = %SelfNestedBadReturnType.as.SelfNested.impl.F.decl.loc239_112.1
// CHECK:STDOUT: extend %SelfNested.ref
// CHECK:STDOUT: witness = %SelfNested.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -94,6 +94,7 @@ impl {.a: bool} as type where .Self impls I {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl @i32.as.<error>.impl: %i32 as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -126,6 +127,7 @@ impl {.a: bool} as type where .Self impls I {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl @bool.as.<error>.impl: %.loc8_6 as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -172,6 +174,7 @@ impl {.a: bool} as type where .Self impls I {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl @f64.as.<error>.impl: %f64 as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -234,6 +237,7 @@ impl {.a: bool} as type where .Self impls I {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl @struct_type.a.as.<error>.impl: %struct_type.a as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -69,6 +69,7 @@ impl true as I {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl @<error>.as.I.impl: <error> as %I.ref {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -80,11 +80,13 @@ impl i32 as I {}
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: impl @i32.as.I.impl.a9e516.2: %i32 as %I.ref {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -167,6 +167,7 @@ impl i32 as I {
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F = @I.WithSelf.%assoc0
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: witness = (@I.WithSelf.%I.WithSelf.F.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -195,6 +196,7 @@ impl i32 as I {
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .I = <poisoned>
// CHECK:STDOUT: .F = %bool.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -224,6 +226,7 @@ impl i32 as I {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F = %i32.as.I.impl.F.decl.loc43_18.1
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+13
View File
@@ -284,6 +284,7 @@ impl C as Y {}
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref.loc4
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -364,6 +365,7 @@ impl C as Y {}
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .G = %empty_struct_type.as.I.impl.G.decl
// CHECK:STDOUT: extend %I.ref.loc4
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -474,6 +476,7 @@ impl C as Y {}
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend file.%.loc4_14.2
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -578,6 +581,7 @@ impl C as Y {}
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc6_14
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -703,6 +707,7 @@ impl C as Y {}
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc7_13
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -844,6 +849,7 @@ impl C as Y {}
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc7_13
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -952,6 +958,7 @@ impl C as Y {}
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref.loc7
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1054,6 +1061,7 @@ impl C as Y {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl @D.as.<error>.impl: %D.ref.loc13 as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1207,6 +1215,7 @@ impl C as Y {}
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%C [concrete = constants.%C]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc8_16
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1375,6 +1384,7 @@ impl C as Y {}
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref.loc5
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1607,6 +1617,7 @@ impl C as Y {}
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc9_13
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1795,6 +1806,7 @@ impl C as Y {}
// CHECK:STDOUT: %X.impl_witness: <witness> = impl_witness %X.impl_witness_table [concrete = constants.%X.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %X.ref.loc12
// CHECK:STDOUT: witness = %X.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1803,6 +1815,7 @@ impl C as Y {}
// CHECK:STDOUT: %Y.impl_witness: <witness> = impl_witness %Y.impl_witness_table [concrete = constants.%Y.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Y.ref.loc36
// CHECK:STDOUT: witness = %Y.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -350,6 +350,7 @@ impl forall [T:! type] T as I {
// CHECK:STDOUT: %Interface.impl_witness.loc12_35.1: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.ff3(constants.%T.651) [symbolic = %Interface.impl_witness.loc12_35.2 (constants.%Interface.impl_witness.cca)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Interface.ref.loc12
// CHECK:STDOUT: witness = %Interface.impl_witness.loc12_35.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -366,6 +367,7 @@ impl forall [T:! type] T as I {
// CHECK:STDOUT: %Interface.impl_witness.loc13_35.1: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.755(constants.%T.612) [symbolic = %Interface.impl_witness.loc13_35.2 (constants.%Interface.impl_witness.885)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Interface.ref.loc13
// CHECK:STDOUT: witness = %Interface.impl_witness.loc13_35.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -382,6 +384,7 @@ impl forall [T:! type] T as I {
// CHECK:STDOUT: %Interface.impl_witness.loc14_35.1: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.cd3(constants.%T.9b2) [symbolic = %Interface.impl_witness.loc14_35.2 (constants.%Interface.impl_witness.0f2)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Interface.ref.loc14
// CHECK:STDOUT: witness = %Interface.impl_witness.loc14_35.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -398,6 +401,7 @@ impl forall [T:! type] T as I {
// CHECK:STDOUT: %Interface.impl_witness.loc15_35.1: <witness> = impl_witness %Interface.impl_witness_table, @T.as_type.as.Interface.impl.ba3(constants.%T.0fc) [symbolic = %Interface.impl_witness.loc15_35.2 (constants.%Interface.impl_witness.18f)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Interface.ref.loc15
// CHECK:STDOUT: witness = %Interface.impl_witness.loc15_35.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -556,6 +560,7 @@ impl forall [T:! type] T as I {
// CHECK:STDOUT: %J.impl_witness.loc7_28.1: <witness> = impl_witness %J.impl_witness_table, @T.as_type.as.J.impl.048579.1(constants.%T) [symbolic = %J.impl_witness.loc7_28.2 (constants.%J.impl_witness)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = %J.impl_witness.loc7_28.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -568,6 +573,7 @@ impl forall [T:! type] T as I {
// CHECK:STDOUT:
// CHECK:STDOUT: impl: %.loc15_21 as %J.ref {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -658,6 +664,7 @@ impl forall [T:! type] T as I {
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.6465e0.1]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -666,6 +673,7 @@ impl forall [T:! type] T as I {
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.6465e0.2]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -773,6 +781,7 @@ impl forall [T:! type] T as I {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .A = %T.as.I.impl.A.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness.loc4_31.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -815,6 +824,7 @@ impl forall [T:! type] T as I {
// CHECK:STDOUT: .B = %T.as.I.impl.B.decl
// CHECK:STDOUT: .C = %T.as.I.impl.C.decl
// CHECK:STDOUT: .D = %T.as.I.impl.D.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
+2
View File
@@ -83,6 +83,7 @@ class C {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: .F = @Simple.WithSelf.%assoc0
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: witness = (@Simple.WithSelf.%Simple.WithSelf.F.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -96,6 +97,7 @@ class C {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.Simple.impl.F.decl
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: extend %Simple.ref
// CHECK:STDOUT: witness = %Simple.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+2
View File
@@ -494,6 +494,7 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @empty_tuple.type.as.<error>.impl: %.loc13_7.2 as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -560,6 +561,7 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @empty_tuple.type.as.<error>.impl: %.loc13_7.2 as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -247,6 +247,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3,
// CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.a.b.fe2 = impl_witness_assoc_constant constants.%struct.682 [concrete = constants.%struct.682]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc6_14
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -437,6 +438,7 @@ impl () as I where .X = {.a = true, .b = (1, 2)} and .X = {.a = false, .b = (3,
// CHECK:STDOUT:
// CHECK:STDOUT: impl @empty_tuple.type.as.<error>.impl: %.loc10_7.2 as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
+1
View File
@@ -90,6 +90,7 @@ impl forall [T:! type] T as Simple {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %T.as.Simple.impl.F.decl
// CHECK:STDOUT: extend %Simple.ref
// CHECK:STDOUT: witness = %Simple.impl_witness.loc19_36.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
+10
View File
@@ -401,6 +401,7 @@ impl () as I({}) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_48.1
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -513,6 +514,7 @@ impl () as I({}) {
// CHECK:STDOUT: .A = <poisoned>
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F = %B.as.X.impl.F.decl.loc14_37.1
// CHECK:STDOUT: extend %X.ref
// CHECK:STDOUT: witness = %X.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -578,6 +580,7 @@ impl () as I({}) {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .A = <poisoned>
// CHECK:STDOUT: .F = %B.as.X.impl.F.decl.loc13_26.1
// CHECK:STDOUT: extend %X.ref
// CHECK:STDOUT: witness = %X.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -666,6 +669,7 @@ impl () as I({}) {
// CHECK:STDOUT: .A = <poisoned>
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F = %B.as.X.impl.F.decl.loc14_37.1
// CHECK:STDOUT: extend %X.ref
// CHECK:STDOUT: witness = %X.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -765,6 +769,7 @@ impl () as I({}) {
// CHECK:STDOUT: .A = <poisoned>
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F = %B.as.X.impl.F.decl.loc14_37.1
// CHECK:STDOUT: extend %X.ref
// CHECK:STDOUT: witness = %X.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -830,6 +835,7 @@ impl () as I({}) {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .A = <poisoned>
// CHECK:STDOUT: .F = %B.as.X.impl.F.decl.loc13_30.1
// CHECK:STDOUT: extend %X.ref
// CHECK:STDOUT: witness = %X.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -886,6 +892,7 @@ impl () as I({}) {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .B = <poisoned>
// CHECK:STDOUT: .F = %A.as.X.impl.F.decl.loc23_14.1
// CHECK:STDOUT: extend %X.ref
// CHECK:STDOUT: witness = %X.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1009,6 +1016,7 @@ impl () as I({}) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_34.1
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1186,6 +1194,7 @@ impl () as I({}) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_51.1
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1314,6 +1323,7 @@ impl () as I({}) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %empty_tuple.type.as.I.impl.F.decl.loc10_29.1
// CHECK:STDOUT: extend %I.type
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -298,6 +298,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %MyInt.as.Add.impl.Op.decl
// CHECK:STDOUT: extend %Add.ref
// CHECK:STDOUT: witness = %Add.impl_witness.loc15_48.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
+2
View File
@@ -213,6 +213,7 @@ fn InstanceCallImportFail() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %struct_type.i.as.NonInstance.impl.F.decl
// CHECK:STDOUT: extend %NonInstance.ref
// CHECK:STDOUT: witness = %NonInstance.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -230,6 +231,7 @@ fn InstanceCallImportFail() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .G = %struct_type.i.as.Instance.impl.G.decl
// CHECK:STDOUT: extend %Instance.ref
// CHECK:STDOUT: witness = %Instance.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -89,6 +89,7 @@ fn G(c: C) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+20
View File
@@ -437,6 +437,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.type
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -445,6 +446,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %J.type
// CHECK:STDOUT: witness = %J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -774,6 +776,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %J.type
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1031,6 +1034,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT: %I.impl_witness.loc8_33.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl.431(constants.%T) [symbolic = %I.impl_witness.loc8_33.2 (constants.%I.impl_witness.9f5)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.type.loc8_32.1
// CHECK:STDOUT: witness = %I.impl_witness.loc8_33.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1049,6 +1053,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT: %I.impl_witness.loc12_35.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl.815(constants.%T) [symbolic = %I.impl_witness.loc12_35.2 (constants.%I.impl_witness.18a)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.type.loc12_33.1
// CHECK:STDOUT: witness = %I.impl_witness.loc12_35.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1162,11 +1167,13 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT: %I.impl_witness_table.ee9 = impl_witness_table (), @C.as.I.impl.6f8 [concrete]
// CHECK:STDOUT: %Main.import_ref.61cd7d.1: type = import_ref Main//import_generic, loc8_24, loaded [concrete = constants.%C]
// CHECK:STDOUT: %Main.import_ref.3582b1.1: type = import_ref Main//import_generic, loc8_32, loaded [symbolic = @C.as.I.impl.6f8.%I.type (constants.%I.type.1ab)]
// CHECK:STDOUT: %Main.import_ref.fd0 = import_ref Main//import_generic, loc8_32, unloaded
// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic, loc8_15, loaded [symbolic = @C.as.I.impl.6f8.%T (constants.%T)]
// CHECK:STDOUT: %Main.import_ref.2c7 = import_ref Main//import_generic, loc12_35, unloaded
// CHECK:STDOUT: %I.impl_witness_table.9fc = impl_witness_table (), @C.as.I.impl.856 [concrete]
// CHECK:STDOUT: %Main.import_ref.61cd7d.2: type = import_ref Main//import_generic, loc12_24, loaded [concrete = constants.%C]
// CHECK:STDOUT: %Main.import_ref.ada: type = import_ref Main//import_generic, loc12_33, loaded [symbolic = @C.as.I.impl.856.%I.type (constants.%I.type.e19)]
// CHECK:STDOUT: %Main.import_ref.dc0 = import_ref Main//import_generic, loc12_33, unloaded
// CHECK:STDOUT: %Main.import_ref.b3bc94.4: type = import_ref Main//import_generic, loc12_15, loaded [symbolic = @C.as.I.impl.856.%T (constants.%T)]
// CHECK:STDOUT: %Main.import_ref.15d = import_ref Main//import_generic, loc15_28, unloaded
// CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//import_generic, loc15_18, loaded [symbolic = @N.WithSelf.Self.as_type.impls.I.type.require.%Self.as_type (constants.%Self.as_type)]
@@ -1321,6 +1328,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%Main.import_ref.61cd7d.1 as imports.%Main.import_ref.3582b1.1 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend imports.%Main.import_ref.fd0
// CHECK:STDOUT: witness = imports.%Main.import_ref.e08
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1336,6 +1344,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%Main.import_ref.61cd7d.2 as imports.%Main.import_ref.ada {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend imports.%Main.import_ref.dc0
// CHECK:STDOUT: witness = imports.%Main.import_ref.2c7
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1355,6 +1364,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl: %C.ref as %I.type.loc14_32.1 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.type.loc14_32.1
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1376,6 +1386,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl: %C.ref as %I.type.loc26_33.1 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.type.loc26_33.1
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1657,6 +1668,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT: %I.impl_witness.loc7_34.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl(constants.%T) [symbolic = %I.impl_witness.loc7_34.2 (constants.%I.impl_witness)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.type.loc7_32.1
// CHECK:STDOUT: witness = %I.impl_witness.loc7_34.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1755,6 +1767,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT: %I.impl_witness_table = impl_witness_table (), @C.as.I.impl.6f8 [concrete]
// CHECK:STDOUT: %Main.import_ref.61c: type = import_ref Main//import_generic_with_different_specific, loc7_24, loaded [concrete = constants.%C]
// CHECK:STDOUT: %Main.import_ref.3582b1.1: type = import_ref Main//import_generic_with_different_specific, loc7_32, loaded [symbolic = @C.as.I.impl.6f8.%I.type (constants.%I.type.1ab)]
// CHECK:STDOUT: %Main.import_ref.fd0 = import_ref Main//import_generic_with_different_specific, loc7_32, unloaded
// CHECK:STDOUT: %Main.import_ref.b3bc94.3: type = import_ref Main//import_generic_with_different_specific, loc7_15, loaded [symbolic = @C.as.I.impl.6f8.%T (constants.%T)]
// CHECK:STDOUT: %Main.import_ref.15d = import_ref Main//import_generic_with_different_specific, loc10_28, unloaded
// CHECK:STDOUT: %Main.import_ref.213: type = import_ref Main//import_generic_with_different_specific, loc10_18, loaded [symbolic = @N.WithSelf.Self.as_type.impls.I.type.require.%Self.as_type (constants.%Self.as_type)]
@@ -1857,6 +1870,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl: imports.%Main.import_ref.61c as imports.%Main.import_ref.3582b1.1 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend imports.%Main.import_ref.fd0
// CHECK:STDOUT: witness = imports.%Main.import_ref.e08
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1875,6 +1889,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT: %I.impl_witness.loc5_35.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl.815(constants.%T) [symbolic = %I.impl_witness.loc5_35.2 (constants.%I.impl_witness.18a)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.type.loc5_33.1
// CHECK:STDOUT: witness = %I.impl_witness.loc5_35.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1894,6 +1909,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT: %I.impl_witness.loc6_36.1: <witness> = impl_witness %I.impl_witness_table, @C.as.I.impl.c93(constants.%T) [symbolic = %I.impl_witness.loc6_36.2 (constants.%I.impl_witness.d57)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %N.type.loc6_34.1
// CHECK:STDOUT: witness = %I.impl_witness.loc6_36.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -2437,6 +2453,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl: %D.ref as %J.type.loc14_32.1 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %J.type.loc14_32.1
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -2458,6 +2475,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl: %D.ref as %J.type.loc26_33.1 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %J.type.loc26_33.1
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -2470,6 +2488,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl: %D.ref as %N.type.loc32_32.1 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %N.type.loc32_32.1
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -2483,6 +2502,7 @@ impl forall [T:! type] D as N(T*) {}
// CHECK:STDOUT:
// CHECK:STDOUT: impl: %D.ref as %N.type.loc38_33.1 {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %N.type.loc38_33.1
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -372,6 +372,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc5_14
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -484,6 +485,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc5_14
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -586,6 +588,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc10_14
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -703,6 +706,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc10_14
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -860,6 +864,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C5.as.<error>.impl.bcbfb8.2: %C5.ref as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -957,6 +962,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness.9dc]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1057,6 +1063,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C7.as.<error>.impl: %C7.ref as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1152,6 +1159,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C8.as.<error>.impl: %C8.ref as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1246,6 +1254,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C9.as.<error>.impl: %C9.ref as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1339,6 +1348,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @CA.as.<error>.impl: %CA.ref as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1440,6 +1450,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_struct_type [concrete = constants.%empty_struct_type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc6_14
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1542,6 +1553,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT: %impl_witness_assoc_constant: %struct_type.a.225 = impl_witness_assoc_constant constants.%struct [concrete = constants.%struct]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc6_20
// CHECK:STDOUT: witness = %NonType.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1685,6 +1697,7 @@ impl CD as IF where .F = 0 {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %CD.as.IF.impl.F.decl
// CHECK:STDOUT: extend %.loc10_15
// CHECK:STDOUT: witness = %IF.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+2
View File
@@ -210,6 +210,7 @@ fn F(x: C, y: C) -> C {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.17c
// CHECK:STDOUT: .Op = imports.%Main.import_ref.a96
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: witness = (imports.%Main.Op)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -241,6 +242,7 @@ fn F(x: C, y: C) -> C {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %C.as.Add.impl.Op.decl
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: extend %Add.ref
// CHECK:STDOUT: witness = %Add.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -219,6 +219,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
// CHECK:STDOUT: %Y.impl_witness.loc5_31.1: <witness> = impl_witness %Y.impl_witness_table, @T.as.Y.impl(constants.%T) [symbolic = %Y.impl_witness.loc5_31.2 (constants.%Y.impl_witness)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Y.ref
// CHECK:STDOUT: witness = %Y.impl_witness.loc5_31.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -234,6 +235,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
// CHECK:STDOUT: %Z.impl_witness.loc9_31.1: <witness> = impl_witness %Z.impl_witness_table, @U.as.Z.impl(constants.%U) [symbolic = %Z.impl_witness.loc9_31.2 (constants.%Z.impl_witness.856)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Z.ref
// CHECK:STDOUT: witness = %Z.impl_witness.loc9_31.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -471,6 +473,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
// CHECK:STDOUT: .Self = imports.%Main.import_ref.c82
// CHECK:STDOUT: .Assoc = imports.%Main.import_ref.414
// CHECK:STDOUT: .F = imports.%Main.import_ref.d7f
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: witness = (imports.%Main.Assoc, imports.%Main.F)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -547,6 +550,7 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F = %D.as.I.impl.F.decl
// CHECK:STDOUT: extend %.loc20_31
// CHECK:STDOUT: witness = %I.impl_witness.loc20_49.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
+3
View File
@@ -210,6 +210,8 @@ fn G() {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = imports.%Main.import_ref.c82
// CHECK:STDOUT: .F = imports.%Main.import_ref.7f4
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .Y = <poisoned>
// CHECK:STDOUT: witness = (imports.%Main.F)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -253,6 +255,7 @@ fn G() {
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .Y = <poisoned>
// CHECK:STDOUT: .F = %C.as.I.impl.F.decl.loc8_24.1
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness.loc7_32.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -141,6 +141,7 @@ fn H() -> C({}).(I.F)() {}
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness.loc10_34.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
+8
View File
@@ -243,6 +243,7 @@ interface B {
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %I.ref.loc6
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -283,6 +284,7 @@ interface B {
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -324,6 +326,7 @@ interface B {
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -389,6 +392,7 @@ interface B {
// CHECK:STDOUT:
// CHECK:STDOUT: impl @C.as.<error>.impl: %C.ref.loc13 as <error> {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend <error>
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -499,6 +503,7 @@ interface B {
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness %I.impl_witness_table [concrete = constants.%I.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc8_13
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -618,6 +623,7 @@ interface B {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc8_13
// CHECK:STDOUT: witness = %J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -689,6 +695,7 @@ interface B {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: .Incomplete = <poisoned>
// CHECK:STDOUT: witness = ()
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -711,6 +718,7 @@ interface B {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Incomplete = <poisoned>
// CHECK:STDOUT: .F = %C.as.I.impl.F.decl
// CHECK:STDOUT: extend %.loc8_13
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+11
View File
@@ -351,6 +351,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = %A.as.Action.impl.Op.decl
// CHECK:STDOUT: extend %Action.type
// CHECK:STDOUT: witness = %Action.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -521,6 +522,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.import_ref.d04: type = import_ref Main//action, loc12_6, loaded [concrete = constants.%A]
// CHECK:STDOUT: %Main.import_ref.5ad: type = import_ref Main//action, loc12_19, loaded [concrete = constants.%Action.type.879]
// CHECK:STDOUT: %Main.import_ref.018 = import_ref Main//action, loc13_30, unloaded
// CHECK:STDOUT: %Main.import_ref.d79 = import_ref Main//action, loc12_19, unloaded
// CHECK:STDOUT: %Main.import_ref.04b = import_ref Main//action, loc5_22, unloaded
// CHECK:STDOUT: %Main.import_ref.e8a: %A.as.Action.impl.Op.type = import_ref Main//action, loc13_30, loaded [concrete = constants.%A.as.Action.impl.Op]
// CHECK:STDOUT: %Action.impl_witness_table = impl_witness_table (%Main.import_ref.e8a), @A.as.Action.impl [concrete]
@@ -569,6 +571,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: impl @A.as.Action.impl: imports.%Main.import_ref.d04 as imports.%Main.import_ref.5ad [from "action.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.018
// CHECK:STDOUT: extend imports.%Main.import_ref.d79
// CHECK:STDOUT: witness = imports.%Main.import_ref.170
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -713,6 +716,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.import_ref.d04: type = import_ref Main//action, loc12_6, loaded [concrete = constants.%A]
// CHECK:STDOUT: %Main.import_ref.5ad: type = import_ref Main//action, loc12_19, loaded [concrete = constants.%Action.type.879]
// CHECK:STDOUT: %Main.import_ref.018 = import_ref Main//action, loc13_30, unloaded
// CHECK:STDOUT: %Main.import_ref.d79 = import_ref Main//action, loc12_19, unloaded
// CHECK:STDOUT: %Main.import_ref.8f24d3.3: <witness> = import_ref Main//action, loc10_10, loaded [concrete = constants.%complete_type]
// CHECK:STDOUT: %Main.import_ref.743 = import_ref Main//action, inst{{[0-9A-F]+}} [no loc], unloaded
// CHECK:STDOUT: %Main.import_ref.04b = import_ref Main//action, loc5_22, unloaded
@@ -761,6 +765,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: impl @A.as.Action.impl: imports.%Main.import_ref.d04 as imports.%Main.import_ref.5ad [from "action.carbon"] {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Op = imports.%Main.import_ref.018
// CHECK:STDOUT: extend imports.%Main.import_ref.d79
// CHECK:STDOUT: witness = imports.%Main.import_ref.acc
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -980,6 +985,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .Make = @Factory.WithSelf.%assoc0.loc6_17.1
// CHECK:STDOUT: .Method = @Factory.WithSelf.%assoc1.loc8_31.1
// CHECK:STDOUT: .B = <poisoned>
// CHECK:STDOUT: witness = (@Factory.WithSelf.%Factory.WithSelf.Make.decl, @Factory.WithSelf.%Factory.WithSelf.Method.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -1017,6 +1023,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: .B = <poisoned>
// CHECK:STDOUT: .Make = %A.as.Factory.impl.Make.decl
// CHECK:STDOUT: .Method = %A.as.Factory.impl.Method.decl
// CHECK:STDOUT: extend %Factory.type
// CHECK:STDOUT: witness = %Factory.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1216,6 +1223,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.import_ref.511: type = import_ref Main//factory, loc14_20, loaded [concrete = constants.%Factory.type.5dd]
// CHECK:STDOUT: %Main.import_ref.b40 = import_ref Main//factory, loc15_17, unloaded
// CHECK:STDOUT: %Main.import_ref.9db = import_ref Main//factory, loc16_31, unloaded
// CHECK:STDOUT: %Main.import_ref.223 = import_ref Main//factory, loc14_20, unloaded
// CHECK:STDOUT: %Main.import_ref.c54 = import_ref Main//factory, loc6_17, unloaded
// CHECK:STDOUT: %Main.import_ref.7b0: %A.as.Factory.impl.Make.type = import_ref Main//factory, loc15_17, loaded [concrete = constants.%A.as.Factory.impl.Make]
// CHECK:STDOUT: %Main.import_ref.df6: %A.as.Factory.impl.Method.type = import_ref Main//factory, loc16_31, loaded [concrete = constants.%A.as.Factory.impl.Method]
@@ -1282,6 +1290,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Make = imports.%Main.import_ref.b40
// CHECK:STDOUT: .Method = imports.%Main.import_ref.9db
// CHECK:STDOUT: extend imports.%Main.import_ref.223
// CHECK:STDOUT: witness = imports.%Main.import_ref.8a9
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1486,6 +1495,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: %Main.import_ref.511: type = import_ref Main//factory, loc14_20, loaded [concrete = constants.%Factory.type.5dd]
// CHECK:STDOUT: %Main.import_ref.b40 = import_ref Main//factory, loc15_17, unloaded
// CHECK:STDOUT: %Main.import_ref.9db = import_ref Main//factory, loc16_31, unloaded
// CHECK:STDOUT: %Main.import_ref.223 = import_ref Main//factory, loc14_20, unloaded
// CHECK:STDOUT: %Main.import_ref.c54 = import_ref Main//factory, loc6_17, unloaded
// CHECK:STDOUT: %Main.import_ref.71e = import_ref Main//factory, loc8_31, unloaded
// CHECK:STDOUT: }
@@ -1551,6 +1561,7 @@ fn InstanceC(a: A) -> C {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Make = imports.%Main.import_ref.b40
// CHECK:STDOUT: .Method = imports.%Main.import_ref.9db
// CHECK:STDOUT: extend imports.%Main.import_ref.223
// CHECK:STDOUT: witness = imports.%Main.import_ref.1cd
// CHECK:STDOUT: }
// CHECK:STDOUT:
+1
View File
@@ -99,6 +99,7 @@ fn G(c: C) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl
// CHECK:STDOUT: extend %HasF.ref
// CHECK:STDOUT: witness = %HasF.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -256,6 +256,7 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .II = %C.as.I.impl.II.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -273,6 +274,7 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .JJ = %C.as.J.impl.JJ.decl
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = %J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -123,6 +123,7 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+7
View File
@@ -255,6 +255,7 @@ fn G(x: A) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
// CHECK:STDOUT: extend %HasF.ref
// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_34.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -502,6 +503,7 @@ fn G(x: A) {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: .F = @HasF.WithSelf.%assoc0
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: witness = (@HasF.WithSelf.%HasF.WithSelf.F.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -538,6 +540,7 @@ fn G(x: A) {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .F = %ptr.as.HasF.impl.F.decl
// CHECK:STDOUT: extend %HasF.ref
// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_35.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -818,6 +821,7 @@ fn G(x: A) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl
// CHECK:STDOUT: extend %HasF.ref
// CHECK:STDOUT: witness = %HasF.impl_witness.loc10_37.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1108,6 +1112,7 @@ fn G(x: A) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %empty_struct_type.as.HasF.impl.F.decl
// CHECK:STDOUT: extend %HasF.type.loc8_36.2
// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_38.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1375,6 +1380,7 @@ fn G(x: A) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
// CHECK:STDOUT: extend %HasF.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1587,6 +1593,7 @@ fn G(x: A) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
// CHECK:STDOUT: extend %HasF.type.loc8_35.2
// CHECK:STDOUT: witness = %HasF.impl_witness.loc8_37.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -189,6 +189,7 @@ fn TestSpecific(a: A({})*) -> {}* {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .V = <poisoned>
// CHECK:STDOUT: .F = %A.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.type.loc12_35.2
// CHECK:STDOUT: witness = %I.impl_witness.loc12_37.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
+8
View File
@@ -309,6 +309,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl
// CHECK:STDOUT: extend %HasF.ref
// CHECK:STDOUT: witness = %HasF.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -499,6 +500,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .G = %C.as.HasG.impl.G.decl
// CHECK:STDOUT: extend %HasG.ref
// CHECK:STDOUT: witness = %HasG.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -516,6 +518,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %D.as.HasF.impl.F.decl
// CHECK:STDOUT: extend %HasF.ref
// CHECK:STDOUT: witness = %HasF.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -533,6 +536,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .G = %D.as.HasG.impl.G.decl
// CHECK:STDOUT: extend %HasG.ref
// CHECK:STDOUT: witness = %HasG.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1343,6 +1347,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .H = %empty_tuple.type.as.Z.impl.H.decl
// CHECK:STDOUT: extend %Z.ref
// CHECK:STDOUT: witness = %Z.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1777,6 +1782,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .K = %AnyParam.as.Y.impl.K.decl
// CHECK:STDOUT: extend %Y.ref
// CHECK:STDOUT: witness = %Y.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -2249,6 +2255,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .K = %AnyParam.as.Y.impl.K.decl
// CHECK:STDOUT: extend %Y.ref
// CHECK:STDOUT: witness = %Y.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -2839,6 +2846,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -153,6 +153,7 @@ fn F(c: C) -> i32 {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -231,6 +231,7 @@ fn F() {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc58_23
// CHECK:STDOUT: witness = %Y.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -604,6 +605,7 @@ fn F() {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc14_15
// CHECK:STDOUT: witness = %Y.impl_witness.loc14_29.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -613,6 +615,7 @@ fn F() {
// CHECK:STDOUT: %Z1.impl_witness: <witness> = impl_witness %Z1.impl_witness_table [concrete = constants.%Z1.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Z1.ref
// CHECK:STDOUT: witness = %Z1.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -621,6 +624,7 @@ fn F() {
// CHECK:STDOUT: %Z2.impl_witness: <witness> = impl_witness %Z2.impl_witness_table [concrete = constants.%Z2.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Z2.ref
// CHECK:STDOUT: witness = %Z2.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -303,6 +303,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc9_44
// CHECK:STDOUT: witness = %Z.impl_witness.loc9_58.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -321,6 +322,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%T.67d [symbolic = %T.loc11_21.2 (constants.%T.67d)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc11_40
// CHECK:STDOUT: witness = %Z.impl_witness.loc11_53.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -710,6 +712,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc10_44
// CHECK:STDOUT: witness = %Z.impl_witness.loc10_58.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -728,6 +731,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%T.67d [symbolic = %T.loc12_15.2 (constants.%T.67d)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc12_34
// CHECK:STDOUT: witness = %Z.impl_witness.loc12_47.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1022,6 +1026,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc7_39
// CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_56.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1251,6 +1256,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc7_39
// CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_56.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -1477,6 +1483,7 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
// CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%ptr.e8f8f9.1 [symbolic = %ptr.loc7_54.2 (constants.%ptr.e8f8f9.1)]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %.loc7_39
// CHECK:STDOUT: witness = %Ptr.impl_witness.loc7_56.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -287,6 +287,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %X.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.type
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -660,6 +661,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.type
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -190,6 +190,7 @@ fn Call() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+8
View File
@@ -270,6 +270,7 @@ fn P(o: O) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl
// CHECK:STDOUT: extend %HasF.ref
// CHECK:STDOUT: witness = %HasF.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -280,6 +281,7 @@ fn P(o: O) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .G = %C.as.HasG.impl.G.decl
// CHECK:STDOUT: extend %HasG.ref
// CHECK:STDOUT: witness = %HasG.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -495,6 +497,7 @@ fn P(o: O) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .A = %D.as.HasA1.impl.A.decl
// CHECK:STDOUT: extend %HasA1.ref
// CHECK:STDOUT: witness = %HasA1.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -505,6 +508,7 @@ fn P(o: O) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .A = %D.as.HasA2.impl.A.decl
// CHECK:STDOUT: extend %HasA2.ref
// CHECK:STDOUT: witness = %HasA2.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -685,6 +689,7 @@ fn P(o: O) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .I = %E.as.HasI.impl.I.decl
// CHECK:STDOUT: extend %HasI.ref
// CHECK:STDOUT: witness = %HasI.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -855,6 +860,7 @@ fn P(o: O) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .K = %L.as.HasK.impl.K.decl
// CHECK:STDOUT: extend %HasK.ref
// CHECK:STDOUT: witness = %HasK.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1043,6 +1049,7 @@ fn P(o: O) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .N = %O.as.HasN1.impl.N.decl
// CHECK:STDOUT: extend %HasN1.ref
// CHECK:STDOUT: witness = %HasN1.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1053,6 +1060,7 @@ fn P(o: O) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .N = %O.as.HasN2.impl.N.decl
// CHECK:STDOUT: extend %HasN2.ref
// CHECK:STDOUT: witness = %HasN2.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -10,7 +10,7 @@
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/name_lookup_in_impl_definition.carbon
// --- fail_todo_name_lookup_into_impl_as_target.carbon
// --- name_lookup_into_impl_as_target.carbon
library "[[@TEST_NAME]]";
interface I {
@@ -21,11 +21,94 @@ interface I {
class C { adapt {}; }
impl forall [T:! type] T as I where .U = C {
// TODO: We should do name lookup into `I` inside the body of an `impl as I`,
// where we would find `U`.
// CHECK:STDERR: fail_todo_name_lookup_into_impl_as_target.carbon:[[@LINE+4]]:13: error: name `U` not found [NameNotFound]
// CHECK:STDERR: fn F() -> U { return {} as C; }
// CHECK:STDERR: ^
// CHECK:STDERR:
// We perform name lookup into `I` and resolve `U` to `T.(I.U)`.
//@dump-sem-ir-begin
fn F() -> U { return {} as C; }
//@dump-sem-ir-end
}
// CHECK:STDOUT: --- name_lookup_into_impl_as_target.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
// CHECK:STDOUT: %C: type = class_type @C [concrete]
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @T.as.I.impl.%I.impl_witness_table, @T.as.I.impl(%T) [symbolic]
// CHECK:STDOUT: %I.facet: %I.type = facet_value %T, (%I.impl_witness) [symbolic]
// CHECK:STDOUT: %.a69: Core.Form = init_form %C [concrete]
// CHECK:STDOUT: %pattern_type.7c7: type = pattern_type %C [concrete]
// CHECK:STDOUT: %T.as.I.impl.F.type: type = fn_type @T.as.I.impl.F, @T.as.I.impl(%T) [symbolic]
// CHECK:STDOUT: %T.as.I.impl.F: %T.as.I.impl.F.type = struct_value () [symbolic]
// CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic impl @T.as.I.impl(%T.loc10_15.2: type) {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as.I.impl.F.type: type = fn_type @T.as.I.impl.F, @T.as.I.impl(%T.loc10_15.1) [symbolic = %T.as.I.impl.F.type (constants.%T.as.I.impl.F.type)]
// CHECK:STDOUT: %T.as.I.impl.F: @T.as.I.impl.%T.as.I.impl.F.type (%T.as.I.impl.F.type) = struct_value () [symbolic = %T.as.I.impl.F (constants.%T.as.I.impl.F)]
// CHECK:STDOUT:
// CHECK:STDOUT: impl: %T.ref as %.loc10_31 {
// CHECK:STDOUT: %T.as.I.impl.F.decl: @T.as.I.impl.%T.as.I.impl.F.type (%T.as.I.impl.F.type) = fn_decl @T.as.I.impl.F [symbolic = @T.as.I.impl.%T.as.I.impl.F (constants.%T.as.I.impl.F)] {
// CHECK:STDOUT: %return.param_patt: %pattern_type.7c7 = out_param_pattern [concrete]
// CHECK:STDOUT: %return.patt: %pattern_type.7c7 = return_slot_pattern %return.param_patt, %U.ref [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %I.facet.loc13_13.2: %I.type = facet_value @T.as.I.impl.%T.ref, (constants.%I.impl_witness) [symbolic = %I.facet.loc13_13.1 (constants.%I.facet)]
// CHECK:STDOUT: %.loc13_13.1: %I.type = converted @T.as.I.impl.%T.ref, %I.facet.loc13_13.2 [symbolic = %I.facet.loc13_13.1 (constants.%I.facet)]
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%C]
// CHECK:STDOUT: %U.ref: type = name_ref U, %impl.elem0 [concrete = constants.%C]
// CHECK:STDOUT: %.loc13_13.2: Core.Form = init_form %U.ref [concrete = constants.%.a69]
// CHECK:STDOUT: %return.param: ref %C = out_param call_param0
// CHECK:STDOUT: %return: ref %C = return_slot %return.param
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .U = <poisoned>
// CHECK:STDOUT: .F = %T.as.I.impl.F.decl
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: extend %.loc10_31
// CHECK:STDOUT: witness = %I.impl_witness.loc10_44.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @T.as.I.impl.F(@T.as.I.impl.%T.loc10_15.2: type) {
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
// CHECK:STDOUT: %I.impl_witness: <witness> = impl_witness @T.as.I.impl.%I.impl_witness_table, @T.as.I.impl(%T) [symbolic = %I.impl_witness (constants.%I.impl_witness)]
// CHECK:STDOUT: %I.facet.loc13_13.1: %I.type = facet_value %T, (%I.impl_witness) [symbolic = %I.facet.loc13_13.1 (constants.%I.facet)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT:
// CHECK:STDOUT: fn() -> out %return.param: %C {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc13_25: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc13_27.1: %C = as_compatible %empty_struct [concrete = constants.%C.val]
// CHECK:STDOUT: %.loc13_27.2: %C = converted %.loc13_25, %.loc13_27.1 [concrete = constants.%C.val]
// CHECK:STDOUT: %.loc13_31.1: %empty_struct_type = as_compatible %.loc13_27.2 [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc13_31.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc13_31.3: init %C = as_compatible %.loc13_31.2 [concrete = constants.%C.val]
// CHECK:STDOUT: %.loc13_31.4: init %C = converted %.loc13_27.2, %.loc13_31.3 [concrete = constants.%C.val]
// CHECK:STDOUT: return %.loc13_31.4
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @T.as.I.impl(constants.%T) {
// CHECK:STDOUT: %T.loc10_15.1 => constants.%T
// CHECK:STDOUT: %I.impl_witness.loc10_44.2 => constants.%I.impl_witness
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
// CHECK:STDOUT: %T.as.I.impl.F.type => constants.%T.as.I.impl.F.type
// CHECK:STDOUT: %T.as.I.impl.F => constants.%T.as.I.impl.F
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: specific @T.as.I.impl.F(constants.%T) {
// CHECK:STDOUT: %T => constants.%T
// CHECK:STDOUT: %I.impl_witness => constants.%I.impl_witness
// CHECK:STDOUT: %I.facet.loc13_13.1 => constants.%I.facet
// CHECK:STDOUT: }
// CHECK:STDOUT:
+10 -14
View File
@@ -2,7 +2,7 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
//
// AUTOUPDATE
// TIP: To test this file alone, run:
@@ -36,22 +36,18 @@ interface I {
class B {
impl as I {
// CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE+3]]:13: error: name `B` used before it was declared [NameUseBeforeDecl]
// CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE+11]]:13: error: accessing member from impl before it has a defined value [ImplAccessMemberBeforeSet]
// CHECK:STDERR: fn A(x: B);
// CHECK:STDERR: ^
// CHECK:STDERR:
// CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE+7]]:13: error: cannot implicitly convert non-type value of type `<type of B in B as I>` to `type` [ConversionFailureNonTypeToFacet]
// CHECK:STDERR: fn A(x: B);
// CHECK:STDERR: ^
// CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE+4]]:13: note: type `<type of B in B as I>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessInContext]
// CHECK:STDERR: fn A(x: B);
// CHECK:STDERR: ^
// CHECK:STDERR:
fn A(x: B);
// TODO: Avoid ImplMissingFunction for functions that were declared after they were poisoned.
// CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE+11]]:8: note: declared here [NameUseBeforeDeclNote]
// CHECK:STDERR: fn B();
// CHECK:STDERR: ^
// CHECK:STDERR:
// CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE-10]]:3: error: missing implementation of B in impl of interface I [ImplMissingFunction]
// CHECK:STDERR: impl as I {
// CHECK:STDERR: ^~~~~~~~~~~
// CHECK:STDERR: fail_impl_function_poisoned.carbon:[[@LINE-17]]:3: note: associated function B declared here [AssociatedFunctionHere]
// CHECK:STDERR: fn B();
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR:
fn B();
}
}
@@ -188,6 +188,7 @@ impl () as D;
// CHECK:STDOUT:
// CHECK:STDOUT: impl @empty_tuple.type.as.A.impl.276de1.2: %.loc14_7.2 as %A.ref {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %A.ref
// CHECK:STDOUT: witness = <error>
// CHECK:STDOUT: }
// CHECK:STDOUT:
+1
View File
@@ -106,6 +106,7 @@ class A {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Make = %C.as.DefaultConstructible.impl.Make.decl
// CHECK:STDOUT: extend %DefaultConstructible.ref
// CHECK:STDOUT: witness = %DefaultConstructible.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -182,6 +182,7 @@ impl D as SelfNested {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: .F = @UseSelf.WithSelf.%assoc0
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: witness = (@UseSelf.WithSelf.%UseSelf.WithSelf.F.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -218,6 +219,7 @@ impl D as SelfNested {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .Self = %Self
// CHECK:STDOUT: .F = @SelfNested.WithSelf.%assoc0
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: witness = (@SelfNested.WithSelf.%SelfNested.WithSelf.F.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -249,6 +251,7 @@ impl D as SelfNested {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F = %C.as.UseSelf.impl.F.decl
// CHECK:STDOUT: extend %UseSelf.ref
// CHECK:STDOUT: witness = %UseSelf.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -277,6 +280,7 @@ impl D as SelfNested {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %D.as.UseSelf.impl.F.decl
// CHECK:STDOUT: extend %UseSelf.ref
// CHECK:STDOUT: witness = %UseSelf.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -304,6 +308,7 @@ impl D as SelfNested {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .C = <poisoned>
// CHECK:STDOUT: .F = %C.as.SelfNested.impl.F.decl
// CHECK:STDOUT: extend %SelfNested.ref
// CHECK:STDOUT: witness = %SelfNested.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -330,6 +335,7 @@ impl D as SelfNested {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %D.as.SelfNested.impl.F.decl
// CHECK:STDOUT: extend %SelfNested.ref
// CHECK:STDOUT: witness = %SelfNested.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -81,6 +81,7 @@ class X {
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .B = %X.as.A.impl.B.decl
// CHECK:STDOUT: .F = %X.as.A.impl.F.decl
// CHECK:STDOUT: extend %A.ref
// CHECK:STDOUT: witness = %A.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
File diff suppressed because it is too large Load Diff
@@ -112,6 +112,7 @@ fn F(T:! Empty) {
// CHECK:STDOUT: %Empty.impl_witness: <witness> = impl_witness %Empty.impl_witness_table [concrete = constants.%Empty.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Empty.ref
// CHECK:STDOUT: witness = %Empty.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1379,6 +1379,7 @@ fn Works() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .G = %C.as.A.impl.G.decl
// CHECK:STDOUT: extend %A.ref
// CHECK:STDOUT: witness = %A.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1563,6 +1564,7 @@ fn Works() {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .G = %C.as.A.impl.G.decl
// CHECK:STDOUT: extend %A.ref
// CHECK:STDOUT: witness = %A.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+1
View File
@@ -121,6 +121,7 @@ class C {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+2
View File
@@ -189,6 +189,7 @@ fn Use() { UseJ(C); }
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %T.as_type.as.I.impl.F.decl
// CHECK:STDOUT: extend %I.ref
// CHECK:STDOUT: witness = %I.impl_witness.loc7_34.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -198,6 +199,7 @@ fn Use() { UseJ(C); }
// CHECK:STDOUT: %J.impl_witness: <witness> = impl_witness %J.impl_witness_table [concrete = constants.%J.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %J.ref
// CHECK:STDOUT: witness = %J.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
+2
View File
@@ -269,6 +269,7 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: %Simple.impl_witness: <witness> = impl_witness %Simple.impl_witness_table [concrete = constants.%Simple.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %Simple.type
// CHECK:STDOUT: witness = %Simple.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -288,6 +289,7 @@ fn F(unused T:! Generic((), ())) {}
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .X = <poisoned>
// CHECK:STDOUT: .F = %C.as.WithAssocFn.impl.F.decl
// CHECK:STDOUT: extend %WithAssocFn.type
// CHECK:STDOUT: witness = %WithAssocFn.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -176,6 +176,7 @@ impl C as AddWith(C) {
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: .F = %C.as.AddWith.impl.F.decl
// CHECK:STDOUT: extend %AddWith.type
// CHECK:STDOUT: witness = %AddWith.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -359,6 +359,8 @@ fn CallIndirect() {
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .F = @A.WithSelf.%assoc0.loc6_41.1
// CHECK:STDOUT: .X = <poisoned>
// CHECK:STDOUT: .Y = <poisoned>
// CHECK:STDOUT: witness = (@A.WithSelf.%A.WithSelf.F.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -401,6 +403,7 @@ fn CallIndirect() {
// CHECK:STDOUT: .X = <poisoned>
// CHECK:STDOUT: .Y = <poisoned>
// CHECK:STDOUT: .F = %Y.as.A.impl.F.decl
// CHECK:STDOUT: extend %A.type
// CHECK:STDOUT: witness = %A.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1085,6 +1088,9 @@ fn CallIndirect() {
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .T = <poisoned>
// CHECK:STDOUT: .F = @A.WithSelf.%assoc0.loc6_39.1
// CHECK:STDOUT: .W = <poisoned>
// CHECK:STDOUT: .V1 = <poisoned>
// CHECK:STDOUT: .V2 = <poisoned>
// CHECK:STDOUT: witness = (@A.WithSelf.%A.WithSelf.F.decl)
// CHECK:STDOUT:
// CHECK:STDOUT: !requires:
@@ -1141,6 +1147,7 @@ fn CallIndirect() {
// CHECK:STDOUT: .V1 = <poisoned>
// CHECK:STDOUT: .V2 = <poisoned>
// CHECK:STDOUT: .F = %tuple.type.as.A.impl.F.decl
// CHECK:STDOUT: extend %A.type.loc14_61.2
// CHECK:STDOUT: witness = %A.impl_witness.loc14_63.1
// CHECK:STDOUT: }
// CHECK:STDOUT: }
@@ -271,6 +271,7 @@ interface Bar[T:! type] {}
// CHECK:STDOUT: %NotGenericNoParams.impl_witness: <witness> = impl_witness %NotGenericNoParams.impl_witness_table [concrete = constants.%NotGenericNoParams.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %NotGenericNoParams.ref
// CHECK:STDOUT: witness = %NotGenericNoParams.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -279,6 +280,7 @@ interface Bar[T:! type] {}
// CHECK:STDOUT: %NotGenericButParams.impl_witness: <witness> = impl_witness %NotGenericButParams.impl_witness_table [concrete = constants.%NotGenericButParams.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %NotGenericButParams.type
// CHECK:STDOUT: witness = %NotGenericButParams.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -287,6 +289,7 @@ interface Bar[T:! type] {}
// CHECK:STDOUT: %GenericAndParams.impl_witness: <witness> = impl_witness %GenericAndParams.impl_witness_table [concrete = constants.%GenericAndParams.impl_witness.12e]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %GenericAndParams.type
// CHECK:STDOUT: witness = %GenericAndParams.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -295,6 +298,7 @@ interface Bar[T:! type] {}
// CHECK:STDOUT: %GenericNoParams.impl_witness: <witness> = impl_witness %GenericNoParams.impl_witness_table [concrete = constants.%GenericNoParams.impl_witness]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %GenericNoParams.ref
// CHECK:STDOUT: witness = %GenericNoParams.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -303,6 +307,7 @@ interface Bar[T:! type] {}
// CHECK:STDOUT: %GenericAndParams.impl_witness: <witness> = impl_witness %GenericAndParams.impl_witness_table [concrete = constants.%GenericAndParams.impl_witness.e7f]
// CHECK:STDOUT:
// CHECK:STDOUT: !members:
// CHECK:STDOUT: extend %GenericAndParams.type
// CHECK:STDOUT: witness = %GenericAndParams.impl_witness
// CHECK:STDOUT: }
// CHECK:STDOUT:

Some files were not shown because too many files have changed in this diff Show More