| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532 |
- // 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/convert.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/impl/lookup/generic.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/lookup/generic.carbon
- // --- deduced_type.carbon
- library "[[@TEST_NAME]]";
- interface HasF {
- fn F[self: Self]();
- }
- impl forall [T:! type] T as HasF {
- fn F[self: Self]() {}
- }
- fn G(x: {}) {
- x.(HasF.F)();
- }
- // --- deduced_type_subst.carbon
- library "[[@TEST_NAME]]";
- interface HasF {
- fn F[self: Self]() -> Self;
- }
- impl forall [T:! type] T* as HasF {
- fn F[self: Self]() -> T* { return self; }
- }
- fn G(x: {}*) -> {}* {
- return x.(HasF.F)();
- }
- // --- deduced_type_argument.carbon
- library "[[@TEST_NAME]]";
- interface HasF {
- fn F[self: Self]();
- }
- class C(T:! type) {}
- impl forall [T:! type] C(T) as HasF {
- fn F[self: Self]() {}
- }
- fn G(x: C({})) {
- x.(HasF.F)();
- }
- // --- deduced_interface_argument.carbon
- library "[[@TEST_NAME]]";
- interface HasF(T:! type) {
- fn F[self: Self]();
- }
- impl forall [T:! type] {} as HasF(T) {
- fn F[self: Self]() {}
- }
- fn G(x: {}) {
- x.(HasF({}).F)();
- }
- // --- fail_incomplete_deduction.carbon
- library "[[@TEST_NAME]]";
- interface HasF {
- fn F[self: Self]();
- }
- // CHECK:STDERR: fail_incomplete_deduction.carbon:[[@LINE+4]]:13: error: `impl` with unused generic binding [ImplUnusedBinding]
- // CHECK:STDERR: impl forall [T:! type, U:! type] T as HasF {
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- impl forall [T:! type, U:! type] T as HasF {
- fn F[self: Self]() {}
- }
- fn G(x: {}) {
- // CHECK:STDERR: fail_incomplete_deduction.carbon:[[@LINE+4]]:3: error: cannot access member of interface `HasF` in type `{}` that does not implement that interface [MissingImplInMemberAccess]
- // CHECK:STDERR: x.(HasF.F)();
- // CHECK:STDERR: ^~~~~~~~~~
- // CHECK:STDERR:
- x.(HasF.F)();
- }
- // --- fail_inconsistent_deduction.carbon
- library "[[@TEST_NAME]]";
- interface HasF(T:! type) {
- fn F[self: Self]();
- }
- impl forall [T:! type] T as HasF(T) {
- fn F[self: Self]() {}
- }
- class A {}
- class B {}
- fn G(x: A) {
- // TODO: It'd be nice to include a note here saying that deduction failed because
- // we deduced two different values for `T`.
- // CHECK:STDERR: fail_inconsistent_deduction.carbon:[[@LINE+4]]:3: error: cannot access member of interface `HasF(B)` in type `A` that does not implement that interface [MissingImplInMemberAccess]
- // CHECK:STDERR: x.(HasF(B).F)();
- // CHECK:STDERR: ^~~~~~~~~~~~~
- // CHECK:STDERR:
- x.(HasF(B).F)();
- }
- // CHECK:STDOUT: --- deduced_type.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
- // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
- // CHECK:STDOUT: %pattern_type.d0b: type = pattern_type %Self.binding.as_type [symbolic]
- // CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
- // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete]
- // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.c31: <witness> = impl_witness @T.as.HasF.impl.%HasF.impl_witness_table, @T.as.HasF.impl(%T) [symbolic]
- // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic]
- // CHECK:STDOUT: %T.as.HasF.impl.F.type.12d: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T) [symbolic]
- // CHECK:STDOUT: %T.as.HasF.impl.F.4f8: %T.as.HasF.impl.F.type.12d = struct_value () [symbolic]
- // CHECK:STDOUT: %HasF.facet.31c: %HasF.type = facet_value %T, (%HasF.impl_witness.c31) [symbolic]
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
- // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
- // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.ada: <witness> = impl_witness @T.as.HasF.impl.%HasF.impl_witness_table, @T.as.HasF.impl(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %T.as.HasF.impl.F.type.472: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %T.as.HasF.impl.F.bd4: %T.as.HasF.impl.F.type.472 = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.facet.53a: %HasF.type = facet_value %empty_struct_type, (%HasF.impl_witness.ada) [concrete]
- // CHECK:STDOUT: %.52d: type = fn_type_with_self_type %HasF.F.type, %HasF.facet.53a [concrete]
- // CHECK:STDOUT: %T.as.HasF.impl.F.specific_fn: <specific function> = specific_function %T.as.HasF.impl.F.bd4, @T.as.HasF.impl.F(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [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: .HasF = %HasF.decl
- // CHECK:STDOUT: .G = %G.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
- // CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)]
- // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
- // CHECK:STDOUT: %x.patt: %pattern_type.a96 = value_binding_pattern x [concrete]
- // CHECK:STDOUT: %x.param_patt: %pattern_type.a96 = value_param_pattern %x.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %empty_struct_type = value_param call_param0
- // CHECK:STDOUT: %.loc12_10.1: type = splice_block %.loc12_10.3 [concrete = constants.%empty_struct_type] {
- // CHECK:STDOUT: %.loc12_10.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc12_10.3: type = converted %.loc12_10.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasF {
- // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
- // CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] {
- // CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
- // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
- // CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .F = %assoc0
- // CHECK:STDOUT: witness = (%HasF.F.decl)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc8_14.2: type) {
- // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
- // CHECK:STDOUT: %HasF.impl_witness.loc8_34.2: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_14.1) [symbolic = %HasF.impl_witness.loc8_34.2 (constants.%HasF.impl_witness.c31)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc8_14.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type.12d)]
- // CHECK:STDOUT: %T.as.HasF.impl.F: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type.12d) = struct_value () [symbolic = %T.as.HasF.impl.F (constants.%T.as.HasF.impl.F.4f8)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %T.ref as %HasF.ref {
- // CHECK:STDOUT: %T.as.HasF.impl.F.decl: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type.12d) = fn_decl @T.as.HasF.impl.F [symbolic = @T.as.HasF.impl.%T.as.HasF.impl.F (constants.%T.as.HasF.impl.F.4f8)] {
- // CHECK:STDOUT: %self.patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = value_binding self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.loc8_34.1: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_34.2 (constants.%HasF.impl_witness.c31)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
- // CHECK:STDOUT: witness = %HasF.impl_witness.loc8_34.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) {
- // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.d0b)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type));
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc8_14.2: type) {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic = %require_complete (constants.%require_complete)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @T.as.HasF.impl.F.%T (%T)) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @G(%x.param: %empty_struct_type) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x
- // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: %.52d = impl_witness_access constants.%HasF.impl_witness.ada, element0 [concrete = constants.%T.as.HasF.impl.F.bd4]
- // CHECK:STDOUT: %bound_method.loc13_4: <bound method> = bound_method %x.ref, %impl.elem0
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @T.as.HasF.impl.F(constants.%empty_struct_type) [concrete = constants.%T.as.HasF.impl.F.specific_fn]
- // CHECK:STDOUT: %bound_method.loc13_14: <bound method> = bound_method %x.ref, %specific_fn
- // CHECK:STDOUT: %T.as.HasF.impl.F.call: init %empty_tuple.type = call %bound_method.loc13_14(%x.ref)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF.F(constants.%Self) {
- // CHECK:STDOUT: %Self => constants.%Self
- // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d0b
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T) {
- // CHECK:STDOUT: %T.loc8_14.1 => constants.%T
- // CHECK:STDOUT: %HasF.impl_witness.loc8_34.2 => constants.%HasF.impl_witness.c31
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type.12d
- // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F.4f8
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet.31c) {
- // CHECK:STDOUT: %Self => constants.%HasF.facet.31c
- // CHECK:STDOUT: %Self.binding.as_type => constants.%T
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%empty_struct_type) {
- // CHECK:STDOUT: %T.loc8_14.1 => constants.%empty_struct_type
- // CHECK:STDOUT: %HasF.impl_witness.loc8_34.2 => constants.%HasF.impl_witness.ada
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type.472
- // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F.bd4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%empty_struct_type) {
- // CHECK:STDOUT: %T => constants.%empty_struct_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a96
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete => constants.%complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- deduced_type_subst.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
- // CHECK:STDOUT: %Self.f09: %HasF.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %Self.binding.as_type.87c: type = symbolic_binding_type Self, 0, %Self.f09 [symbolic]
- // CHECK:STDOUT: %pattern_type.d0b: type = pattern_type %Self.binding.as_type.87c [symbolic]
- // CHECK:STDOUT: %.880: form = init_form %Self.binding.as_type.87c, call_param1 [symbolic]
- // CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete]
- // CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
- // CHECK:STDOUT: %assoc0.55d: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete]
- // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
- // CHECK:STDOUT: %ptr.e8f: type = ptr_type %T.67d [symbolic]
- // CHECK:STDOUT: %HasF.impl_witness.e63: <witness> = impl_witness @ptr.as.HasF.impl.%HasF.impl_witness_table, @ptr.as.HasF.impl(%T.67d) [symbolic]
- // CHECK:STDOUT: %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic]
- // CHECK:STDOUT: %.ba4: form = init_form %ptr.e8f, call_param1 [symbolic]
- // CHECK:STDOUT: %ptr.as.HasF.impl.F.type.672: type = fn_type @ptr.as.HasF.impl.F, @ptr.as.HasF.impl(%T.67d) [symbolic]
- // CHECK:STDOUT: %ptr.as.HasF.impl.F.dbd: %ptr.as.HasF.impl.F.type.672 = struct_value () [symbolic]
- // CHECK:STDOUT: %HasF.facet.506: %HasF.type = facet_value %ptr.e8f, (%HasF.impl_witness.e63) [symbolic]
- // CHECK:STDOUT: %require_complete.ef1: <witness> = require_complete_type %ptr.e8f [symbolic]
- // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
- // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
- // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.2d4: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%T.67d) [symbolic]
- // CHECK:STDOUT: %ptr.as.Copy.impl.Op.74e: %ptr.as.Copy.impl.Op.type.2d4 = struct_value () [symbolic]
- // CHECK:STDOUT: %.2f2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.67d) [symbolic]
- // CHECK:STDOUT: %Copy.lookup_impl_witness.2e6: <witness> = lookup_impl_witness %ptr.e8f, @Copy [symbolic]
- // CHECK:STDOUT: %Copy.facet.c25: %Copy.type = facet_value %ptr.e8f, (%Copy.lookup_impl_witness.2e6) [symbolic]
- // CHECK:STDOUT: %.b46: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c25 [symbolic]
- // CHECK:STDOUT: %impl.elem0.201: %.b46 = impl_witness_access %Copy.lookup_impl_witness.2e6, element0 [symbolic]
- // CHECK:STDOUT: %specific_impl_fn.b84: <specific function> = specific_impl_function %impl.elem0.201, @Copy.Op(%Copy.facet.c25) [symbolic]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %ptr.c28: type = ptr_type %empty_struct_type [concrete]
- // CHECK:STDOUT: %pattern_type.1cc: type = pattern_type %ptr.c28 [concrete]
- // CHECK:STDOUT: %.f0e: form = init_form %ptr.c28, call_param1 [concrete]
- // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
- // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.e25: <witness> = impl_witness @ptr.as.HasF.impl.%HasF.impl_witness_table, @ptr.as.HasF.impl(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %ptr.as.HasF.impl.F.type.5bc: type = fn_type @ptr.as.HasF.impl.F, @ptr.as.HasF.impl(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %ptr.as.HasF.impl.F.8a8: %ptr.as.HasF.impl.F.type.5bc = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.facet.b93: %HasF.type = facet_value %ptr.c28, (%HasF.impl_witness.e25) [concrete]
- // CHECK:STDOUT: %.38f: type = fn_type_with_self_type %HasF.F.type, %HasF.facet.b93 [concrete]
- // CHECK:STDOUT: %ptr.as.HasF.impl.F.specific_fn: <specific function> = specific_function %ptr.as.HasF.impl.F.8a8, @ptr.as.HasF.impl.F(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %ptr.c28 [concrete]
- // CHECK:STDOUT: %Copy.impl_witness.3fd: <witness> = impl_witness imports.%Copy.impl_witness_table.c3a, @ptr.as.Copy.impl(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %ptr.as.Copy.impl.Op.type.032: type = fn_type @ptr.as.Copy.impl.Op, @ptr.as.Copy.impl(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %ptr.as.Copy.impl.Op.cbf: %ptr.as.Copy.impl.Op.type.032 = struct_value () [concrete]
- // CHECK:STDOUT: %.07c: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %Copy.facet.111: %Copy.type = facet_value %ptr.c28, (%Copy.impl_witness.3fd) [concrete]
- // CHECK:STDOUT: %.38c: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.111 [concrete]
- // CHECK:STDOUT: %ptr.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %ptr.as.Copy.impl.Op.cbf, @ptr.as.Copy.impl.Op(%empty_struct_type) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
- // CHECK:STDOUT: .Copy = %Core.Copy
- // CHECK:STDOUT: import Core//prelude
- // CHECK:STDOUT: import Core//prelude/...
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.Copy: type = import_ref Core//prelude/parts/copy, Copy, loaded [concrete = constants.%Copy.type]
- // CHECK:STDOUT: %Core.import_ref.203: @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op.type (%ptr.as.Copy.impl.Op.type.2d4) = import_ref Core//prelude/parts/copy, loc{{\d+_\d+}}, loaded [symbolic = @ptr.as.Copy.impl.%ptr.as.Copy.impl.Op (constants.%ptr.as.Copy.impl.Op.74e)]
- // CHECK:STDOUT: %Copy.impl_witness_table.c3a = impl_witness_table (%Core.import_ref.203), @ptr.as.Copy.impl [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
- // CHECK:STDOUT: .Core = imports.%Core
- // CHECK:STDOUT: .HasF = %HasF.decl
- // CHECK:STDOUT: .G = %G.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
- // CHECK:STDOUT: impl_decl @ptr.as.HasF.impl [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T.67d)]
- // CHECK:STDOUT: %ptr.loc8_25.2: type = ptr_type %T.ref [symbolic = %ptr.loc8_25.1 (constants.%ptr.e8f)]
- // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T.67d)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
- // CHECK:STDOUT: %x.patt: %pattern_type.1cc = value_binding_pattern x [concrete]
- // CHECK:STDOUT: %x.param_patt: %pattern_type.1cc = value_param_pattern %x.patt, call_param0 [concrete]
- // CHECK:STDOUT: %return.patt: %pattern_type.1cc = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: %pattern_type.1cc = out_param_pattern %return.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %.loc12_18: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc12_19.1: type = converted %.loc12_18, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %ptr.loc12_19: type = ptr_type %.loc12_19.1 [concrete = constants.%ptr.c28]
- // CHECK:STDOUT: %.loc12_19.2: form = init_form %ptr.loc12_19, call_param1 [concrete = constants.%.f0e]
- // CHECK:STDOUT: %x.param: %ptr.c28 = value_param call_param0
- // CHECK:STDOUT: %.loc12_11.1: type = splice_block %ptr.loc12_11 [concrete = constants.%ptr.c28] {
- // CHECK:STDOUT: %.loc12_10: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_10, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %ptr.loc12_11: type = ptr_type %.loc12_11.2 [concrete = constants.%ptr.c28]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %x: %ptr.c28 = value_binding x, %x.param
- // CHECK:STDOUT: %return.param: ref %ptr.c28 = out_param call_param1
- // CHECK:STDOUT: %return: ref %ptr.c28 = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasF {
- // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self.f09]
- // CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] {
- // CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: %return.patt: @HasF.F.%pattern_type (%pattern_type.d0b) = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: @HasF.F.%pattern_type (%pattern_type.d0b) = out_param_pattern %return.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %Self.ref.loc5_25: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self.f09)]
- // CHECK:STDOUT: %Self.as_type.loc5_25: type = facet_access_type %Self.ref.loc5_25 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)]
- // CHECK:STDOUT: %.loc5_25.2: type = converted %Self.ref.loc5_25, %Self.as_type.loc5_25 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)]
- // CHECK:STDOUT: %.loc5_25.3: form = init_form %.loc5_25.2, call_param1 [symbolic = %.loc5_25.1 (constants.%.880)]
- // CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type.87c) = value_param call_param0
- // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)] {
- // CHECK:STDOUT: %Self.ref.loc5_14: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self.f09)]
- // CHECK:STDOUT: %Self.as_type.loc5_14: type = facet_access_type %Self.ref.loc5_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)]
- // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref.loc5_14, %Self.as_type.loc5_14 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type.87c) = value_binding self, %self.param
- // CHECK:STDOUT: %return.param: ref @HasF.F.%Self.binding.as_type (%Self.binding.as_type.87c) = out_param call_param1
- // CHECK:STDOUT: %return: ref @HasF.F.%Self.binding.as_type (%Self.binding.as_type.87c) = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0.55d]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .F = %assoc0
- // CHECK:STDOUT: witness = (%HasF.F.decl)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @ptr.as.HasF.impl(%T.loc8_14.2: type) {
- // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T.67d)]
- // CHECK:STDOUT: %ptr.loc8_25.1: type = ptr_type %T.loc8_14.1 [symbolic = %ptr.loc8_25.1 (constants.%ptr.e8f)]
- // CHECK:STDOUT: %HasF.impl_witness.loc8_35.2: <witness> = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(%T.loc8_14.1) [symbolic = %HasF.impl_witness.loc8_35.2 (constants.%HasF.impl_witness.e63)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %ptr.as.HasF.impl.F.type: type = fn_type @ptr.as.HasF.impl.F, @ptr.as.HasF.impl(%T.loc8_14.1) [symbolic = %ptr.as.HasF.impl.F.type (constants.%ptr.as.HasF.impl.F.type.672)]
- // CHECK:STDOUT: %ptr.as.HasF.impl.F: @ptr.as.HasF.impl.%ptr.as.HasF.impl.F.type (%ptr.as.HasF.impl.F.type.672) = struct_value () [symbolic = %ptr.as.HasF.impl.F (constants.%ptr.as.HasF.impl.F.dbd)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %ptr.loc8_25.2 as %HasF.ref {
- // CHECK:STDOUT: %ptr.as.HasF.impl.F.decl: @ptr.as.HasF.impl.%ptr.as.HasF.impl.F.type (%ptr.as.HasF.impl.F.type.672) = fn_decl @ptr.as.HasF.impl.F [symbolic = @ptr.as.HasF.impl.%ptr.as.HasF.impl.F (constants.%ptr.as.HasF.impl.F.dbd)] {
- // CHECK:STDOUT: %self.patt: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = value_binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: %return.patt: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = return_slot_pattern [concrete]
- // CHECK:STDOUT: %return.param_patt: @ptr.as.HasF.impl.F.%pattern_type (%pattern_type.4f4) = out_param_pattern %return.patt, call_param1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %T.ref: type = name_ref T, @ptr.as.HasF.impl.%T.loc8_14.2 [symbolic = %T (constants.%T.67d)]
- // CHECK:STDOUT: %ptr.loc9_26: type = ptr_type %T.ref [symbolic = %ptr.loc9_14 (constants.%ptr.e8f)]
- // CHECK:STDOUT: %.loc9_26.2: form = init_form %ptr.loc9_26, call_param1 [symbolic = %.loc9_26.1 (constants.%.ba4)]
- // CHECK:STDOUT: %self.param: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @ptr.as.HasF.impl.%ptr.loc8_25.2 [symbolic = %ptr.loc9_14 (constants.%ptr.e8f)]
- // CHECK:STDOUT: %self: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = value_binding self, %self.param
- // CHECK:STDOUT: %return.param: ref @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = out_param call_param1
- // CHECK:STDOUT: %return: ref @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = return_slot %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%ptr.as.HasF.impl.F.decl), @ptr.as.HasF.impl [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.loc8_35.1: <witness> = impl_witness %HasF.impl_witness_table, @ptr.as.HasF.impl(constants.%T.67d) [symbolic = %HasF.impl_witness.loc8_35.2 (constants.%HasF.impl_witness.e63)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .T = <poisoned>
- // CHECK:STDOUT: .F = %ptr.as.HasF.impl.F.decl
- // CHECK:STDOUT: witness = %HasF.impl_witness.loc8_35.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) {
- // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self.f09)]
- // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type.87c)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.d0b)]
- // CHECK:STDOUT: %.loc5_25.1: form = init_form %Self.binding.as_type, call_param1 [symbolic = %.loc5_25.1 (constants.%.880)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type.87c)) -> @HasF.F.%Self.binding.as_type (%Self.binding.as_type.87c);
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @ptr.as.HasF.impl.F(@ptr.as.HasF.impl.%T.loc8_14.2: type) {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)]
- // CHECK:STDOUT: %ptr.loc9_14: type = ptr_type %T [symbolic = %ptr.loc9_14 (constants.%ptr.e8f)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.loc9_14 [symbolic = %pattern_type (constants.%pattern_type.4f4)]
- // CHECK:STDOUT: %.loc9_26.1: form = init_form %ptr.loc9_14, call_param1 [symbolic = %.loc9_26.1 (constants.%.ba4)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %ptr.loc9_14 [symbolic = %require_complete (constants.%require_complete.ef1)]
- // CHECK:STDOUT: %.loc9_37.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T) [symbolic = %.loc9_37.1 (constants.%.2f2)]
- // CHECK:STDOUT: %Copy.lookup_impl_witness: <witness> = lookup_impl_witness %ptr.loc9_14, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)]
- // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc9_14, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.c25)]
- // CHECK:STDOUT: %.loc9_37.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc9_37.2 (constants.%.b46)]
- // CHECK:STDOUT: %impl.elem0.loc9_37.2: @ptr.as.HasF.impl.F.%.loc9_37.2 (%.b46) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.201)]
- // CHECK:STDOUT: %specific_impl_fn.loc9_37.2: <specific function> = specific_impl_function %impl.elem0.loc9_37.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc9_37.2 (constants.%specific_impl_fn.b84)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f)) -> @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %self.ref: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = name_ref self, %self
- // CHECK:STDOUT: %impl.elem0.loc9_37.1: @ptr.as.HasF.impl.F.%.loc9_37.2 (%.b46) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.201)]
- // CHECK:STDOUT: %bound_method.loc9_37.1: <bound method> = bound_method %self.ref, %impl.elem0.loc9_37.1
- // CHECK:STDOUT: %specific_impl_fn.loc9_37.1: <specific function> = specific_impl_function %impl.elem0.loc9_37.1, @Copy.Op(constants.%Copy.facet.c25) [symbolic = %specific_impl_fn.loc9_37.2 (constants.%specific_impl_fn.b84)]
- // CHECK:STDOUT: %bound_method.loc9_37.2: <bound method> = bound_method %self.ref, %specific_impl_fn.loc9_37.1
- // CHECK:STDOUT: %Copy.Op.call: init @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = call %bound_method.loc9_37.2(%self.ref)
- // CHECK:STDOUT: return %Copy.Op.call to %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @G(%x.param: %ptr.c28) -> %ptr.c28 {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %x.ref: %ptr.c28 = name_ref x, %x
- // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0.55d]
- // CHECK:STDOUT: %impl.elem0: %.38f = impl_witness_access constants.%HasF.impl_witness.e25, element0 [concrete = constants.%ptr.as.HasF.impl.F.8a8]
- // CHECK:STDOUT: %bound_method.loc13_11: <bound method> = bound_method %x.ref, %impl.elem0
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @ptr.as.HasF.impl.F(constants.%empty_struct_type) [concrete = constants.%ptr.as.HasF.impl.F.specific_fn]
- // CHECK:STDOUT: %bound_method.loc13_21: <bound method> = bound_method %x.ref, %specific_fn
- // CHECK:STDOUT: %ptr.as.HasF.impl.F.call: init %ptr.c28 = call %bound_method.loc13_21(%x.ref)
- // CHECK:STDOUT: return %ptr.as.HasF.impl.F.call to %return.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF.F(constants.%Self.f09) {
- // CHECK:STDOUT: %Self => constants.%Self.f09
- // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type.87c
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d0b
- // CHECK:STDOUT: %.loc5_25.1 => constants.%.880
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ptr.as.HasF.impl(constants.%T.67d) {
- // CHECK:STDOUT: %T.loc8_14.1 => constants.%T.67d
- // CHECK:STDOUT: %ptr.loc8_25.1 => constants.%ptr.e8f
- // CHECK:STDOUT: %HasF.impl_witness.loc8_35.2 => constants.%HasF.impl_witness.e63
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %ptr.as.HasF.impl.F.type => constants.%ptr.as.HasF.impl.F.type.672
- // CHECK:STDOUT: %ptr.as.HasF.impl.F => constants.%ptr.as.HasF.impl.F.dbd
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ptr.as.HasF.impl.F(constants.%T.67d) {
- // CHECK:STDOUT: %T => constants.%T.67d
- // CHECK:STDOUT: %ptr.loc9_14 => constants.%ptr.e8f
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4
- // CHECK:STDOUT: %.loc9_26.1 => constants.%.ba4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet.506) {
- // CHECK:STDOUT: %Self => constants.%HasF.facet.506
- // CHECK:STDOUT: %Self.binding.as_type => constants.%ptr.e8f
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4f4
- // CHECK:STDOUT: %.loc5_25.1 => constants.%.ba4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ptr.as.HasF.impl(constants.%empty_struct_type) {
- // CHECK:STDOUT: %T.loc8_14.1 => constants.%empty_struct_type
- // CHECK:STDOUT: %ptr.loc8_25.1 => constants.%ptr.c28
- // CHECK:STDOUT: %HasF.impl_witness.loc8_35.2 => constants.%HasF.impl_witness.e25
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %ptr.as.HasF.impl.F.type => constants.%ptr.as.HasF.impl.F.type.5bc
- // CHECK:STDOUT: %ptr.as.HasF.impl.F => constants.%ptr.as.HasF.impl.F.8a8
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @ptr.as.HasF.impl.F(constants.%empty_struct_type) {
- // CHECK:STDOUT: %T => constants.%empty_struct_type
- // CHECK:STDOUT: %ptr.loc9_14 => constants.%ptr.c28
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.1cc
- // CHECK:STDOUT: %.loc9_26.1 => constants.%.f0e
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete => constants.%complete_type
- // CHECK:STDOUT: %.loc9_37.1 => constants.%.07c
- // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.3fd
- // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.111
- // CHECK:STDOUT: %.loc9_37.2 => constants.%.38c
- // CHECK:STDOUT: %impl.elem0.loc9_37.2 => constants.%ptr.as.Copy.impl.Op.cbf
- // CHECK:STDOUT: %specific_impl_fn.loc9_37.2 => constants.%ptr.as.Copy.impl.Op.specific_fn
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- deduced_type_argument.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
- // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
- // CHECK:STDOUT: %pattern_type.d0b: type = pattern_type %Self.binding.as_type [symbolic]
- // CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
- // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete]
- // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
- // CHECK:STDOUT: %C.type: type = generic_class_type @C [concrete]
- // CHECK:STDOUT: %C.generic: %C.type = struct_value () [concrete]
- // CHECK:STDOUT: %C.5a3: type = class_type @C, @C(%T) [symbolic]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.61b: <witness> = impl_witness @C.as.HasF.impl.%HasF.impl_witness_table, @C.as.HasF.impl(%T) [symbolic]
- // CHECK:STDOUT: %pattern_type.3d5: type = pattern_type %C.5a3 [symbolic]
- // CHECK:STDOUT: %C.as.HasF.impl.F.type.fb0: type = fn_type @C.as.HasF.impl.F, @C.as.HasF.impl(%T) [symbolic]
- // CHECK:STDOUT: %C.as.HasF.impl.F.f34: %C.as.HasF.impl.F.type.fb0 = struct_value () [symbolic]
- // CHECK:STDOUT: %HasF.facet.834: %HasF.type = facet_value %C.5a3, (%HasF.impl_witness.61b) [symbolic]
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %C.5a3 [symbolic]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %C.850: type = class_type @C, @C(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %pattern_type.526: type = pattern_type %C.850 [concrete]
- // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
- // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.635: <witness> = impl_witness @C.as.HasF.impl.%HasF.impl_witness_table, @C.as.HasF.impl(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %C.as.HasF.impl.F.type.98f: type = fn_type @C.as.HasF.impl.F, @C.as.HasF.impl(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %C.as.HasF.impl.F.a6f: %C.as.HasF.impl.F.type.98f = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.facet.514: %HasF.type = facet_value %C.850, (%HasF.impl_witness.635) [concrete]
- // CHECK:STDOUT: %.d74: type = fn_type_with_self_type %HasF.F.type, %HasF.facet.514 [concrete]
- // CHECK:STDOUT: %C.as.HasF.impl.F.specific_fn: <specific function> = specific_function %C.as.HasF.impl.F.a6f, @C.as.HasF.impl.F(%empty_struct_type) [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: .HasF = %HasF.decl
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .G = %G.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
- // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [concrete = constants.%C.generic] {
- // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc8_9.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_9.1 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @C.as.HasF.impl [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_14.2 [symbolic = %T.loc10_14.1 (constants.%T)]
- // CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.1 (constants.%C.5a3)]
- // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc10_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc10_14.1 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
- // CHECK:STDOUT: %x.patt: %pattern_type.526 = value_binding_pattern x [concrete]
- // CHECK:STDOUT: %x.param_patt: %pattern_type.526 = value_param_pattern %x.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %C.850 = value_param call_param0
- // CHECK:STDOUT: %.loc14_13.1: type = splice_block %C [concrete = constants.%C.850] {
- // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [concrete = constants.%C.generic]
- // CHECK:STDOUT: %.loc14_12: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc14_13.2: type = converted %.loc14_12, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [concrete = constants.%C.850]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %x: %C.850 = value_binding x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasF {
- // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
- // CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] {
- // CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
- // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
- // CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .F = %assoc0
- // CHECK:STDOUT: witness = (%HasF.F.decl)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @C.as.HasF.impl(%T.loc10_14.2: type) {
- // CHECK:STDOUT: %T.loc10_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc10_14.1 (constants.%T)]
- // CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(%T.loc10_14.1) [symbolic = %C.loc10_27.1 (constants.%C.5a3)]
- // CHECK:STDOUT: %HasF.impl_witness.loc10_37.2: <witness> = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(%T.loc10_14.1) [symbolic = %HasF.impl_witness.loc10_37.2 (constants.%HasF.impl_witness.61b)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %C.as.HasF.impl.F.type: type = fn_type @C.as.HasF.impl.F, @C.as.HasF.impl(%T.loc10_14.1) [symbolic = %C.as.HasF.impl.F.type (constants.%C.as.HasF.impl.F.type.fb0)]
- // CHECK:STDOUT: %C.as.HasF.impl.F: @C.as.HasF.impl.%C.as.HasF.impl.F.type (%C.as.HasF.impl.F.type.fb0) = struct_value () [symbolic = %C.as.HasF.impl.F (constants.%C.as.HasF.impl.F.f34)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %C.loc10_27.2 as %HasF.ref {
- // CHECK:STDOUT: %C.as.HasF.impl.F.decl: @C.as.HasF.impl.%C.as.HasF.impl.F.type (%C.as.HasF.impl.F.type.fb0) = fn_decl @C.as.HasF.impl.F [symbolic = @C.as.HasF.impl.%C.as.HasF.impl.F (constants.%C.as.HasF.impl.F.f34)] {
- // CHECK:STDOUT: %self.patt: @C.as.HasF.impl.F.%pattern_type (%pattern_type.3d5) = value_binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @C.as.HasF.impl.F.%pattern_type (%pattern_type.3d5) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @C.as.HasF.impl.F.%C (%C.5a3) = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @C.as.HasF.impl.%C.loc10_27.2 [symbolic = %C (constants.%C.5a3)]
- // CHECK:STDOUT: %self: @C.as.HasF.impl.F.%C (%C.5a3) = value_binding self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%C.as.HasF.impl.F.decl), @C.as.HasF.impl [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.loc10_37.1: <witness> = impl_witness %HasF.impl_witness_table, @C.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc10_37.2 (constants.%HasF.impl_witness.61b)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .F = %C.as.HasF.impl.F.decl
- // CHECK:STDOUT: witness = %HasF.impl_witness.loc10_37.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic class @C(%T.loc8_9.2: type) {
- // CHECK:STDOUT: %T.loc8_9.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_9.1 (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: class {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C.5a3
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) {
- // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.d0b)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type));
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @C.as.HasF.impl.F(@C.as.HasF.impl.%T.loc10_14.2: type) {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %C: type = class_type @C, @C(%T) [symbolic = %C (constants.%C.5a3)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %C [symbolic = %pattern_type (constants.%pattern_type.3d5)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %C [symbolic = %require_complete (constants.%require_complete)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @C.as.HasF.impl.F.%C (%C.5a3)) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @G(%x.param: %C.850) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %x.ref: %C.850 = name_ref x, %x
- // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0]
- // CHECK:STDOUT: %impl.elem0: %.d74 = impl_witness_access constants.%HasF.impl_witness.635, element0 [concrete = constants.%C.as.HasF.impl.F.a6f]
- // CHECK:STDOUT: %bound_method.loc15_4: <bound method> = bound_method %x.ref, %impl.elem0
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @C.as.HasF.impl.F(constants.%empty_struct_type) [concrete = constants.%C.as.HasF.impl.F.specific_fn]
- // CHECK:STDOUT: %bound_method.loc15_14: <bound method> = bound_method %x.ref, %specific_fn
- // CHECK:STDOUT: %C.as.HasF.impl.F.call: init %empty_tuple.type = call %bound_method.loc15_14(%x.ref)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF.F(constants.%Self) {
- // CHECK:STDOUT: %Self => constants.%Self
- // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d0b
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C(constants.%T) {
- // CHECK:STDOUT: %T.loc8_9.1 => constants.%T
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C.as.HasF.impl(constants.%T) {
- // CHECK:STDOUT: %T.loc10_14.1 => constants.%T
- // CHECK:STDOUT: %C.loc10_27.1 => constants.%C.5a3
- // CHECK:STDOUT: %HasF.impl_witness.loc10_37.2 => constants.%HasF.impl_witness.61b
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %C.as.HasF.impl.F.type => constants.%C.as.HasF.impl.F.type.fb0
- // CHECK:STDOUT: %C.as.HasF.impl.F => constants.%C.as.HasF.impl.F.f34
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C.as.HasF.impl.F(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %C => constants.%C.5a3
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3d5
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF.F(constants.%HasF.facet.834) {
- // CHECK:STDOUT: %Self => constants.%HasF.facet.834
- // CHECK:STDOUT: %Self.binding.as_type => constants.%C.5a3
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.3d5
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C(constants.%empty_struct_type) {
- // CHECK:STDOUT: %T.loc8_9.1 => constants.%empty_struct_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C.as.HasF.impl(constants.%empty_struct_type) {
- // CHECK:STDOUT: %T.loc10_14.1 => constants.%empty_struct_type
- // CHECK:STDOUT: %C.loc10_27.1 => constants.%C.850
- // CHECK:STDOUT: %HasF.impl_witness.loc10_37.2 => constants.%HasF.impl_witness.635
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %C.as.HasF.impl.F.type => constants.%C.as.HasF.impl.F.type.98f
- // CHECK:STDOUT: %C.as.HasF.impl.F => constants.%C.as.HasF.impl.F.a6f
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @C.as.HasF.impl.F(constants.%empty_struct_type) {
- // CHECK:STDOUT: %T => constants.%empty_struct_type
- // CHECK:STDOUT: %C => constants.%C.850
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.526
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete => constants.%complete_type
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- deduced_interface_argument.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
- // CHECK:STDOUT: %HasF.type.ee1: type = generic_interface_type @HasF [concrete]
- // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
- // CHECK:STDOUT: %HasF.generic: %HasF.type.ee1 = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.type.8a4: type = facet_type <@HasF, @HasF(%T)> [symbolic]
- // CHECK:STDOUT: %Self.c1f: %HasF.type.8a4 = symbolic_binding Self, 1 [symbolic]
- // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.c1f [symbolic]
- // CHECK:STDOUT: %pattern_type.969: type = pattern_type %Self.binding.as_type [symbolic]
- // CHECK:STDOUT: %HasF.F.type.607: type = fn_type @HasF.F, @HasF(%T) [symbolic]
- // CHECK:STDOUT: %HasF.F.39f: %HasF.F.type.607 = struct_value () [symbolic]
- // CHECK:STDOUT: %HasF.assoc_type.196: type = assoc_entity_type @HasF, @HasF(%T) [symbolic]
- // CHECK:STDOUT: %assoc0.303: %HasF.assoc_type.196 = assoc_entity element0, @HasF.%HasF.F.decl [symbolic]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.63f: <witness> = impl_witness @empty_struct_type.as.HasF.impl.%HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%T) [symbolic]
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.8a4 [symbolic]
- // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type.1d0: type = fn_type @empty_struct_type.as.HasF.impl.F, @empty_struct_type.as.HasF.impl(%T) [symbolic]
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.e82: %empty_struct_type.as.HasF.impl.F.type.1d0 = struct_value () [symbolic]
- // CHECK:STDOUT: %HasF.facet.1a2: %HasF.type.8a4 = facet_value %empty_struct_type, (%HasF.impl_witness.63f) [symbolic]
- // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
- // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.type.9d3: type = facet_type <@HasF, @HasF(%empty_struct_type)> [concrete]
- // CHECK:STDOUT: %Self.167: %HasF.type.9d3 = symbolic_binding Self, 1 [symbolic]
- // CHECK:STDOUT: %HasF.F.type.9d7: type = fn_type @HasF.F, @HasF(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %HasF.F.6a4: %HasF.F.type.9d7 = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.assoc_type.78b: type = assoc_entity_type @HasF, @HasF(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %assoc0.ed4: %HasF.assoc_type.78b = assoc_entity element0, @HasF.%HasF.F.decl [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.95e: <witness> = impl_witness @empty_struct_type.as.HasF.impl.%HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %HasF.type.9d3 [concrete]
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type.0e6: type = fn_type @empty_struct_type.as.HasF.impl.F, @empty_struct_type.as.HasF.impl(%empty_struct_type) [concrete]
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.a41: %empty_struct_type.as.HasF.impl.F.type.0e6 = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.facet.d0d: %HasF.type.9d3 = facet_value %empty_struct_type, (%HasF.impl_witness.95e) [concrete]
- // CHECK:STDOUT: %.dab: type = fn_type_with_self_type %HasF.F.type.9d7, %HasF.facet.d0d [concrete]
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.specific_fn: <specific function> = specific_function %empty_struct_type.as.HasF.impl.F.a41, @empty_struct_type.as.HasF.impl.F(%empty_struct_type) [concrete]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // 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: .HasF = %HasF.decl
- // CHECK:STDOUT: .G = %G.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %HasF.decl: %HasF.type.ee1 = interface_decl @HasF [concrete = constants.%HasF.generic] {
- // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @empty_struct_type.as.HasF.impl [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %.loc8_25.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc8_25.2: type = converted %.loc8_25.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %HasF.ref: %HasF.type.ee1 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)]
- // CHECK:STDOUT: %HasF.type.loc8_36.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_36.1 (constants.%HasF.type.8a4)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
- // CHECK:STDOUT: %x.patt: %pattern_type.a96 = value_binding_pattern x [concrete]
- // CHECK:STDOUT: %x.param_patt: %pattern_type.a96 = value_param_pattern %x.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %empty_struct_type = value_param call_param0
- // CHECK:STDOUT: %.loc12_10.1: type = splice_block %.loc12_10.3 [concrete = constants.%empty_struct_type] {
- // CHECK:STDOUT: %.loc12_10.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc12_10.3: type = converted %.loc12_10.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @HasF(%T.loc4_16.2: type) {
- // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_16.1)> [symbolic = %HasF.type (constants.%HasF.type.8a4)]
- // CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)]
- // CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F, @HasF(%T.loc4_16.1) [symbolic = %HasF.F.type (constants.%HasF.F.type.607)]
- // CHECK:STDOUT: %HasF.F: @HasF.%HasF.F.type (%HasF.F.type.607) = struct_value () [symbolic = %HasF.F (constants.%HasF.F.39f)]
- // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF, @HasF(%T.loc4_16.1) [symbolic = %HasF.assoc_type (constants.%HasF.assoc_type.196)]
- // CHECK:STDOUT: %assoc0.loc5_21.2: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.303)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)]
- // CHECK:STDOUT: %HasF.F.decl: @HasF.%HasF.F.type (%HasF.F.type.607) = fn_decl @HasF.F [symbolic = @HasF.%HasF.F (constants.%HasF.F.39f)] {
- // CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.969) = value_binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.969) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
- // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
- // CHECK:STDOUT: %.loc5_14.2: @HasF.F.%HasF.type (%HasF.type.8a4) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.c1f)]
- // CHECK:STDOUT: %Self.ref: @HasF.F.%HasF.type (%HasF.type.8a4) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.c1f)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %assoc0.loc5_21.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.303)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self.loc4_26.1
- // CHECK:STDOUT: .F = %assoc0.loc5_21.1
- // CHECK:STDOUT: witness = (%HasF.F.decl)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @empty_struct_type.as.HasF.impl(%T.loc8_14.2: type) {
- // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
- // CHECK:STDOUT: %HasF.type.loc8_36.1: type = facet_type <@HasF, @HasF(%T.loc8_14.1)> [symbolic = %HasF.type.loc8_36.1 (constants.%HasF.type.8a4)]
- // CHECK:STDOUT: %HasF.impl_witness.loc8_38.2: <witness> = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(%T.loc8_14.1) [symbolic = %HasF.impl_witness.loc8_38.2 (constants.%HasF.impl_witness.63f)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.loc8_36.1 [symbolic = %require_complete (constants.%require_complete)]
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type: type = fn_type @empty_struct_type.as.HasF.impl.F, @empty_struct_type.as.HasF.impl(%T.loc8_14.1) [symbolic = %empty_struct_type.as.HasF.impl.F.type (constants.%empty_struct_type.as.HasF.impl.F.type.1d0)]
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F: @empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F.type (%empty_struct_type.as.HasF.impl.F.type.1d0) = struct_value () [symbolic = %empty_struct_type.as.HasF.impl.F (constants.%empty_struct_type.as.HasF.impl.F.e82)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %.loc8_25.2 as %HasF.type.loc8_36.2 {
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.decl: @empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F.type (%empty_struct_type.as.HasF.impl.F.type.1d0) = fn_decl @empty_struct_type.as.HasF.impl.F [symbolic = @empty_struct_type.as.HasF.impl.%empty_struct_type.as.HasF.impl.F (constants.%empty_struct_type.as.HasF.impl.F.e82)] {
- // CHECK:STDOUT: %self.patt: %pattern_type.a96 = value_binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: %pattern_type.a96 = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: %empty_struct_type = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @empty_struct_type.as.HasF.impl.%.loc8_25.2 [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %self: %empty_struct_type = value_binding self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%empty_struct_type.as.HasF.impl.F.decl), @empty_struct_type.as.HasF.impl [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.loc8_38.1: <witness> = impl_witness %HasF.impl_witness_table, @empty_struct_type.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_38.2 (constants.%HasF.impl_witness.63f)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .F = %empty_struct_type.as.HasF.impl.F.decl
- // CHECK:STDOUT: witness = %HasF.impl_witness.loc8_38.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @HasF.F(@HasF.%T.loc4_16.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4)) {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.8a4)]
- // CHECK:STDOUT: %Self: @HasF.F.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1f)]
- // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.969)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type));
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @empty_struct_type.as.HasF.impl.F(@empty_struct_type.as.HasF.impl.%T.loc8_14.2: type) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: %empty_struct_type) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @G(%x.param: %empty_struct_type) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x
- // CHECK:STDOUT: %HasF.ref: %HasF.type.ee1 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
- // CHECK:STDOUT: %.loc13_12: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc13_13: type = converted %.loc13_12, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%empty_struct_type)> [concrete = constants.%HasF.type.9d3]
- // CHECK:STDOUT: %.loc13_14: %HasF.assoc_type.78b = specific_constant @HasF.%assoc0.loc5_21.1, @HasF(constants.%empty_struct_type) [concrete = constants.%assoc0.ed4]
- // CHECK:STDOUT: %F.ref: %HasF.assoc_type.78b = name_ref F, %.loc13_14 [concrete = constants.%assoc0.ed4]
- // CHECK:STDOUT: %impl.elem0: %.dab = impl_witness_access constants.%HasF.impl_witness.95e, element0 [concrete = constants.%empty_struct_type.as.HasF.impl.F.a41]
- // CHECK:STDOUT: %bound_method.loc13_4: <bound method> = bound_method %x.ref, %impl.elem0
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @empty_struct_type.as.HasF.impl.F(constants.%empty_struct_type) [concrete = constants.%empty_struct_type.as.HasF.impl.F.specific_fn]
- // CHECK:STDOUT: %bound_method.loc13_18: <bound method> = bound_method %x.ref, %specific_fn
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.call: init %empty_tuple.type = call %bound_method.loc13_18(%x.ref)
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF(constants.%T) {
- // CHECK:STDOUT: %T.loc4_16.1 => constants.%T
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
- // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.c1f
- // CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.607
- // CHECK:STDOUT: %HasF.F => constants.%HasF.F.39f
- // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.196
- // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.303
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF.F(constants.%T, constants.%Self.c1f) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
- // CHECK:STDOUT: %Self => constants.%Self.c1f
- // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.969
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl(constants.%T) {
- // CHECK:STDOUT: %T.loc8_14.1 => constants.%T
- // CHECK:STDOUT: %HasF.type.loc8_36.1 => constants.%HasF.type.8a4
- // CHECK:STDOUT: %HasF.impl_witness.loc8_38.2 => constants.%HasF.impl_witness.63f
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete => constants.%require_complete
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type => constants.%empty_struct_type.as.HasF.impl.F.type.1d0
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F => constants.%empty_struct_type.as.HasF.impl.F.e82
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl.F(constants.%T) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF.F(constants.%T, constants.%HasF.facet.1a2) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
- // CHECK:STDOUT: %Self => constants.%HasF.facet.1a2
- // CHECK:STDOUT: %Self.binding.as_type => constants.%empty_struct_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.a96
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF(constants.%empty_struct_type) {
- // CHECK:STDOUT: %T.loc4_16.1 => constants.%empty_struct_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %HasF.type => constants.%HasF.type.9d3
- // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.167
- // CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.9d7
- // CHECK:STDOUT: %HasF.F => constants.%HasF.F.6a4
- // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.78b
- // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.ed4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl(constants.%empty_struct_type) {
- // CHECK:STDOUT: %T.loc8_14.1 => constants.%empty_struct_type
- // CHECK:STDOUT: %HasF.type.loc8_36.1 => constants.%HasF.type.9d3
- // CHECK:STDOUT: %HasF.impl_witness.loc8_38.2 => constants.%HasF.impl_witness.95e
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete => constants.%complete_type
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F.type => constants.%empty_struct_type.as.HasF.impl.F.type.0e6
- // CHECK:STDOUT: %empty_struct_type.as.HasF.impl.F => constants.%empty_struct_type.as.HasF.impl.F.a41
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @empty_struct_type.as.HasF.impl.F(constants.%empty_struct_type) {
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_incomplete_deduction.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [concrete]
- // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic]
- // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic]
- // CHECK:STDOUT: %pattern_type.d0b: type = pattern_type %Self.binding.as_type [symbolic]
- // CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F [concrete]
- // CHECK:STDOUT: %HasF.F: %HasF.F.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF [concrete]
- // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.%HasF.F.decl [concrete]
- // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
- // CHECK:STDOUT: %U: type = symbolic_binding U, 1 [symbolic]
- // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness @T.as.HasF.impl.%HasF.impl_witness_table, @T.as.HasF.impl(%T, %U) [symbolic]
- // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic]
- // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T, %U) [symbolic]
- // CHECK:STDOUT: %T.as.HasF.impl.F: %T.as.HasF.impl.F.type = struct_value () [symbolic]
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
- // CHECK:STDOUT: %pattern_type.a96: type = pattern_type %empty_struct_type [concrete]
- // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
- // CHECK:STDOUT: %G: %G.type = struct_value () [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: .HasF = %HasF.decl
- // CHECK:STDOUT: .G = %G.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %HasF.decl: type = interface_decl @HasF [concrete = constants.%HasF.type] {} {}
- // CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: %U.patt: %pattern_type.98f = symbolic_binding_pattern U, 1 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_14.2 [symbolic = %T.loc12_14.1 (constants.%T)]
- // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc12_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc12_14.1 (constants.%T)]
- // CHECK:STDOUT: %.Self.2: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %U.loc12_24.2: type = symbolic_binding U, 1 [symbolic = %U.loc12_24.1 (constants.%U)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
- // CHECK:STDOUT: %x.patt: %pattern_type.a96 = value_binding_pattern x [concrete]
- // CHECK:STDOUT: %x.param_patt: %pattern_type.a96 = value_param_pattern %x.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %empty_struct_type = value_param call_param0
- // CHECK:STDOUT: %.loc16_10.1: type = splice_block %.loc16_10.3 [concrete = constants.%empty_struct_type] {
- // CHECK:STDOUT: %.loc16_10.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
- // CHECK:STDOUT: %.loc16_10.3: type = converted %.loc16_10.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %x: %empty_struct_type = value_binding x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface @HasF {
- // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = constants.%Self]
- // CHECK:STDOUT: %HasF.F.decl: %HasF.F.type = fn_decl @HasF.F [concrete = constants.%HasF.F] {
- // CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.d0b) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
- // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.2 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
- // CHECK:STDOUT: %Self.ref: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %assoc0: %HasF.assoc_type = assoc_entity element0, %HasF.F.decl [concrete = constants.%assoc0]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self
- // CHECK:STDOUT: .F = %assoc0
- // CHECK:STDOUT: witness = (%HasF.F.decl)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc12_14.2: type, %U.loc12_24.2: type) {
- // CHECK:STDOUT: %T.loc12_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc12_14.1 (constants.%T)]
- // CHECK:STDOUT: %U.loc12_24.1: type = symbolic_binding U, 1 [symbolic = %U.loc12_24.1 (constants.%U)]
- // CHECK:STDOUT: %HasF.impl_witness.loc12_44.2: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc12_14.1, %U.loc12_24.1) [symbolic = %HasF.impl_witness.loc12_44.2 (constants.%HasF.impl_witness)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc12_14.1, %U.loc12_24.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type)]
- // CHECK:STDOUT: %T.as.HasF.impl.F: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = struct_value () [symbolic = %T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %T.ref as %HasF.ref {
- // CHECK:STDOUT: %T.as.HasF.impl.F.decl: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = fn_decl @T.as.HasF.impl.F [symbolic = @T.as.HasF.impl.%T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)] {
- // CHECK:STDOUT: %self.patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = value_binding self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (), @T.as.HasF.impl [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.loc12_44.1: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T, constants.%U) [symbolic = %HasF.impl_witness.loc12_44.2 (constants.%HasF.impl_witness)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
- // CHECK:STDOUT: witness = <error>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @HasF.F(@HasF.%Self: %HasF.type) {
- // CHECK:STDOUT: %Self: %HasF.type = symbolic_binding Self, 0 [symbolic = %Self (constants.%Self)]
- // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 0, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.d0b)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type));
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc12_14.2: type, @T.as.HasF.impl.%U.loc12_24.2: type) {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic = %require_complete (constants.%require_complete)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @T.as.HasF.impl.F.%T (%T)) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @G(%x.param: %empty_struct_type) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %x.ref: %empty_struct_type = name_ref x, %x
- // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.type]
- // CHECK:STDOUT: %F.ref: %HasF.assoc_type = name_ref F, @HasF.%assoc0 [concrete = constants.%assoc0]
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF.F(constants.%Self) {
- // CHECK:STDOUT: %Self => constants.%Self
- // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.d0b
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T, constants.%U) {
- // CHECK:STDOUT: %T.loc12_14.1 => constants.%T
- // CHECK:STDOUT: %U.loc12_24.1 => constants.%U
- // CHECK:STDOUT: %HasF.impl_witness.loc12_44.2 => constants.%HasF.impl_witness
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type
- // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%T, constants.%U) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_inconsistent_deduction.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %type: type = facet_type <type> [concrete]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self]
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic]
- // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
- // CHECK:STDOUT: %HasF.type.ee1: type = generic_interface_type @HasF [concrete]
- // CHECK:STDOUT: %HasF.generic: %HasF.type.ee1 = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.type.8a4: type = facet_type <@HasF, @HasF(%T)> [symbolic]
- // CHECK:STDOUT: %Self.c1f: %HasF.type.8a4 = symbolic_binding Self, 1 [symbolic]
- // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self.c1f [symbolic]
- // CHECK:STDOUT: %pattern_type.969: type = pattern_type %Self.binding.as_type [symbolic]
- // CHECK:STDOUT: %HasF.F.type.607: type = fn_type @HasF.F, @HasF(%T) [symbolic]
- // CHECK:STDOUT: %HasF.F.39f: %HasF.F.type.607 = struct_value () [symbolic]
- // CHECK:STDOUT: %HasF.assoc_type.196: type = assoc_entity_type @HasF, @HasF(%T) [symbolic]
- // CHECK:STDOUT: %assoc0.303: %HasF.assoc_type.196 = assoc_entity element0, @HasF.%HasF.F.decl [symbolic]
- // CHECK:STDOUT: %HasF.impl_witness: <witness> = impl_witness @T.as.HasF.impl.%HasF.impl_witness_table, @T.as.HasF.impl(%T) [symbolic]
- // CHECK:STDOUT: %require_complete.5da: <witness> = require_complete_type %HasF.type.8a4 [symbolic]
- // CHECK:STDOUT: %pattern_type.51d: type = pattern_type %T [symbolic]
- // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T) [symbolic]
- // CHECK:STDOUT: %T.as.HasF.impl.F: %T.as.HasF.impl.F.type = struct_value () [symbolic]
- // CHECK:STDOUT: %HasF.facet: %HasF.type.8a4 = facet_value %T, (%HasF.impl_witness) [symbolic]
- // CHECK:STDOUT: %require_complete.944: <witness> = require_complete_type %T [symbolic]
- // CHECK:STDOUT: %A: type = class_type @A [concrete]
- // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
- // CHECK:STDOUT: %B: type = class_type @B [concrete]
- // CHECK:STDOUT: %pattern_type.1ab: type = pattern_type %A [concrete]
- // CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
- // CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.type.4ef: type = facet_type <@HasF, @HasF(%B)> [concrete]
- // CHECK:STDOUT: %Self.a94: %HasF.type.4ef = symbolic_binding Self, 1 [symbolic]
- // CHECK:STDOUT: %HasF.F.type.c38: type = fn_type @HasF.F, @HasF(%B) [concrete]
- // CHECK:STDOUT: %HasF.F.bbb: %HasF.F.type.c38 = struct_value () [concrete]
- // CHECK:STDOUT: %HasF.assoc_type.e4f: type = assoc_entity_type @HasF, @HasF(%B) [concrete]
- // CHECK:STDOUT: %assoc0.096: %HasF.assoc_type.e4f = assoc_entity element0, @HasF.%HasF.F.decl [concrete]
- // CHECK:STDOUT: }
- // 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: .HasF = %HasF.decl
- // CHECK:STDOUT: .A = %A.decl
- // CHECK:STDOUT: .B = %B.decl
- // CHECK:STDOUT: .G = %G.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Core.import = import Core
- // CHECK:STDOUT: %HasF.decl: %HasF.type.ee1 = interface_decl @HasF [concrete = constants.%HasF.generic] {
- // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc4_16.2: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: impl_decl @T.as.HasF.impl [concrete] {
- // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %T.ref.loc8_24: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)]
- // CHECK:STDOUT: %HasF.ref: %HasF.type.ee1 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
- // CHECK:STDOUT: %T.ref.loc8_34: type = name_ref T, %T.loc8_14.2 [symbolic = %T.loc8_14.1 (constants.%T)]
- // CHECK:STDOUT: %HasF.type.loc8_35.2: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.8a4)]
- // CHECK:STDOUT: %.Self: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
- // CHECK:STDOUT: %T.loc8_14.2: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %A.decl: type = class_decl @A [concrete = constants.%A] {} {}
- // CHECK:STDOUT: %B.decl: type = class_decl @B [concrete = constants.%B] {} {}
- // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [concrete = constants.%G] {
- // CHECK:STDOUT: %x.patt: %pattern_type.1ab = value_binding_pattern x [concrete]
- // CHECK:STDOUT: %x.param_patt: %pattern_type.1ab = value_param_pattern %x.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %x.param: %A = value_param call_param0
- // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
- // CHECK:STDOUT: %x: %A = value_binding x, %x.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @HasF(%T.loc4_16.2: type) {
- // CHECK:STDOUT: %T.loc4_16.1: type = symbolic_binding T, 0 [symbolic = %T.loc4_16.1 (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T.loc4_16.1)> [symbolic = %HasF.type (constants.%HasF.type.8a4)]
- // CHECK:STDOUT: %Self.loc4_26.2: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)]
- // CHECK:STDOUT: %HasF.F.type: type = fn_type @HasF.F, @HasF(%T.loc4_16.1) [symbolic = %HasF.F.type (constants.%HasF.F.type.607)]
- // CHECK:STDOUT: %HasF.F: @HasF.%HasF.F.type (%HasF.F.type.607) = struct_value () [symbolic = %HasF.F (constants.%HasF.F.39f)]
- // CHECK:STDOUT: %HasF.assoc_type: type = assoc_entity_type @HasF, @HasF(%T.loc4_16.1) [symbolic = %HasF.assoc_type (constants.%HasF.assoc_type.196)]
- // CHECK:STDOUT: %assoc0.loc5_21.2: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.303)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: %Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self.loc4_26.2 (constants.%Self.c1f)]
- // CHECK:STDOUT: %HasF.F.decl: @HasF.%HasF.F.type (%HasF.F.type.607) = fn_decl @HasF.F [symbolic = @HasF.%HasF.F (constants.%HasF.F.39f)] {
- // CHECK:STDOUT: %self.patt: @HasF.F.%pattern_type (%pattern_type.969) = value_binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @HasF.F.%pattern_type (%pattern_type.969) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_param call_param0
- // CHECK:STDOUT: %.loc5_14.1: type = splice_block %.loc5_14.3 [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)] {
- // CHECK:STDOUT: %.loc5_14.2: @HasF.F.%HasF.type (%HasF.type.8a4) = specific_constant @HasF.%Self.loc4_26.1, @HasF(constants.%T) [symbolic = %Self (constants.%Self.c1f)]
- // CHECK:STDOUT: %Self.ref: @HasF.F.%HasF.type (%HasF.type.8a4) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self.c1f)]
- // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self.ref [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %Self.as_type [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %self: @HasF.F.%Self.binding.as_type (%Self.binding.as_type) = value_binding self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %assoc0.loc5_21.1: @HasF.%HasF.assoc_type (%HasF.assoc_type.196) = assoc_entity element0, %HasF.F.decl [symbolic = %assoc0.loc5_21.2 (constants.%assoc0.303)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self.loc4_26.1
- // CHECK:STDOUT: .F = %assoc0.loc5_21.1
- // CHECK:STDOUT: witness = (%HasF.F.decl)
- // CHECK:STDOUT:
- // CHECK:STDOUT: !requires:
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic impl @T.as.HasF.impl(%T.loc8_14.2: type) {
- // CHECK:STDOUT: %T.loc8_14.1: type = symbolic_binding T, 0 [symbolic = %T.loc8_14.1 (constants.%T)]
- // CHECK:STDOUT: %HasF.type.loc8_35.1: type = facet_type <@HasF, @HasF(%T.loc8_14.1)> [symbolic = %HasF.type.loc8_35.1 (constants.%HasF.type.8a4)]
- // CHECK:STDOUT: %HasF.impl_witness.loc8_37.2: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(%T.loc8_14.1) [symbolic = %HasF.impl_witness.loc8_37.2 (constants.%HasF.impl_witness)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %HasF.type.loc8_35.1 [symbolic = %require_complete (constants.%require_complete.5da)]
- // CHECK:STDOUT: %T.as.HasF.impl.F.type: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T.loc8_14.1) [symbolic = %T.as.HasF.impl.F.type (constants.%T.as.HasF.impl.F.type)]
- // CHECK:STDOUT: %T.as.HasF.impl.F: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = struct_value () [symbolic = %T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl: %T.ref.loc8_24 as %HasF.type.loc8_35.2 {
- // CHECK:STDOUT: %T.as.HasF.impl.F.decl: @T.as.HasF.impl.%T.as.HasF.impl.F.type (%T.as.HasF.impl.F.type) = fn_decl @T.as.HasF.impl.F [symbolic = @T.as.HasF.impl.%T.as.HasF.impl.F (constants.%T.as.HasF.impl.F)] {
- // CHECK:STDOUT: %self.patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_binding_pattern self [concrete]
- // CHECK:STDOUT: %self.param_patt: @T.as.HasF.impl.F.%pattern_type (%pattern_type.51d) = value_param_pattern %self.patt, call_param0 [concrete]
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %self.param: @T.as.HasF.impl.F.%T (%T) = value_param call_param0
- // CHECK:STDOUT: %Self.ref: type = name_ref Self, @T.as.HasF.impl.%T.ref.loc8_24 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %self: @T.as.HasF.impl.F.%T (%T) = value_binding self, %self.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %HasF.impl_witness_table = impl_witness_table (%T.as.HasF.impl.F.decl), @T.as.HasF.impl [concrete]
- // CHECK:STDOUT: %HasF.impl_witness.loc8_37.1: <witness> = impl_witness %HasF.impl_witness_table, @T.as.HasF.impl(constants.%T) [symbolic = %HasF.impl_witness.loc8_37.2 (constants.%HasF.impl_witness)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .F = %T.as.HasF.impl.F.decl
- // CHECK:STDOUT: witness = %HasF.impl_witness.loc8_37.1
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @A {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%A
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @B {
- // CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type]
- // CHECK:STDOUT: complete_type_witness = %complete_type
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%B
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @HasF.F(@HasF.%T.loc4_16.2: type, @HasF.%Self.loc4_26.1: @HasF.%HasF.type (%HasF.type.8a4)) {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(%T)> [symbolic = %HasF.type (constants.%HasF.type.8a4)]
- // CHECK:STDOUT: %Self: @HasF.F.%HasF.type (%HasF.type.8a4) = symbolic_binding Self, 1 [symbolic = %Self (constants.%Self.c1f)]
- // CHECK:STDOUT: %Self.binding.as_type: type = symbolic_binding_type Self, 1, %Self [symbolic = %Self.binding.as_type (constants.%Self.binding.as_type)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.969)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @HasF.F.%Self.binding.as_type (%Self.binding.as_type));
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @T.as.HasF.impl.F(@T.as.HasF.impl.%T.loc8_14.2: type) {
- // CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %pattern_type: type = pattern_type %T [symbolic = %pattern_type (constants.%pattern_type.51d)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete: <witness> = require_complete_type %T [symbolic = %require_complete (constants.%require_complete.944)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn(%self.param: @T.as.HasF.impl.F.%T (%T)) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @G(%x.param: %A) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %x.ref: %A = name_ref x, %x
- // CHECK:STDOUT: %HasF.ref: %HasF.type.ee1 = name_ref HasF, file.%HasF.decl [concrete = constants.%HasF.generic]
- // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B]
- // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%B)> [concrete = constants.%HasF.type.4ef]
- // CHECK:STDOUT: %.loc22: %HasF.assoc_type.e4f = specific_constant @HasF.%assoc0.loc5_21.1, @HasF(constants.%B) [concrete = constants.%assoc0.096]
- // CHECK:STDOUT: %F.ref: %HasF.assoc_type.e4f = name_ref F, %.loc22 [concrete = constants.%assoc0.096]
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF(constants.%T) {
- // CHECK:STDOUT: %T.loc4_16.1 => constants.%T
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
- // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.c1f
- // CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.607
- // CHECK:STDOUT: %HasF.F => constants.%HasF.F.39f
- // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.196
- // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.303
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF.F(constants.%T, constants.%Self.c1f) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
- // CHECK:STDOUT: %Self => constants.%Self.c1f
- // CHECK:STDOUT: %Self.binding.as_type => constants.%Self.binding.as_type
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.969
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @T.as.HasF.impl(constants.%T) {
- // CHECK:STDOUT: %T.loc8_14.1 => constants.%T
- // CHECK:STDOUT: %HasF.type.loc8_35.1 => constants.%HasF.type.8a4
- // CHECK:STDOUT: %HasF.impl_witness.loc8_37.2 => constants.%HasF.impl_witness
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %require_complete => constants.%require_complete.5da
- // CHECK:STDOUT: %T.as.HasF.impl.F.type => constants.%T.as.HasF.impl.F.type
- // CHECK:STDOUT: %T.as.HasF.impl.F => constants.%T.as.HasF.impl.F
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @T.as.HasF.impl.F(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF.F(constants.%T, constants.%HasF.facet) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: %HasF.type => constants.%HasF.type.8a4
- // CHECK:STDOUT: %Self => constants.%HasF.facet
- // CHECK:STDOUT: %Self.binding.as_type => constants.%T
- // CHECK:STDOUT: %pattern_type => constants.%pattern_type.51d
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @HasF(constants.%B) {
- // CHECK:STDOUT: %T.loc4_16.1 => constants.%B
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %HasF.type => constants.%HasF.type.4ef
- // CHECK:STDOUT: %Self.loc4_26.2 => constants.%Self.a94
- // CHECK:STDOUT: %HasF.F.type => constants.%HasF.F.type.c38
- // CHECK:STDOUT: %HasF.F => constants.%HasF.F.bbb
- // CHECK:STDOUT: %HasF.assoc_type => constants.%HasF.assoc_type.e4f
- // CHECK:STDOUT: %assoc0.loc5_21.2 => constants.%assoc0.096
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|