| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016 |
- // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
- // Exceptions. See /LICENSE for license information.
- // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- //
- // AUTOUPDATE
- // TIP: To test this file alone, run:
- // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/no_prelude/interface_args.carbon
- // TIP: To dump output, run:
- // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/no_prelude/interface_args.carbon
- // --- action.carbon
- library "[[@TEST_NAME]]";
- interface Action(T:! type) {
- fn Op();
- }
- class A {}
- class B {}
- class C {}
- impl A as Action(B) {
- fn Op() {}
- }
- fn F(a: A) { a.(Action(B).Op)(); }
- // --- action.impl.carbon
- impl library "[[@TEST_NAME]]";
- fn G(a: A) { a.(Action(B).Op)(); }
- // --- fail_action.impl.carbon
- impl library "[[@TEST_NAME]]";
- // CHECK:STDERR: fail_action.impl.carbon:[[@LINE+4]]:14: error: cannot access member of interface `Action` in type `A` that does not implement that interface
- // CHECK:STDERR: fn G(a: A) { a.(Action(C).Op)(); }
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~
- // CHECK:STDERR:
- fn G(a: A) { a.(Action(C).Op)(); }
- // --- factory.carbon
- library "[[@TEST_NAME]]";
- interface Factory(T:! type) {
- fn Make() -> T;
- }
- class A {}
- class B {}
- impl A as Factory(B) {
- fn Make() -> B;
- }
- // --- factory.impl.carbon
- impl library "[[@TEST_NAME]]";
- fn MakeB(a: A) -> B {
- return a.(Factory(B).Make)();
- }
- // --- fail_factory.impl.carbon
- impl library "[[@TEST_NAME]]";
- class C {}
- fn MakeC(a: A) -> C {
- // CHECK:STDERR: fail_factory.impl.carbon:[[@LINE+3]]:10: error: cannot access member of interface `Factory` in type `A` that does not implement that interface
- // CHECK:STDERR: return a.(Factory(C).Make)();
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
- return a.(Factory(C).Make)();
- }
- // CHECK:STDOUT: --- action.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %Action.type.1: type = generic_interface_type @Action [template]
- // CHECK:STDOUT: %.1: type = tuple_type () [template]
- // CHECK:STDOUT: %Action: %Action.type.1 = struct_value () [template]
- // CHECK:STDOUT: %Action.type.2: type = interface_type @Action, @Action(%T) [symbolic]
- // CHECK:STDOUT: %Self: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1, @Action(%T) [symbolic]
- // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [symbolic]
- // CHECK:STDOUT: %.2: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic]
- // CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Action.%Op.decl [symbolic]
- // CHECK:STDOUT: %A: type = class_type @A [template]
- // CHECK:STDOUT: %.4: type = struct_type {} [template]
- // CHECK:STDOUT: %.5: <witness> = complete_type_witness %.4 [template]
- // CHECK:STDOUT: %B: type = class_type @B [template]
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %Action.type.3: type = interface_type @Action, @Action(%B) [template]
- // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template]
- // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template]
- // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.1, @Action(%B) [template]
- // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template]
- // CHECK:STDOUT: %.6: type = assoc_entity_type %Action.type.3, %Op.type.3 [template]
- // CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @Action.%Op.decl [template]
- // CHECK:STDOUT: %.8: <witness> = interface_witness (%Op.2) [template]
- // CHECK:STDOUT: %F.type: type = fn_type @F [template]
- // CHECK:STDOUT: %F: %F.type = struct_value () [template]
- // CHECK:STDOUT: %.9: type = ptr_type %.4 [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Action = %Action.decl
- // CHECK:STDOUT: .A = %A.decl
- // CHECK:STDOUT: .B = %B.decl
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .F = %F.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Action.decl: %Action.type.1 = interface_decl @Action [template = constants.%Action] {
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %T.param: type = param T, runtime_param<invalid>
- // CHECK:STDOUT: %T.loc4_18.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_18.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {}
- // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {}
- // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
- // CHECK:STDOUT: impl_decl @impl [template] {} {
- // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A]
- // CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, file.%Action.decl [template = constants.%Action]
- // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B]
- // CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(constants.%B) [template = constants.%Action.type.3]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
- // CHECK:STDOUT: %a.patt: %A = binding_pattern a
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A]
- // CHECK:STDOUT: %a.param: %A = param a, runtime_param0
- // CHECK:STDOUT: %a: %A = bind_name a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @Action(%T.loc4_18.1: type) {
- // CHECK:STDOUT: %T.loc4_18.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_18.2 (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(%T.loc4_18.2) [symbolic = %Action.type (constants.%Action.type.2)]
- // CHECK:STDOUT: %Self.2: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
- // CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @Action(%T.loc4_18.2) [symbolic = %Op.type (constants.%Op.type.1)]
- // CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.1) = struct_value () [symbolic = %Op (constants.%Op.1)]
- // CHECK:STDOUT: %.loc5_10.2: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.loc5_10.2 (constants.%.2)]
- // CHECK:STDOUT: %.loc5_10.3: @Action.%.loc5_10.2 (%.2) = assoc_entity element0, %Op.decl [symbolic = %.loc5_10.3 (constants.%.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: %Self.1: @Action.%Action.type (%Action.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
- // CHECK:STDOUT: %Op.decl: @Action.%Op.type (%Op.type.1) = fn_decl @Op.1 [symbolic = @Action.%Op (constants.%Op.1)] {} {}
- // CHECK:STDOUT: %.loc5_10.1: @Action.%.loc5_10.2 (%.2) = assoc_entity element0, %Op.decl [symbolic = %.loc5_10.3 (constants.%.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self.1
- // CHECK:STDOUT: .Op = %.loc5_10.1
- // CHECK:STDOUT: witness = (%Op.decl)
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl: %A.ref as %Action.type {
- // CHECK:STDOUT: %Op.decl: %Op.type.2 = fn_decl @Op.2 [template = constants.%Op.2] {} {}
- // CHECK:STDOUT: %.loc12: <witness> = interface_witness (%Op.decl) [template = constants.%.8]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Op = %Op.decl
- // CHECK:STDOUT: witness = %.loc12
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @A {
- // CHECK:STDOUT: %.loc8: <witness> = complete_type_witness %.4 [template = constants.%.5]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%A
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @B {
- // CHECK:STDOUT: %.loc9: <witness> = complete_type_witness %.4 [template = constants.%.5]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%B
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %.loc10: <witness> = complete_type_witness %.4 [template = constants.%.5]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Op.1(@Action.%T.loc4_18.1: type, @Action.%Self.1: @Action.%Action.type (%Action.type.2)) {
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn();
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Op.2() {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @F(%a: %A) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %a.ref: %A = name_ref a, %a
- // CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, file.%Action.decl [template = constants.%Action]
- // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B]
- // CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(constants.%B) [template = constants.%Action.type.3]
- // CHECK:STDOUT: %.loc16_26: %.6 = specific_constant @Action.%.loc5_10.1, @Action(constants.%B) [template = constants.%.7]
- // CHECK:STDOUT: %Op.ref: %.6 = name_ref Op, %.loc16_26 [template = constants.%.7]
- // CHECK:STDOUT: %.loc16_15: %Op.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%Op.2]
- // CHECK:STDOUT: %Op.call: init %.1 = call %.loc16_15()
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Action(constants.%T) {
- // CHECK:STDOUT: %T.loc4_18.2 => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Op.1(constants.%T, constants.%Self) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Action(@Action.%T.loc4_18.2) {
- // CHECK:STDOUT: %T.loc4_18.2 => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Action(constants.%B) {
- // CHECK:STDOUT: %T.loc4_18.2 => constants.%B
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Action.type => constants.%Action.type.3
- // CHECK:STDOUT: %Self.2 => constants.%Self
- // CHECK:STDOUT: %Op.type => constants.%Op.type.3
- // CHECK:STDOUT: %Op => constants.%Op.3
- // CHECK:STDOUT: %.loc5_10.2 => constants.%.6
- // CHECK:STDOUT: %.loc5_10.3 => constants.%.7
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Op.1(constants.%B, constants.%A) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- action.impl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %B: type = class_type @B [template]
- // CHECK:STDOUT: %.1: type = struct_type {} [template]
- // CHECK:STDOUT: %.2: <witness> = complete_type_witness %.1 [template]
- // CHECK:STDOUT: %Action.type.1: type = generic_interface_type @Action [template]
- // CHECK:STDOUT: %.3: type = tuple_type () [template]
- // CHECK:STDOUT: %Action: %Action.type.1 = struct_value () [template]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %Action.type.2: type = interface_type @Action, @Action(%T) [symbolic]
- // CHECK:STDOUT: %Self.1: @Action.%Action.type (%Action.type.2) = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %Action.type.3: type = interface_type @Action, @Action(%B) [template]
- // CHECK:STDOUT: %A: type = class_type @A [template]
- // CHECK:STDOUT: %Self.2: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1, @Action(%T) [symbolic]
- // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [symbolic]
- // CHECK:STDOUT: %.4: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic]
- // CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic]
- // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.1, @Action(%B) [template]
- // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template]
- // CHECK:STDOUT: %.6: type = assoc_entity_type %Action.type.3, %Op.type.2 [template]
- // CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.16 [template]
- // CHECK:STDOUT: %G.type: type = fn_type @G [template]
- // CHECK:STDOUT: %G: %G.type = struct_value () [template]
- // CHECK:STDOUT: %.8: type = ptr_type %.1 [template]
- // CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.17 [symbolic]
- // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.2 [template]
- // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template]
- // CHECK:STDOUT: %.10: <witness> = interface_witness (%Op.3) [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %import_ref.1: %Action.type.1 = import_ref Main//action, inst+5, loaded [template = constants.%Action]
- // CHECK:STDOUT: %import_ref.2: type = import_ref Main//action, inst+25, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.3: type = import_ref Main//action, inst+30, loaded [template = constants.%B]
- // CHECK:STDOUT: %import_ref.4 = import_ref Main//action, inst+33, unloaded
- // CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+56, unloaded
- // CHECK:STDOUT: %import_ref.6 = import_ref Main//action, inst+31, unloaded
- // CHECK:STDOUT: %import_ref.7 = import_ref Main//action, inst+11, unloaded
- // CHECK:STDOUT: %import_ref.8: @Action.%.1 (%.4) = import_ref Main//action, inst+17, loaded [symbolic = @Action.%.2 (constants.%.9)]
- // CHECK:STDOUT: %import_ref.9 = import_ref Main//action, inst+13, unloaded
- // CHECK:STDOUT: %import_ref.10 = import_ref Main//action, inst+26, unloaded
- // CHECK:STDOUT: %import_ref.11: type = import_ref Main//action, inst+36, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.12: type = import_ref Main//action, inst+39, loaded [template = constants.%Action.type.3]
- // CHECK:STDOUT: %import_ref.13: <witness> = import_ref Main//action, inst+49, loaded [template = constants.%.10]
- // CHECK:STDOUT: %import_ref.14 = import_ref Main//action, inst+42, unloaded
- // CHECK:STDOUT: %import_ref.15 = import_ref Main//action, inst+13, unloaded
- // CHECK:STDOUT: %import_ref.16 = import_ref Main//action, inst+13, unloaded
- // CHECK:STDOUT: %import_ref.17 = import_ref Main//action, inst+13, unloaded
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Action = imports.%import_ref.1
- // CHECK:STDOUT: .A = imports.%import_ref.2
- // CHECK:STDOUT: .B = imports.%import_ref.3
- // CHECK:STDOUT: .C = imports.%import_ref.4
- // CHECK:STDOUT: .F = imports.%import_ref.5
- // CHECK:STDOUT: .G = %G.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
- // CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
- // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
- // CHECK:STDOUT: %a.patt: %A = binding_pattern a
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A]
- // CHECK:STDOUT: %a.param: %A = param a, runtime_param0
- // CHECK:STDOUT: %a: %A = bind_name a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @Action(constants.%T: type) {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(%T) [symbolic = %Action.type (constants.%Action.type.2)]
- // CHECK:STDOUT: %Self: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
- // CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @Action(%T) [symbolic = %Op.type (constants.%Op.type.1)]
- // CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.1) = struct_value () [symbolic = %Op (constants.%Op.1)]
- // CHECK:STDOUT: %.1: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.1 (constants.%.4)]
- // CHECK:STDOUT: %.2: @Action.%.1 (%.4) = assoc_entity element0, imports.%import_ref.15 [symbolic = %.2 (constants.%.5)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.7
- // CHECK:STDOUT: .Op = imports.%import_ref.8
- // CHECK:STDOUT: witness = (imports.%import_ref.9)
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl: imports.%import_ref.11 as imports.%import_ref.12 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Op = imports.%import_ref.14
- // CHECK:STDOUT: witness = imports.%import_ref.13
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @B {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.6
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @A {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.10
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Op.1(constants.%T: type, constants.%Self.1: @Action.%Action.type (%Action.type.2)) {
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn();
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @G(%a: %A) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %a.ref: %A = name_ref a, %a
- // CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, imports.%import_ref.1 [template = constants.%Action]
- // CHECK:STDOUT: %B.ref: type = name_ref B, imports.%import_ref.3 [template = constants.%B]
- // CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(constants.%B) [template = constants.%Action.type.3]
- // CHECK:STDOUT: %.loc4_26: %.6 = specific_constant imports.%import_ref.8, @Action(constants.%B) [template = constants.%.7]
- // CHECK:STDOUT: %Op.ref: %.6 = name_ref Op, %.loc4_26 [template = constants.%.7]
- // CHECK:STDOUT: %.loc4_15: %Op.type.2 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3]
- // CHECK:STDOUT: %Op.call: init %.3 = call %.loc4_15()
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Op.2();
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Action(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Action(constants.%B) {
- // CHECK:STDOUT: %T => constants.%B
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Action.type => constants.%Action.type.3
- // CHECK:STDOUT: %Self => constants.%Self.2
- // CHECK:STDOUT: %Op.type => constants.%Op.type.2
- // CHECK:STDOUT: %Op => constants.%Op.2
- // CHECK:STDOUT: %.1 => constants.%.6
- // CHECK:STDOUT: %.2 => constants.%.7
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Action(@Action.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Op.1(constants.%T, constants.%Self.1) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_action.impl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %B: type = class_type @B [template]
- // CHECK:STDOUT: %.1: type = struct_type {} [template]
- // CHECK:STDOUT: %.2: <witness> = complete_type_witness %.1 [template]
- // CHECK:STDOUT: %Action.type.1: type = generic_interface_type @Action [template]
- // CHECK:STDOUT: %.3: type = tuple_type () [template]
- // CHECK:STDOUT: %Action: %Action.type.1 = struct_value () [template]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %Action.type.2: type = interface_type @Action, @Action(%T) [symbolic]
- // CHECK:STDOUT: %Self.1: @Action.%Action.type (%Action.type.2) = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %Action.type.3: type = interface_type @Action, @Action(%B) [template]
- // CHECK:STDOUT: %A: type = class_type @A [template]
- // CHECK:STDOUT: %Self.2: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %Op.type.1: type = fn_type @Op, @Action(%T) [symbolic]
- // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [symbolic]
- // CHECK:STDOUT: %.4: type = assoc_entity_type %Action.type.2, %Op.type.1 [symbolic]
- // CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic]
- // CHECK:STDOUT: %Op.type.2: type = fn_type @Op, @Action(%B) [template]
- // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template]
- // CHECK:STDOUT: %.6: type = assoc_entity_type %Action.type.3, %Op.type.2 [template]
- // CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.16 [template]
- // CHECK:STDOUT: %G.type: type = fn_type @G [template]
- // CHECK:STDOUT: %G: %G.type = struct_value () [template]
- // CHECK:STDOUT: %.8: type = ptr_type %.1 [template]
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %Action.type.4: type = interface_type @Action, @Action(%C) [template]
- // CHECK:STDOUT: %Op.type.3: type = fn_type @Op, @Action(%C) [template]
- // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template]
- // CHECK:STDOUT: %.9: type = assoc_entity_type %Action.type.4, %Op.type.3 [template]
- // CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.15 [template]
- // CHECK:STDOUT: %.11: %.4 = assoc_entity element0, imports.%import_ref.18 [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %import_ref.1: %Action.type.1 = import_ref Main//action, inst+5, loaded [template = constants.%Action]
- // CHECK:STDOUT: %import_ref.2: type = import_ref Main//action, inst+25, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.3 = import_ref Main//action, inst+30, unloaded
- // CHECK:STDOUT: %import_ref.4: type = import_ref Main//action, inst+33, loaded [template = constants.%C]
- // CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+56, unloaded
- // CHECK:STDOUT: %import_ref.6 = import_ref Main//action, inst+31, unloaded
- // CHECK:STDOUT: %import_ref.7 = import_ref Main//action, inst+11, unloaded
- // CHECK:STDOUT: %import_ref.8: @Action.%.1 (%.4) = import_ref Main//action, inst+17, loaded [symbolic = @Action.%.2 (constants.%.11)]
- // CHECK:STDOUT: %import_ref.9 = import_ref Main//action, inst+13, unloaded
- // CHECK:STDOUT: %import_ref.10 = import_ref Main//action, inst+26, unloaded
- // CHECK:STDOUT: %import_ref.11: type = import_ref Main//action, inst+36, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.12: type = import_ref Main//action, inst+39, loaded [template = constants.%Action.type.3]
- // CHECK:STDOUT: %import_ref.13 = import_ref Main//action, inst+49, unloaded
- // CHECK:STDOUT: %import_ref.14 = import_ref Main//action, inst+42, unloaded
- // CHECK:STDOUT: %import_ref.15 = import_ref Main//action, inst+13, unloaded
- // CHECK:STDOUT: %import_ref.16 = import_ref Main//action, inst+13, unloaded
- // CHECK:STDOUT: %import_ref.17 = import_ref Main//action, inst+34, unloaded
- // CHECK:STDOUT: %import_ref.18 = import_ref Main//action, inst+13, unloaded
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Action = imports.%import_ref.1
- // CHECK:STDOUT: .A = imports.%import_ref.2
- // CHECK:STDOUT: .B = imports.%import_ref.3
- // CHECK:STDOUT: .C = imports.%import_ref.4
- // CHECK:STDOUT: .F = imports.%import_ref.5
- // CHECK:STDOUT: .G = %G.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
- // CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
- // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
- // CHECK:STDOUT: %a.patt: %A = binding_pattern a
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A]
- // CHECK:STDOUT: %a.param: %A = param a, runtime_param0
- // CHECK:STDOUT: %a: %A = bind_name a, %a.param
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @Action(constants.%T: type) {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(%T) [symbolic = %Action.type (constants.%Action.type.2)]
- // CHECK:STDOUT: %Self: %Action.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
- // CHECK:STDOUT: %Op.type: type = fn_type @Op, @Action(%T) [symbolic = %Op.type (constants.%Op.type.1)]
- // CHECK:STDOUT: %Op: @Action.%Op.type (%Op.type.1) = struct_value () [symbolic = %Op (constants.%Op.1)]
- // CHECK:STDOUT: %.1: type = assoc_entity_type @Action.%Action.type (%Action.type.2), @Action.%Op.type (%Op.type.1) [symbolic = %.1 (constants.%.4)]
- // CHECK:STDOUT: %.2: @Action.%.1 (%.4) = assoc_entity element0, imports.%import_ref.15 [symbolic = %.2 (constants.%.5)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.7
- // CHECK:STDOUT: .Op = imports.%import_ref.8
- // CHECK:STDOUT: witness = (imports.%import_ref.9)
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl: imports.%import_ref.11 as imports.%import_ref.12 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Op = imports.%import_ref.14
- // CHECK:STDOUT: witness = imports.%import_ref.13
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @B {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.6
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @A {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.10
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.17
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Op(constants.%T: type, constants.%Self.1: @Action.%Action.type (%Action.type.2)) {
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn();
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @G(%a: %A) {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %a.ref: %A = name_ref a, %a
- // CHECK:STDOUT: %Action.ref: %Action.type.1 = name_ref Action, imports.%import_ref.1 [template = constants.%Action]
- // CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.4 [template = constants.%C]
- // CHECK:STDOUT: %Action.type: type = interface_type @Action, @Action(constants.%C) [template = constants.%Action.type.4]
- // CHECK:STDOUT: %.loc8: %.9 = specific_constant imports.%import_ref.8, @Action(constants.%C) [template = constants.%.10]
- // CHECK:STDOUT: %Op.ref: %.9 = name_ref Op, %.loc8 [template = constants.%.10]
- // CHECK:STDOUT: return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Action(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Action(constants.%B) {
- // CHECK:STDOUT: %T => constants.%B
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Action.type => constants.%Action.type.3
- // CHECK:STDOUT: %Self => constants.%Self.2
- // CHECK:STDOUT: %Op.type => constants.%Op.type.2
- // CHECK:STDOUT: %Op => constants.%Op.2
- // CHECK:STDOUT: %.1 => constants.%.6
- // CHECK:STDOUT: %.2 => constants.%.7
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Action(@Action.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Op(constants.%T, constants.%Self.1) {}
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Action(constants.%C) {
- // CHECK:STDOUT: %T => constants.%C
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Action.type => constants.%Action.type.4
- // CHECK:STDOUT: %Self => constants.%Self.2
- // CHECK:STDOUT: %Op.type => constants.%Op.type.3
- // CHECK:STDOUT: %Op => constants.%Op.3
- // CHECK:STDOUT: %.1 => constants.%.9
- // CHECK:STDOUT: %.2 => constants.%.10
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- factory.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %Factory.type.1: type = generic_interface_type @Factory [template]
- // CHECK:STDOUT: %.1: type = tuple_type () [template]
- // CHECK:STDOUT: %Factory: %Factory.type.1 = struct_value () [template]
- // CHECK:STDOUT: %Factory.type.2: type = interface_type @Factory, @Factory(%T) [symbolic]
- // CHECK:STDOUT: %Self: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1, @Factory(%T) [symbolic]
- // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic]
- // CHECK:STDOUT: %.2: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic]
- // CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Factory.%Make.decl [symbolic]
- // CHECK:STDOUT: %A: type = class_type @A [template]
- // CHECK:STDOUT: %.4: type = struct_type {} [template]
- // CHECK:STDOUT: %.5: <witness> = complete_type_witness %.4 [template]
- // CHECK:STDOUT: %B: type = class_type @B [template]
- // CHECK:STDOUT: %Factory.type.3: type = interface_type @Factory, @Factory(%B) [template]
- // CHECK:STDOUT: %Make.type.2: type = fn_type @Make.2 [template]
- // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template]
- // CHECK:STDOUT: %Make.type.3: type = fn_type @Make.1, @Factory(%B) [template]
- // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template]
- // CHECK:STDOUT: %.6: type = assoc_entity_type %Factory.type.3, %Make.type.3 [template]
- // CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @Factory.%Make.decl [template]
- // CHECK:STDOUT: %.8: <witness> = interface_witness (%Make.2) [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Factory = %Factory.decl
- // CHECK:STDOUT: .A = %A.decl
- // CHECK:STDOUT: .B = %B.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %Factory.decl: %Factory.type.1 = interface_decl @Factory [template = constants.%Factory] {
- // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %T.param: type = param T, runtime_param<invalid>
- // CHECK:STDOUT: %T.loc4_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_19.2 (constants.%T)]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {}
- // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {}
- // CHECK:STDOUT: impl_decl @impl [template] {} {
- // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A]
- // CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, file.%Factory.decl [template = constants.%Factory]
- // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B]
- // CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(constants.%B) [template = constants.%Factory.type.3]
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @Factory(%T.loc4_19.1: type) {
- // CHECK:STDOUT: %T.loc4_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_19.2 (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(%T.loc4_19.2) [symbolic = %Factory.type (constants.%Factory.type.2)]
- // CHECK:STDOUT: %Self.2: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
- // CHECK:STDOUT: %Make.type: type = fn_type @Make.1, @Factory(%T.loc4_19.2) [symbolic = %Make.type (constants.%Make.type.1)]
- // CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)]
- // CHECK:STDOUT: %.loc5_17.2: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.loc5_17.2 (constants.%.2)]
- // CHECK:STDOUT: %.loc5_17.3: @Factory.%.loc5_17.2 (%.2) = assoc_entity element0, %Make.decl [symbolic = %.loc5_17.3 (constants.%.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: %Self.1: @Factory.%Factory.type (%Factory.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)]
- // CHECK:STDOUT: %Make.decl: @Factory.%Make.type (%Make.type.1) = fn_decl @Make.1 [symbolic = @Factory.%Make (constants.%Make.1)] {} {
- // CHECK:STDOUT: %T.ref: type = name_ref T, @Factory.%T.loc4_19.1 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT: %return: ref @Make.1.%T (%T) = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc5_17.1: @Factory.%.loc5_17.2 (%.2) = assoc_entity element0, %Make.decl [symbolic = %.loc5_17.3 (constants.%.3)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = %Self.1
- // CHECK:STDOUT: .Make = %.loc5_17.1
- // CHECK:STDOUT: witness = (%Make.decl)
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl: %A.ref as %Factory.type {
- // CHECK:STDOUT: %Make.decl: %Make.type.2 = fn_decl @Make.2 [template = constants.%Make.2] {} {
- // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B]
- // CHECK:STDOUT: %return: ref %B = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %.loc11: <witness> = interface_witness (%Make.decl) [template = constants.%.8]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Make = %Make.decl
- // CHECK:STDOUT: witness = %.loc11
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @A {
- // CHECK:STDOUT: %.loc8: <witness> = complete_type_witness %.4 [template = constants.%.5]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%A
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @B {
- // CHECK:STDOUT: %.loc9: <witness> = complete_type_witness %.4 [template = constants.%.5]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%B
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Make.1(@Factory.%T.loc4_19.1: type, @Factory.%Self.1: @Factory.%Factory.type (%Factory.type.2)) {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn() -> @Make.1.%T (%T);
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Make.2() -> %B;
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Factory(constants.%T) {
- // CHECK:STDOUT: %T.loc4_19.2 => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Make.1(constants.%T, constants.%Self) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Factory(@Factory.%T.loc4_19.2) {
- // CHECK:STDOUT: %T.loc4_19.2 => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Factory(constants.%B) {
- // CHECK:STDOUT: %T.loc4_19.2 => constants.%B
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Factory.type => constants.%Factory.type.3
- // CHECK:STDOUT: %Self.2 => constants.%Self
- // CHECK:STDOUT: %Make.type => constants.%Make.type.3
- // CHECK:STDOUT: %Make => constants.%Make.3
- // CHECK:STDOUT: %.loc5_17.2 => constants.%.6
- // CHECK:STDOUT: %.loc5_17.3 => constants.%.7
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Make.1(constants.%B, constants.%A) {
- // CHECK:STDOUT: %T => constants.%B
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- factory.impl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %B: type = class_type @B [template]
- // CHECK:STDOUT: %.1: type = struct_type {} [template]
- // CHECK:STDOUT: %.2: <witness> = complete_type_witness %.1 [template]
- // CHECK:STDOUT: %Factory.type.1: type = generic_interface_type @Factory [template]
- // CHECK:STDOUT: %.3: type = tuple_type () [template]
- // CHECK:STDOUT: %Factory: %Factory.type.1 = struct_value () [template]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %Factory.type.2: type = interface_type @Factory, @Factory(%T) [symbolic]
- // CHECK:STDOUT: %Self.1: @Factory.%Factory.type (%Factory.type.2) = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %Factory.type.3: type = interface_type @Factory, @Factory(%B) [template]
- // CHECK:STDOUT: %A: type = class_type @A [template]
- // CHECK:STDOUT: %Self.2: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1, @Factory(%T) [symbolic]
- // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic]
- // CHECK:STDOUT: %.4: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic]
- // CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.13 [symbolic]
- // CHECK:STDOUT: %Make.type.2: type = fn_type @Make.1, @Factory(%B) [template]
- // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template]
- // CHECK:STDOUT: %.6: type = assoc_entity_type %Factory.type.3, %Make.type.2 [template]
- // CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.14 [template]
- // CHECK:STDOUT: %MakeB.type: type = fn_type @MakeB [template]
- // CHECK:STDOUT: %MakeB: %MakeB.type = struct_value () [template]
- // CHECK:STDOUT: %.8: type = ptr_type %.1 [template]
- // CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic]
- // CHECK:STDOUT: %Make.type.3: type = fn_type @Make.2 [template]
- // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template]
- // CHECK:STDOUT: %.10: <witness> = interface_witness (%Make.3) [template]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %import_ref.1: %Factory.type.1 = import_ref Main//factory, inst+5, loaded [template = constants.%Factory]
- // CHECK:STDOUT: %import_ref.2: type = import_ref Main//factory, inst+28, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.3: type = import_ref Main//factory, inst+33, loaded [template = constants.%B]
- // CHECK:STDOUT: %import_ref.4 = import_ref Main//factory, inst+34, unloaded
- // CHECK:STDOUT: %import_ref.5 = import_ref Main//factory, inst+11, unloaded
- // CHECK:STDOUT: %import_ref.6: @Factory.%.1 (%.4) = import_ref Main//factory, inst+20, loaded [symbolic = @Factory.%.2 (constants.%.9)]
- // CHECK:STDOUT: %import_ref.7 = import_ref Main//factory, inst+15, unloaded
- // CHECK:STDOUT: %import_ref.8 = import_ref Main//factory, inst+29, unloaded
- // CHECK:STDOUT: %import_ref.9: type = import_ref Main//factory, inst+36, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.10: type = import_ref Main//factory, inst+39, loaded [template = constants.%Factory.type.3]
- // CHECK:STDOUT: %import_ref.11: <witness> = import_ref Main//factory, inst+51, loaded [template = constants.%.10]
- // CHECK:STDOUT: %import_ref.12 = import_ref Main//factory, inst+44, unloaded
- // CHECK:STDOUT: %import_ref.13 = import_ref Main//factory, inst+15, unloaded
- // CHECK:STDOUT: %import_ref.14 = import_ref Main//factory, inst+15, unloaded
- // CHECK:STDOUT: %import_ref.15 = import_ref Main//factory, inst+15, unloaded
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Factory = imports.%import_ref.1
- // CHECK:STDOUT: .A = imports.%import_ref.2
- // CHECK:STDOUT: .B = imports.%import_ref.3
- // CHECK:STDOUT: .MakeB = %MakeB.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
- // CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
- // CHECK:STDOUT: %MakeB.decl: %MakeB.type = fn_decl @MakeB [template = constants.%MakeB] {
- // CHECK:STDOUT: %a.patt: %A = binding_pattern a
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A]
- // CHECK:STDOUT: %a.param: %A = param a, runtime_param0
- // CHECK:STDOUT: %a: %A = bind_name a, %a.param
- // CHECK:STDOUT: %B.ref.loc4: type = name_ref B, imports.%import_ref.3 [template = constants.%B]
- // CHECK:STDOUT: %return: ref %B = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @Factory(constants.%T: type) {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(%T) [symbolic = %Factory.type (constants.%Factory.type.2)]
- // CHECK:STDOUT: %Self: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
- // CHECK:STDOUT: %Make.type: type = fn_type @Make.1, @Factory(%T) [symbolic = %Make.type (constants.%Make.type.1)]
- // CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)]
- // CHECK:STDOUT: %.1: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.1 (constants.%.4)]
- // CHECK:STDOUT: %.2: @Factory.%.1 (%.4) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.2 (constants.%.5)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.5
- // CHECK:STDOUT: .Make = imports.%import_ref.6
- // CHECK:STDOUT: witness = (imports.%import_ref.7)
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl: imports.%import_ref.9 as imports.%import_ref.10 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Make = imports.%import_ref.12
- // CHECK:STDOUT: witness = imports.%import_ref.11
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @B {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @A {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.8
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Make.1(constants.%T: type, constants.%Self.1: @Factory.%Factory.type (%Factory.type.2)) {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn() -> @Make.1.%T (%T);
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @MakeB(%a: %A) -> %return: %B {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %a.ref: %A = name_ref a, %a
- // CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory]
- // CHECK:STDOUT: %B.ref.loc5: type = name_ref B, imports.%import_ref.3 [template = constants.%B]
- // CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(constants.%B) [template = constants.%Factory.type.3]
- // CHECK:STDOUT: %.loc5_23: %.6 = specific_constant imports.%import_ref.6, @Factory(constants.%B) [template = constants.%.7]
- // CHECK:STDOUT: %Make.ref: %.6 = name_ref Make, %.loc5_23 [template = constants.%.7]
- // CHECK:STDOUT: %.loc5_11: %Make.type.2 = interface_witness_access constants.%.10, element0 [template = constants.%Make.3]
- // CHECK:STDOUT: %.loc4: ref %B = splice_block %return {}
- // CHECK:STDOUT: %Make.call: init %B = call %.loc5_11() to %.loc4
- // CHECK:STDOUT: return %Make.call to %return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @Make.2() -> %B;
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Factory(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Factory(constants.%B) {
- // CHECK:STDOUT: %T => constants.%B
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Factory.type => constants.%Factory.type.3
- // CHECK:STDOUT: %Self => constants.%Self.2
- // CHECK:STDOUT: %Make.type => constants.%Make.type.2
- // CHECK:STDOUT: %Make => constants.%Make.2
- // CHECK:STDOUT: %.1 => constants.%.6
- // CHECK:STDOUT: %.2 => constants.%.7
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Factory(@Factory.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Make.1(constants.%T, constants.%Self.1) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: --- fail_factory.impl.carbon
- // CHECK:STDOUT:
- // CHECK:STDOUT: constants {
- // CHECK:STDOUT: %B: type = class_type @B [template]
- // CHECK:STDOUT: %.1: type = struct_type {} [template]
- // CHECK:STDOUT: %.2: <witness> = complete_type_witness %.1 [template]
- // CHECK:STDOUT: %Factory.type.1: type = generic_interface_type @Factory [template]
- // CHECK:STDOUT: %.3: type = tuple_type () [template]
- // CHECK:STDOUT: %Factory: %Factory.type.1 = struct_value () [template]
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
- // CHECK:STDOUT: %Factory.type.2: type = interface_type @Factory, @Factory(%T) [symbolic]
- // CHECK:STDOUT: %Self.1: @Factory.%Factory.type (%Factory.type.2) = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %Factory.type.3: type = interface_type @Factory, @Factory(%B) [template]
- // CHECK:STDOUT: %A: type = class_type @A [template]
- // CHECK:STDOUT: %Self.2: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic]
- // CHECK:STDOUT: %Make.type.1: type = fn_type @Make, @Factory(%T) [symbolic]
- // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [symbolic]
- // CHECK:STDOUT: %.4: type = assoc_entity_type %Factory.type.2, %Make.type.1 [symbolic]
- // CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.13 [symbolic]
- // CHECK:STDOUT: %Make.type.2: type = fn_type @Make, @Factory(%B) [template]
- // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template]
- // CHECK:STDOUT: %.6: type = assoc_entity_type %Factory.type.3, %Make.type.2 [template]
- // CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.14 [template]
- // CHECK:STDOUT: %C: type = class_type @C [template]
- // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template]
- // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template]
- // CHECK:STDOUT: %.8: type = ptr_type %.1 [template]
- // CHECK:STDOUT: %Factory.type.4: type = interface_type @Factory, @Factory(%C) [template]
- // CHECK:STDOUT: %Make.type.3: type = fn_type @Make, @Factory(%C) [template]
- // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template]
- // CHECK:STDOUT: %.9: type = assoc_entity_type %Factory.type.4, %Make.type.3 [template]
- // CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.13 [template]
- // CHECK:STDOUT: %.11: %.4 = assoc_entity element0, imports.%import_ref.15 [symbolic]
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: imports {
- // CHECK:STDOUT: %import_ref.1: %Factory.type.1 = import_ref Main//factory, inst+5, loaded [template = constants.%Factory]
- // CHECK:STDOUT: %import_ref.2: type = import_ref Main//factory, inst+28, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.3 = import_ref Main//factory, inst+33, unloaded
- // CHECK:STDOUT: %import_ref.4 = import_ref Main//factory, inst+34, unloaded
- // CHECK:STDOUT: %import_ref.5 = import_ref Main//factory, inst+11, unloaded
- // CHECK:STDOUT: %import_ref.6: @Factory.%.1 (%.4) = import_ref Main//factory, inst+20, loaded [symbolic = @Factory.%.2 (constants.%.11)]
- // CHECK:STDOUT: %import_ref.7 = import_ref Main//factory, inst+15, unloaded
- // CHECK:STDOUT: %import_ref.8 = import_ref Main//factory, inst+29, unloaded
- // CHECK:STDOUT: %import_ref.9: type = import_ref Main//factory, inst+36, loaded [template = constants.%A]
- // CHECK:STDOUT: %import_ref.10: type = import_ref Main//factory, inst+39, loaded [template = constants.%Factory.type.3]
- // CHECK:STDOUT: %import_ref.11 = import_ref Main//factory, inst+51, unloaded
- // CHECK:STDOUT: %import_ref.12 = import_ref Main//factory, inst+44, unloaded
- // CHECK:STDOUT: %import_ref.13 = import_ref Main//factory, inst+15, unloaded
- // CHECK:STDOUT: %import_ref.14 = import_ref Main//factory, inst+15, unloaded
- // CHECK:STDOUT: %import_ref.15 = import_ref Main//factory, inst+15, unloaded
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: file {
- // CHECK:STDOUT: package: <namespace> = namespace [template] {
- // CHECK:STDOUT: .Factory = imports.%import_ref.1
- // CHECK:STDOUT: .A = imports.%import_ref.2
- // CHECK:STDOUT: .B = imports.%import_ref.3
- // CHECK:STDOUT: .C = %C.decl
- // CHECK:STDOUT: .MakeC = %MakeC.decl
- // CHECK:STDOUT: }
- // CHECK:STDOUT: %default.import.loc2_6.1 = import <invalid>
- // CHECK:STDOUT: %default.import.loc2_6.2 = import <invalid>
- // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {}
- // CHECK:STDOUT: %MakeC.decl: %MakeC.type = fn_decl @MakeC [template = constants.%MakeC] {
- // CHECK:STDOUT: %a.patt: %A = binding_pattern a
- // CHECK:STDOUT: } {
- // CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A]
- // CHECK:STDOUT: %a.param: %A = param a, runtime_param0
- // CHECK:STDOUT: %a: %A = bind_name a, %a.param
- // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %return: ref %C = var <return slot>
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic interface @Factory(constants.%T: type) {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(%T) [symbolic = %Factory.type (constants.%Factory.type.2)]
- // CHECK:STDOUT: %Self: %Factory.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)]
- // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Factory(%T) [symbolic = %Make.type (constants.%Make.type.1)]
- // CHECK:STDOUT: %Make: @Factory.%Make.type (%Make.type.1) = struct_value () [symbolic = %Make (constants.%Make.1)]
- // CHECK:STDOUT: %.1: type = assoc_entity_type @Factory.%Factory.type (%Factory.type.2), @Factory.%Make.type (%Make.type.1) [symbolic = %.1 (constants.%.4)]
- // CHECK:STDOUT: %.2: @Factory.%.1 (%.4) = assoc_entity element0, imports.%import_ref.13 [symbolic = %.2 (constants.%.5)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: interface {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.5
- // CHECK:STDOUT: .Make = imports.%import_ref.6
- // CHECK:STDOUT: witness = (imports.%import_ref.7)
- // CHECK:STDOUT: }
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: impl @impl: imports.%import_ref.9 as imports.%import_ref.10 {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Make = imports.%import_ref.12
- // CHECK:STDOUT: witness = imports.%import_ref.11
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @B {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.4
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @A {
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = imports.%import_ref.8
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: class @C {
- // CHECK:STDOUT: %.loc4: <witness> = complete_type_witness %.1 [template = constants.%.2]
- // CHECK:STDOUT:
- // CHECK:STDOUT: !members:
- // CHECK:STDOUT: .Self = constants.%C
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: generic fn @Make(constants.%T: type, constants.%Self.1: @Factory.%Factory.type (%Factory.type.2)) {
- // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn() -> @Make.%T (%T);
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: fn @MakeC(%a: %A) -> %return: %C {
- // CHECK:STDOUT: !entry:
- // CHECK:STDOUT: %a.ref: %A = name_ref a, %a
- // CHECK:STDOUT: %Factory.ref: %Factory.type.1 = name_ref Factory, imports.%import_ref.1 [template = constants.%Factory]
- // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [template = constants.%C]
- // CHECK:STDOUT: %Factory.type: type = interface_type @Factory, @Factory(constants.%C) [template = constants.%Factory.type.4]
- // CHECK:STDOUT: %.loc10: %.9 = specific_constant imports.%import_ref.6, @Factory(constants.%C) [template = constants.%.10]
- // CHECK:STDOUT: %Make.ref: %.9 = name_ref Make, %.loc10 [template = constants.%.10]
- // CHECK:STDOUT: return <error> to %return
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Factory(constants.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Factory(constants.%B) {
- // CHECK:STDOUT: %T => constants.%B
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Factory.type => constants.%Factory.type.3
- // CHECK:STDOUT: %Self => constants.%Self.2
- // CHECK:STDOUT: %Make.type => constants.%Make.type.2
- // CHECK:STDOUT: %Make => constants.%Make.2
- // CHECK:STDOUT: %.1 => constants.%.6
- // CHECK:STDOUT: %.2 => constants.%.7
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Factory(@Factory.%T) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Make(constants.%T, constants.%Self.1) {
- // CHECK:STDOUT: %T => constants.%T
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
- // CHECK:STDOUT: specific @Factory(constants.%C) {
- // CHECK:STDOUT: %T => constants.%C
- // CHECK:STDOUT:
- // CHECK:STDOUT: !definition:
- // CHECK:STDOUT: %Factory.type => constants.%Factory.type.4
- // CHECK:STDOUT: %Self => constants.%Self.2
- // CHECK:STDOUT: %Make.type => constants.%Make.type.3
- // CHECK:STDOUT: %Make => constants.%Make.3
- // CHECK:STDOUT: %.1 => constants.%.9
- // CHECK:STDOUT: %.2 => constants.%.10
- // CHECK:STDOUT: }
- // CHECK:STDOUT:
|