mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 09:24:46 +01:00
Associated constants can be used in member function signatures (#5089)
This required allowing incomplete facet types where previously completeness was required. Once we support named constraints, we will need a way to consistently go from an interface to a facet type witness index without requiring the interface to be complete in these cases. --------- Co-authored-by: Josh L <josh11b@users.noreply.github.com>
This commit is contained in:
@@ -1148,7 +1148,10 @@ auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id,
|
||||
return SemIR::ErrorInst::SingletonInstId;
|
||||
}
|
||||
|
||||
// We can only perform initialization for complete, non-abstract types.
|
||||
// We can only perform initialization for complete, non-abstract types. Note
|
||||
// that `RequireConcreteType` returns true for facet types, since their
|
||||
// representation is fixed. This allows us to support using the `Self` of an
|
||||
// interface inside its definition.
|
||||
if (!RequireConcreteType(
|
||||
context, target.type_id, loc_id,
|
||||
[&] {
|
||||
|
||||
@@ -154,6 +154,9 @@ auto HandleParseNode(Context& context,
|
||||
interface_info.definition_id = interface_decl_id;
|
||||
interface_info.scope_id = context.name_scopes().Add(
|
||||
interface_decl_id, SemIR::NameId::None, interface_info.parent_scope_id);
|
||||
context.name_scopes()
|
||||
.Get(interface_info.scope_id)
|
||||
.set_is_interface_definition();
|
||||
|
||||
auto self_specific_id =
|
||||
context.generics().GetSelfSpecific(interface_info.generic_id);
|
||||
|
||||
@@ -165,28 +165,17 @@ static auto FindAndDiagnoseImplLookupCycle(
|
||||
static auto GetInterfacesFromConstantId(
|
||||
Context& context, SemIR::ConstantId query_facet_type_const_id,
|
||||
bool& has_other_requirements)
|
||||
-> llvm::SmallVector<SemIR::CompleteFacetType::RequiredInterface> {
|
||||
// The `query_facet_type_const_id` is a constant value for some facet type. We
|
||||
// do this long chain of steps to go from that constant value to the
|
||||
// `FacetTypeId` found on the `FacetType` instruction of this constant value,
|
||||
// and finally to the `CompleteFacetType`.
|
||||
-> llvm::SmallVector<SemIR::SpecificInterface> {
|
||||
auto facet_type_inst_id =
|
||||
context.constant_values().GetInstId(query_facet_type_const_id);
|
||||
auto facet_type_inst =
|
||||
context.insts().GetAs<SemIR::FacetType>(facet_type_inst_id);
|
||||
auto facet_type_id = facet_type_inst.facet_type_id;
|
||||
auto complete_facet_type_id =
|
||||
context.complete_facet_types().TryGetId(facet_type_id);
|
||||
// The facet type will already be completed before coming here. If we're
|
||||
// converting from a concrete type to a facet type, the conversion step
|
||||
// requires everything to be complete before doing impl lookup.
|
||||
CARBON_CHECK(complete_facet_type_id.has_value());
|
||||
const auto& complete_facet_type =
|
||||
context.complete_facet_types().Get(complete_facet_type_id);
|
||||
|
||||
has_other_requirements =
|
||||
context.facet_types().Get(facet_type_id).other_requirements;
|
||||
return complete_facet_type.required_interfaces;
|
||||
const auto& facet_type_info =
|
||||
context.facet_types().Get(facet_type_inst.facet_type_id);
|
||||
has_other_requirements = facet_type_info.other_requirements;
|
||||
// TODO: Once we add support for named constraints, we will need to change
|
||||
// this to return the same interfaces as in the complete facet type.
|
||||
return facet_type_info.impls_constraints;
|
||||
}
|
||||
|
||||
static auto GetWitnessIdForImpl(
|
||||
@@ -257,15 +246,12 @@ static auto GetWitnessIdForImpl(
|
||||
context.insts()
|
||||
.GetAs<SemIR::FacetType>(deduced_constraint_id)
|
||||
.facet_type_id;
|
||||
const auto& deduced_constraint_complete_facet_type =
|
||||
context.complete_facet_types().Get(
|
||||
context.complete_facet_types().TryGetId(
|
||||
deduced_constraint_facet_type_id));
|
||||
CARBON_CHECK(deduced_constraint_complete_facet_type.num_to_impl == 1);
|
||||
const auto& deduced_constraint_facet_type_info =
|
||||
context.facet_types().Get(deduced_constraint_facet_type_id);
|
||||
CARBON_CHECK(deduced_constraint_facet_type_info.impls_constraints.size() ==
|
||||
1);
|
||||
|
||||
if (context.facet_types()
|
||||
.Get(deduced_constraint_facet_type_id)
|
||||
.other_requirements) {
|
||||
if (deduced_constraint_facet_type_info.other_requirements) {
|
||||
// TODO: Remove this when other requirements goes away.
|
||||
return SemIR::InstId::None;
|
||||
}
|
||||
@@ -273,7 +259,7 @@ static auto GetWitnessIdForImpl(
|
||||
// The specifics in the queried interface must match the deduced specifics in
|
||||
// the impl's constraint facet type.
|
||||
auto impl_interface_specific_id =
|
||||
deduced_constraint_complete_facet_type.required_interfaces[0].specific_id;
|
||||
deduced_constraint_facet_type_info.impls_constraints[0].specific_id;
|
||||
auto query_interface_specific_id = interface.specific_id;
|
||||
if (impl_interface_specific_id != query_interface_specific_id) {
|
||||
return SemIR::InstId::None;
|
||||
|
||||
@@ -2314,6 +2314,7 @@ static auto AddInterfaceDefinition(ImportContext& context,
|
||||
new_interface.first_owning_decl_id, SemIR::NameId::None,
|
||||
new_interface.parent_scope_id);
|
||||
auto& new_scope = context.local_name_scopes().Get(new_interface.scope_id);
|
||||
new_scope.set_is_interface_definition();
|
||||
const auto& import_scope =
|
||||
context.import_name_scopes().Get(import_interface.scope_id);
|
||||
|
||||
|
||||
@@ -568,10 +568,6 @@ auto PerformCompoundMemberAccess(Context& context, SemIR::LocId loc_id,
|
||||
auto interface_type = GetInterfaceFromFacetType(context, interface_type_id);
|
||||
// An associated entity is always associated with a single interface.
|
||||
CARBON_CHECK(interface_type);
|
||||
const auto& interface =
|
||||
context.interfaces().Get(interface_type->interface_id);
|
||||
auto assoc_entities =
|
||||
context.inst_blocks().Get(interface.associated_entities_id);
|
||||
auto value_inst_id = context.constant_values().GetConstantInstId(member_id);
|
||||
// TODO: According to
|
||||
// https://docs.carbon-lang.dev/docs/design/expressions/member_access.html#member-resolution
|
||||
@@ -584,7 +580,7 @@ auto PerformCompoundMemberAccess(Context& context, SemIR::LocId loc_id,
|
||||
}
|
||||
auto assoc_entity =
|
||||
context.insts().GetAs<SemIR::AssociatedEntity>(value_inst_id);
|
||||
auto decl_id = assoc_entities[assoc_entity.index.index];
|
||||
auto decl_id = assoc_entity.decl_id;
|
||||
LoadImportRef(context, decl_id);
|
||||
auto decl_value_id = context.constant_values().GetConstantInstId(decl_id);
|
||||
auto decl_type_id = context.insts().Get(decl_value_id).type_id();
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "toolchain/check/import.h"
|
||||
#include "toolchain/check/import_cpp.h"
|
||||
#include "toolchain/check/import_ref.h"
|
||||
#include "toolchain/check/member_access.h"
|
||||
#include "toolchain/check/type_completion.h"
|
||||
#include "toolchain/diagnostics/format_providers.h"
|
||||
#include "toolchain/sem_ir/name_scope.h"
|
||||
@@ -101,6 +102,27 @@ auto LookupUnqualifiedName(Context& context, Parse::NodeId node_id,
|
||||
.specific_id = specific_id},
|
||||
/*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).
|
||||
const auto& scope = context.name_scopes().Get(lookup_scope_id);
|
||||
if (scope.is_interface_definition()) {
|
||||
SemIR::InstId target_inst_id =
|
||||
non_lexical_result.scope_result.target_inst_id();
|
||||
if (context.types().Is<SemIR::AssociatedEntityType>(
|
||||
context.insts().Get(target_inst_id).type_id())) {
|
||||
auto interface_decl =
|
||||
context.insts().GetAs<SemIR::InterfaceDecl>(scope.inst_id());
|
||||
const auto& interface =
|
||||
context.interfaces().Get(interface_decl.interface_id);
|
||||
// TODO: Refactor the code so that we can call the "no instance
|
||||
// binding" case from `PerformCompoundMemberAccess` as a separate
|
||||
// function (`GetAssociatedValue`).
|
||||
SemIR::InstId result_inst_id = PerformCompoundMemberAccess(
|
||||
context, node_id, interface.self_param_id, target_inst_id);
|
||||
non_lexical_result.scope_result = SemIR::ScopeLookupResult::MakeFound(
|
||||
result_inst_id, non_lexical_result.scope_result.access_kind());
|
||||
}
|
||||
}
|
||||
return non_lexical_result;
|
||||
}
|
||||
}
|
||||
|
||||
+11
-14
@@ -78,7 +78,6 @@ fn HandleTameAnimal2[W:! Animal & Tame](w: W) {
|
||||
// CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type %BitAnd.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %BitAnd.assoc_type = assoc_entity element0, imports.%Core.import_ref.a93 [concrete]
|
||||
// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete]
|
||||
// CHECK:STDOUT: %Op.ab9: %Op.type.27a = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic]
|
||||
// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %T.patt.e01: type = symbolic_binding_pattern T, 0 [symbolic]
|
||||
@@ -115,7 +114,7 @@ fn HandleTameAnimal2[W:! Animal & Tame](w: W) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst100 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.08d: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %Core.Op: %Op.type.27a = import_ref Core//prelude, Op, loaded [concrete = constants.%Op.ab9]
|
||||
// CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst100 [no loc], loaded [symbolic = constants.%Self.25f]
|
||||
// CHECK:STDOUT: %Core.import_ref.51c: <witness> = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.%impl_witness (constants.%impl_witness.b81)]
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.%T (constants.%T.8b3)]
|
||||
@@ -345,7 +344,6 @@ fn HandleTameAnimal2[W:! Animal & Tame](w: W) {
|
||||
// CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type %BitAnd.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %BitAnd.assoc_type = assoc_entity element0, imports.%Core.import_ref.a93 [concrete]
|
||||
// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete]
|
||||
// CHECK:STDOUT: %Op.ab9: %Op.type.27a = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic]
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
||||
@@ -395,7 +393,7 @@ fn HandleTameAnimal2[W:! Animal & Tame](w: W) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst100 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.08d: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %Core.Op: %Op.type.27a = import_ref Core//prelude, Op, loaded [concrete = constants.%Op.ab9]
|
||||
// CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst100 [no loc], loaded [symbolic = constants.%Self.25f]
|
||||
// CHECK:STDOUT: %Core.import_ref.51c: <witness> = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.%impl_witness (constants.%impl_witness.b81)]
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.%T (constants.%T)]
|
||||
@@ -659,7 +657,6 @@ fn HandleTameAnimal2[W:! Animal & Tame](w: W) {
|
||||
// CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type %BitAnd.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.a63: %BitAnd.assoc_type = assoc_entity element0, imports.%Core.import_ref.a93 [concrete]
|
||||
// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete]
|
||||
// CHECK:STDOUT: %Op.ab9: %Op.type.27a = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type.19f: type = facet_access_type %Self.25f [symbolic]
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
||||
@@ -704,13 +701,13 @@ fn HandleTameAnimal2[W:! Animal & Tame](w: W) {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type.40a: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.dbb: type = facet_type <@ImplicitAs, @ImplicitAs(%facet_type.6ff)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.bd1: type = fn_type @Convert, @ImplicitAs(%facet_type.6ff) [concrete]
|
||||
// CHECK:STDOUT: %Convert.af7: %Convert.type.bd1 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.f1b: type = assoc_entity_type %ImplicitAs.type.dbb [concrete]
|
||||
// CHECK:STDOUT: %assoc0.976: %ImplicitAs.assoc_type.f1b = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.15b: %ImplicitAs.assoc_type.f1b = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -721,7 +718,7 @@ fn HandleTameAnimal2[W:! Animal & Tame](w: W) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst100 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.08d: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0.a63]
|
||||
// CHECK:STDOUT: %Core.Op: %Op.type.27a = import_ref Core//prelude, Op, loaded [concrete = constants.%Op.ab9]
|
||||
// CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst100 [no loc], loaded [symbolic = constants.%Self.25f]
|
||||
// CHECK:STDOUT: %Core.import_ref.51c: <witness> = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%impl_witness (constants.%impl_witness.b81)]
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)]
|
||||
@@ -731,11 +728,11 @@ fn HandleTameAnimal2[W:! Animal & Tame](w: W) {
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//prelude, loc13_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//prelude, inst65 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//prelude, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//prelude, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//prelude, loc13_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//prelude, inst65 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//prelude, loc14_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -855,7 +852,7 @@ fn HandleTameAnimal2[W:! Animal & Tame](w: W) {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -1050,7 +1047,7 @@ fn HandleTameAnimal2[W:! Animal & Tame](w: W) {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.bd1
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.af7
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.f1b
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.976
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.15b
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- toolchain/testing/min_prelude/facet_types.carbon
|
||||
|
||||
+16
-20
@@ -791,13 +791,13 @@ fn B() {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.442: type = facet_type <@ImplicitAs, @ImplicitAs(%I.type.906)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.b43: type = fn_type @Convert, @ImplicitAs(%I.type.906) [concrete]
|
||||
// CHECK:STDOUT: %Convert.2fc: %Convert.type.b43 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.128: type = assoc_entity_type %ImplicitAs.type.442 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.5ba: %ImplicitAs.assoc_type.128 = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.e59: %ImplicitAs.assoc_type.128 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -807,11 +807,11 @@ fn B() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc4_22, loaded [symbolic = @ImplicitAs.%T (constants.%T.8b3)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc5_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc5_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc4_22, loaded [symbolic = @ImplicitAs.%T (constants.%T.8b3)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc5_32, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc5_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -897,7 +897,7 @@ fn B() {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%T) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -1003,10 +1003,6 @@ fn B() {
|
||||
// CHECK:STDOUT: %V.patt.loc5_13.2 => constants.%empty_struct_type
|
||||
// CHECK:STDOUT: %W.loc5_23.2 => constants.%empty_struct_type
|
||||
// CHECK:STDOUT: %W.patt.loc5_23.2 => constants.%empty_struct_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %I.type => constants.%I.type.906
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.770
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @A(constants.%T.4b2) {
|
||||
@@ -1060,7 +1056,7 @@ fn B() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.b43
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.2fc
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.128
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.5ba
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.e59
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_mismatch_impl_self_with_fixed_specific.carbon
|
||||
@@ -1100,13 +1096,13 @@ fn B() {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.c42: type = facet_type <@ImplicitAs, @ImplicitAs(%I.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.7ef: type = fn_type @Convert, @ImplicitAs(%I.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.c77: %Convert.type.7ef = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.167: type = assoc_entity_type %ImplicitAs.type.c42 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.ae9: %ImplicitAs.assoc_type.167 = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.0e0: %ImplicitAs.assoc_type.167 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -1116,11 +1112,11 @@ fn B() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc4_22, loaded [symbolic = @ImplicitAs.%T (constants.%T.8b3)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc5_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc5_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc4_22, loaded [symbolic = @ImplicitAs.%T (constants.%T.8b3)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc5_32, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc5_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -1188,7 +1184,7 @@ fn B() {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%T) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -1350,6 +1346,6 @@ fn B() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.7ef
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.c77
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.167
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.ae9
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.0e0
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
-6
@@ -432,7 +432,6 @@ fn F() {
|
||||
// CHECK:STDOUT: %require_complete.loc23_45: <witness> = require_complete_type @HandleAnimal.%T.as_type.loc23_47.2 (%T.as_type.2ad) [symbolic = %require_complete.loc23_45 (constants.%require_complete.234)]
|
||||
// CHECK:STDOUT: %require_complete.loc23_54: <witness> = require_complete_type @HandleAnimal.%Food.as_type.loc23_56.2 (%Food.as_type.fae) [symbolic = %require_complete.loc23_54 (constants.%require_complete.444)]
|
||||
// CHECK:STDOUT: %Eats.type: type = facet_type <@Eats, @Eats(%Food.as_type.loc23_56.2)> [symbolic = %Eats.type (constants.%Eats.type.f54c3d.2)]
|
||||
// CHECK:STDOUT: %require_complete.loc23_76: <witness> = require_complete_type @HandleAnimal.%Eats.type (%Eats.type.f54c3d.2) [symbolic = %require_complete.loc23_76 (constants.%require_complete.42532a.2)]
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (), @impl.009(%T.loc23_17.2, %Food.loc23_29.2) [symbolic = %impl_witness (constants.%impl_witness.c7c36b.2)]
|
||||
// CHECK:STDOUT: %Eats.facet.loc23_76.2: @HandleAnimal.%Eats.type (%Eats.type.f54c3d.2) = facet_value %T.as_type.loc23_47.2, (%impl_witness) [symbolic = %Eats.facet.loc23_76.2 (constants.%Eats.facet.97e)]
|
||||
// CHECK:STDOUT: %Feed.specific_fn.loc23_64.2: <specific function> = specific_function constants.%Feed, @Feed(%Food.loc23_29.2, %Eats.facet.loc23_76.2) [symbolic = %Feed.specific_fn.loc23_64.2 (constants.%Feed.specific_fn.387)]
|
||||
@@ -549,10 +548,6 @@ fn F() {
|
||||
// CHECK:STDOUT: specific @Eats(constants.%Food.as_type.fae) {
|
||||
// CHECK:STDOUT: %Food.loc12_16.2 => constants.%Food.as_type.fae
|
||||
// CHECK:STDOUT: %Food.patt.loc12_16.2 => constants.%Food.as_type.fae
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Eats.type => constants.%Eats.type.f54c3d.2
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.4eb
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @impl.009(constants.%T.fd4, constants.%Food.5fe) {
|
||||
@@ -601,7 +596,6 @@ fn F() {
|
||||
// CHECK:STDOUT: %require_complete.loc23_45 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %require_complete.loc23_54 => constants.%complete_type.357
|
||||
// CHECK:STDOUT: %Eats.type => constants.%Eats.type.1ae
|
||||
// CHECK:STDOUT: %require_complete.loc23_76 => constants.%complete_type.004
|
||||
// CHECK:STDOUT: %impl_witness => constants.%impl_witness.4f1
|
||||
// CHECK:STDOUT: %Eats.facet.loc23_76.2 => constants.%Eats.facet.fa6
|
||||
// CHECK:STDOUT: %Feed.specific_fn.loc23_64.2 => constants.%Feed.specific_fn.d82
|
||||
|
||||
+8
-20
@@ -180,10 +180,6 @@ fn G() {
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Generic.type.c3b: type = facet_type <@Generic, @Generic(%WrongGenericParam)> [concrete]
|
||||
// CHECK:STDOUT: %F.type.96d: type = fn_type @F.1, @Generic(%WrongGenericParam) [concrete]
|
||||
// CHECK:STDOUT: %F.86b: %F.type.96d = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Generic.assoc_type.967: type = assoc_entity_type %Generic.type.c3b [concrete]
|
||||
// CHECK:STDOUT: %assoc0.c10: %Generic.assoc_type.967 = assoc_entity element0, @Generic.%F.decl [concrete]
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic]
|
||||
@@ -192,13 +188,13 @@ fn G() {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.7f5: type = facet_type <@ImplicitAs, @ImplicitAs(%Generic.type.c3b)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.a2c: type = fn_type @Convert, @ImplicitAs(%Generic.type.c3b) [concrete]
|
||||
// CHECK:STDOUT: %Convert.3cc: %Convert.type.a2c = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.237: type = assoc_entity_type %ImplicitAs.type.7f5 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.c5b: %ImplicitAs.assoc_type.237 = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.faa: %ImplicitAs.assoc_type.237 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -208,11 +204,11 @@ fn G() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc4_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc5_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc5_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc4_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc5_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc5_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -290,7 +286,7 @@ fn G() {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -418,14 +414,6 @@ fn G() {
|
||||
// CHECK:STDOUT: specific @Generic(constants.%WrongGenericParam) {
|
||||
// CHECK:STDOUT: %Scalar.loc4_19.2 => constants.%WrongGenericParam
|
||||
// CHECK:STDOUT: %Scalar.patt.loc4_19.2 => constants.%WrongGenericParam
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Generic.type => constants.%Generic.type.c3b
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self.dee
|
||||
// CHECK:STDOUT: %F.type => constants.%F.type.96d
|
||||
// CHECK:STDOUT: %F => constants.%F.86b
|
||||
// CHECK:STDOUT: %Generic.assoc_type => constants.%Generic.assoc_type.967
|
||||
// CHECK:STDOUT: %assoc0.loc5_9.2 => constants.%assoc0.c10
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
||||
@@ -454,7 +442,7 @@ fn G() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.a2c
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.3cc
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.237
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.c5b
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.faa
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @CallGenericMethod(constants.%WrongGenericParam, <error>) {
|
||||
|
||||
+8
-8
@@ -251,13 +251,13 @@ fn F() {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.af9: type = facet_type <@ImplicitAs, @ImplicitAs(%Eats.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.9a9: type = fn_type @Convert, @ImplicitAs(%Eats.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.35d: %Convert.type.9a9 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.9a7: type = assoc_entity_type %ImplicitAs.type.af9 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.152: %ImplicitAs.assoc_type.9a7 = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.ceb: %ImplicitAs.assoc_type.9a7 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -267,11 +267,11 @@ fn F() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc8_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst65 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc9_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc9_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc8_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst65 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc9_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc9_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -332,7 +332,7 @@ fn F() {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -423,6 +423,6 @@ fn F() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.9a9
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.35d
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.9a7
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.152
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.ceb
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+8
-8
@@ -160,13 +160,13 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.af9: type = facet_type <@ImplicitAs, @ImplicitAs(%Eats.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.9a9: type = fn_type @Convert, @ImplicitAs(%Eats.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.35d: %Convert.type.9a9 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.9a7: type = assoc_entity_type %ImplicitAs.type.af9 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.152: %ImplicitAs.assoc_type.9a7 = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.ceb: %ImplicitAs.assoc_type.9a7 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -176,11 +176,11 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc4_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc5_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc5_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc4_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc5_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc5_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -252,7 +252,7 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -340,6 +340,6 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.9a9
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.35d
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.9a7
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.152
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.ceb
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+8
-8
@@ -249,13 +249,13 @@ fn F() {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.ec2: type = facet_type <@ImplicitAs, @ImplicitAs(%Animal.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.69d: type = fn_type @Convert, @ImplicitAs(%Animal.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.0e1: %Convert.type.69d = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.a8b: type = assoc_entity_type %ImplicitAs.type.ec2 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.65b: %ImplicitAs.assoc_type.a8b = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.560: %ImplicitAs.assoc_type.a8b = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -265,11 +265,11 @@ fn F() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc8_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst65 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc9_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc9_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc8_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst65 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc9_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc9_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -315,7 +315,7 @@ fn F() {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -403,6 +403,6 @@ fn F() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.69d
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.0e1
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.a8b
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.65b
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.560
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -19,42 +19,42 @@ fn G[T:! A](t: T) {}
|
||||
fn H[T:! A & B](t: T) {}
|
||||
|
||||
fn F() {
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:17: error: invalid use of incomplete type `A` [IncompleteTypeInConversion]
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:17: error: cannot convert value of type `type` to `A` with `as` [ExplicitAsConversionFailure]
|
||||
// CHECK:STDERR: ({} as C) as (C as A);
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:17: note: type `type` does not implement interface `Core.As(A)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: ({} as C) as (C as A);
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-11]]:1: note: interface was forward declared here [InterfaceForwardDeclaredHere]
|
||||
// CHECK:STDERR: interface A;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
({} as C) as (C as A);
|
||||
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:17: error: invalid use of incomplete type `A & B` [IncompleteTypeInConversion]
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:17: error: cannot convert value of type `type` to `A & B` with `as` [ExplicitAsConversionFailure]
|
||||
// CHECK:STDERR: ({} as C) as (C as (A & B));
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:17: note: type `type` does not implement interface `Core.As(A & B)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: ({} as C) as (C as (A & B));
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-20]]:1: note: interface was forward declared here [InterfaceForwardDeclaredHere]
|
||||
// CHECK:STDERR: interface A;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
({} as C) as (C as (A & B));
|
||||
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+10]]:3: error: forming value of incomplete type `A` [IncompleteTypeInValueConversion]
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+10]]:3: error: cannot implicitly convert value of type `type` to `A` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: G({} as C);
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:3: note: type `type` does not implement interface `Core.ImplicitAs(A)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: G({} as C);
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-29]]:1: note: interface was forward declared here [InterfaceForwardDeclaredHere]
|
||||
// CHECK:STDERR: interface A;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-28]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn G[T:! A](t: T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
G({} as C);
|
||||
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+10]]:3: error: forming value of incomplete type `A & B` [IncompleteTypeInValueConversion]
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+10]]:3: error: cannot implicitly convert value of type `type` to `A & B` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: H({} as C);
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:3: note: type `type` does not implement interface `Core.ImplicitAs(A & B)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: H({} as C);
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-41]]:1: note: interface was forward declared here [InterfaceForwardDeclaredHere]
|
||||
// CHECK:STDERR: interface A;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-39]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: fn H[T:! A & B](t: T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
+11
-12
@@ -96,7 +96,6 @@ fn F() {
|
||||
// CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type %BitAnd.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.a63: %BitAnd.assoc_type = assoc_entity element0, imports.%Core.import_ref.a93 [concrete]
|
||||
// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete]
|
||||
// CHECK:STDOUT: %Op.ab9: %Op.type.27a = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type.19f: type = facet_access_type %Self.25f [symbolic]
|
||||
// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %T.patt.e01: type = symbolic_binding_pattern T, 0 [symbolic]
|
||||
@@ -142,18 +141,18 @@ fn F() {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type.40a: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.2d2: type = facet_type <@ImplicitAs, @ImplicitAs(%A.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.597: type = fn_type @Convert, @ImplicitAs(%A.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.d1e: %Convert.type.597 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.568: type = assoc_entity_type %ImplicitAs.type.2d2 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.6fc: %ImplicitAs.assoc_type.568 = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.e1d: %ImplicitAs.assoc_type.568 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.8a4: type = facet_type <@ImplicitAs, @ImplicitAs(%B.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.f1c: type = fn_type @Convert, @ImplicitAs(%B.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.e93: %Convert.type.f1c = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.f97: type = assoc_entity_type %ImplicitAs.type.8a4 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.19a: %ImplicitAs.assoc_type.f97 = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.824: %ImplicitAs.assoc_type.f97 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %C.val: %C = struct_value () [concrete]
|
||||
@@ -173,7 +172,7 @@ fn F() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst100 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.08d: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0.a63]
|
||||
// CHECK:STDOUT: %Core.Op: %Op.type.27a = import_ref Core//prelude, Op, loaded [concrete = constants.%Op.ab9]
|
||||
// CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst100 [no loc], loaded [symbolic = constants.%Self.25f]
|
||||
// CHECK:STDOUT: %Core.import_ref.51c: <witness> = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%impl_witness (constants.%impl_witness.b81)]
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)]
|
||||
@@ -183,11 +182,11 @@ fn F() {
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T.8b3)]
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//prelude, loc13_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//prelude, inst65 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//prelude, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//prelude, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//prelude, loc13_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//prelude, inst65 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//prelude, loc14_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -307,7 +306,7 @@ fn F() {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -565,7 +564,7 @@ fn F() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.597
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.d1e
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.568
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.6fc
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.e1d
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(constants.%B.type) {
|
||||
@@ -578,7 +577,7 @@ fn F() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.f1c
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.e93
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.f97
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.19a
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.824
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @AA.1(@G.%A.facet) {}
|
||||
|
||||
+5
-6
@@ -621,7 +621,6 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: %Add.assoc_type: type = assoc_entity_type %Add.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.b3c: %Add.assoc_type = assoc_entity element0, imports.%Core.import_ref.6dd [concrete]
|
||||
// CHECK:STDOUT: %Op.type.545: type = fn_type @Op.1 [concrete]
|
||||
// CHECK:STDOUT: %Op.3eb: %Op.type.545 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type.da9: type = facet_access_type %Self.a99 [symbolic]
|
||||
// CHECK:STDOUT: %impl_witness.bd0: <witness> = impl_witness (imports.%Core.import_ref.db4) [concrete]
|
||||
// CHECK:STDOUT: %Add.facet: %Add.type = facet_value %i32.builtin, (%impl_witness.bd0) [concrete]
|
||||
@@ -668,13 +667,13 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Core.import_ref.a7c = import_ref Core//default, inst83 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.713: @As.%As.assoc_type (%As.assoc_type.a44) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%assoc0 (constants.%assoc0.5bc)]
|
||||
// CHECK:STDOUT: %Core.Convert.48c: @As.%Convert.type (%Convert.type.843) = import_ref Core//default, Convert, loaded [symbolic = @As.%Convert (constants.%Convert.95f)]
|
||||
// CHECK:STDOUT: %Core.Convert.313 = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst83 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)]
|
||||
// CHECK:STDOUT: %Core.import_ref.708: @As.%Convert.type (%Convert.type.843) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%Convert (constants.%Convert.95f)]
|
||||
// CHECK:STDOUT: %Core.import_ref.07c = import_ref Core//default, inst39 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.bdf: %Add.assoc_type = import_ref Core//default, loc8_41, loaded [concrete = constants.%assoc0.b3c]
|
||||
// CHECK:STDOUT: %Core.Op: %Op.type.545 = import_ref Core//default, Op, loaded [concrete = constants.%Op.3eb]
|
||||
// CHECK:STDOUT: %Core.Op = import_ref Core//default, Op, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.595: <witness> = import_ref Core//default, loc19_17, loaded [concrete = constants.%impl_witness.bd0]
|
||||
// CHECK:STDOUT: %Core.import_ref.c8c7cd.1: type = import_ref Core//default, loc19_6, loaded [concrete = constants.%i32.builtin]
|
||||
// CHECK:STDOUT: %Core.import_ref.bf0: type = import_ref Core//default, loc19_13, loaded [concrete = constants.%Add.type]
|
||||
@@ -684,7 +683,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst124 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert.582: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.Convert.e69 = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.de9: <witness> = import_ref Core//default, loc27_38, loaded [concrete = constants.%impl_witness.39c]
|
||||
// CHECK:STDOUT: %Core.import_ref.8721d7.2: type = import_ref Core//default, loc27_17, loaded [concrete = Core.IntLiteral]
|
||||
// CHECK:STDOUT: %Core.import_ref.4d9: type = import_ref Core//default, loc27_36, loaded [concrete = constants.%ImplicitAs.type.61e]
|
||||
@@ -764,7 +763,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = imports.%Core.import_ref.a7c
|
||||
// CHECK:STDOUT: .Convert = imports.%Core.import_ref.713
|
||||
// CHECK:STDOUT: witness = (imports.%Core.Convert.48c)
|
||||
// CHECK:STDOUT: witness = (imports.%Core.Convert.313)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -791,7 +790,7 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = imports.%Core.import_ref.ff5
|
||||
// CHECK:STDOUT: .Convert = imports.%Core.import_ref.630
|
||||
// CHECK:STDOUT: witness = (imports.%Core.Convert.582)
|
||||
// CHECK:STDOUT: witness = (imports.%Core.Convert.e69)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+103
-36
@@ -11,25 +11,25 @@
|
||||
class C[T:! type](X:! T) {}
|
||||
|
||||
interface I {
|
||||
// This tests that inside the definition of `I`, `Self` has type `I`.
|
||||
|
||||
// Below, `C(Self)` deduces `T` to be the incomplete facet type `I`, which
|
||||
// leads to the error.
|
||||
|
||||
// CHECK:STDERR: fail_self_type_mismatch.carbon:[[@LINE+10]]:11: error: forming value of incomplete type `I` [IncompleteTypeInValueConversion]
|
||||
// CHECK:STDERR: fn F(c: C(Self));
|
||||
// CHECK:STDERR: ^~~~~~~
|
||||
// CHECK:STDERR: fail_self_type_mismatch.carbon:[[@LINE-9]]:1: note: interface is currently being defined [InterfaceUndefinedWithinDefinition]
|
||||
// CHECK:STDERR: interface I {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_self_type_mismatch.carbon:[[@LINE-14]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
|
||||
// CHECK:STDERR: class C[T:! type](X:! T) {}
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
// Uses of `Self` inside the definition of `I` have type `I`.
|
||||
fn F(c: C(Self));
|
||||
}
|
||||
|
||||
impl bool as I {
|
||||
// In this scope, `Self` is `bool`, but the signature of `F` uses the `Self`
|
||||
// from the interface, not the `Self` from the impl.
|
||||
|
||||
fn F(c: C(bool as I));
|
||||
}
|
||||
|
||||
impl i32 as I {
|
||||
// CHECK:STDERR: fail_self_type_mismatch.carbon:[[@LINE+7]]:8: error: type `C(i32)` of parameter 1 in redeclaration differs from previous parameter type `C(i32 as I)` [RedeclParamDiffersType]
|
||||
// CHECK:STDERR: fn F(c: C(i32));
|
||||
// CHECK:STDERR: ^~~~~~~~~
|
||||
// CHECK:STDERR: fail_self_type_mismatch.carbon:[[@LINE-14]]:8: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
|
||||
// CHECK:STDERR: fn F(c: C(Self));
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn F(c: C(i32));
|
||||
}
|
||||
|
||||
@@ -47,21 +47,31 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
|
||||
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
|
||||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %C.dbb: type = class_type @C, @C(%I.type, %Self) [symbolic]
|
||||
// CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete]
|
||||
// CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%F.decl [concrete]
|
||||
// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
|
||||
// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %impl_witness.8b6: <witness> = impl_witness (@impl.049.%F.decl) [concrete]
|
||||
// CHECK:STDOUT: %I.facet.ba7: %I.type = facet_value bool, (%impl_witness.8b6) [concrete]
|
||||
// CHECK:STDOUT: %C.338: type = class_type @C, @C(%I.type, %I.facet.ba7) [concrete]
|
||||
// CHECK:STDOUT: %F.type.8ba: type = fn_type @F.2 [concrete]
|
||||
// CHECK:STDOUT: %F.2cf: %F.type.8ba = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (<error>) [concrete]
|
||||
// CHECK:STDOUT: %impl_witness.85b: <witness> = impl_witness (<error>) [concrete]
|
||||
// CHECK:STDOUT: %C.6fb: type = class_type @C, @C(type, %i32) [concrete]
|
||||
// CHECK:STDOUT: %F.type.066: type = fn_type @F.2 [concrete]
|
||||
// CHECK:STDOUT: %F.type.066: type = fn_type @F.3 [concrete]
|
||||
// CHECK:STDOUT: %F.9ec: %F.type.066 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, (%impl_witness) [concrete]
|
||||
// CHECK:STDOUT: %I.facet.6ef: %I.type = facet_value %i32, (%impl_witness.85b) [concrete]
|
||||
// CHECK:STDOUT: %C.90e: type = class_type @C, @C(%I.type, %I.facet.6ef) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: .Bool = %Core.Bool
|
||||
// CHECK:STDOUT: .Int = %Core.Int
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
@@ -84,27 +94,34 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: %X.loc11_19.1: @C.%T.loc11_9.2 (%T) = bind_symbolic_name X, 1 [symbolic = %X.loc11_19.2 (constants.%X)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
|
||||
// CHECK:STDOUT: impl_decl @impl [concrete] {} {
|
||||
// CHECK:STDOUT: impl_decl @impl.049 [concrete] {} {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc18_6.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc18_6.2: type = converted %bool.make_type, %.loc18_6.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl_witness.loc18: <witness> = impl_witness (@impl.049.%F.decl) [concrete = constants.%impl_witness.8b6]
|
||||
// CHECK:STDOUT: impl_decl @impl.a9a [concrete] {} {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (<error>) [concrete = constants.%impl_witness]
|
||||
// CHECK:STDOUT: %impl_witness.loc25: <witness> = impl_witness (<error>) [concrete = constants.%impl_witness.85b]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @I {
|
||||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] {
|
||||
// CHECK:STDOUT: %c.patt: <error> = binding_pattern c
|
||||
// CHECK:STDOUT: %c.param_patt: <error> = value_param_pattern %c.patt, call_param0 [concrete = <error>]
|
||||
// CHECK:STDOUT: %c.patt: @F.1.%C.loc15_17.1 (%C.dbb) = binding_pattern c
|
||||
// CHECK:STDOUT: %c.param_patt: @F.1.%C.loc15_17.1 (%C.dbb) = value_param_pattern %c.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %c.param: <error> = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc29: type = splice_block %C [concrete = <error>] {
|
||||
// CHECK:STDOUT: %c.param: @F.1.%C.loc15_17.1 (%C.dbb) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc15: type = splice_block %C.loc15_17.2 [symbolic = %C.loc15_17.1 (constants.%C.dbb)] {
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
|
||||
// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%I.type, <error>) [concrete = <error>]
|
||||
// CHECK:STDOUT: %C.loc15_17.2: type = class_type @C, @C(constants.%I.type, constants.%Self) [symbolic = %C.loc15_17.1 (constants.%C.dbb)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %c: <error> = bind_name c, %c.param
|
||||
// CHECK:STDOUT: %c: @F.1.%C.loc15_17.1 (%C.dbb) = bind_name c, %c.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT:
|
||||
@@ -115,8 +132,32 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: witness = (%F.decl)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl: %i32 as %I.ref {
|
||||
// CHECK:STDOUT: %F.decl: %F.type.066 = fn_decl @F.2 [concrete = constants.%F.9ec] {
|
||||
// CHECK:STDOUT: impl @impl.049: %.loc18_6.2 as %I.ref {
|
||||
// CHECK:STDOUT: %F.decl: %F.type.8ba = fn_decl @F.2 [concrete = constants.%F.2cf] {
|
||||
// CHECK:STDOUT: %c.patt: %C.338 = binding_pattern c
|
||||
// CHECK:STDOUT: %c.param_patt: %C.338 = value_param_pattern %c.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %c.param: %C.338 = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc22_22: type = splice_block %C [concrete = constants.%C.338] {
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %I.facet: %I.type = facet_value bool, (constants.%impl_witness.8b6) [concrete = constants.%I.facet.ba7]
|
||||
// CHECK:STDOUT: %.loc22_18: %I.type = converted %bool.make_type, %I.facet [concrete = constants.%I.facet.ba7]
|
||||
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%I.type, constants.%I.facet.ba7) [concrete = constants.%C.338]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %c: %C.338 = bind_name c, %c.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .C = <poisoned>
|
||||
// CHECK:STDOUT: .I = <poisoned>
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: witness = file.%impl_witness.loc18
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl.a9a: %i32 as %I.ref {
|
||||
// CHECK:STDOUT: %F.decl: %F.type.066 = fn_decl @F.3 [concrete = constants.%F.9ec] {
|
||||
// CHECK:STDOUT: %c.patt: %C.6fb = binding_pattern c
|
||||
// CHECK:STDOUT: %c.param_patt: %C.6fb = value_param_pattern %c.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
@@ -133,7 +174,7 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .C = <poisoned>
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: witness = file.%impl_witness
|
||||
// CHECK:STDOUT: witness = file.%impl_witness.loc25
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic class @C(%T.loc11_9.1: type, %X.loc11_19.1: @C.%T.loc11_9.2 (%T)) {
|
||||
@@ -155,11 +196,14 @@ impl i32 as I {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) {
|
||||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %C.loc15_17.1: type = class_type @C, @C(constants.%I.type, %Self) [symbolic = %C.loc15_17.1 (constants.%C.dbb)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%c.param_patt: <error>);
|
||||
// CHECK:STDOUT: fn(%c.param_patt: @F.1.%C.loc15_17.1 (%C.dbb));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F.2(%c.param_patt: %C.6fb);
|
||||
// CHECK:STDOUT: fn @F.2(%c.param_patt: %C.338);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F.3(%c.param_patt: %C.6fb);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C(constants.%T, constants.%X) {
|
||||
// CHECK:STDOUT: %T.loc11_9.2 => constants.%T
|
||||
@@ -168,15 +212,30 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%X
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C(constants.%I.type, <error>) {
|
||||
// CHECK:STDOUT: specific @C(constants.%I.type, constants.%Self) {
|
||||
// CHECK:STDOUT: %T.loc11_9.2 => constants.%I.type
|
||||
// CHECK:STDOUT: %T.patt.loc11_9.2 => constants.%I.type
|
||||
// CHECK:STDOUT: %X.loc11_19.2 => <error>
|
||||
// CHECK:STDOUT: %X.patt.loc11_19.2 => <error>
|
||||
// CHECK:STDOUT: %X.loc11_19.2 => constants.%Self
|
||||
// CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%Self
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F.1(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %C.loc15_17.1 => constants.%C.dbb
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C(constants.%I.type, @F.1.%Self) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C(constants.%I.type, constants.%I.facet.ba7) {
|
||||
// CHECK:STDOUT: %T.loc11_9.2 => constants.%I.type
|
||||
// CHECK:STDOUT: %T.patt.loc11_9.2 => constants.%I.type
|
||||
// CHECK:STDOUT: %X.loc11_19.2 => constants.%I.facet.ba7
|
||||
// CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%I.facet.ba7
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F.1(constants.%I.facet.ba7) {
|
||||
// CHECK:STDOUT: %Self => constants.%I.facet.ba7
|
||||
// CHECK:STDOUT: %C.loc15_17.1 => constants.%C.338
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C(type, constants.%i32) {
|
||||
@@ -186,7 +245,15 @@ impl i32 as I {
|
||||
// CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%i32
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F.1(constants.%I.facet) {
|
||||
// CHECK:STDOUT: %Self => constants.%I.facet
|
||||
// CHECK:STDOUT: specific @F.1(constants.%I.facet.6ef) {
|
||||
// CHECK:STDOUT: %Self => constants.%I.facet.6ef
|
||||
// CHECK:STDOUT: %C.loc15_17.1 => constants.%C.90e
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C(constants.%I.type, constants.%I.facet.6ef) {
|
||||
// CHECK:STDOUT: %T.loc11_9.2 => constants.%I.type
|
||||
// CHECK:STDOUT: %T.patt.loc11_9.2 => constants.%I.type
|
||||
// CHECK:STDOUT: %X.loc11_19.2 => constants.%I.facet.6ef
|
||||
// CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%I.facet.6ef
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -1,906 +0,0 @@
|
||||
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/fail_todo_use_assoc_const.carbon
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/fail_todo_use_assoc_const.carbon
|
||||
|
||||
// --- fail_todo_associated_type_in_signature.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface J {
|
||||
let U:! type;
|
||||
// CHECK:STDERR: fail_todo_associated_type_in_signature.carbon:[[@LINE+14]]:23: error: cannot implicitly convert value of type `<associated entity in J>` to `type` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: fn F[self: Self](u: U) -> U;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_todo_associated_type_in_signature.carbon:[[@LINE+11]]:23: note: type `<associated entity in J>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fn F[self: Self](u: U) -> U;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_todo_associated_type_in_signature.carbon:[[@LINE+7]]:29: error: cannot implicitly convert value of type `<associated entity in J>` to `type` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: fn F[self: Self](u: U) -> U;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_todo_associated_type_in_signature.carbon:[[@LINE+4]]:29: note: type `<associated entity in J>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fn F[self: Self](u: U) -> U;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
fn F[self: Self](u: U) -> U;
|
||||
}
|
||||
|
||||
impl () as J where .U = {} {
|
||||
fn F[self: Self](u: {}) -> {} { return u; }
|
||||
}
|
||||
|
||||
class C {
|
||||
// This allows the type to be copyable so it can be returned.
|
||||
adapt {};
|
||||
}
|
||||
|
||||
impl C as J where .U = C {
|
||||
fn F[self: Self](u: C) -> C { return self; }
|
||||
}
|
||||
|
||||
// --- use_non-type_in_function.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface M {
|
||||
let Z:! {.b: {}};
|
||||
fn G() -> {};
|
||||
}
|
||||
|
||||
impl () as M where .Z = {.b = {}} {
|
||||
fn G() -> {} {
|
||||
return (Self as M).Z.b;
|
||||
}
|
||||
}
|
||||
|
||||
// --- self_as_uses_correct_rewrite_constraint.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C(T:! type) {}
|
||||
|
||||
interface M {
|
||||
let Z:! {.b: type};
|
||||
fn G() -> type;
|
||||
}
|
||||
|
||||
impl C({}) as M where .Z = {.b = {}} {
|
||||
fn G() -> type {
|
||||
return (Self as M).Z.b;
|
||||
}
|
||||
}
|
||||
|
||||
impl C(()) as M where .Z = {.b = ()} {
|
||||
fn G() -> type {
|
||||
return (Self as M).Z.b;
|
||||
}
|
||||
}
|
||||
|
||||
// --- fail_todo_associated_int_in_array.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let N:! i32;
|
||||
// CHECK:STDERR: fail_todo_associated_int_in_array.carbon:[[@LINE+7]]:37: error: cannot implicitly convert value of type `<associated entity in I>` to `Core.IntLiteral` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: fn F[self: Self]() -> array(bool, N);
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_todo_associated_int_in_array.carbon:[[@LINE+4]]:37: note: type `<associated entity in I>` does not implement interface `Core.ImplicitAs(Core.IntLiteral)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fn F[self: Self]() -> array(bool, N);
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
fn F[self: Self]() -> array(bool, N);
|
||||
}
|
||||
|
||||
impl () as I where .N = 2 {
|
||||
fn F[self: Self]() -> array(bool, 2) { return (true, false); }
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: --- fail_todo_associated_type_in_signature.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
|
||||
// CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type %J.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.1e6: %J.assoc_type = assoc_entity element0, @J.%U [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type.3df: type = facet_access_type %Self.ccd [symbolic]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %F.type.c14: type = fn_type @F.1 [concrete]
|
||||
// CHECK:STDOUT: %F.b71: %F.type.c14 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, @J.%F.decl [concrete]
|
||||
// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
|
||||
// CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self, element0 [symbolic_self]
|
||||
// CHECK:STDOUT: %J.facet.28c: %J.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self]
|
||||
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
||||
// CHECK:STDOUT: %J_where.type.5f6: type = facet_type <@J where %impl.elem0 = %empty_struct_type> [concrete]
|
||||
// CHECK:STDOUT: %impl_witness.f71: <witness> = impl_witness (%empty_struct_type, <error>) [concrete]
|
||||
// CHECK:STDOUT: %F.type.b97: type = fn_type @F.2 [concrete]
|
||||
// CHECK:STDOUT: %F.747: %F.type.b97 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %J.facet.506: %J.type = facet_value %empty_tuple.type, (%impl_witness.f71) [concrete]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
||||
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
||||
// CHECK:STDOUT: %J_where.type.6f2: type = facet_type <@J where %impl.elem0 = %C> [concrete]
|
||||
// CHECK:STDOUT: %impl_witness.c2b: <witness> = impl_witness (%C, <error>) [concrete]
|
||||
// CHECK:STDOUT: %F.type.69d: type = fn_type @F.3 [concrete]
|
||||
// CHECK:STDOUT: %F.451: %F.type.69d = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %J.facet.e8d: %J.type = facet_value %C, (%impl_witness.c2b) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .J = %J.decl
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
|
||||
// CHECK:STDOUT: impl_decl @impl.8c7 [concrete] {} {
|
||||
// CHECK:STDOUT: %.loc22_7.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc22_7.2: type = converted %.loc22_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
|
||||
// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.1e6]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.loc22_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0]
|
||||
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0]
|
||||
// CHECK:STDOUT: %.loc22_26.1: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc22_26.2: type = converted %.loc22_26.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %.loc22_14: type = where_expr %.Self [concrete = constants.%J_where.type.5f6] {
|
||||
// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc22_26.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl_witness.loc22: <witness> = impl_witness (constants.%empty_struct_type, <error>) [concrete = constants.%impl_witness.f71]
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
|
||||
// CHECK:STDOUT: impl_decl @impl.f57 [concrete] {} {
|
||||
// CHECK:STDOUT: %C.ref.loc31_6: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [concrete = constants.%J.type]
|
||||
// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %U.ref: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.1e6]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.loc31_19: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0]
|
||||
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0]
|
||||
// CHECK:STDOUT: %C.ref.loc31_24: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %.loc31_13: type = where_expr %.Self [concrete = constants.%J_where.type.6f2] {
|
||||
// CHECK:STDOUT: requirement_rewrite %impl.elem0, %C.ref.loc31_24
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl_witness.loc31: <witness> = impl_witness (constants.%C, <error>) [concrete = constants.%impl_witness.c2b]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @J {
|
||||
// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
|
||||
// CHECK:STDOUT: %U: type = assoc_const_decl @U [concrete] {
|
||||
// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, @J.%U [concrete = constants.%assoc0.1e6]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type.c14 = fn_decl @F.1 [concrete = constants.%F.b71] {
|
||||
// CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc19_14.1 (%Self.as_type.3df) = binding_pattern self
|
||||
// CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc19_14.1 (%Self.as_type.3df) = value_param_pattern %self.patt, call_param0
|
||||
// CHECK:STDOUT: %u.patt: <error> = binding_pattern u
|
||||
// CHECK:STDOUT: %u.param_patt: <error> = value_param_pattern %u.patt, call_param1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param2
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %U.ref.loc19_29: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.1e6]
|
||||
// CHECK:STDOUT: %.loc19_29: type = converted %U.ref.loc19_29, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc19_14.1 (%Self.as_type.3df) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc19_14.1: type = splice_block %.loc19_14.2 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type.3df)] {
|
||||
// CHECK:STDOUT: %Self.ref: %J.type = name_ref Self, @J.%Self [symbolic = %Self (constants.%Self.ccd)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc19_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type.3df)]
|
||||
// CHECK:STDOUT: %.loc19_14.2: type = converted %Self.ref, %Self.as_type.loc19_14.2 [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type.3df)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc19_14.1 (%Self.as_type.3df) = bind_name self, %self.param
|
||||
// CHECK:STDOUT: %u.param: <error> = value_param call_param1
|
||||
// CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
|
||||
// CHECK:STDOUT: %U.ref.loc19_23: %J.assoc_type = name_ref U, @U.%assoc0 [concrete = constants.%assoc0.1e6]
|
||||
// CHECK:STDOUT: %.loc19_23: type = converted %U.ref.loc19_23, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %u: <error> = bind_name u, %u.param
|
||||
// CHECK:STDOUT: %return.param: ref <error> = out_param call_param2
|
||||
// CHECK:STDOUT: %return: ref <error> = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc1: %J.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
// CHECK:STDOUT: .U = @U.%assoc0
|
||||
// CHECK:STDOUT: .F = %assoc1
|
||||
// CHECK:STDOUT: witness = (%U, %F.decl)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic assoc_const @U(@J.%Self: %J.type) {
|
||||
// CHECK:STDOUT: assoc_const U:! type;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl.8c7: %.loc22_7.2 as %.loc22_14 {
|
||||
// CHECK:STDOUT: %F.decl: %F.type.b97 = fn_decl @F.2 [concrete = constants.%F.747] {
|
||||
// CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self
|
||||
// CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, call_param0
|
||||
// CHECK:STDOUT: %u.patt: %empty_struct_type = binding_pattern u
|
||||
// CHECK:STDOUT: %u.param_patt: %empty_struct_type = value_param_pattern %u.patt, call_param1
|
||||
// CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, call_param2
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc23_31.1: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc23_31.2: type = converted %.loc23_31.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.8c7.%.loc22_7.2 [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param
|
||||
// CHECK:STDOUT: %u.param: %empty_struct_type = value_param call_param1
|
||||
// CHECK:STDOUT: %.loc23_24.1: type = splice_block %.loc23_24.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc23_24.2: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc23_24.3: type = converted %.loc23_24.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %u: %empty_struct_type = bind_name u, %u.param
|
||||
// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param2
|
||||
// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: witness = file.%impl_witness.loc22
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl.f57: %C.ref.loc31_6 as %.loc31_13 {
|
||||
// CHECK:STDOUT: %F.decl: %F.type.69d = fn_decl @F.3 [concrete = constants.%F.451] {
|
||||
// CHECK:STDOUT: %self.patt: %C = binding_pattern self
|
||||
// CHECK:STDOUT: %self.param_patt: %C = value_param_pattern %self.patt, call_param0
|
||||
// CHECK:STDOUT: %u.patt: %C = binding_pattern u
|
||||
// CHECK:STDOUT: %u.param_patt: %C = value_param_pattern %u.patt, call_param1
|
||||
// CHECK:STDOUT: %return.patt: %C = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, call_param2
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %C.ref.loc32_29: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %self.param: %C = value_param call_param0
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.f57.%C.ref.loc31_6 [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %self: %C = bind_name self, %self.param
|
||||
// CHECK:STDOUT: %u.param: %C = value_param call_param1
|
||||
// CHECK:STDOUT: %C.ref.loc32_23: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %u: %C = bind_name u, %u.param
|
||||
// CHECK:STDOUT: %return.param: ref %C = out_param call_param2
|
||||
// CHECK:STDOUT: %return: ref %C = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .C = <poisoned>
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: witness = file.%impl_witness.loc31
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C {
|
||||
// CHECK:STDOUT: %.loc28_10: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc28_11: type = converted %.loc28_10, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: adapt_decl %.loc28_11 [concrete]
|
||||
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%C
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F.1(@J.%Self: %J.type) {
|
||||
// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.ccd)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc19_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc19_14.1 (constants.%Self.as_type.3df)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self.as_type.loc19_14.1 (%Self.as_type.3df)](%u.param_patt: <error>) -> <error>;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F.2[%self.param_patt: %empty_tuple.type](%u.param_patt: %empty_struct_type) -> %empty_struct_type {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %u.ref: %empty_struct_type = name_ref u, %u
|
||||
// CHECK:STDOUT: return %u.ref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F.3[%self.param_patt: %C](%u.param_patt: %C) -> %C {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref: %C = name_ref self, %self
|
||||
// CHECK:STDOUT: return %self.ref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @U(constants.%Self.ccd) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F.1(constants.%Self.ccd) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self.ccd
|
||||
// CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%Self.as_type.3df
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @U(constants.%J.facet.28c) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F.1(constants.%J.facet.506) {
|
||||
// CHECK:STDOUT: %Self => constants.%J.facet.506
|
||||
// CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%empty_tuple.type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F.1(constants.%J.facet.e8d) {
|
||||
// CHECK:STDOUT: %Self => constants.%J.facet.e8d
|
||||
// CHECK:STDOUT: %Self.as_type.loc19_14.1 => constants.%C
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- use_non-type_in_function.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %M.type: type = facet_type <@M> [concrete]
|
||||
// CHECK:STDOUT: %Self: %M.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
||||
// CHECK:STDOUT: %struct_type.b.347: type = struct_type {.b: %empty_struct_type} [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %M.assoc_type: type = assoc_entity_type %M.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete]
|
||||
// CHECK:STDOUT: %G.type.020: type = fn_type @G.1 [concrete]
|
||||
// CHECK:STDOUT: %G.91c: %G.type.020 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%G.decl [concrete]
|
||||
// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
|
||||
// CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self, element0 [symbolic_self]
|
||||
// CHECK:STDOUT: %M.facet.407: %M.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self]
|
||||
// CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self]
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %struct: %struct_type.b.347 = struct_value (%empty_struct) [concrete]
|
||||
// CHECK:STDOUT: %M_where.type: type = facet_type <@M where %impl.elem0 = %struct> [concrete]
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (%struct, @impl.%G.decl) [concrete]
|
||||
// CHECK:STDOUT: %G.type.bf5: type = fn_type @G.2 [concrete]
|
||||
// CHECK:STDOUT: %G.44e: %G.type.bf5 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %M.facet.993: %M.type = facet_value %empty_tuple.type, (%impl_witness) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .M = %M.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %M.decl: type = interface_decl @M [concrete = constants.%M.type] {} {}
|
||||
// CHECK:STDOUT: impl_decl @impl [concrete] {} {
|
||||
// CHECK:STDOUT: %.loc8_7.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc8_7.2: type = converted %.loc8_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
|
||||
// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.loc8_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0]
|
||||
// CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0]
|
||||
// CHECK:STDOUT: %.loc8_32: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc8_33.1: %struct_type.b.347 = struct_literal (%.loc8_32)
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_33.2: %empty_struct_type = converted %.loc8_32, %empty_struct [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %struct: %struct_type.b.347 = struct_value (%.loc8_33.2) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc8_33.3: %struct_type.b.347 = converted %.loc8_33.1, %struct [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc8_14: type = where_expr %.Self [concrete = constants.%M_where.type] {
|
||||
// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_33.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (constants.%struct, @impl.%G.decl) [concrete = constants.%impl_witness]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @M {
|
||||
// CHECK:STDOUT: %Self: %M.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %Z: %struct_type.b.347 = assoc_const_decl @Z [concrete] {
|
||||
// CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type.020 = fn_decl @G.1 [concrete = constants.%G.91c] {
|
||||
// CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc5_14.1: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc5_14.2: type = converted %.loc5_14.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, %G.decl [concrete = constants.%assoc1]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
// CHECK:STDOUT: .Z = @Z.%assoc0
|
||||
// CHECK:STDOUT: .G = %assoc1
|
||||
// CHECK:STDOUT: witness = (%Z, %G.decl)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic assoc_const @Z(@M.%Self: %M.type) {
|
||||
// CHECK:STDOUT: assoc_const Z:! %struct_type.b.347;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl: %.loc8_7.2 as %.loc8_14 {
|
||||
// CHECK:STDOUT: %G.decl: %G.type.bf5 = fn_decl @G.2 [concrete = constants.%G.44e] {
|
||||
// CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc9_14.1: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc9_14.2: type = converted %.loc9_14.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: .M = <poisoned>
|
||||
// CHECK:STDOUT: witness = file.%impl_witness
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @G.1(@M.%Self: %M.type) {
|
||||
// CHECK:STDOUT: fn() -> %empty_struct_type;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G.2() -> %empty_struct_type {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc8_7.2 [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
|
||||
// CHECK:STDOUT: %M.facet: %M.type = facet_value constants.%empty_tuple.type, (constants.%impl_witness) [concrete = constants.%M.facet.993]
|
||||
// CHECK:STDOUT: %.loc10_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.993]
|
||||
// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %as_type: type = facet_access_type %.loc10_18 [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %.loc10_23: type = converted %.loc10_18, %as_type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %as_wit.iface0: <witness> = facet_access_witness %.loc10_18, element0 [concrete = constants.%impl_witness]
|
||||
// CHECK:STDOUT: %impl.elem0: %struct_type.b.347 = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc10_25: %empty_struct_type = struct_access %impl.elem0, element0 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: return %.loc10_25
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Z(constants.%Self) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @G.1(constants.%Self) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Z(constants.%M.facet.407) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @G.1(constants.%M.facet.993) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Z(constants.%M.facet.993) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- self_as_uses_correct_rewrite_constraint.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %C.f2e: type = class_type @C, @C(%T) [symbolic]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
||||
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
||||
// CHECK:STDOUT: %M.type: type = facet_type <@M> [concrete]
|
||||
// CHECK:STDOUT: %Self: %M.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %struct_type.b.86f: type = struct_type {.b: type} [concrete]
|
||||
// CHECK:STDOUT: %M.assoc_type: type = assoc_entity_type %M.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete]
|
||||
// CHECK:STDOUT: %G.type.020: type = fn_type @G.1 [concrete]
|
||||
// CHECK:STDOUT: %G.91c: %G.type.020 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, @M.%G.decl [concrete]
|
||||
// CHECK:STDOUT: %C.7a7: type = class_type @C, @C(%empty_struct_type) [concrete]
|
||||
// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
|
||||
// CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self, element0 [symbolic_self]
|
||||
// CHECK:STDOUT: %M.facet.407: %M.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self]
|
||||
// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self]
|
||||
// CHECK:STDOUT: %struct_type.b.347: type = struct_type {.b: %empty_struct_type} [concrete]
|
||||
// CHECK:STDOUT: %struct.0f3: %struct_type.b.86f = struct_value (%empty_struct_type) [concrete]
|
||||
// CHECK:STDOUT: %M_where.type.132: type = facet_type <@M where %impl.elem0 = %struct.0f3> [concrete]
|
||||
// CHECK:STDOUT: %impl_witness.ae0: <witness> = impl_witness (%struct.0f3, @impl.9c5.%G.decl) [concrete]
|
||||
// CHECK:STDOUT: %G.type.160: type = fn_type @G.2 [concrete]
|
||||
// CHECK:STDOUT: %G.fc4: %G.type.160 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %M.facet.508: %M.type = facet_value %C.7a7, (%impl_witness.ae0) [concrete]
|
||||
// CHECK:STDOUT: %C.3a0: type = class_type @C, @C(%empty_tuple.type) [concrete]
|
||||
// CHECK:STDOUT: %struct_type.b.161: type = struct_type {.b: %empty_tuple.type} [concrete]
|
||||
// CHECK:STDOUT: %struct.c94: %struct_type.b.86f = struct_value (%empty_tuple.type) [concrete]
|
||||
// CHECK:STDOUT: %M_where.type.363: type = facet_type <@M where %impl.elem0 = %struct.c94> [concrete]
|
||||
// CHECK:STDOUT: %impl_witness.6b9: <witness> = impl_witness (%struct.c94, @impl.f46.%G.decl) [concrete]
|
||||
// CHECK:STDOUT: %G.type.18e: type = fn_type @G.3 [concrete]
|
||||
// CHECK:STDOUT: %G.066: %G.type.18e = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %M.facet.a97: %M.type = facet_value %C.3a0, (%impl_witness.6b9) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: .M = %M.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
|
||||
// CHECK:STDOUT: %T.patt.loc4_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.loc4_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.2 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %M.decl: type = interface_decl @M [concrete = constants.%M.type] {} {}
|
||||
// CHECK:STDOUT: impl_decl @impl.9c5 [concrete] {} {
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
|
||||
// CHECK:STDOUT: %.loc11_9: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc11_10: type = converted %.loc11_9, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [concrete = constants.%C.7a7]
|
||||
// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
|
||||
// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.loc11_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0]
|
||||
// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0]
|
||||
// CHECK:STDOUT: %.loc11_35: %empty_struct_type = struct_literal ()
|
||||
// CHECK:STDOUT: %.loc11_36.1: %struct_type.b.347 = struct_literal (%.loc11_35)
|
||||
// CHECK:STDOUT: %.loc11_36.2: type = converted %.loc11_35, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %struct: %struct_type.b.86f = struct_value (%.loc11_36.2) [concrete = constants.%struct.0f3]
|
||||
// CHECK:STDOUT: %.loc11_36.3: %struct_type.b.86f = converted %.loc11_36.1, %struct [concrete = constants.%struct.0f3]
|
||||
// CHECK:STDOUT: %.loc11_17: type = where_expr %.Self [concrete = constants.%M_where.type.132] {
|
||||
// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc11_36.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl_witness.loc11: <witness> = impl_witness (constants.%struct.0f3, @impl.9c5.%G.decl) [concrete = constants.%impl_witness.ae0]
|
||||
// CHECK:STDOUT: impl_decl @impl.f46 [concrete] {} {
|
||||
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
|
||||
// CHECK:STDOUT: %.loc17_9: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc17_10: type = converted %.loc17_9, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_tuple.type) [concrete = constants.%C.3a0]
|
||||
// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
|
||||
// CHECK:STDOUT: %.Self: %M.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %.Self.ref: %M.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.loc17_23: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0]
|
||||
// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0]
|
||||
// CHECK:STDOUT: %.loc17_35: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc17_36.1: %struct_type.b.161 = struct_literal (%.loc17_35)
|
||||
// CHECK:STDOUT: %.loc17_36.2: type = converted %.loc17_35, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %struct: %struct_type.b.86f = struct_value (%.loc17_36.2) [concrete = constants.%struct.c94]
|
||||
// CHECK:STDOUT: %.loc17_36.3: %struct_type.b.86f = converted %.loc17_36.1, %struct [concrete = constants.%struct.c94]
|
||||
// CHECK:STDOUT: %.loc17_17: type = where_expr %.Self [concrete = constants.%M_where.type.363] {
|
||||
// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc17_36.3
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl_witness.loc17: <witness> = impl_witness (constants.%struct.c94, @impl.f46.%G.decl) [concrete = constants.%impl_witness.6b9]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @M {
|
||||
// CHECK:STDOUT: %Self: %M.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %Z: %struct_type.b.86f = assoc_const_decl @Z [concrete] {
|
||||
// CHECK:STDOUT: %assoc0: %M.assoc_type = assoc_entity element0, @M.%Z [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl: %G.type.020 = fn_decl @G.1 [concrete = constants.%G.91c] {
|
||||
// CHECK:STDOUT: %return.patt: type = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %return.param: ref type = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc1: %M.assoc_type = assoc_entity element1, %G.decl [concrete = constants.%assoc1]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
// CHECK:STDOUT: .Z = @Z.%assoc0
|
||||
// CHECK:STDOUT: .G = %assoc1
|
||||
// CHECK:STDOUT: witness = (%Z, %G.decl)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic assoc_const @Z(@M.%Self: %M.type) {
|
||||
// CHECK:STDOUT: assoc_const Z:! %struct_type.b.86f;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl.9c5: %C as %.loc11_17 {
|
||||
// CHECK:STDOUT: %G.decl: %G.type.160 = fn_decl @G.2 [concrete = constants.%G.fc4] {
|
||||
// CHECK:STDOUT: %return.patt: type = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %return.param: ref type = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: .M = <poisoned>
|
||||
// CHECK:STDOUT: witness = file.%impl_witness.loc11
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl.f46: %C as %.loc17_17 {
|
||||
// CHECK:STDOUT: %G.decl: %G.type.18e = fn_decl @G.3 [concrete = constants.%G.066] {
|
||||
// CHECK:STDOUT: %return.patt: type = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %return.param: ref type = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .G = %G.decl
|
||||
// CHECK:STDOUT: .M = <poisoned>
|
||||
// CHECK:STDOUT: witness = file.%impl_witness.loc17
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic class @C(%T.loc4_9.1: type) {
|
||||
// CHECK:STDOUT: %T.loc4_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %T.patt.loc4_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4_9.2 (constants.%T.patt)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class {
|
||||
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%C.f2e
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @G.1(@M.%Self: %M.type) {
|
||||
// CHECK:STDOUT: fn() -> type;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G.2() -> type {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.9c5.%C [concrete = constants.%C.7a7]
|
||||
// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
|
||||
// CHECK:STDOUT: %M.facet: %M.type = facet_value constants.%C.7a7, (constants.%impl_witness.ae0) [concrete = constants.%M.facet.508]
|
||||
// CHECK:STDOUT: %.loc13_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.508]
|
||||
// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %as_type: type = facet_access_type %.loc13_18 [concrete = constants.%C.7a7]
|
||||
// CHECK:STDOUT: %.loc13_23: type = converted %.loc13_18, %as_type [concrete = constants.%C.7a7]
|
||||
// CHECK:STDOUT: %as_wit.iface0: <witness> = facet_access_witness %.loc13_18, element0 [concrete = constants.%impl_witness.ae0]
|
||||
// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%struct.0f3]
|
||||
// CHECK:STDOUT: %.loc13_25: type = struct_access %impl.elem0, element0 [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: return %.loc13_25
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G.3() -> type {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.f46.%C [concrete = constants.%C.3a0]
|
||||
// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [concrete = constants.%M.type]
|
||||
// CHECK:STDOUT: %M.facet: %M.type = facet_value constants.%C.3a0, (constants.%impl_witness.6b9) [concrete = constants.%M.facet.a97]
|
||||
// CHECK:STDOUT: %.loc19_18: %M.type = converted %Self.ref, %M.facet [concrete = constants.%M.facet.a97]
|
||||
// CHECK:STDOUT: %Z.ref: %M.assoc_type = name_ref Z, @Z.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %as_type: type = facet_access_type %.loc19_18 [concrete = constants.%C.3a0]
|
||||
// CHECK:STDOUT: %.loc19_23: type = converted %.loc19_18, %as_type [concrete = constants.%C.3a0]
|
||||
// CHECK:STDOUT: %as_wit.iface0: <witness> = facet_access_witness %.loc19_18, element0 [concrete = constants.%impl_witness.6b9]
|
||||
// CHECK:STDOUT: %impl.elem0: %struct_type.b.86f = impl_witness_access %as_wit.iface0, element0 [concrete = constants.%struct.c94]
|
||||
// CHECK:STDOUT: %.loc19_25: type = struct_access %impl.elem0, element0 [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: return %.loc19_25
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C(constants.%T) {
|
||||
// CHECK:STDOUT: %T.loc4_9.2 => constants.%T
|
||||
// CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Z(constants.%Self) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @G.1(constants.%Self) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C(constants.%empty_struct_type) {
|
||||
// CHECK:STDOUT: %T.loc4_9.2 => constants.%empty_struct_type
|
||||
// CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%empty_struct_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Z(constants.%M.facet.407) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @G.1(constants.%M.facet.508) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Z(constants.%M.facet.508) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @C(constants.%empty_tuple.type) {
|
||||
// CHECK:STDOUT: %T.loc4_9.2 => constants.%empty_tuple.type
|
||||
// CHECK:STDOUT: %T.patt.loc4_9.2 => constants.%empty_tuple.type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @G.1(constants.%M.facet.a97) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Z(constants.%M.facet.a97) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_todo_associated_int_in_array.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
|
||||
// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.73c: %I.assoc_type = assoc_entity element0, @I.%N [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type.b70: type = facet_access_type %Self.826 [symbolic]
|
||||
// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [concrete]
|
||||
// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete]
|
||||
// CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%F.decl [concrete]
|
||||
// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
|
||||
// CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self, element0 [symbolic_self]
|
||||
// CHECK:STDOUT: %I.facet.d87: %I.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self]
|
||||
// CHECK:STDOUT: %impl.elem0: %i32 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self]
|
||||
// CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete]
|
||||
// CHECK:STDOUT: %impl_witness.d39: <witness> = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete]
|
||||
// CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete]
|
||||
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_2.ecc, %Convert.956 [concrete]
|
||||
// CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.956, @Convert.2(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_2.ecc, %Convert.specific_fn [concrete]
|
||||
// CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
|
||||
// CHECK:STDOUT: %I_where.type: type = facet_type <@I where %impl.elem0 = %int_2.ef8> [concrete]
|
||||
// CHECK:STDOUT: %impl_witness.2c9: <witness> = impl_witness (%int_2.ef8, <error>) [concrete]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_2.ecc, bool [concrete]
|
||||
// CHECK:STDOUT: %F.type.925: type = fn_type @F.2 [concrete]
|
||||
// CHECK:STDOUT: %F.2a6: %F.type.925 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %I.facet.3e8: %I.type = facet_value %empty_tuple.type, (%impl_witness.2c9) [concrete]
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [concrete]
|
||||
// CHECK:STDOUT: %false: bool = bool_literal false [concrete]
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (bool, bool) [concrete]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
|
||||
// CHECK:STDOUT: %array: %array_type = tuple_value (%true, %false) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: .Int = %Core.Int
|
||||
// CHECK:STDOUT: .Bool = %Core.Bool
|
||||
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .I = %I.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
|
||||
// CHECK:STDOUT: impl_decl @impl.dd2 [concrete] {} {
|
||||
// CHECK:STDOUT: %.loc15_7.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc15_7.2: type = converted %.loc15_7.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %N.ref: %I.assoc_type = name_ref N, @N.%assoc0 [concrete = constants.%assoc0.73c]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.loc15_20: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0]
|
||||
// CHECK:STDOUT: %impl.elem0.loc15_20: %i32 = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %impl.elem0.loc15_25: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc15_25.1: <bound method> = bound_method %int_2, %impl.elem0.loc15_25 [concrete = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc15_25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc15_25.2: <bound method> = bound_method %int_2, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_25.2(%int_2) [concrete = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc15_25.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc15_25.2: %i32 = converted %int_2, %.loc15_25.1 [concrete = constants.%int_2.ef8]
|
||||
// CHECK:STDOUT: %.loc15_14: type = where_expr %.Self [concrete = constants.%I_where.type] {
|
||||
// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc15_20, %.loc15_25.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (constants.%int_2.ef8, <error>) [concrete = constants.%impl_witness.2c9]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @I {
|
||||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
|
||||
// CHECK:STDOUT: %N: %i32 = assoc_const_decl @N [concrete] {
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%N [concrete = constants.%assoc0.73c]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type.cf0 = fn_decl @F.1 [concrete = constants.%F.bc6] {
|
||||
// CHECK:STDOUT: %self.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = binding_pattern self
|
||||
// CHECK:STDOUT: %self.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = value_param_pattern %self.patt, call_param0
|
||||
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %N.ref: %I.assoc_type = name_ref N, @N.%assoc0 [concrete = constants.%assoc0.73c]
|
||||
// CHECK:STDOUT: %.loc12_31.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc12_31.2: type = converted %bool.make_type, %.loc12_31.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc12_37: Core.IntLiteral = converted %N.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %array_type: type = array_type <error>, bool [concrete = <error>]
|
||||
// CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc12_14.1: type = splice_block %.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)] {
|
||||
// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.826)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)]
|
||||
// CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70) = bind_name self, %self.param
|
||||
// CHECK:STDOUT: %return.param: ref <error> = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref <error> = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
// CHECK:STDOUT: .N = @N.%assoc0
|
||||
// CHECK:STDOUT: .F = %assoc1
|
||||
// CHECK:STDOUT: witness = (%N, %F.decl)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic assoc_const @N(@I.%Self: %I.type) {
|
||||
// CHECK:STDOUT: assoc_const N:! %i32;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl @impl.dd2: %.loc15_7.2 as %.loc15_14 {
|
||||
// CHECK:STDOUT: %F.decl: %F.type.925 = fn_decl @F.2 [concrete = constants.%F.2a6] {
|
||||
// CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self
|
||||
// CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, call_param0
|
||||
// CHECK:STDOUT: %return.patt: %array_type = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: %array_type = out_param_pattern %return.patt, call_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [concrete = bool]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %.loc16_31.1: type = value_of_initializer %bool.make_type [concrete = bool]
|
||||
// CHECK:STDOUT: %.loc16_31.2: type = converted %bool.make_type, %.loc16_31.1 [concrete = bool]
|
||||
// CHECK:STDOUT: %array_type: type = array_type %int_2, bool [concrete = constants.%array_type]
|
||||
// CHECK:STDOUT: %self.param: %empty_tuple.type = value_param call_param0
|
||||
// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.dd2.%.loc15_7.2 [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param
|
||||
// CHECK:STDOUT: %return.param: ref %array_type = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref %array_type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: witness = file.%impl_witness
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) {
|
||||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.826)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc12_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.b70)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.b70)]() -> <error>;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F.2[%self.param_patt: %empty_tuple.type]() -> %return.param_patt: %array_type {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %false: bool = bool_literal false [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc16_61.1: %tuple.type = tuple_literal (%true, %false)
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc16_61.2: ref bool = array_index %return, %int_0
|
||||
// CHECK:STDOUT: %.loc16_61.3: init bool = initialize_from %true to %.loc16_61.2 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %.loc16_61.4: ref bool = array_index %return, %int_1
|
||||
// CHECK:STDOUT: %.loc16_61.5: init bool = initialize_from %false to %.loc16_61.4 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc16_61.6: init %array_type = array_init (%.loc16_61.3, %.loc16_61.5) to %return [concrete = constants.%array]
|
||||
// CHECK:STDOUT: %.loc16_62: init %array_type = converted %.loc16_61.1, %.loc16_61.6 [concrete = constants.%array]
|
||||
// CHECK:STDOUT: return %.loc16_62 to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @N(constants.%Self.826) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F.1(constants.%Self.826) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self.826
|
||||
// CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%Self.as_type.b70
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @N(constants.%I.facet.d87) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F.1(constants.%I.facet.3e8) {
|
||||
// CHECK:STDOUT: %Self => constants.%I.facet.3e8
|
||||
// CHECK:STDOUT: %Self.as_type.loc12_14.1 => constants.%empty_tuple.type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -524,7 +524,6 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type %HasF.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, imports.%PackageA.import_ref.ab2 [concrete]
|
||||
// CHECK:STDOUT: %F.type.dbc: type = fn_type @F.1 [concrete]
|
||||
// CHECK:STDOUT: %F.a2b: %F.type.dbc = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (imports.%PackageA.import_ref.148) [concrete]
|
||||
// CHECK:STDOUT: %HasF.facet: %HasF.type = facet_value %C, (%impl_witness) [concrete]
|
||||
@@ -545,7 +544,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type]
|
||||
// CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst15 [no loc], unloaded
|
||||
// CHECK:STDOUT: %PackageA.import_ref.566: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %PackageA.F: %F.type.dbc = import_ref PackageA//default, F, loaded [concrete = constants.%F.a2b]
|
||||
// CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded
|
||||
// CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst15 [no loc], loaded [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %PackageA.import_ref.a71: <witness> = import_ref PackageA//default, loc11_16, loaded [concrete = constants.%impl_witness]
|
||||
// CHECK:STDOUT: %PackageA.import_ref.29a: type = import_ref PackageA//default, loc11_6, loaded [concrete = constants.%C]
|
||||
@@ -630,7 +629,6 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type %HasF.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, imports.%PackageA.import_ref.ab2 [concrete]
|
||||
// CHECK:STDOUT: %F.type.dbc: type = fn_type @F.1 [concrete]
|
||||
// CHECK:STDOUT: %F.a2b: %F.type.dbc = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.cf3 [symbolic]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
||||
// CHECK:STDOUT: %HasG.type: type = facet_type <@HasG> [concrete]
|
||||
@@ -656,7 +654,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type]
|
||||
// CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst15 [no loc], unloaded
|
||||
// CHECK:STDOUT: %PackageA.import_ref.566: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %PackageA.F: %F.type.dbc = import_ref PackageA//default, F, loaded [concrete = constants.%F.a2b]
|
||||
// CHECK:STDOUT: %PackageA.F = import_ref PackageA//default, F, unloaded
|
||||
// CHECK:STDOUT: %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst15 [no loc], loaded [symbolic = constants.%Self.cf3]
|
||||
// CHECK:STDOUT: %PackageA.import_ref.0e8 = import_ref PackageA//default, loc11_16, unloaded
|
||||
// CHECK:STDOUT: %PackageA.import_ref.8f2: <witness> = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type]
|
||||
@@ -786,7 +784,6 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %HasG.assoc_type: type = assoc_entity_type %HasG.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, imports.%PackageB.import_ref.70a [concrete]
|
||||
// CHECK:STDOUT: %G.type.d9e: type = fn_type @G.1 [concrete]
|
||||
// CHECK:STDOUT: %G.cd6: %G.type.d9e = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.fcb [symbolic]
|
||||
// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
|
||||
// CHECK:STDOUT: %D: type = class_type @D [concrete]
|
||||
@@ -812,7 +809,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %PackageB.HasG: type = import_ref PackageB//default, HasG, loaded [concrete = constants.%HasG.type]
|
||||
// CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst17 [no loc], unloaded
|
||||
// CHECK:STDOUT: %PackageB.import_ref.604: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %PackageB.G: %G.type.d9e = import_ref PackageB//default, G, loaded [concrete = constants.%G.cd6]
|
||||
// CHECK:STDOUT: %PackageB.G = import_ref PackageB//default, G, unloaded
|
||||
// CHECK:STDOUT: %PackageB.import_ref.ef5: %HasG.type = import_ref PackageB//default, inst17 [no loc], loaded [symbolic = constants.%Self.fcb]
|
||||
// CHECK:STDOUT: %PackageA.import_ref.28c = import_ref PackageA//default, inst15 [no loc], unloaded
|
||||
// CHECK:STDOUT: %PackageA.import_ref.a2a = import_ref PackageA//default, loc5_21, unloaded
|
||||
@@ -942,7 +939,6 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %HasG.assoc_type: type = assoc_entity_type %HasG.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %HasG.assoc_type = assoc_entity element0, imports.%PackageB.import_ref.70a [concrete]
|
||||
// CHECK:STDOUT: %G.type.d9e: type = fn_type @G.1 [concrete]
|
||||
// CHECK:STDOUT: %G.cd6: %G.type.d9e = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.fcb [symbolic]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
||||
// CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
|
||||
@@ -965,7 +961,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %PackageB.HasG: type = import_ref PackageB//default, HasG, loaded [concrete = constants.%HasG.type]
|
||||
// CHECK:STDOUT: %PackageB.import_ref.5d8 = import_ref PackageB//default, inst17 [no loc], unloaded
|
||||
// CHECK:STDOUT: %PackageB.import_ref.604: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %PackageB.G: %G.type.d9e = import_ref PackageB//default, G, loaded [concrete = constants.%G.cd6]
|
||||
// CHECK:STDOUT: %PackageB.G = import_ref PackageB//default, G, unloaded
|
||||
// CHECK:STDOUT: %PackageB.import_ref.ef5: %HasG.type = import_ref PackageB//default, inst17 [no loc], loaded [symbolic = constants.%Self.fcb]
|
||||
// CHECK:STDOUT: %PackageB.import_ref.fa0 = import_ref PackageB//default, loc13_25, unloaded
|
||||
// CHECK:STDOUT: %PackageB.import_ref.8db: <witness> = import_ref PackageB//default, inst46 [indirect], loaded [concrete = constants.%complete_type]
|
||||
@@ -1171,7 +1167,6 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %Z.assoc_type: type = assoc_entity_type %Z.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %Z.assoc_type = assoc_entity element0, imports.%PackageAssociatedInterface.import_ref.250 [concrete]
|
||||
// CHECK:STDOUT: %H.type.386: type = fn_type @H.1 [concrete]
|
||||
// CHECK:STDOUT: %H.246: %H.type.386 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (imports.%PackageAssociatedInterface.import_ref.6d7) [concrete]
|
||||
// CHECK:STDOUT: %Z.facet: %Z.type = facet_value %empty_tuple.type, (%impl_witness) [concrete]
|
||||
@@ -1189,7 +1184,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %PackageAssociatedInterface.Z: type = import_ref PackageAssociatedInterface//default, Z, loaded [concrete = constants.%Z.type]
|
||||
// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.f88 = import_ref PackageAssociatedInterface//default, inst15 [no loc], unloaded
|
||||
// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.ddc: %Z.assoc_type = import_ref PackageAssociatedInterface//default, loc5_21, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %PackageAssociatedInterface.H: %H.type.386 = import_ref PackageAssociatedInterface//default, H, loaded [concrete = constants.%H.246]
|
||||
// CHECK:STDOUT: %PackageAssociatedInterface.H = import_ref PackageAssociatedInterface//default, H, unloaded
|
||||
// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.d26: %Z.type = import_ref PackageAssociatedInterface//default, inst15 [no loc], loaded [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.998: <witness> = import_ref PackageAssociatedInterface//default, loc8_14, loaded [concrete = constants.%impl_witness]
|
||||
// CHECK:STDOUT: %PackageAssociatedInterface.import_ref.e5c: type = import_ref PackageAssociatedInterface//default, loc8_7, loaded [concrete = constants.%empty_tuple.type]
|
||||
@@ -1585,7 +1580,6 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %Y.assoc_type: type = assoc_entity_type %Y.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %Y.assoc_type = assoc_entity element0, imports.%PackageHasParam.import_ref.ce2 [concrete]
|
||||
// CHECK:STDOUT: %K.type.311: type = fn_type @K.1 [concrete]
|
||||
// CHECK:STDOUT: %K.7a1: %K.type.311 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.f64 [symbolic]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.as_type [symbolic]
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (imports.%PackageGenericInterface.import_ref.456) [concrete]
|
||||
@@ -1616,7 +1610,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %PackageHasParam.Y: type = import_ref PackageHasParam//default, Y, loaded [concrete = constants.%Y.type]
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.dc1 = import_ref PackageHasParam//default, inst36 [no loc], unloaded
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.5e7: %Y.assoc_type = import_ref PackageHasParam//default, loc7_22, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %PackageHasParam.K: %K.type.311 = import_ref PackageHasParam//default, K, loaded [concrete = constants.%K.7a1]
|
||||
// CHECK:STDOUT: %PackageHasParam.K = import_ref PackageHasParam//default, K, unloaded
|
||||
// CHECK:STDOUT: %PackageHasParam.import_ref.292: %Y.type = import_ref PackageHasParam//default, inst36 [no loc], loaded [symbolic = constants.%Self.f64]
|
||||
// CHECK:STDOUT: %PackageGenericInterface.import_ref.ca8: <witness> = import_ref PackageGenericInterface//default, loc8_70, loaded [concrete = constants.%impl_witness]
|
||||
// CHECK:STDOUT: %PackageGenericInterface.import_ref.321: type = import_ref PackageGenericInterface//default, loc8_47, loaded [concrete = constants.%AnyParam.861]
|
||||
@@ -1999,9 +1993,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
|
||||
// CHECK:STDOUT: %Self.013: %I.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%HasExtraInterfaces.import_ref.777 [concrete]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%HasExtraInterfaces.import_ref.d54 [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.013 [symbolic]
|
||||
// CHECK:STDOUT: %Extra8.type: type = facet_type <@Extra8> [concrete]
|
||||
// CHECK:STDOUT: %Extra7.type: type = facet_type <@Extra7> [concrete]
|
||||
@@ -2028,7 +2020,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.I: type = import_ref HasExtraInterfaces//default, I, loaded [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.import_ref.e5d = import_ref HasExtraInterfaces//default, inst61 [no loc], unloaded
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.import_ref.9cd: %I.assoc_type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.F: %F.type = import_ref HasExtraInterfaces//default, F, loaded [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.F = import_ref HasExtraInterfaces//default, F, unloaded
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.import_ref.1db: %I.type = import_ref HasExtraInterfaces//default, inst61 [no loc], loaded [symbolic = constants.%Self.013]
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.import_ref.1c8 = import_ref HasExtraInterfaces//default, loc16_79, unloaded
|
||||
// CHECK:STDOUT: %HasExtraInterfaces.import_ref.9c8 = import_ref HasExtraInterfaces//default, inst43 [no loc], unloaded
|
||||
|
||||
@@ -387,7 +387,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
|
||||
// CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.cd3: @I.%I.assoc_type (%I.assoc_type.955) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%assoc0 (constants.%assoc0.249)]
|
||||
// CHECK:STDOUT: %Main.F: @I.%F.type (%F.type.2ae) = import_ref Main//types, F, loaded [symbolic = @I.%F (constants.%F.bb2)]
|
||||
// CHECK:STDOUT: %Main.F = import_ref Main//types, F, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst24 [no loc], loaded [symbolic = @I.%Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Main.import_ref.e54: @I.%F.type (%F.type.2ae) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%F (constants.%F.bb2)]
|
||||
@@ -756,7 +756,7 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
|
||||
// CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.884 = import_ref Main//types, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.cd3: @I.%I.assoc_type (%I.assoc_type.955) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%assoc0 (constants.%assoc0.249)]
|
||||
// CHECK:STDOUT: %Main.F: @I.%F.type (%F.type.2ae) = import_ref Main//types, F, loaded [symbolic = @I.%F (constants.%F.bb2)]
|
||||
// CHECK:STDOUT: %Main.F = import_ref Main//types, F, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//types, loc4_13, loaded [symbolic = @I.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.38e: @I.%I.type (%I.type.325) = import_ref Main//types, inst24 [no loc], loaded [symbolic = @I.%Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Main.import_ref.e54: @I.%F.type (%F.type.2ae) = import_ref Main//types, loc4_43, loaded [symbolic = @I.%F (constants.%F.bb2)]
|
||||
|
||||
+1
-2
@@ -265,7 +265,6 @@ fn Call() {
|
||||
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.e03 [concrete]
|
||||
// CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete]
|
||||
// CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (imports.%Main.import_ref.742) [concrete]
|
||||
// CHECK:STDOUT: %I.facet: %I.type = facet_value %C, (%impl_witness) [concrete]
|
||||
@@ -285,7 +284,7 @@ fn Call() {
|
||||
// CHECK:STDOUT: %Main.import_ref.6a9 = import_ref Main//get, inst22 [indirect], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//i, inst17 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.bcb: %I.assoc_type = import_ref Main//i, loc4_33, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %Main.F: %F.type.cf0 = import_ref Main//i, F, loaded [concrete = constants.%F.bc6]
|
||||
// CHECK:STDOUT: %Main.F = import_ref Main//i, F, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//i, inst17 [no loc], loaded [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %Main.import_ref.e53: <witness> = import_ref Main//c, loc7_13, loaded [concrete = constants.%impl_witness]
|
||||
// CHECK:STDOUT: %Main.import_ref.29a: type = import_ref Main//c, loc7_6, loaded [concrete = constants.%C]
|
||||
|
||||
+16
-16
@@ -318,13 +318,13 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.c38: type = facet_type <@ImplicitAs, @ImplicitAs(%NonInstance2.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.d1f: type = fn_type @Convert, @ImplicitAs(%NonInstance2.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.079: %Convert.type.d1f = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.5d3: type = assoc_entity_type %ImplicitAs.type.c38 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.947: %ImplicitAs.assoc_type.5d3 = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.c84: %ImplicitAs.assoc_type.5d3 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -334,11 +334,11 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc4_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -391,7 +391,7 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -466,7 +466,7 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.d1f
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.079
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.5d3
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.947
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.c84
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_non-instance_indirect.carbon
|
||||
@@ -495,13 +495,13 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.c69: type = facet_type <@ImplicitAs, @ImplicitAs(%NonInstance3.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.0f1: type = fn_type @Convert, @ImplicitAs(%NonInstance3.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.bb3: %Convert.type.0f1 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.43b: type = assoc_entity_type %ImplicitAs.type.c69 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.f5b: %ImplicitAs.assoc_type.43b = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.085: %ImplicitAs.assoc_type.43b = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -511,11 +511,11 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc4_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -569,7 +569,7 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -645,7 +645,7 @@ fn InstanceCallFail() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.0f1
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.bb3
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.43b
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.f5b
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.085
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- instance_success.carbon
|
||||
|
||||
@@ -429,7 +429,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
|
||||
// CHECK:STDOUT: %Add.assoc_type: type = assoc_entity_type %Add.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %Add.assoc_type = assoc_entity element0, imports.%Main.import_ref.5a3 [concrete]
|
||||
// CHECK:STDOUT: %Op.type.31b: type = fn_type @Op.1 [concrete]
|
||||
// CHECK:STDOUT: %Op.d59: %Op.type.31b = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
|
||||
// CHECK:STDOUT: %impl_witness.3a3: <witness> = impl_witness (imports.%Main.import_ref.19b), @impl(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Op.type.883: type = fn_type @Op.2, @impl(%N) [symbolic]
|
||||
@@ -467,7 +466,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
|
||||
// CHECK:STDOUT: %Main.import_ref.697 = import_ref Main//generic_impl, inst87 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.07c = import_ref Main//generic_impl, inst15 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.db7: %Add.assoc_type = import_ref Main//generic_impl, loc5_41, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %Main.Op: %Op.type.31b = import_ref Main//generic_impl, Op, loaded [concrete = constants.%Op.d59]
|
||||
// CHECK:STDOUT: %Main.Op = import_ref Main//generic_impl, Op, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.e5e: %Add.type = import_ref Main//generic_impl, inst15 [no loc], loaded [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %Main.import_ref.33b: <witness> = import_ref Main//generic_impl, loc15_48, loaded [symbolic = @impl.%impl_witness (constants.%impl_witness.7e5be3.1)]
|
||||
// CHECK:STDOUT: %Main.import_ref.f1e294.2: Core.IntLiteral = import_ref Main//generic_impl, loc15_14, loaded [symbolic = @impl.%N (constants.%N)]
|
||||
|
||||
+29
-37
@@ -350,9 +350,8 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %NonInstance.type: type = facet_type <@NonInstance> [concrete]
|
||||
// CHECK:STDOUT: %Self.73c: %NonInstance.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %NonInstance.assoc_type: type = assoc_entity_type %NonInstance.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.bb3 [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.474 [concrete]
|
||||
// CHECK:STDOUT: %F.type.9e5: type = fn_type @F.1 [concrete]
|
||||
// CHECK:STDOUT: %F.4e4: %F.type.9e5 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Instance.type: type = facet_type <@Instance> [concrete]
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (imports.%Main.import_ref.2d7) [concrete]
|
||||
// CHECK:STDOUT: %NonInstance.facet: %NonInstance.type = facet_value %struct_type.i, (%impl_witness) [concrete]
|
||||
@@ -366,7 +365,7 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %Main.Instance = import_ref Main//lib, Instance, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst15 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.69f: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %Main.F: %F.type.9e5 = import_ref Main//lib, F, loaded [concrete = constants.%F.4e4]
|
||||
// CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst15 [no loc], loaded [symbolic = constants.%Self.73c]
|
||||
// CHECK:STDOUT: %Main.import_ref.826: <witness> = import_ref Main//lib, loc7_30, loaded [concrete = constants.%impl_witness]
|
||||
// CHECK:STDOUT: %Main.import_ref.ded207.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i]
|
||||
@@ -446,9 +445,7 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %NonInstance.type: type = facet_type <@NonInstance> [concrete]
|
||||
// CHECK:STDOUT: %Self.73c: %NonInstance.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %NonInstance.assoc_type: type = assoc_entity_type %NonInstance.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.3d0: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.bb3 [concrete]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc0.b0b: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.474 [concrete]
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic]
|
||||
@@ -457,13 +454,13 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.a4a: type = facet_type <@ImplicitAs, @ImplicitAs(%NonInstance.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.0a7: type = fn_type @Convert, @ImplicitAs(%NonInstance.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.c2d: %Convert.type.0a7 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.ffd: type = assoc_entity_type %ImplicitAs.type.a4a [concrete]
|
||||
// CHECK:STDOUT: %assoc0.ff2: %ImplicitAs.assoc_type.ffd = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.46f: %ImplicitAs.assoc_type.ffd = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: %Instance.type: type = facet_type <@Instance> [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -475,16 +472,16 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: import Core//default
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst15 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.69f: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0.3d0]
|
||||
// CHECK:STDOUT: %Main.F: %F.type = import_ref Main//lib, F, loaded [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %Main.import_ref.69f: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0.b0b]
|
||||
// CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst15 [no loc], loaded [symbolic = constants.%Self.73c]
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc4_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Main.import_ref.112 = import_ref Main//lib, loc7_30, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.ded207.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i]
|
||||
// CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type]
|
||||
@@ -536,7 +533,7 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -567,7 +564,7 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %n.ref: %struct_type.i = name_ref n, %n
|
||||
// CHECK:STDOUT: %NonInstance.ref: type = name_ref NonInstance, imports.%Main.NonInstance [concrete = constants.%NonInstance.type]
|
||||
// CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.69f [concrete = constants.%assoc0.3d0]
|
||||
// CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.69f [concrete = constants.%assoc0.b0b]
|
||||
// CHECK:STDOUT: %.loc14: %NonInstance.type = converted %n.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
@@ -613,7 +610,7 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.0a7
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.c2d
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.ffd
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.ff2
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.46f
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_import_non-instance_indirect.carbon
|
||||
@@ -627,9 +624,7 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %NonInstance.type: type = facet_type <@NonInstance> [concrete]
|
||||
// CHECK:STDOUT: %Self.73c: %NonInstance.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %NonInstance.assoc_type: type = assoc_entity_type %NonInstance.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.3d0: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.bb3 [concrete]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc0.b0b: %NonInstance.assoc_type = assoc_entity element0, imports.%Main.import_ref.474 [concrete]
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic]
|
||||
@@ -638,13 +633,13 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.a4a: type = facet_type <@ImplicitAs, @ImplicitAs(%NonInstance.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.0a7: type = fn_type @Convert, @ImplicitAs(%NonInstance.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.c2d: %Convert.type.0a7 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.ffd: type = assoc_entity_type %ImplicitAs.type.a4a [concrete]
|
||||
// CHECK:STDOUT: %assoc0.ff2: %ImplicitAs.assoc_type.ffd = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.46f: %ImplicitAs.assoc_type.ffd = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: %Instance.type: type = facet_type <@Instance> [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -656,16 +651,16 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: import Core//default
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst15 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.69f: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0.3d0]
|
||||
// CHECK:STDOUT: %Main.F: %F.type = import_ref Main//lib, F, loaded [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %Main.import_ref.69f: %NonInstance.assoc_type = import_ref Main//lib, loc4_9, loaded [concrete = constants.%assoc0.b0b]
|
||||
// CHECK:STDOUT: %Main.F = import_ref Main//lib, F, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.f85: %NonInstance.type = import_ref Main//lib, inst15 [no loc], loaded [symbolic = constants.%Self.73c]
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc4_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Main.import_ref.112 = import_ref Main//lib, loc7_30, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.ded207.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i]
|
||||
// CHECK:STDOUT: %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type]
|
||||
@@ -718,7 +713,7 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -749,7 +744,7 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p
|
||||
// CHECK:STDOUT: %NonInstance.ref: type = name_ref NonInstance, imports.%Main.NonInstance [concrete = constants.%NonInstance.type]
|
||||
// CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.69f [concrete = constants.%assoc0.3d0]
|
||||
// CHECK:STDOUT: %F.ref: %NonInstance.assoc_type = name_ref F, imports.%Main.import_ref.69f [concrete = constants.%assoc0.b0b]
|
||||
// CHECK:STDOUT: %.loc14_4.1: ref %struct_type.i = deref %p.ref
|
||||
// CHECK:STDOUT: %.loc14_4.2: %NonInstance.type = converted %.loc14_4.1, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
@@ -796,7 +791,7 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.0a7
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.c2d
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.ffd
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.ff2
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.46f
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- import_instance_success.carbon
|
||||
@@ -811,7 +806,6 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %Instance.assoc_type: type = assoc_entity_type %Instance.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %Instance.assoc_type = assoc_entity element0, imports.%Main.import_ref.b4d [concrete]
|
||||
// CHECK:STDOUT: %G.type.1e1: type = fn_type @G.1 [concrete]
|
||||
// CHECK:STDOUT: %G.449: %G.type.1e1 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.cf8 [symbolic]
|
||||
// CHECK:STDOUT: %NonInstance.type: type = facet_type <@NonInstance> [concrete]
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (imports.%Main.import_ref.373) [concrete]
|
||||
@@ -831,7 +825,7 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %Main.Instance: type = import_ref Main//lib, Instance, loaded [concrete = constants.%Instance.type]
|
||||
// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst39 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.7cb: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %Main.G: %G.type.1e1 = import_ref Main//lib, G, loaded [concrete = constants.%G.449]
|
||||
// CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst39 [no loc], loaded [symbolic = constants.%Self.cf8]
|
||||
// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst15 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.93f = import_ref Main//lib, loc4_9, unloaded
|
||||
@@ -955,9 +949,7 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: %Instance.type: type = facet_type <@Instance> [concrete]
|
||||
// CHECK:STDOUT: %Self.cf8: %Instance.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Instance.assoc_type: type = assoc_entity_type %Instance.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %Instance.assoc_type = assoc_entity element0, imports.%Main.import_ref.19f [concrete]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %Instance.assoc_type = assoc_entity element0, imports.%Main.import_ref.b4d [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.cf8 [symbolic]
|
||||
// CHECK:STDOUT: %NonInstance.type: type = facet_type <@NonInstance> [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -970,7 +962,7 @@ fn InstanceCallImportFail() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Main.import_ref.dcd = import_ref Main//lib, inst39 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.7cb: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %Main.G: %G.type = import_ref Main//lib, G, loaded [concrete = constants.%G]
|
||||
// CHECK:STDOUT: %Main.G = import_ref Main//lib, G, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst39 [no loc], loaded [symbolic = constants.%Self.cf8]
|
||||
// CHECK:STDOUT: %Main.import_ref.c55 = import_ref Main//lib, inst15 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.93f = import_ref Main//lib, loc4_9, unloaded
|
||||
|
||||
@@ -194,9 +194,8 @@ fn H() -> C({}).(I.F)() {}
|
||||
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
|
||||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.777 [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, imports.%Main.import_ref.e03 [concrete]
|
||||
// CHECK:STDOUT: %F.type.cf0: type = fn_type @F.1 [concrete]
|
||||
// CHECK:STDOUT: %F.bc6: %F.type.cf0 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %impl_witness.681: <witness> = impl_witness (imports.%Main.import_ref.e2c), @impl(%T) [symbolic]
|
||||
@@ -221,7 +220,7 @@ fn H() -> C({}).(I.F)() {}
|
||||
// CHECK:STDOUT: %Main.import_ref.4c0 = import_ref Main//import_generic, inst23 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.e5d = import_ref Main//import_generic, inst29 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.bcb: %I.assoc_type = import_ref Main//import_generic, loc7_9, loaded [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %Main.F: %F.type.cf0 = import_ref Main//import_generic, F, loaded [concrete = constants.%F.bc6]
|
||||
// CHECK:STDOUT: %Main.F = import_ref Main//import_generic, F, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.5dd: %I.type = import_ref Main//import_generic, inst29 [no loc], loaded [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %Main.import_ref.d91: <witness> = import_ref Main//import_generic, loc10_34, loaded [symbolic = @impl.%impl_witness (constants.%impl_witness.bbe)]
|
||||
// CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//import_generic, loc10_14, loaded [symbolic = @impl.%T (constants.%T)]
|
||||
|
||||
+49
-49
@@ -451,7 +451,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.318: @Action.%Action.assoc_type (%Action.assoc_type.8f9) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.905ab9.2)]
|
||||
// CHECK:STDOUT: %Main.Op: @Action.%Op.type (%Op.type.036) = import_ref Main//action, Op, loaded [symbolic = @Action.%Op (constants.%Op.6ed)]
|
||||
// CHECK:STDOUT: %Main.Op = import_ref Main//action, Op, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.71c: <witness> = import_ref Main//action, loc12_21, loaded [concrete = constants.%impl_witness]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst53 [no loc], unloaded
|
||||
@@ -596,11 +596,11 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Op.6ed: %Op.type.036 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
|
||||
// CHECK:STDOUT: %Action.assoc_type.8f9: type = assoc_entity_type %Action.type.cca [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.905ab9.1: %Action.assoc_type.8f9 = assoc_entity element0, imports.%Main.import_ref.0e3753.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.83d: %Action.assoc_type.8f9 = assoc_entity element0, imports.%Main.import_ref.1f6 [symbolic]
|
||||
// CHECK:STDOUT: %Op.type.54d: type = fn_type @Op, @Action(%B) [concrete]
|
||||
// CHECK:STDOUT: %Op.dba: %Op.type.54d = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Action.assoc_type.827: type = assoc_entity_type %Action.type.cb0 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.8f8: %Action.assoc_type.827 = assoc_entity element0, imports.%Main.import_ref.0e3753.2 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.8f8: %Action.assoc_type.827 = assoc_entity element0, imports.%Main.import_ref.0e3753.1 [concrete]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
||||
@@ -608,8 +608,8 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Op.type.5ad: type = fn_type @Op, @Action(%C) [concrete]
|
||||
// CHECK:STDOUT: %Op.b10: %Op.type.5ad = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Action.assoc_type.0a7: type = assoc_entity_type %Action.type.e2b [concrete]
|
||||
// CHECK:STDOUT: %assoc0.85d: %Action.assoc_type.0a7 = assoc_entity element0, imports.%Main.import_ref.0e3753.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.905ab9.2: %Action.assoc_type.8f9 = assoc_entity element0, imports.%Main.import_ref.0e3753.3 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.55b: %Action.assoc_type.0a7 = assoc_entity element0, imports.%Main.import_ref.1f6 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.905: %Action.assoc_type.8f9 = assoc_entity element0, imports.%Main.import_ref.0e3753.2 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -622,8 +622,8 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//action, inst58 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.ddc = import_ref Main//action, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.318: @Action.%Action.assoc_type (%Action.assoc_type.8f9) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.905ab9.2)]
|
||||
// CHECK:STDOUT: %Main.Op: @Action.%Op.type (%Op.type.036) = import_ref Main//action, Op, loaded [symbolic = @Action.%Op (constants.%Op.6ed)]
|
||||
// CHECK:STDOUT: %Main.import_ref.318: @Action.%Action.assoc_type (%Action.assoc_type.8f9) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%assoc0 (constants.%assoc0.905)]
|
||||
// CHECK:STDOUT: %Main.Op = import_ref Main//action, Op, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.7a1 = import_ref Main//action, loc12_21, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//action, loc8_10, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//action, inst53 [no loc], unloaded
|
||||
@@ -632,7 +632,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Main.import_ref.7b5 = import_ref Main//action, loc13_23, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//action, loc4_18, loaded [symbolic = @Action.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.835: @Action.%Action.type (%Action.type.cca) = import_ref Main//action, inst24 [no loc], loaded [symbolic = @Action.%Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Main.import_ref.0e3753.1 = import_ref Main//action, loc5_22, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.1f6: @Action.%Op.type (%Op.type.036) = import_ref Main//action, loc5_22, loaded [symbolic = @Action.%Op (constants.%Op.6ed)]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.3: <witness> = import_ref Main//action, loc10_10, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.2c4 = import_ref Main//action, inst61 [no loc], unloaded
|
||||
// CHECK:STDOUT: }
|
||||
@@ -668,7 +668,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Op.type: type = fn_type @Op, @Action(%T) [symbolic = %Op.type (constants.%Op.type.036)]
|
||||
// CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.036) = struct_value () [symbolic = %Op (constants.%Op.6ed)]
|
||||
// CHECK:STDOUT: %Action.assoc_type: type = assoc_entity_type @Action.%Action.type (%Action.type.cca) [symbolic = %Action.assoc_type (constants.%Action.assoc_type.8f9)]
|
||||
// CHECK:STDOUT: %assoc0: @Action.%Action.assoc_type (%Action.assoc_type.8f9) = assoc_entity element0, imports.%Main.import_ref.0e3753.1 [symbolic = %assoc0 (constants.%assoc0.905ab9.1)]
|
||||
// CHECK:STDOUT: %assoc0: @Action.%Action.assoc_type (%Action.assoc_type.8f9) = assoc_entity element0, imports.%Main.import_ref.1f6 [symbolic = %assoc0 (constants.%assoc0.83d)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -720,8 +720,8 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Action.ref: %Action.type.29c = name_ref Action, imports.%Main.Action [concrete = constants.%Action.generic]
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%Main.C [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(constants.%C)> [concrete = constants.%Action.type.e2b]
|
||||
// CHECK:STDOUT: %.loc8: %Action.assoc_type.0a7 = specific_constant imports.%Main.import_ref.318, @Action(constants.%C) [concrete = constants.%assoc0.85d]
|
||||
// CHECK:STDOUT: %Op.ref: %Action.assoc_type.0a7 = name_ref Op, %.loc8 [concrete = constants.%assoc0.85d]
|
||||
// CHECK:STDOUT: %.loc8: %Action.assoc_type.0a7 = specific_constant imports.%Main.import_ref.318, @Action(constants.%C) [concrete = constants.%assoc0.55b]
|
||||
// CHECK:STDOUT: %Op.ref: %Action.assoc_type.0a7 = name_ref Op, %.loc8 [concrete = constants.%assoc0.55b]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -764,7 +764,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Op.type => constants.%Op.type.5ad
|
||||
// CHECK:STDOUT: %Op => constants.%Op.b10
|
||||
// CHECK:STDOUT: %Action.assoc_type => constants.%Action.assoc_type.0a7
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.85d
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.55b
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- factory.carbon
|
||||
@@ -1018,13 +1018,13 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Make.type.c59: type = fn_type @Make.1, @Factory(%B) [concrete]
|
||||
// CHECK:STDOUT: %Make.efe: %Make.type.c59 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Factory.assoc_type.668: type = assoc_entity_type %Factory.type.a5d [concrete]
|
||||
// CHECK:STDOUT: %assoc0.228: %Factory.assoc_type.668 = assoc_entity element0, imports.%Main.import_ref.21018a.2 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.503: %Factory.assoc_type.668 = assoc_entity element0, imports.%Main.import_ref.1aa [concrete]
|
||||
// CHECK:STDOUT: %Method.type.117: type = fn_type @Method.1, @Factory(%B) [concrete]
|
||||
// CHECK:STDOUT: %Method.ea9: %Method.type.117 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc1.51f: %Factory.assoc_type.668 = assoc_entity element1, imports.%Main.import_ref.5be [concrete]
|
||||
// CHECK:STDOUT: %MakeB.type: type = fn_type @MakeB [concrete]
|
||||
// CHECK:STDOUT: %MakeB: %MakeB.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc0.35472f.2: %Factory.assoc_type.ca7 = assoc_entity element0, imports.%Main.import_ref.21018a.3 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.35472f.2: %Factory.assoc_type.ca7 = assoc_entity element0, imports.%Main.import_ref.21018a.2 [symbolic]
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (imports.%Main.import_ref.9ec, imports.%Main.import_ref.7dd) [concrete]
|
||||
// CHECK:STDOUT: %Factory.facet: %Factory.type.a5d = facet_value %A, (%impl_witness) [concrete]
|
||||
// CHECK:STDOUT: %.b98: type = fn_type_with_self_type %Make.type.c59, %Factory.facet [concrete]
|
||||
@@ -1048,8 +1048,8 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Main.import_ref.fbb = import_ref Main//factory, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.8d5: @Factory.%Factory.assoc_type (%Factory.assoc_type.ca7) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.35472f.2)]
|
||||
// CHECK:STDOUT: %Main.import_ref.ff7: @Factory.%Factory.assoc_type (%Factory.assoc_type.ca7) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.1fdf32.2)]
|
||||
// CHECK:STDOUT: %Main.Make: @Factory.%Make.type (%Make.type.598) = import_ref Main//factory, Make, loaded [symbolic = @Factory.%Make (constants.%Make.737)]
|
||||
// CHECK:STDOUT: %Main.Method: @Factory.%Method.type (%Method.type.7ee) = import_ref Main//factory, Method, loaded [symbolic = @Factory.%Method (constants.%Method.a71)]
|
||||
// CHECK:STDOUT: %Main.Make = import_ref Main//factory, Make, unloaded
|
||||
// CHECK:STDOUT: %Main.Method = import_ref Main//factory, Method, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.f8d: <witness> = import_ref Main//factory, loc14_22, loaded [concrete = constants.%impl_witness]
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst72 [no loc], unloaded
|
||||
@@ -1164,8 +1164,8 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Factory.ref: %Factory.type.1a8 = name_ref Factory, imports.%Main.Factory [concrete = constants.%Factory.generic]
|
||||
// CHECK:STDOUT: %B.ref.loc5: type = name_ref B, imports.%Main.B [concrete = constants.%B]
|
||||
// CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%B)> [concrete = constants.%Factory.type.a5d]
|
||||
// CHECK:STDOUT: %.loc5_23: %Factory.assoc_type.668 = specific_constant imports.%Main.import_ref.8d5, @Factory(constants.%B) [concrete = constants.%assoc0.228]
|
||||
// CHECK:STDOUT: %Make.ref: %Factory.assoc_type.668 = name_ref Make, %.loc5_23 [concrete = constants.%assoc0.228]
|
||||
// CHECK:STDOUT: %.loc5_23: %Factory.assoc_type.668 = specific_constant imports.%Main.import_ref.8d5, @Factory(constants.%B) [concrete = constants.%assoc0.503]
|
||||
// CHECK:STDOUT: %Make.ref: %Factory.assoc_type.668 = name_ref Make, %.loc5_23 [concrete = constants.%assoc0.503]
|
||||
// CHECK:STDOUT: %Factory.facet: %Factory.type.a5d = facet_value constants.%A, (constants.%impl_witness) [concrete = constants.%Factory.facet]
|
||||
// CHECK:STDOUT: %.loc5_11: %Factory.type.a5d = converted %A.ref, %Factory.facet [concrete = constants.%Factory.facet]
|
||||
// CHECK:STDOUT: %as_wit.iface0: <witness> = facet_access_witness %.loc5_11, element0 [concrete = constants.%impl_witness]
|
||||
@@ -1209,7 +1209,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Make.type => constants.%Make.type.c59
|
||||
// CHECK:STDOUT: %Make => constants.%Make.efe
|
||||
// CHECK:STDOUT: %Factory.assoc_type => constants.%Factory.assoc_type.668
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.228
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.503
|
||||
// CHECK:STDOUT: %Method.type => constants.%Method.type.117
|
||||
// CHECK:STDOUT: %Method => constants.%Method.ea9
|
||||
// CHECK:STDOUT: %assoc1 => constants.%assoc1.51f
|
||||
@@ -1247,18 +1247,18 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Make.type.598: type = fn_type @Make, @Factory(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Make.737: %Make.type.598 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Factory.assoc_type.ca7: type = assoc_entity_type %Factory.type.c96 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.35472f.1: %Factory.assoc_type.ca7 = assoc_entity element0, imports.%Main.import_ref.21018a.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.4f7: %Factory.assoc_type.ca7 = assoc_entity element0, imports.%Main.import_ref.1aa [symbolic]
|
||||
// CHECK:STDOUT: %Method.type.7ee: type = fn_type @Method, @Factory(%T) [symbolic]
|
||||
// CHECK:STDOUT: %Method.a71: %Method.type.7ee = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type.56c: type = facet_access_type %Self.9ba [symbolic]
|
||||
// CHECK:STDOUT: %assoc1.1fdf32.1: %Factory.assoc_type.ca7 = assoc_entity element1, imports.%Main.import_ref.46fc3c.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc1.7f7: %Factory.assoc_type.ca7 = assoc_entity element1, imports.%Main.import_ref.5be [symbolic]
|
||||
// CHECK:STDOUT: %Make.type.c59: type = fn_type @Make, @Factory(%B) [concrete]
|
||||
// CHECK:STDOUT: %Make.efe: %Make.type.c59 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Factory.assoc_type.668: type = assoc_entity_type %Factory.type.a5d [concrete]
|
||||
// CHECK:STDOUT: %assoc0.228: %Factory.assoc_type.668 = assoc_entity element0, imports.%Main.import_ref.21018a.2 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.228: %Factory.assoc_type.668 = assoc_entity element0, imports.%Main.import_ref.21018a.1 [concrete]
|
||||
// CHECK:STDOUT: %Method.type.117: type = fn_type @Method, @Factory(%B) [concrete]
|
||||
// CHECK:STDOUT: %Method.ea9: %Method.type.117 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc1.7a1: %Factory.assoc_type.668 = assoc_entity element1, imports.%Main.import_ref.46fc3c.2 [concrete]
|
||||
// CHECK:STDOUT: %assoc1.7a1: %Factory.assoc_type.668 = assoc_entity element1, imports.%Main.import_ref.46fc3c.1 [concrete]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
||||
// CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [concrete]
|
||||
// CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [concrete]
|
||||
@@ -1266,11 +1266,11 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Make.type.0de: type = fn_type @Make, @Factory(%C) [concrete]
|
||||
// CHECK:STDOUT: %Make.8ba: %Make.type.0de = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Factory.assoc_type.709: type = assoc_entity_type %Factory.type.5c5 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.ef9: %Factory.assoc_type.709 = assoc_entity element0, imports.%Main.import_ref.21018a.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.b47: %Factory.assoc_type.709 = assoc_entity element0, imports.%Main.import_ref.1aa [concrete]
|
||||
// CHECK:STDOUT: %Method.type.d46: type = fn_type @Method, @Factory(%C) [concrete]
|
||||
// CHECK:STDOUT: %Method.f9e: %Method.type.d46 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc1.ae5: %Factory.assoc_type.709 = assoc_entity element1, imports.%Main.import_ref.46fc3c.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.35472f.2: %Factory.assoc_type.ca7 = assoc_entity element0, imports.%Main.import_ref.21018a.3 [symbolic]
|
||||
// CHECK:STDOUT: %assoc1.90c: %Factory.assoc_type.709 = assoc_entity element1, imports.%Main.import_ref.5be [concrete]
|
||||
// CHECK:STDOUT: %assoc0.354: %Factory.assoc_type.ca7 = assoc_entity element0, imports.%Main.import_ref.21018a.2 [symbolic]
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic]
|
||||
@@ -1279,16 +1279,16 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type.40a: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.d43: type = facet_type <@ImplicitAs, @ImplicitAs(%Factory.type.5c5)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.9b5: type = fn_type @Convert, @ImplicitAs(%Factory.type.5c5) [concrete]
|
||||
// CHECK:STDOUT: %Convert.8cc: %Convert.type.9b5 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.0f8: type = assoc_entity_type %ImplicitAs.type.d43 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.ae3: %ImplicitAs.assoc_type.0f8 = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.a8c: %ImplicitAs.assoc_type.0f8 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: %InstanceC.type: type = fn_type @InstanceC [concrete]
|
||||
// CHECK:STDOUT: %InstanceC: %InstanceC.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc1.1fdf32.2: %Factory.assoc_type.ca7 = assoc_entity element1, imports.%Main.import_ref.46fc3c.3 [symbolic]
|
||||
// CHECK:STDOUT: %assoc1.1fd: %Factory.assoc_type.ca7 = assoc_entity element1, imports.%Main.import_ref.46fc3c.2 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -1303,10 +1303,10 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Main.import_ref.54a = import_ref Main//factory, inst77 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.5ab3ec.1: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.fbb = import_ref Main//factory, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.8d5: @Factory.%Factory.assoc_type (%Factory.assoc_type.ca7) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.35472f.2)]
|
||||
// CHECK:STDOUT: %Main.import_ref.ff7: @Factory.%Factory.assoc_type (%Factory.assoc_type.ca7) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.1fdf32.2)]
|
||||
// CHECK:STDOUT: %Main.Make: @Factory.%Make.type (%Make.type.598) = import_ref Main//factory, Make, loaded [symbolic = @Factory.%Make (constants.%Make.737)]
|
||||
// CHECK:STDOUT: %Main.Method: @Factory.%Method.type (%Method.type.7ee) = import_ref Main//factory, Method, loaded [symbolic = @Factory.%Method (constants.%Method.a71)]
|
||||
// CHECK:STDOUT: %Main.import_ref.8d5: @Factory.%Factory.assoc_type (%Factory.assoc_type.ca7) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%assoc0 (constants.%assoc0.354)]
|
||||
// CHECK:STDOUT: %Main.import_ref.ff7: @Factory.%Factory.assoc_type (%Factory.assoc_type.ca7) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%assoc1 (constants.%assoc1.1fd)]
|
||||
// CHECK:STDOUT: %Main.Make = import_ref Main//factory, Make, unloaded
|
||||
// CHECK:STDOUT: %Main.Method = import_ref Main//factory, Method, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.e41 = import_ref Main//factory, loc14_22, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.8f24d3.2: <witness> = import_ref Main//factory, loc11_10, loaded [concrete = constants.%complete_type]
|
||||
// CHECK:STDOUT: %Main.import_ref.da3 = import_ref Main//factory, inst72 [no loc], unloaded
|
||||
@@ -1316,17 +1316,17 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Main.import_ref.163 = import_ref Main//factory, loc16_31, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.5ab3ec.2: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.91b53a.1: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst24 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)]
|
||||
// CHECK:STDOUT: %Main.import_ref.21018a.1 = import_ref Main//factory, loc6_17, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.1aa: @Factory.%Make.type (%Make.type.598) = import_ref Main//factory, loc6_17, loaded [symbolic = @Factory.%Make (constants.%Make.737)]
|
||||
// CHECK:STDOUT: %Main.import_ref.5ab3ec.3: type = import_ref Main//factory, loc4_19, loaded [symbolic = @Factory.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Main.import_ref.91b53a.2: @Factory.%Factory.type (%Factory.type.c96) = import_ref Main//factory, inst24 [no loc], loaded [symbolic = @Factory.%Self (constants.%Self.9ba)]
|
||||
// CHECK:STDOUT: %Main.import_ref.46fc3c.1 = import_ref Main//factory, loc8_31, unloaded
|
||||
// CHECK:STDOUT: %Main.import_ref.5be: @Factory.%Method.type (%Method.type.7ee) = import_ref Main//factory, loc8_31, loaded [symbolic = @Factory.%Method (constants.%Method.a71)]
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc4_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -1376,10 +1376,10 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Make.type: type = fn_type @Make, @Factory(%T) [symbolic = %Make.type (constants.%Make.type.598)]
|
||||
// CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.598) = struct_value () [symbolic = %Make (constants.%Make.737)]
|
||||
// CHECK:STDOUT: %Factory.assoc_type: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.c96) [symbolic = %Factory.assoc_type (constants.%Factory.assoc_type.ca7)]
|
||||
// CHECK:STDOUT: %assoc0: @Factory.%Factory.assoc_type (%Factory.assoc_type.ca7) = assoc_entity element0, imports.%Main.import_ref.21018a.1 [symbolic = %assoc0 (constants.%assoc0.35472f.1)]
|
||||
// CHECK:STDOUT: %assoc0: @Factory.%Factory.assoc_type (%Factory.assoc_type.ca7) = assoc_entity element0, imports.%Main.import_ref.1aa [symbolic = %assoc0 (constants.%assoc0.4f7)]
|
||||
// CHECK:STDOUT: %Method.type: type = fn_type @Method, @Factory(%T) [symbolic = %Method.type (constants.%Method.type.7ee)]
|
||||
// CHECK:STDOUT: %Method: @Factory.%Method.type (%Method.type.7ee) = struct_value () [symbolic = %Method (constants.%Method.a71)]
|
||||
// CHECK:STDOUT: %assoc1: @Factory.%Factory.assoc_type (%Factory.assoc_type.ca7) = assoc_entity element1, imports.%Main.import_ref.46fc3c.1 [symbolic = %assoc1 (constants.%assoc1.1fdf32.1)]
|
||||
// CHECK:STDOUT: %assoc1: @Factory.%Factory.assoc_type (%Factory.assoc_type.ca7) = assoc_entity element1, imports.%Main.import_ref.5be [symbolic = %assoc1 (constants.%assoc1.7f7)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -1400,7 +1400,7 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -1460,8 +1460,8 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Factory.ref: %Factory.type.1a8 = name_ref Factory, imports.%Main.Factory [concrete = constants.%Factory.generic]
|
||||
// CHECK:STDOUT: %C.ref.loc16: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%C)> [concrete = constants.%Factory.type.5c5]
|
||||
// CHECK:STDOUT: %.loc16_23: %Factory.assoc_type.709 = specific_constant imports.%Main.import_ref.8d5, @Factory(constants.%C) [concrete = constants.%assoc0.ef9]
|
||||
// CHECK:STDOUT: %Make.ref: %Factory.assoc_type.709 = name_ref Make, %.loc16_23 [concrete = constants.%assoc0.ef9]
|
||||
// CHECK:STDOUT: %.loc16_23: %Factory.assoc_type.709 = specific_constant imports.%Main.import_ref.8d5, @Factory(constants.%C) [concrete = constants.%assoc0.b47]
|
||||
// CHECK:STDOUT: %Make.ref: %Factory.assoc_type.709 = name_ref Make, %.loc16_23 [concrete = constants.%assoc0.b47]
|
||||
// CHECK:STDOUT: %.loc16_11: %Factory.type.5c5 = converted %A.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: return <error> to %return
|
||||
// CHECK:STDOUT: }
|
||||
@@ -1481,8 +1481,8 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Factory.ref: %Factory.type.1a8 = name_ref Factory, imports.%Main.Factory [concrete = constants.%Factory.generic]
|
||||
// CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %Factory.type: type = facet_type <@Factory, @Factory(constants.%C)> [concrete = constants.%Factory.type.5c5]
|
||||
// CHECK:STDOUT: %.loc24: %Factory.assoc_type.709 = specific_constant imports.%Main.import_ref.ff7, @Factory(constants.%C) [concrete = constants.%assoc1.ae5]
|
||||
// CHECK:STDOUT: %Method.ref: %Factory.assoc_type.709 = name_ref Method, %.loc24 [concrete = constants.%assoc1.ae5]
|
||||
// CHECK:STDOUT: %.loc24: %Factory.assoc_type.709 = specific_constant imports.%Main.import_ref.ff7, @Factory(constants.%C) [concrete = constants.%assoc1.90c]
|
||||
// CHECK:STDOUT: %Method.ref: %Factory.assoc_type.709 = name_ref Method, %.loc24 [concrete = constants.%assoc1.90c]
|
||||
// CHECK:STDOUT: return <error> to %return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1532,10 +1532,10 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Make.type => constants.%Make.type.0de
|
||||
// CHECK:STDOUT: %Make => constants.%Make.8ba
|
||||
// CHECK:STDOUT: %Factory.assoc_type => constants.%Factory.assoc_type.709
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.ef9
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.b47
|
||||
// CHECK:STDOUT: %Method.type => constants.%Method.type.d46
|
||||
// CHECK:STDOUT: %Method => constants.%Method.f9e
|
||||
// CHECK:STDOUT: %assoc1 => constants.%assoc1.ae5
|
||||
// CHECK:STDOUT: %assoc1 => constants.%assoc1.90c
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
||||
@@ -1564,6 +1564,6 @@ fn InstanceC(a: A) -> C {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.9b5
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.8cc
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.0f8
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.ae3
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.a8c
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+3266
File diff suppressed because it is too large
Load Diff
+18
-20
@@ -533,13 +533,13 @@ fn Works() {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.014: type = facet_type <@ImplicitAs, @ImplicitAs(%K2.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.a72: type = fn_type @Convert, @ImplicitAs(%K2.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.2ea: %Convert.type.a72 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.053: type = assoc_entity_type %ImplicitAs.type.014 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.3e2: %ImplicitAs.assoc_type.053 = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.63c: %ImplicitAs.assoc_type.053 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: %BitAnd.type: type = facet_type <@BitAnd> [concrete]
|
||||
// CHECK:STDOUT: %T.8b3: type = bind_symbolic_name T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %T.patt.e01: type = symbolic_binding_pattern T, 0 [symbolic]
|
||||
@@ -556,11 +556,11 @@ fn Works() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc13_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//prelude, inst65 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//prelude, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//prelude, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc13_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//prelude, inst65 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//prelude, loc14_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst100 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.3bf = import_ref Core//prelude, loc18_41, unloaded
|
||||
// CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded
|
||||
@@ -634,7 +634,7 @@ fn Works() {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -777,7 +777,7 @@ fn Works() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.a72
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.2ea
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.053
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.3e2
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.63c
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @impl(constants.%T.8b3) {
|
||||
@@ -1293,7 +1293,6 @@ fn Works() {
|
||||
// CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type %BitAnd.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.a63: %BitAnd.assoc_type = assoc_entity element0, imports.%Core.import_ref.a93 [concrete]
|
||||
// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete]
|
||||
// CHECK:STDOUT: %Op.ab9: %Op.type.27a = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type.19f: type = facet_access_type %Self.25f [symbolic]
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
||||
@@ -1319,13 +1318,13 @@ fn Works() {
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type.40a: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.2d2: type = facet_type <@ImplicitAs, @ImplicitAs(%A.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.597: type = fn_type @Convert, @ImplicitAs(%A.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.d1e: %Convert.type.597 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.568: type = assoc_entity_type %ImplicitAs.type.2d2 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.6fc: %ImplicitAs.assoc_type.568 = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.e1d: %ImplicitAs.assoc_type.568 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
@@ -1336,7 +1335,7 @@ fn Works() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst100 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.08d: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0.a63]
|
||||
// CHECK:STDOUT: %Core.Op: %Op.type.27a = import_ref Core//prelude, Op, loaded [concrete = constants.%Op.ab9]
|
||||
// CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst100 [no loc], loaded [symbolic = constants.%Self.25f]
|
||||
// CHECK:STDOUT: %Core.import_ref.51c: <witness> = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%impl_witness (constants.%impl_witness.b81)]
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)]
|
||||
@@ -1346,11 +1345,11 @@ fn Works() {
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//prelude, loc13_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//prelude, inst65 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//prelude, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//prelude, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//prelude, loc13_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//prelude, inst65 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//prelude, loc14_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//prelude, loc14_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -1399,7 +1398,7 @@ fn Works() {
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -1610,7 +1609,7 @@ fn Works() {
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.597
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.d1e
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.568
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.6fc
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.e1d
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- allowed_combine_non_instance.carbon
|
||||
@@ -1637,7 +1636,6 @@ fn Works() {
|
||||
// CHECK:STDOUT: %BitAnd.assoc_type: type = assoc_entity_type %BitAnd.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.a63: %BitAnd.assoc_type = assoc_entity element0, imports.%Core.import_ref.a93 [concrete]
|
||||
// CHECK:STDOUT: %Op.type.27a: type = fn_type @Op.1 [concrete]
|
||||
// CHECK:STDOUT: %Op.ab9: %Op.type.27a = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.25f [symbolic]
|
||||
// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic]
|
||||
@@ -1665,7 +1663,7 @@ fn Works() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.ad0 = import_ref Core//prelude, inst100 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.08d: %BitAnd.assoc_type = import_ref Core//prelude, loc18_41, loaded [concrete = constants.%assoc0.a63]
|
||||
// CHECK:STDOUT: %Core.Op: %Op.type.27a = import_ref Core//prelude, Op, loaded [concrete = constants.%Op.ab9]
|
||||
// CHECK:STDOUT: %Core.Op = import_ref Core//prelude, Op, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.040: %BitAnd.type = import_ref Core//prelude, inst100 [no loc], loaded [symbolic = constants.%Self.25f]
|
||||
// CHECK:STDOUT: %Core.import_ref.51c: <witness> = import_ref Core//prelude, loc21_36, loaded [symbolic = @impl.f92.%impl_witness (constants.%impl_witness.b81)]
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//prelude, loc21_14, loaded [symbolic = @impl.f92.%T (constants.%T)]
|
||||
|
||||
@@ -0,0 +1,825 @@
|
||||
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_alias.carbon
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_alias.carbon
|
||||
|
||||
// --- core.carbon
|
||||
package Core;
|
||||
|
||||
interface ImplicitAs(Dest:! type) {
|
||||
fn Convert[self: Self]() -> Dest;
|
||||
}
|
||||
|
||||
// --- fail_alias_to_different_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import Core;
|
||||
|
||||
interface I {
|
||||
let T:! type;
|
||||
}
|
||||
|
||||
interface J {
|
||||
alias U = I.T;
|
||||
// CHECK:STDERR: fail_alias_to_different_interface.carbon:[[@LINE+7]]:13: error: cannot implicitly convert value of type `J` to `I` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: fn F() -> U;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_alias_to_different_interface.carbon:[[@LINE+4]]:13: note: type `J` does not implement interface `Core.ImplicitAs(I)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fn F() -> U;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
fn F() -> U;
|
||||
}
|
||||
|
||||
// --- fail_todo_alias_to_different_interface_with_requires.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import Core;
|
||||
|
||||
interface I2 {
|
||||
let T2:! type;
|
||||
}
|
||||
|
||||
interface J2;
|
||||
|
||||
impl forall [V:! J2] V as I2 where .T2 = () {}
|
||||
|
||||
interface J2 {
|
||||
alias U2 = I2.T2;
|
||||
// CHECK:STDERR: fail_todo_alias_to_different_interface_with_requires.carbon:[[@LINE+7]]:14: error: cannot implicitly convert value of type `J2` to `I2` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: fn F2() -> U2;
|
||||
// CHECK:STDERR: ^~
|
||||
// CHECK:STDERR: fail_todo_alias_to_different_interface_with_requires.carbon:[[@LINE+4]]:14: note: type `J2` does not implement interface `Core.ImplicitAs(I2)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fn F2() -> U2;
|
||||
// CHECK:STDERR: ^~
|
||||
// CHECK:STDERR:
|
||||
fn F2() -> U2;
|
||||
}
|
||||
|
||||
// --- fail_call_method_alias.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import Core;
|
||||
|
||||
interface A {
|
||||
fn F[self: Self]() -> type;
|
||||
}
|
||||
interface B {
|
||||
alias F = A.F;
|
||||
// TODO: This should be getting a different error here, since it should not
|
||||
// be binding `A.F` to `Self`.
|
||||
// CHECK:STDERR: fail_call_method_alias.carbon:[[@LINE+4]]:13: error: cannot access member of interface `A` in type `B` that does not implement that interface [MissingImplInMemberAccess]
|
||||
// CHECK:STDERR: fn G() -> F();
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
fn G() -> F();
|
||||
}
|
||||
|
||||
// --- fail_todo_call_with_compound_member_access.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
import Core;
|
||||
|
||||
interface C {
|
||||
fn F[self: Self]();
|
||||
// TODO: Add `default` once supported.
|
||||
fn G[self: Self]() {
|
||||
// These should both work.
|
||||
self.F();
|
||||
// CHECK:STDERR: fail_todo_call_with_compound_member_access.carbon:[[@LINE+4]]:11: error: cannot access member of interface `C` in type `C` that does not implement that interface [MissingImplInMemberAccess]
|
||||
// CHECK:STDERR: self.(F)();
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
self.(F)();
|
||||
}
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: --- core.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.96f: type = generic_interface_type @ImplicitAs [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.96f = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.07f: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
|
||||
// CHECK:STDOUT: %Convert: %Convert.type = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type %ImplicitAs.type.07f [symbolic]
|
||||
// CHECK:STDOUT: %assoc0: %ImplicitAs.assoc_type = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.96f = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] {
|
||||
// CHECK:STDOUT: %Dest.patt.loc3_22.1: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc3_22.2 (constants.%Dest.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %Dest.loc3_22.1: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc3_22.2 (constants.%Dest)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic interface @ImplicitAs(%Dest.loc3_22.1: type) {
|
||||
// CHECK:STDOUT: %Dest.loc3_22.2: type = bind_symbolic_name Dest, 0 [symbolic = %Dest.loc3_22.2 (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Dest.patt.loc3_22.2: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt.loc3_22.2 (constants.%Dest.patt)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest.loc3_22.2)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
|
||||
// CHECK:STDOUT: %Self.2: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest.loc3_22.2) [symbolic = %Convert.type (constants.%Convert.type)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type) = struct_value () [symbolic = %Convert (constants.%Convert)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type)]
|
||||
// CHECK:STDOUT: %assoc0.loc4_35.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
|
||||
// CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type) = fn_decl @Convert [symbolic = @ImplicitAs.%Convert (constants.%Convert)] {
|
||||
// CHECK:STDOUT: %self.patt: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type) = binding_pattern self
|
||||
// CHECK:STDOUT: %self.param_patt: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type) = value_param_pattern %self.patt, call_param0
|
||||
// CHECK:STDOUT: %return.patt: @Convert.%Dest (%Dest) = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: @Convert.%Dest (%Dest) = out_param_pattern %return.patt, call_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %Dest.ref: type = name_ref Dest, @ImplicitAs.%Dest.loc3_22.1 [symbolic = %Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %self.param: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc4_20.1: type = splice_block %.loc4_20.3 [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %.loc4_20.2: @Convert.%ImplicitAs.type (%ImplicitAs.type.07f) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%Dest) [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.ref: @Convert.%ImplicitAs.type (%ImplicitAs.type.07f) = name_ref Self, %.loc4_20.2 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc4_20.3: type = converted %Self.ref, %Self.as_type.loc4_20.2 [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type) = bind_name self, %self.param
|
||||
// CHECK:STDOUT: %return.param: ref @Convert.%Dest (%Dest) = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref @Convert.%Dest (%Dest) = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0.loc4_35.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc4_35.2 (constants.%assoc0)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self.1
|
||||
// CHECK:STDOUT: .Dest = <poisoned>
|
||||
// CHECK:STDOUT: .Convert = %assoc0.loc4_35.1
|
||||
// CHECK:STDOUT: witness = (%Convert.decl)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Convert(@ImplicitAs.%Dest.loc3_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f)) {
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc4_20.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self.as_type.loc4_20.1 (%Self.as_type)]() -> @Convert.%Dest (%Dest);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
||||
// CHECK:STDOUT: %Dest.loc3_22.2 => constants.%Dest
|
||||
// CHECK:STDOUT: %Dest.patt.loc3_22.2 => constants.%Dest
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self) {
|
||||
// CHECK:STDOUT: %Dest => constants.%Dest
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.07f
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc4_20.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc3_22.2) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_alias_to_different_interface.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
|
||||
// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.c7e: %I.assoc_type = assoc_entity element0, @I.%T [concrete]
|
||||
// CHECK:STDOUT: %J.type: type = facet_type <@J> [concrete]
|
||||
// CHECK:STDOUT: %Self.ccd: %J.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.c42: type = facet_type <@ImplicitAs, @ImplicitAs(%I.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.7ef: type = fn_type @Convert, @ImplicitAs(%I.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.c77: %Convert.type.7ef = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.167: type = assoc_entity_type %ImplicitAs.type.c42 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.0e0: %ImplicitAs.assoc_type.167 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %J.assoc_type: type = assoc_entity_type %J.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.ebc: %J.assoc_type = assoc_entity element0, @J.%F.decl [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
|
||||
// CHECK:STDOUT: import Core//default
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .I = %I.decl
|
||||
// CHECK:STDOUT: .J = %J.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %I.decl: type = interface_decl @I [concrete = constants.%I.type] {} {}
|
||||
// CHECK:STDOUT: %J.decl: type = interface_decl @J [concrete = constants.%J.type] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @I {
|
||||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
|
||||
// CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.c7e]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
// CHECK:STDOUT: .T = @T.%assoc0
|
||||
// CHECK:STDOUT: witness = (%T)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @J {
|
||||
// CHECK:STDOUT: %Self: %J.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.ccd]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
|
||||
// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0.c7e]
|
||||
// CHECK:STDOUT: %U: %I.assoc_type = bind_alias U, @T.%assoc0 [concrete = constants.%assoc0.c7e]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc18: %I.type = converted @J.%Self, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %U.ref: <error> = name_ref U, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %return.param: ref <error> = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref <error> = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %J.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.ebc]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
// CHECK:STDOUT: .I = <poisoned>
|
||||
// CHECK:STDOUT: .U = %U
|
||||
// CHECK:STDOUT: .F = %assoc0
|
||||
// CHECK:STDOUT: witness = (%F.decl)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.1: type) [from "core.carbon"] {
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = imports.%Core.import_ref.ff5
|
||||
// CHECK:STDOUT: .Convert = imports.%Core.import_ref.630
|
||||
// CHECK:STDOUT: witness = (imports.%Core.Convert)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic assoc_const @T(@I.%Self: %I.type) {
|
||||
// CHECK:STDOUT: assoc_const T:! type;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Convert(imports.%Core.import_ref.5ab3ec.2: type, imports.%Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62)) [from "core.carbon"] {
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self.as_type (%Self.as_type)]() -> @Convert.%Dest (%Dest);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(@J.%Self: %J.type) {
|
||||
// CHECK:STDOUT: fn() -> <error>;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @T(constants.%Self.826) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
||||
// CHECK:STDOUT: %Dest => constants.%Dest
|
||||
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(%Dest) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) {
|
||||
// CHECK:STDOUT: %Dest => constants.%Dest
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62
|
||||
// CHECK:STDOUT: %Self => constants.%Self.519
|
||||
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(constants.%I.type) {
|
||||
// CHECK:STDOUT: %Dest => constants.%I.type
|
||||
// CHECK:STDOUT: %Dest.patt => constants.%I.type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.c42
|
||||
// CHECK:STDOUT: %Self => constants.%Self.519
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.7ef
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.c77
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.167
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.0e0
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%Self.ccd) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_todo_alias_to_different_interface_with_requires.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %I2.type: type = facet_type <@I2> [concrete]
|
||||
// CHECK:STDOUT: %Self.c7b: %I2.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %I2.assoc_type: type = assoc_entity_type %I2.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.166: %I2.assoc_type = assoc_entity element0, @I2.%T2 [concrete]
|
||||
// CHECK:STDOUT: %J2.type: type = facet_type <@J2> [concrete]
|
||||
// CHECK:STDOUT: %V: %J2.type = bind_symbolic_name V, 0 [symbolic]
|
||||
// CHECK:STDOUT: %V.patt: %J2.type = symbolic_binding_pattern V, 0 [symbolic]
|
||||
// CHECK:STDOUT: %V.as_type: type = facet_access_type %V [symbolic]
|
||||
// CHECK:STDOUT: %.Self: %I2.type = bind_symbolic_name .Self [symbolic_self]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
|
||||
// CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self, element0 [symbolic_self]
|
||||
// CHECK:STDOUT: %I2.facet: %I2.type = facet_value %.Self.as_type, (%.Self.as_wit.iface0) [symbolic_self]
|
||||
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self]
|
||||
// CHECK:STDOUT: %I2_where.type: type = facet_type <@I2 where %impl.elem0 = %empty_tuple.type> [concrete]
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (%empty_tuple.type), @impl(%V) [symbolic]
|
||||
// CHECK:STDOUT: %Self.541: %J2.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
|
||||
// CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic]
|
||||
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.40d: type = facet_type <@ImplicitAs, @ImplicitAs(%J2.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.099: type = fn_type @Convert, @ImplicitAs(%J2.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.7ee: %Convert.type.099 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.4e8: type = assoc_entity_type %ImplicitAs.type.40d [concrete]
|
||||
// CHECK:STDOUT: %assoc0.78f: %ImplicitAs.assoc_type.4e8 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.2eb: type = facet_type <@ImplicitAs, @ImplicitAs(%I2.type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.b16: type = fn_type @Convert, @ImplicitAs(%I2.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.b2c: %Convert.type.b16 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.ede: type = assoc_entity_type %ImplicitAs.type.2eb [concrete]
|
||||
// CHECK:STDOUT: %assoc0.76a: %ImplicitAs.assoc_type.ede = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %F2.type: type = fn_type @F2 [concrete]
|
||||
// CHECK:STDOUT: %F2: %F2.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %J2.assoc_type: type = assoc_entity_type %J2.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.5b2: %J2.assoc_type = assoc_entity element0, @J2.%F2.decl [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
|
||||
// CHECK:STDOUT: import Core//default
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .I2 = %I2.decl
|
||||
// CHECK:STDOUT: .J2 = %J2.decl.loc9
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %I2.decl: type = interface_decl @I2 [concrete = constants.%I2.type] {} {}
|
||||
// CHECK:STDOUT: %J2.decl.loc9: type = interface_decl @J2 [concrete = constants.%J2.type] {} {}
|
||||
// CHECK:STDOUT: impl_decl @impl [concrete] {
|
||||
// CHECK:STDOUT: %V.patt.loc11_14.1: %J2.type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_14.2 (constants.%V.patt)]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %V.ref: %J2.type = name_ref V, %V.loc11_14.1 [symbolic = %V.loc11_14.2 (constants.%V)]
|
||||
// CHECK:STDOUT: %V.as_type.loc11_22.1: type = facet_access_type %V.ref [symbolic = %V.as_type.loc11_22.2 (constants.%V.as_type)]
|
||||
// CHECK:STDOUT: %.loc11_22: type = converted %V.ref, %V.as_type.loc11_22.1 [symbolic = %V.as_type.loc11_22.2 (constants.%V.as_type)]
|
||||
// CHECK:STDOUT: %I2.ref: type = name_ref I2, file.%I2.decl [concrete = constants.%I2.type]
|
||||
// CHECK:STDOUT: %.Self: %I2.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %.Self.ref: %I2.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
|
||||
// CHECK:STDOUT: %T2.ref: %I2.assoc_type = name_ref T2, @T2.%assoc0 [concrete = constants.%assoc0.166]
|
||||
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.loc11_36: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
|
||||
// CHECK:STDOUT: %.Self.as_wit.iface0: <witness> = facet_access_witness %.Self.ref, element0 [symbolic_self = constants.%.Self.as_wit.iface0]
|
||||
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %.Self.as_wit.iface0, element0 [symbolic_self = constants.%impl.elem0]
|
||||
// CHECK:STDOUT: %.loc11_43.1: %empty_tuple.type = tuple_literal ()
|
||||
// CHECK:STDOUT: %.loc11_43.2: type = converted %.loc11_43.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %.loc11_30: type = where_expr %.Self [concrete = constants.%I2_where.type] {
|
||||
// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc11_43.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %J2.ref: type = name_ref J2, file.%J2.decl.loc9 [concrete = constants.%J2.type]
|
||||
// CHECK:STDOUT: %V.loc11_14.1: %J2.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.2 (constants.%V)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (constants.%empty_tuple.type), @impl(constants.%V) [symbolic = @impl.%impl_witness (constants.%impl_witness)]
|
||||
// CHECK:STDOUT: %J2.decl.loc13: type = interface_decl @J2 [concrete = constants.%J2.type] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @I2 {
|
||||
// CHECK:STDOUT: %Self: %I2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.c7b]
|
||||
// CHECK:STDOUT: %T2: type = assoc_const_decl @T2 [concrete] {
|
||||
// CHECK:STDOUT: %assoc0: %I2.assoc_type = assoc_entity element0, @I2.%T2 [concrete = constants.%assoc0.166]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
// CHECK:STDOUT: .T2 = @T2.%assoc0
|
||||
// CHECK:STDOUT: witness = (%T2)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @J2 {
|
||||
// CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.541]
|
||||
// CHECK:STDOUT: %I2.ref: type = name_ref I2, file.%I2.decl [concrete = constants.%I2.type]
|
||||
// CHECK:STDOUT: %T2.ref: %I2.assoc_type = name_ref T2, @T2.%assoc0 [concrete = constants.%assoc0.166]
|
||||
// CHECK:STDOUT: %U2: %I2.assoc_type = bind_alias U2, @T2.%assoc0 [concrete = constants.%assoc0.166]
|
||||
// CHECK:STDOUT: %F2.decl: %F2.type = fn_decl @F2 [concrete = constants.%F2] {
|
||||
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc22_14.1: %J2.type = converted constants.%J2.type, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc22_14.2: %I2.type = converted @J2.%Self, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %U2.ref: <error> = name_ref U2, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %return.param: ref <error> = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref <error> = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, %F2.decl [concrete = constants.%assoc0.5b2]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
// CHECK:STDOUT: .I2 = <poisoned>
|
||||
// CHECK:STDOUT: .U2 = %U2
|
||||
// CHECK:STDOUT: .F2 = %assoc0
|
||||
// CHECK:STDOUT: witness = (%F2.decl)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.1: type) [from "core.carbon"] {
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Dest.patt: type = symbolic_binding_pattern Dest, 0 [symbolic = %Dest.patt (constants.%Dest.patt)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = imports.%Core.import_ref.ff5
|
||||
// CHECK:STDOUT: .Convert = imports.%Core.import_ref.630
|
||||
// CHECK:STDOUT: witness = (imports.%Core.Convert)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic assoc_const @T2(@I2.%Self: %I2.type) {
|
||||
// CHECK:STDOUT: assoc_const T2:! type;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic impl @impl(%V.loc11_14.1: %J2.type) {
|
||||
// CHECK:STDOUT: %V.loc11_14.2: %J2.type = bind_symbolic_name V, 0 [symbolic = %V.loc11_14.2 (constants.%V)]
|
||||
// CHECK:STDOUT: %V.patt.loc11_14.2: %J2.type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc11_14.2 (constants.%V.patt)]
|
||||
// CHECK:STDOUT: %V.as_type.loc11_22.2: type = facet_access_type %V.loc11_14.2 [symbolic = %V.as_type.loc11_22.2 (constants.%V.as_type)]
|
||||
// CHECK:STDOUT: %impl_witness: <witness> = impl_witness (constants.%empty_tuple.type), @impl(%V.loc11_14.2) [symbolic = %impl_witness (constants.%impl_witness)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: impl: %.loc11_22 as %.loc11_30 {
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: witness = file.%impl_witness
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Convert(imports.%Core.import_ref.5ab3ec.2: type, imports.%Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62)) [from "core.carbon"] {
|
||||
// CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
|
||||
// CHECK:STDOUT: %Self: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @Convert.%Self.as_type (%Self.as_type)]() -> @Convert.%Dest (%Dest);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F2(@J2.%Self: %J2.type) {
|
||||
// CHECK:STDOUT: fn() -> <error>;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @T2(constants.%Self.c7b) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @T2(constants.%I2.facet) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @impl(constants.%V) {
|
||||
// CHECK:STDOUT: %V.loc11_14.2 => constants.%V
|
||||
// CHECK:STDOUT: %V.patt.loc11_14.2 => constants.%V
|
||||
// CHECK:STDOUT: %V.as_type.loc11_22.2 => constants.%V.as_type
|
||||
// CHECK:STDOUT: %impl_witness => constants.%impl_witness
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @impl(%V.loc11_14.2) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
|
||||
// CHECK:STDOUT: %Dest => constants.%Dest
|
||||
// CHECK:STDOUT: %Dest.patt => constants.%Dest
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(%Dest) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) {
|
||||
// CHECK:STDOUT: %Dest => constants.%Dest
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62
|
||||
// CHECK:STDOUT: %Self => constants.%Self.519
|
||||
// CHECK:STDOUT: %Self.as_type => constants.%Self.as_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(constants.%J2.type) {
|
||||
// CHECK:STDOUT: %Dest => constants.%J2.type
|
||||
// CHECK:STDOUT: %Dest.patt => constants.%J2.type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.40d
|
||||
// CHECK:STDOUT: %Self => constants.%Self.519
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.099
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.7ee
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.4e8
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.78f
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(constants.%I2.type) {
|
||||
// CHECK:STDOUT: %Dest => constants.%I2.type
|
||||
// CHECK:STDOUT: %Dest.patt => constants.%I2.type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2eb
|
||||
// CHECK:STDOUT: %Self => constants.%Self.519
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.b16
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.b2c
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.ede
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.76a
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F2(constants.%Self.541) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_call_method_alias.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %A.type: type = facet_type <@A> [concrete]
|
||||
// CHECK:STDOUT: %Self.31d: %A.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.31d [symbolic]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %A.assoc_type: type = assoc_entity_type %A.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.70d: %A.assoc_type = assoc_entity element0, @A.%F.decl [concrete]
|
||||
// CHECK:STDOUT: %B.type: type = facet_type <@B> [concrete]
|
||||
// CHECK:STDOUT: %Self.783: %B.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %B.assoc_type: type = assoc_entity_type %B.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.c1f: %B.assoc_type = assoc_entity element0, @B.%G.decl [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: import Core//default
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .A = %A.decl
|
||||
// CHECK:STDOUT: .B = %B.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %A.decl: type = interface_decl @A [concrete = constants.%A.type] {} {}
|
||||
// CHECK:STDOUT: %B.decl: type = interface_decl @B [concrete = constants.%B.type] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @A {
|
||||
// CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.31d]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %self.patt: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = binding_pattern self
|
||||
// CHECK:STDOUT: %self.param_patt: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = value_param_pattern %self.patt, call_param0
|
||||
// CHECK:STDOUT: %return.patt: type = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, call_param1
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref: %A.type = name_ref Self, @A.%Self [symbolic = %Self (constants.%Self.31d)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc6_14.2: type = converted %Self.ref, %Self.as_type.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = bind_name self, %self.param
|
||||
// CHECK:STDOUT: %return.param: ref type = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %A.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0.70d]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
// CHECK:STDOUT: .F = %assoc0
|
||||
// CHECK:STDOUT: witness = (%F.decl)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @B {
|
||||
// CHECK:STDOUT: %Self: %B.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.783]
|
||||
// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A.type]
|
||||
// CHECK:STDOUT: %F.ref: %A.assoc_type = name_ref F, @A.%assoc0 [concrete = constants.%assoc0.70d]
|
||||
// CHECK:STDOUT: %F: %A.assoc_type = bind_alias F, @A.%assoc0 [concrete = constants.%assoc0.70d]
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
|
||||
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %F.ref: <error> = name_ref F, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %return.param: ref <error> = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref <error> = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %B.assoc_type = assoc_entity element0, %G.decl [concrete = constants.%assoc0.c1f]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
// CHECK:STDOUT: .A = <poisoned>
|
||||
// CHECK:STDOUT: .F = %F
|
||||
// CHECK:STDOUT: .G = %assoc0
|
||||
// CHECK:STDOUT: witness = (%G.decl)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(@A.%Self: %A.type) {
|
||||
// CHECK:STDOUT: %Self: %A.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.31d)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @F.%Self.as_type.loc6_14.1 (%Self.as_type)]() -> type;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @G(@B.%Self: %B.type) {
|
||||
// CHECK:STDOUT: fn() -> <error>;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%Self.31d) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self.31d
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @G(constants.%Self.783) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_todo_call_with_compound_member_access.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %C.type: type = facet_type <@C> [concrete]
|
||||
// CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %C.assoc_type: type = assoc_entity_type %C.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %C.assoc_type = assoc_entity element0, @C.%F.decl [concrete]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc1: %C.assoc_type = assoc_entity element1, @C.%G.decl [concrete]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.as_type [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_wit.iface0: <witness> = facet_access_witness %Self, element0 [symbolic]
|
||||
// CHECK:STDOUT: %C.facet: %C.type = facet_value %Self.as_type, (%Self.as_wit.iface0) [symbolic]
|
||||
// CHECK:STDOUT: %.70a: type = fn_type_with_self_type %F.type, %C.facet [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem0: %.70a = impl_witness_access %Self.as_wit.iface0, element0 [symbolic]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @F(%C.facet) [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: import Core//default
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %C.decl: type = interface_decl @C [concrete = constants.%C.type] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @C {
|
||||
// CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %self.patt: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = binding_pattern self
|
||||
// CHECK:STDOUT: %self.param_patt: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = value_param_pattern %self.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref: %C.type = name_ref Self, @C.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc6_14.2: type = converted %Self.ref, %Self.as_type.loc6_14.2 [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @F.%Self.as_type.loc6_14.1 (%Self.as_type) = bind_name self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc0: %C.assoc_type = assoc_entity element0, %F.decl [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
|
||||
// CHECK:STDOUT: %self.patt: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = binding_pattern self
|
||||
// CHECK:STDOUT: %self.param_patt: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = value_param_pattern %self.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %self.param: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc8_14.1: type = splice_block %.loc8_14.2 [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)] {
|
||||
// CHECK:STDOUT: %Self.ref: %C.type = name_ref Self, @C.%Self [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc8_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc8_14.2: type = converted %Self.ref, %Self.as_type.loc8_14.2 [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %self: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = bind_name self, %self.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc1: %C.assoc_type = assoc_entity element1, %G.decl [concrete = constants.%assoc1]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = %Self
|
||||
// CHECK:STDOUT: .F = %assoc0
|
||||
// CHECK:STDOUT: .G = %assoc1
|
||||
// CHECK:STDOUT: witness = (%F.decl, %G.decl)
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(@C.%Self: %C.type) {
|
||||
// CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc6_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @F.%Self.as_type.loc6_14.1 (%Self.as_type)]();
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @G(@C.%Self: %C.type) {
|
||||
// CHECK:STDOUT: %Self: %C.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_type.loc8_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type @G.%Self.as_type.loc8_14.1 (%Self.as_type) [symbolic = %require_complete (constants.%require_complete)]
|
||||
// CHECK:STDOUT: %Self.as_wit.iface0.loc10_9.2: <witness> = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc10_9.2 (constants.%Self.as_wit.iface0)]
|
||||
// CHECK:STDOUT: %C.facet: %C.type = facet_value %Self.as_type.loc8_14.1, (%Self.as_wit.iface0.loc10_9.2) [symbolic = %C.facet (constants.%C.facet)]
|
||||
// CHECK:STDOUT: %.loc10_9.2: type = fn_type_with_self_type constants.%F.type, %C.facet [symbolic = %.loc10_9.2 (constants.%.70a)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_9.2: @G.%.loc10_9.2 (%.70a) = impl_witness_access %Self.as_wit.iface0.loc10_9.2, element0 [symbolic = %impl.elem0.loc10_9.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %specific_fn.loc10_9.2: <specific function> = specific_function %impl.elem0.loc10_9.2, @F(%C.facet) [symbolic = %specific_fn.loc10_9.2 (constants.%specific_fn)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn[%self.param_patt: @G.%Self.as_type.loc8_14.1 (%Self.as_type)]() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %self.ref.loc10: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = name_ref self, %self
|
||||
// CHECK:STDOUT: %F.ref.loc10: %C.assoc_type = name_ref F, @C.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %Self.as_type.loc10: type = facet_access_type constants.%Self [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %.loc10_9.1: type = converted constants.%Self, %Self.as_type.loc10 [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)]
|
||||
// CHECK:STDOUT: %Self.as_wit.iface0.loc10_9.1: <witness> = facet_access_witness constants.%Self, element0 [symbolic = %Self.as_wit.iface0.loc10_9.2 (constants.%Self.as_wit.iface0)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc10_9.1: @G.%.loc10_9.2 (%.70a) = impl_witness_access %Self.as_wit.iface0.loc10_9.1, element0 [symbolic = %impl.elem0.loc10_9.2 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %bound_method.loc10_9: <bound method> = bound_method %self.ref.loc10, %impl.elem0.loc10_9.1
|
||||
// CHECK:STDOUT: %specific_fn.loc10_9.1: <specific function> = specific_function %impl.elem0.loc10_9.1, @F(constants.%C.facet) [symbolic = %specific_fn.loc10_9.2 (constants.%specific_fn)]
|
||||
// CHECK:STDOUT: %bound_method.loc10_12: <bound method> = bound_method %self.ref.loc10, %specific_fn.loc10_9.1
|
||||
// CHECK:STDOUT: %F.call: init %empty_tuple.type = call %bound_method.loc10_12(%self.ref.loc10)
|
||||
// CHECK:STDOUT: %self.ref.loc15: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = name_ref self, %self
|
||||
// CHECK:STDOUT: %F.ref.loc15: <error> = name_ref F, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @G(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_type.loc8_14.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%C.facet) {
|
||||
// CHECK:STDOUT: %Self => constants.%C.facet
|
||||
// CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%Self.as_type
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(@G.%C.facet) {}
|
||||
// CHECK:STDOUT:
|
||||
@@ -168,13 +168,13 @@ fn G(U:! Different) -> U.(Interface.T);
|
||||
// CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.519 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.837: type = assoc_entity_type %ImplicitAs.type.d62 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.1: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.02f: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.dc8: type = facet_type <@ImplicitAs, @ImplicitAs(type)> [concrete]
|
||||
// CHECK:STDOUT: %Convert.type.30b: type = fn_type @Convert, @ImplicitAs(type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.732: %Convert.type.30b = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.372: type = assoc_entity_type %ImplicitAs.type.dc8 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.536: %ImplicitAs.assoc_type.372 = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43db8b.2: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
|
||||
// CHECK:STDOUT: %assoc0.6e4: %ImplicitAs.assoc_type.372 = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.43d: %ImplicitAs.assoc_type.837 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
|
||||
// CHECK:STDOUT: %Different.type: type = facet_type <@Different> [concrete]
|
||||
// CHECK:STDOUT: %Self.e7f: %Different.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %U: %Different.type = bind_symbolic_name U, 0 [symbolic]
|
||||
@@ -183,7 +183,7 @@ fn G(U:! Different) -> U.(Interface.T);
|
||||
// CHECK:STDOUT: %Convert.type.2bc: type = fn_type @Convert, @ImplicitAs(%Interface.type) [concrete]
|
||||
// CHECK:STDOUT: %Convert.6b1: %Convert.type.2bc = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type.62c: type = assoc_entity_type %ImplicitAs.type.55e [concrete]
|
||||
// CHECK:STDOUT: %assoc0.b1f: %ImplicitAs.assoc_type.62c = assoc_entity element0, imports.%Core.import_ref.207961.1 [concrete]
|
||||
// CHECK:STDOUT: %assoc0.6f1: %ImplicitAs.assoc_type.62c = assoc_entity element0, imports.%Core.import_ref.1c7 [concrete]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -195,11 +195,11 @@ fn G(U:! Different) -> U.(Interface.T);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst24 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43db8b.2)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc3_22, loaded [symbolic = @ImplicitAs.%Dest (constants.%Dest)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst24 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
|
||||
// CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc4_35, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc4_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -255,7 +255,7 @@ fn G(U:! Different) -> U.(Interface.T);
|
||||
// CHECK:STDOUT: %Convert.type: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.275)]
|
||||
// CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.837)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.43db8b.1)]
|
||||
// CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.02f)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface {
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -345,7 +345,7 @@ fn G(U:! Different) -> U.(Interface.T);
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.30b
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.732
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.372
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.536
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.6e4
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @ImplicitAs(constants.%Interface.type) {
|
||||
@@ -358,7 +358,7 @@ fn G(U:! Different) -> U.(Interface.T);
|
||||
// CHECK:STDOUT: %Convert.type => constants.%Convert.type.2bc
|
||||
// CHECK:STDOUT: %Convert => constants.%Convert.6b1
|
||||
// CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.62c
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.b1f
|
||||
// CHECK:STDOUT: %assoc0 => constants.%assoc0.6f1
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @G(constants.%U) {
|
||||
|
||||
@@ -500,10 +500,6 @@ fn G(T:! Generic(B)) {
|
||||
// CHECK:STDOUT: specific @Generic(constants.%A) {
|
||||
// CHECK:STDOUT: %T.loc4_19.2 => constants.%A
|
||||
// CHECK:STDOUT: %T.patt.loc4_19.2 => constants.%A
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %Generic.type => constants.%Generic.type.c7c
|
||||
// CHECK:STDOUT: %Self.2 => constants.%Self
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%T.a53) {
|
||||
|
||||
+30
-23
@@ -101,19 +101,12 @@ fn F() -> i32 {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// --- fail_return_in_interface.carbon
|
||||
// --- return_in_interface.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
interface I {
|
||||
let T:! type = i32;
|
||||
// CHECK:STDERR: fail_return_in_interface.carbon:[[@LINE+7]]:13: error: cannot implicitly convert value of type `<associated entity in I>` to `type` [ImplicitAsConversionFailure]
|
||||
// CHECK:STDERR: fn F() -> T;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_return_in_interface.carbon:[[@LINE+4]]:13: note: type `<associated entity in I>` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
|
||||
// CHECK:STDERR: fn F() -> T;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR:
|
||||
fn F() -> T;
|
||||
}
|
||||
|
||||
@@ -743,15 +736,19 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT: return %.loc9_11.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_return_in_interface.carbon
|
||||
// CHECK:STDOUT: --- return_in_interface.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %I.type: type = facet_type <@I> [concrete]
|
||||
// CHECK:STDOUT: %Self.826: %I.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic]
|
||||
// CHECK:STDOUT: %I.assoc_type: type = assoc_entity_type %I.type [concrete]
|
||||
// CHECK:STDOUT: %assoc0.c7e: %I.assoc_type = assoc_entity element0, @I.%T [concrete]
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic]
|
||||
// CHECK:STDOUT: %Self.as_wit.iface0: <witness> = facet_access_witness %Self, element0 [symbolic]
|
||||
// CHECK:STDOUT: %I.facet: %I.type = facet_value %Self.as_type, (%Self.as_wit.iface0) [symbolic]
|
||||
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access %Self.as_wit.iface0, element0 [symbolic]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, @I.%F.decl [concrete]
|
||||
@@ -760,7 +757,6 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
|
||||
// CHECK:STDOUT: .Int = %Core.Int
|
||||
// CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
@@ -776,20 +772,21 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: interface @I {
|
||||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.826]
|
||||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self]
|
||||
// CHECK:STDOUT: %T: type = assoc_const_decl @T [concrete] {
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0.c7e]
|
||||
// CHECK:STDOUT: %assoc0: %I.assoc_type = assoc_entity element0, @I.%T [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param0
|
||||
// CHECK:STDOUT: %return.patt: @F.%impl.elem0.loc6_13.1 (%impl.elem0) = return_slot_pattern
|
||||
// CHECK:STDOUT: %return.param_patt: @F.%impl.elem0.loc6_13.1 (%impl.elem0) = out_param_pattern %return.patt, call_param0
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0.c7e]
|
||||
// CHECK:STDOUT: %.loc13: type = converted %T.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %return.param: ref <error> = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref <error> = return_slot %return.param
|
||||
// CHECK:STDOUT: %Self.as_wit.iface0.loc6_13.2: <witness> = facet_access_witness @I.%Self, element0 [symbolic = %Self.as_wit.iface0.loc6_13.1 (constants.%Self.as_wit.iface0)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc6_13.2: type = impl_witness_access %Self.as_wit.iface0.loc6_13.2, element0 [symbolic = %impl.elem0.loc6_13.1 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %impl.elem0.loc6_13.2 [symbolic = %impl.elem0.loc6_13.1 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT: %return.param: ref @F.%impl.elem0.loc6_13.1 (%impl.elem0) = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref @F.%impl.elem0.loc6_13.1 (%impl.elem0) = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %assoc1: %I.assoc_type = assoc_entity element1, %F.decl [concrete = constants.%assoc1]
|
||||
// CHECK:STDOUT:
|
||||
@@ -807,12 +804,22 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F(@I.%Self: %I.type) {
|
||||
// CHECK:STDOUT: fn() -> <error>;
|
||||
// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Self.as_wit.iface0.loc6_13.1: <witness> = facet_access_witness %Self, element0 [symbolic = %Self.as_wit.iface0.loc6_13.1 (constants.%Self.as_wit.iface0)]
|
||||
// CHECK:STDOUT: %impl.elem0.loc6_13.1: type = impl_witness_access %Self.as_wit.iface0.loc6_13.1, element0 [symbolic = %impl.elem0.loc6_13.1 (constants.%impl.elem0)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() -> @F.%impl.elem0.loc6_13.1 (%impl.elem0);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @T(constants.%Self.826) {}
|
||||
// CHECK:STDOUT: specific @T(constants.%Self) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%Self.826) {}
|
||||
// CHECK:STDOUT: specific @T(constants.%I.facet) {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F(constants.%Self) {
|
||||
// CHECK:STDOUT: %Self => constants.%Self
|
||||
// CHECK:STDOUT: %Self.as_wit.iface0.loc6_13.1 => constants.%Self.as_wit.iface0
|
||||
// CHECK:STDOUT: %impl.elem0.loc6_13.1 => constants.%impl.elem0
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_return_in_class.carbon
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -1189,7 +1189,7 @@ fn F0(n: i32) -> P.D {
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc8_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst47 [no loc], unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.630: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.837) = import_ref Core//default, loc9_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.43d)]
|
||||
// CHECK:STDOUT: %Core.Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
// CHECK:STDOUT: %Core.Convert = import_ref Core//default, Convert, unloaded
|
||||
// CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc8_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)]
|
||||
// CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst47 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self)]
|
||||
// CHECK:STDOUT: %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc9_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
|
||||
|
||||
@@ -588,10 +588,16 @@ static auto NoteAbstractClass(Context& context, SemIR::ClassId class_id,
|
||||
auto RequireConcreteType(Context& context, SemIR::TypeId type_id,
|
||||
SemIR::LocId loc_id, MakeDiagnosticBuilderFn diagnoser,
|
||||
MakeDiagnosticBuilderFn abstract_diagnoser) -> bool {
|
||||
// TODO: For symbolic types, should add a RequireConcreteType instruction,
|
||||
// like RequireCompleteType.
|
||||
// TODO: For symbolic types, should add an implicit constraint that they are
|
||||
// not abstract.
|
||||
CARBON_CHECK(abstract_diagnoser);
|
||||
|
||||
// The representation of a facet type does not depend on its definition, so
|
||||
// they are considered "concrete" even when not complete.
|
||||
if (context.types().IsFacetType(type_id)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!RequireCompleteType(context, type_id, loc_id, diagnoser)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -40,9 +40,15 @@ auto RequireCompleteType(Context& context, SemIR::TypeId type_id,
|
||||
SemIR::LocId loc_id, MakeDiagnosticBuilderFn diagnoser)
|
||||
-> bool;
|
||||
|
||||
// Like `RequireCompleteType`, but also require the type to not be an abstract
|
||||
// class type. If it is, `abstract_diagnoser` is used to diagnose the problem,
|
||||
// and this function returns false.
|
||||
// Returns true for types that have an object representation that may be used as
|
||||
// a return type or variable type. Returns true for all facet types, since their
|
||||
// representation is always the same and is never considered abstract.
|
||||
// Otherwise, this is like `RequireCompleteType`, but also require the type to
|
||||
// not be abstract. If it is, `abstract_diagnoser` is used to diagnose the
|
||||
// problem, and this function returns false.
|
||||
//
|
||||
// Note: class types are abstract if marked using the `abstract` keyword; tuple
|
||||
// and struct types are abstract if any element is abstract.
|
||||
auto RequireConcreteType(Context& context, SemIR::TypeId type_id,
|
||||
SemIR::LocId loc_id, MakeDiagnosticBuilderFn diagnoser,
|
||||
MakeDiagnosticBuilderFn abstract_diagnoser) -> bool;
|
||||
|
||||
@@ -76,8 +76,9 @@ struct FacetTypeInfo : Printable<FacetTypeInfo> {
|
||||
|
||||
auto Print(llvm::raw_ostream& out) const -> void;
|
||||
|
||||
// TODO: Update callers to be able to deal with facet types that aren't a
|
||||
// single interface and then remove this function.
|
||||
// In some cases, a facet type is expected to represent a single interface.
|
||||
// For example, an interface declaration or an associated constant are
|
||||
// associated with a facet type that will always be a single interface.
|
||||
auto TryAsSingleInterface() const -> std::optional<ImplsConstraint> {
|
||||
// We are ignoring other requirements for the moment, since this function is
|
||||
// (hopefully) temporary.
|
||||
|
||||
@@ -233,6 +233,16 @@ class NameScope : public Printable<NameScope> {
|
||||
import_ir_scopes_.push_back(import_ir_scope);
|
||||
}
|
||||
|
||||
auto is_interface_definition() const -> bool {
|
||||
return is_interface_definition_;
|
||||
}
|
||||
|
||||
// TODO: Figure out a better way of setting this and is_cpp_scope() than
|
||||
// calling a function immediately after construction.
|
||||
auto set_is_interface_definition() -> void {
|
||||
is_interface_definition_ = true;
|
||||
}
|
||||
|
||||
private:
|
||||
// Names in the scope, including poisoned names.
|
||||
//
|
||||
@@ -281,6 +291,10 @@ class NameScope : public Printable<NameScope> {
|
||||
// True if this is the `Cpp` namescope used when importing C++ code.
|
||||
bool is_cpp_scope_ = false;
|
||||
|
||||
// True if this is the scope of an interface definition, where associated
|
||||
// entities will be bound to the interface's `Self` symbolic type.
|
||||
bool is_interface_definition_ = false;
|
||||
|
||||
// Imported IR scopes that compose this namespace. This will be empty for
|
||||
// scopes that correspond to the current package.
|
||||
llvm::SmallVector<std::pair<ImportIRId, NameScopeId>, 0> import_ir_scopes_;
|
||||
|
||||
Reference in New Issue
Block a user