| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678 |
- // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- // Exceptions. See /LICENSE for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
- // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
- // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interface/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/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+4]]:13: error: cannot convert type `Self` that implements `J` into type implementing `I` [ConversionFailureFacetToFacet]
- // CHECK:STDERR: fn F() -> U;
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- fn F() -> U;
- }
- // --- 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;
- 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;
- // CHECK:STDERR: fail_call_method_alias.carbon:[[@LINE+4]]:13: error: cannot convert type `Self` that implements `B` into type implementing `A` [ConversionFailureFacetToFacet]
- // CHECK:STDERR: fn G() -> F();
- // CHECK:STDERR: ^
- // CHECK:STDERR:
- fn G() -> F();
- }
- // --- 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]() {
- self.F();
- self.(F)();
- }
- }
- // CHECK:STDOUT: --- core.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
- // 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: %pattern_type.a93: type = pattern_type %Self.as_type [symbolic]
- // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %Dest [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, @ImplicitAs(%Dest) [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: %pattern_type.98f = symbolic_binding_pattern Dest, 0 [concrete]
- // 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:
- // 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.%ImplicitAs.type (%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(%Dest.loc3_22.2) [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.%pattern_type.loc4_14 (%pattern_type.a93) = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @Convert.%pattern_type.loc4_14 (%pattern_type.a93) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: %return.patt: @Convert.%pattern_type.loc4_28 (%pattern_type.7dc) = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: @Convert.%pattern_type.loc4_28 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete]
- // 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: @Convert.%ImplicitAs.type (%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: %pattern_type.loc4_14: type = pattern_type %Self.as_type.loc4_20.1 [symbolic = %pattern_type.loc4_14 (constants.%pattern_type.a93)]
- // CHECK:STDOUT: %pattern_type.loc4_28: type = pattern_type %Dest [symbolic = %pattern_type.loc4_28 (constants.%pattern_type.7dc)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @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: }
- // 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: %pattern_type.loc4_14 => constants.%pattern_type.a93
- // CHECK:STDOUT: %pattern_type.loc4_28 => constants.%pattern_type.7dc
- // CHECK:STDOUT: }
- // 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 [concrete]
- // CHECK:STDOUT: %assoc0.cd1: %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: %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 [concrete]
- // CHECK:STDOUT: %assoc0.922: %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: 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: .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.cd1]
- // 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.cd1]
- // CHECK:STDOUT: %U: %I.assoc_type = bind_alias U, @T.%assoc0 [concrete = constants.%assoc0.cd1]
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
- // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // 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.922]
- // 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 assoc_const @T(@I.%Self: %I.type) {
- // CHECK:STDOUT: assoc_const T:! type;
- // 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 @F(constants.%Self.ccd) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- 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 [concrete]
- // CHECK:STDOUT: %assoc0.25f: %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: %pattern_type.f47: type = pattern_type %J2.type [concrete]
- // CHECK:STDOUT: %V.as_type: type = facet_access_type %V [symbolic]
- // CHECK:STDOUT: %.Self: %I2.type = bind_symbolic_name .Self [symbolic_self]
- // CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self [symbolic_self]
- // CHECK:STDOUT: %I2.lookup_impl_witness.ebe: <witness> = lookup_impl_witness %.Self, @I2 [symbolic_self]
- // CHECK:STDOUT: %I2.facet.708: %I2.type = facet_value %.Self.as_type, (%I2.lookup_impl_witness.ebe) [symbolic_self]
- // CHECK:STDOUT: %impl.elem0.dde: type = impl_witness_access %I2.lookup_impl_witness.ebe, element0 [symbolic_self]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %I2_where.type: type = facet_type <@I2 where %impl.elem0.dde = %empty_tuple.type> [concrete]
- // CHECK:STDOUT: %I2.impl_witness.2ab13d.1: <witness> = impl_witness file.%I2.impl_witness_table, @I2.impl(%V) [symbolic]
- // CHECK:STDOUT: %Self.541: %J2.type = bind_symbolic_name Self, 0 [symbolic]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.541 [symbolic]
- // CHECK:STDOUT: %I2.impl_witness.2ab13d.2: <witness> = impl_witness file.%I2.impl_witness_table, @I2.impl(%Self.541) [symbolic]
- // CHECK:STDOUT: %I2.lookup_impl_witness.487: <witness> = lookup_impl_witness %Self.541, @I2 [symbolic]
- // CHECK:STDOUT: %I2.facet.758: %I2.type = facet_value %Self.as_type, (%I2.lookup_impl_witness.487) [symbolic]
- // CHECK:STDOUT: %impl.elem0.7c7: type = impl_witness_access %I2.lookup_impl_witness.487, element0 [symbolic]
- // CHECK:STDOUT: %pattern_type.f9d: type = pattern_type %impl.elem0.7c7 [symbolic]
- // 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 [concrete]
- // CHECK:STDOUT: %assoc0.775: %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: 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: .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 @I2.impl [concrete] {
- // CHECK:STDOUT: %V.patt: %pattern_type.f47 = symbolic_binding_pattern V, 0 [concrete]
- // 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.25f]
- // 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: %impl.elem0: type = impl_witness_access constants.%I2.lookup_impl_witness.ebe, element0 [symbolic_self = constants.%impl.elem0.dde]
- // 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: %I2.impl_witness_table = impl_witness_table (%impl_witness_assoc_constant), @I2.impl [concrete]
- // CHECK:STDOUT: %I2.impl_witness: <witness> = impl_witness %I2.impl_witness_table, @I2.impl(constants.%V) [symbolic = @I2.impl.%I2.impl_witness (constants.%I2.impl_witness.2ab13d.1)]
- // CHECK:STDOUT: %impl_witness_assoc_constant: type = impl_witness_assoc_constant constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
- // 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.25f]
- // 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.25f]
- // CHECK:STDOUT: %U2: %I2.assoc_type = bind_alias U2, @T2.%assoc0 [concrete = constants.%assoc0.25f]
- // CHECK:STDOUT: %F2.decl: %F2.type = fn_decl @F2 [concrete = constants.%F2] {
- // CHECK:STDOUT: %return.patt: @F2.%pattern_type (%pattern_type.f9d) = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: @F2.%pattern_type (%pattern_type.f9d) = out_param_pattern %return.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %Self.as_type.loc15_14.2: type = facet_access_type constants.%Self.541 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %.loc15_14.1: type = converted constants.%Self.541, %Self.as_type.loc15_14.2 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %.loc15_14.2: %J2.type = converted %.loc15_14.1, constants.%Self.541 [symbolic = %Self (constants.%Self.541)]
- // CHECK:STDOUT: %Self.as_type.loc15_14.3: type = facet_access_type constants.%Self.541 [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %I2.facet.loc15_14.2: %I2.type = facet_value %Self.as_type.loc15_14.3, (constants.%I2.lookup_impl_witness.487) [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet.758)]
- // CHECK:STDOUT: %.loc15_14.3: %I2.type = converted @J2.%Self, %I2.facet.loc15_14.2 [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet.758)]
- // CHECK:STDOUT: %impl.elem0.loc15_14.2: type = impl_witness_access constants.%I2.lookup_impl_witness.487, element0 [symbolic = %impl.elem0.loc15_14.1 (constants.%impl.elem0.7c7)]
- // CHECK:STDOUT: %U2.ref: type = name_ref U2, %impl.elem0.loc15_14.2 [symbolic = %impl.elem0.loc15_14.1 (constants.%impl.elem0.7c7)]
- // CHECK:STDOUT: %return.param: ref @F2.%impl.elem0.loc15_14.1 (%impl.elem0.7c7) = out_param call_param0
- // CHECK:STDOUT: %return: ref @F2.%impl.elem0.loc15_14.1 (%impl.elem0.7c7) = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type constants.%Self.541 [symbolic = constants.%Self.as_type]
- // CHECK:STDOUT: %.loc15_14.1: type = converted constants.%Self.541, %Self.as_type [symbolic = constants.%Self.as_type]
- // CHECK:STDOUT: %.loc15_14.2: %J2.type = converted %.loc15_14.1, constants.%Self.541 [symbolic = constants.%Self.541]
- // CHECK:STDOUT: %assoc0: %J2.assoc_type = assoc_entity element0, %F2.decl [concrete = constants.%assoc0.775]
- // 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 assoc_const @T2(@I2.%Self: %I2.type) {
- // CHECK:STDOUT: assoc_const T2:! type;
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @I2.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.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: %I2.impl_witness: <witness> = impl_witness file.%I2.impl_witness_table, @I2.impl(%V.loc11_14.2) [symbolic = %I2.impl_witness (constants.%I2.impl_witness.2ab13d.1)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %.loc11_22 as %.loc11_30 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: witness = file.%I2.impl_witness
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @F2(@J2.%Self: %J2.type) {
- // CHECK:STDOUT: %Self: %J2.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.541)]
- // CHECK:STDOUT: %Self.as_type.loc15_14.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc15_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %I2.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @I2 [symbolic = %I2.lookup_impl_witness (constants.%I2.lookup_impl_witness.487)]
- // CHECK:STDOUT: %I2.facet.loc15_14.1: %I2.type = facet_value %Self.as_type.loc15_14.1, (%I2.lookup_impl_witness) [symbolic = %I2.facet.loc15_14.1 (constants.%I2.facet.758)]
- // CHECK:STDOUT: %impl.elem0.loc15_14.1: type = impl_witness_access %I2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_14.1 (constants.%impl.elem0.7c7)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %impl.elem0.loc15_14.1 [symbolic = %pattern_type (constants.%pattern_type.f9d)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn() -> @F2.%impl.elem0.loc15_14.1 (%impl.elem0.7c7);
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @T2(constants.%Self.c7b) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @T2(constants.%I2.facet.708) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I2.impl(constants.%V) {
- // CHECK:STDOUT: %V.loc11_14.2 => constants.%V
- // CHECK:STDOUT: %V.as_type.loc11_22.2 => constants.%V.as_type
- // CHECK:STDOUT: %I2.impl_witness => constants.%I2.impl_witness.2ab13d.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @I2.impl(constants.%Self.541) {
- // CHECK:STDOUT: %V.loc11_14.2 => constants.%Self.541
- // CHECK:STDOUT: %V.as_type.loc11_22.2 => constants.%Self.as_type
- // CHECK:STDOUT: %I2.impl_witness => constants.%I2.impl_witness.2ab13d.2
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @T2(constants.%I2.facet.758) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F2(constants.%Self.541) {
- // CHECK:STDOUT: %Self => constants.%Self.541
- // CHECK:STDOUT: %Self.as_type.loc15_14.1 => constants.%Self.as_type
- // CHECK:STDOUT: %I2.lookup_impl_witness => constants.%I2.lookup_impl_witness.487
- // CHECK:STDOUT: %I2.facet.loc15_14.1 => constants.%I2.facet.758
- // CHECK:STDOUT: %impl.elem0.loc15_14.1 => constants.%impl.elem0.7c7
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.f9d
- // CHECK:STDOUT: }
- // 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: %pattern_type.f98: type = pattern_type %Self.as_type [symbolic]
- // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
- // 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 [concrete]
- // CHECK:STDOUT: %assoc0.2e6: %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 [concrete]
- // CHECK:STDOUT: %assoc0.d1a: %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.%pattern_type (%pattern_type.f98) = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @F.%pattern_type (%pattern_type.f98) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %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.2e6]
- // 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.2e6]
- // CHECK:STDOUT: %F: %A.assoc_type = bind_alias F, @A.%assoc0 [concrete = constants.%assoc0.2e6]
- // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
- // CHECK:STDOUT: %return.patt: <error> = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: <error> = out_param_pattern %return.patt, call_param0 [concrete]
- // 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.d1a]
- // 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: %pattern_type: type = pattern_type %Self.as_type.loc6_14.1 [symbolic = %pattern_type (constants.%pattern_type.f98)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @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: %pattern_type => constants.%pattern_type.f98
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @G(constants.%Self.783) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- 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: %pattern_type: type = pattern_type %Self.as_type [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 [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: %C.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @C [symbolic]
- // CHECK:STDOUT: %C.facet: %C.type = facet_value %Self.as_type, (%C.lookup_impl_witness) [symbolic]
- // CHECK:STDOUT: %.54d: type = fn_type_with_self_type %F.type, %C.facet [symbolic]
- // CHECK:STDOUT: %impl.elem0: %.54d = impl_witness_access %C.lookup_impl_witness, element0 [symbolic]
- // CHECK:STDOUT: %specific_impl_fn: <specific function> = specific_impl_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.%pattern_type (%pattern_type) = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @F.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete]
- // 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.%pattern_type (%pattern_type) = binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @G.%pattern_type (%pattern_type) = value_param_pattern %self.patt, call_param0 [concrete]
- // 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: %pattern_type: type = pattern_type %Self.as_type.loc6_14.1 [symbolic = %pattern_type (constants.%pattern_type)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @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: %pattern_type: type = pattern_type %Self.as_type.loc8_14.1 [symbolic = %pattern_type (constants.%pattern_type)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %Self.as_type.loc8_14.1 [symbolic = %require_complete (constants.%require_complete)]
- // CHECK:STDOUT: %C.lookup_impl_witness: <witness> = lookup_impl_witness %Self, @C [symbolic = %C.lookup_impl_witness (constants.%C.lookup_impl_witness)]
- // CHECK:STDOUT: %C.facet: %C.type = facet_value %Self.as_type.loc8_14.1, (%C.lookup_impl_witness) [symbolic = %C.facet (constants.%C.facet)]
- // CHECK:STDOUT: %.loc9_9.2: type = fn_type_with_self_type constants.%F.type, %C.facet [symbolic = %.loc9_9.2 (constants.%.54d)]
- // CHECK:STDOUT: %impl.elem0.loc9_9.2: @G.%.loc9_9.2 (%.54d) = impl_witness_access %C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)]
- // CHECK:STDOUT: %specific_impl_fn.loc9_9.2: <specific function> = specific_impl_function %impl.elem0.loc9_9.2, @F(%C.facet) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @G.%Self.as_type.loc8_14.1 (%Self.as_type)) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %self.ref.loc9: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = name_ref self, %self
- // CHECK:STDOUT: %F.ref.loc9: %C.assoc_type = name_ref F, @C.%assoc0 [concrete = constants.%assoc0]
- // CHECK:STDOUT: %Self.as_type.loc9: type = facet_access_type constants.%Self [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %.loc9_9.1: type = converted constants.%Self, %Self.as_type.loc9 [symbolic = %Self.as_type.loc8_14.1 (constants.%Self.as_type)]
- // CHECK:STDOUT: %impl.elem0.loc9_9.1: @G.%.loc9_9.2 (%.54d) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)]
- // CHECK:STDOUT: %bound_method.loc9_9: <bound method> = bound_method %self.ref.loc9, %impl.elem0.loc9_9.1
- // CHECK:STDOUT: %specific_impl_fn.loc9_9.1: <specific function> = specific_impl_function %impl.elem0.loc9_9.1, @F(constants.%C.facet) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)]
- // CHECK:STDOUT: %bound_method.loc9_12: <bound method> = bound_method %self.ref.loc9, %specific_impl_fn.loc9_9.1
- // CHECK:STDOUT: %.loc9_12: init %empty_tuple.type = call %bound_method.loc9_12(%self.ref.loc9)
- // CHECK:STDOUT: %self.ref.loc10: @G.%Self.as_type.loc8_14.1 (%Self.as_type) = name_ref self, %self
- // CHECK:STDOUT: %impl.elem0.loc10: @G.%.loc9_9.2 (%.54d) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)]
- // CHECK:STDOUT: %F.ref.loc10: @G.%.loc9_9.2 (%.54d) = name_ref F, %impl.elem0.loc10 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)]
- // CHECK:STDOUT: %bound_method.loc10_9: <bound method> = bound_method %self.ref.loc10, %F.ref.loc10
- // CHECK:STDOUT: %specific_impl_fn.loc10: <specific function> = specific_impl_function %F.ref.loc10, @F(constants.%C.facet) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)]
- // CHECK:STDOUT: %bound_method.loc10_14: <bound method> = bound_method %self.ref.loc10, %specific_impl_fn.loc10
- // CHECK:STDOUT: %.loc10: init %empty_tuple.type = call %bound_method.loc10_14(%self.ref.loc10)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @F(constants.%Self) {
- // CHECK:STDOUT: %Self => constants.%Self
- // CHECK:STDOUT: %Self.as_type.loc6_14.1 => constants.%Self.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_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: %pattern_type => constants.%pattern_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: %pattern_type => constants.%pattern_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|